How to unit test web services

I read an article in Dr Dobbs how to go about writing a unit client to test web services and i agree with the essence of the same.

  1. create a test for each new service behavior
  2. the tests should also validate error-handling characteristics
  3. validate behaviors that are difficult to test manually, for example service connection timeout can be tested with sleep for timeout interval
  4. create multiple client connections side by side working with the web service from same thread
  5. calling web service methods asynchronously, may be even from multiple threads
  6. measure performance of web service method calls
  7. stress test; for example keep sending large amount of data
Advertisements