| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- Web Service Test Suite
- ----------------------
- This directory contains a test suite for testing Web Services. It tests:
- * Proxy generation using the wsdl tool
- * Access to web services using the generated client proxies
- * Execution of web services in the server
- This suite not only tests web services running on XSP, but it can also test
- services running on other platforms and that are available in internet. This
- will help track down interoperability issues.
- To build the test suite, just run:
- > xsp --nonstop --root server &
- > make
- This will download the wsdl documents, generate the proxies, build a dll with
- the proxies, and build the nunit tests. Then you can use nunit-console or
- gnunit to run the tests (the nunit dll is testclient.dll).
- Which services are tested?
- --------------------------
- The file services.xml contains the list of services to test. There is an
- xml element for each web service with the following structure:
- <service>
- <wsdl>url</wsdl> // url to the wsdl document
- <name>name</name> // name of the service
- <protocols> // List of protocols for which to
- <protocol>Soap</protocol> // generate a proxy
- <protocol>HttpGet</protocol>
- <protocol>HttpPost</protocol>
- </protocols>
- <clientTest>true</clientTest> // True if there is a nunit test
- </service> // for the service
- Notice that not all web services will have a corresponding nunit test, since
- such test is not allways possible. However, proxy generation will be tested
- for all of them.
- You can manually add new services to the list or use the wstest tool to add
- a list of references included in a DISCO document. For example:
- > ./wstest ur <url> <ignore-file>
- This will download the DISCO document from the provided <url> and add an entry
- for each service referenced in the document. The second parameter is optional,
- it is a file that contains a list of wsdl urls that should be ignored from the
- document.
- The current Makefile downloads references from the following locations:
- * http://www.xmethods.net/default.disco
- * http://localhost:8080/xsp.disco
- Creating a new nunit test
- -------------------------
- To test services running in XSP, just add the asmx file in the "server"
- directory and update the xsp.disco file in there. Then run "make".
- To create a nunit test for a web service already registered, just run:
- > ./wstest gc <url>
- Where url is the URL of the service's WSDL document. This will generate a class
- in the "client" directory with a basic structure. You should then manually
- implement the test.
- Other useful targets in of the makefile
- ---------------------------------------
- make update: Updates the services.xml list with the references from
- http://www.xmethods.net/default.disco and
- http://localhost:8080/xsp.disco
-
- make gen: Generates proxies for new service references.
- make regen: Regenerates all proxies
- make cls: Removes obsolete proxies and tests.
- make proxies: Builds the proxy library.
- make tests: Builds the nunit library.
- make tools: Builds wstest.
|