README 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. Web Service Test Suite
  2. ----------------------
  3. This directory contains a test suite for testing Web Services. It tests:
  4. * Proxy generation using the wsdl tool
  5. * Access to web services using the generated client proxies
  6. * Execution of web services in the server
  7. This suite not only tests web services running on XSP, but it can also test
  8. services running on other platforms and that are available in internet. This
  9. will help track down interoperability issues.
  10. To build the test suite, just run:
  11. > xsp --nonstop --root server &
  12. > make
  13. This will download the wsdl documents, generate the proxies, build a dll with
  14. the proxies, and build the nunit tests. Then you can use nunit-console or
  15. gnunit to run the tests (the nunit dll is testclient.dll).
  16. Which services are tested?
  17. --------------------------
  18. The file services.xml contains the list of services to test. There is an
  19. xml element for each web service with the following structure:
  20. <service>
  21. <wsdl>url</wsdl> // url to the wsdl document
  22. <name>name</name> // name of the service
  23. <protocols> // List of protocols for which to
  24. <protocol>Soap</protocol> // generate a proxy
  25. <protocol>HttpGet</protocol>
  26. <protocol>HttpPost</protocol>
  27. </protocols>
  28. <clientTest>true</clientTest> // True if there is a nunit test
  29. </service> // for the service
  30. Notice that not all web services will have a corresponding nunit test, since
  31. such test is not allways possible. However, proxy generation will be tested
  32. for all of them.
  33. You can manually add new services to the list or use the wstest tool to add
  34. a list of references included in a DISCO document. For example:
  35. > ./wstest ur <url> <ignore-file>
  36. This will download the DISCO document from the provided <url> and add an entry
  37. for each service referenced in the document. The second parameter is optional,
  38. it is a file that contains a list of wsdl urls that should be ignored from the
  39. document.
  40. The current Makefile downloads references from the following locations:
  41. * http://www.xmethods.net/default.disco
  42. * http://localhost:8080/xsp.disco
  43. Creating a new nunit test
  44. -------------------------
  45. To test services running in XSP, just add the asmx file in the "server"
  46. directory and update the xsp.disco file in there. Then run "make".
  47. To create a nunit test for a web service already registered, just run:
  48. > ./wstest gc <url>
  49. Where url is the URL of the service's WSDL document. This will generate a class
  50. in the "client" directory with a basic structure. You should then manually
  51. implement the test.
  52. Other useful targets in of the makefile
  53. ---------------------------------------
  54. make update: Updates the services.xml list with the references from
  55. http://www.xmethods.net/default.disco and
  56. http://localhost:8080/xsp.disco
  57. make gen: Generates proxies for new service references.
  58. make regen: Regenerates all proxies
  59. make cls: Removes obsolete proxies and tests.
  60. make proxies: Builds the proxy library.
  61. make tests: Builds the nunit library.
  62. make tools: Builds wstest.