如何测试未记录的 Web 服务?

发布于 2024-08-17 21:01:38 字数 153 浏览 7 评论 0原文

我最近遇到这个问题,有人可以帮助我作为测试人员应该采取什么方法吗?

假设有一个 Web 服务的功能已更改,并且没有可用的文档。您将采用什么方法来测试相同的内容?

更新:如果数据库功能发生更改并且没有文档,相同的答案是否成立。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

葬シ愛 2024-08-24 21:01:38

您似乎可能会问两个不同的问题之一:

1) 如何发现黑盒 Web 服务的 API。
在这种情况下,最好的来源是 Web 服务的来源(文档存在故障),或者查看现有客户端或服务的 ?wsdl。

2) 如何发现网络服务的正确响应和错误响应。
为此,您需要需求、文档或正确的客户端。在这种情况下最有可能存在的是客户。或者,网络服务可能正在实现某些功能,其结果可以从外部确认。

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.

一萌ing 2024-08-24 21:01:38

没有文档就无法测试某些东西。您如何知道预期的结果是什么?


也许您在错误的地方寻找“文档”。有人做出了这些改变。他们有一些信息告诉他们要对数据库和服务进行哪些更改。甚至可能有需求文档,但也可能有一些设计文档。

获取这些,并使用它们来找出发生了什么变化。使用该信息来决定如何更改您的测试。

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.

一张白纸 2024-08-24 21:01:38

如果您以有用的方式使用该服务,那么可能您有一些调用会返回一些已知的结果,即使这可能没有记录在案。如果是这种情况,那么我会编写测试来验证我对当前服务的期望。那么至少如果进行了更改,您将有更多机会知道哪些部分发生了影响您的更改。

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.

|煩躁 2024-08-24 21:01:38

一般来说,Web 服务在提供服务和调用者之间提供一致的契约。它指定虽然后端实现可能会发生变化,但服务的接口将保持一致。

如果您有兴趣发现该服务可以使用哪些功能,它很可能会提供记录其可用功能和消息类型的元数据。通常,可以通过将“?wsdl”附加到 Web 服务 URL 来访问,但也存在其他方案。

一旦您很好地了解了可用的功能,您就可以开始通过测试框架调用它们,并根据您通常的测试流程评估响应。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文