开发者

How to Test an Undocumented Web Service?

开发者 https://www.devze.com 2022-12-16 01:45 出处:网络
I came across this question recently, could anyone please help me what should be my approach as a tester.

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 functionalit开发者_StackOverflow社区y changed and no documentation.


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.


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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号