views:

62

answers:

4

I came across this question recently, could anyone please help me what should be my approach as a tester.

Suppose, there is a webservice whose functionality have been changed and there is no documentation available of the same. What will be your approach to test the same?

Update: Does the same answer hold if Database functionality changed and no documentation.

+2  A: 

You can't test something with no documentation. How would you know what results to expect?


Maybe you're looking for "documentation" in the wrong place. Somebody made these changes. They had some information telling them what changes to make to the database and to the service. There may even be a requirements document, but maybe also some design documents.

Get those, and use them to figure out what changed. Use that information to decide how to change your tests.

John Saunders
You can guess?!? Why not just say "yeah, it's fine, ship it"? That would save you the trouble of actually testing anything. Or you could say "no, we can't pass this unless you provide documentation." As a customer, I know which I'd prefer that you do.
kdgregory
It is my bad...so deleted early comment...As the functionality changed little bit, so I think we can at least hit the web service and check the earlier functionality is working or not, if not then our existing test cases will fail and we need to debug the code.
Pritam Karmakar
A: 

Generally speaking, a web service provides a consistent contract between the providing service and callers. It specifies that whilst the back-end implementation might change, the interface for the service will remain consistent.

If you are interested in discovering what functions are available for the service, it may well provide metadata that documents it's available functions and message types. Usually, this is accessible by appending "?wsdl" to the web service URL, although other schemes exist.

Once you have a good idea of the available functions, you can begin to invoke them through your testing framework and evaluating the responses in accordance with your usual test processes.

Gareth Saul
I bet his usual test processes say things like, "if I pass it a 'one', it should return 'two'". It seems he doesn't even know that much about the changes in the service.
John Saunders
+1  A: 

If you are using the service in a useful way, then presumably you have some calls which return some known results, even though this may not be documented. If this is the case then I would write tests which validate my expectations of the service as it is currently. Then at least if changes are made you'll have more chance of knowing which bits have changed that affect you.

Sam Holder
+1  A: 

It seems you might be asking one of two different questions:

1) How to discover the API of a black-box web service.
In this case, the best source would be the source of the web-service (with the existence failure of the documentation), alternatively look at existing clients, or the ?wsdl of the service.

2) How to discover what are correct and incorrect responses from the web service.
For this you need either requirements, or documentation, or correct clients. Probably the most likely to exist in this case is a client. Alternatively the web-service might be implementing some function the results of which can be confirmed externally.

Douglas Leeder