简体   繁体   English

Web服务的测试策略

[英]Test strategy for Web Services

I have been asked to devise a strategy to a REST web services suite my company is developing. 我被要求为我公司正在开发的REST Web服务套件设计一种策略。 These services are primarily intended to share with vendors to aid in their integration. 这些服务主要旨在与供应商共享以帮助其集成。

So far, what I know about the services are that these are XML based REST services that would end up converting java objects to XMLs. 到目前为止,我对服务的了解是,这些都是基于XML的REST服务,最终会将Java对象转换为XML。 Given that, I am looking at various ways to test the output of such services. 鉴于此,我正在寻找各种方法来测试此类服务的输出。

So far, these are the options I am looking into - 到目前为止,这些是我正在寻找的选项-

  • verify each XML node to make sure data is good. 验证每个XML节点以确保数据正确。
  • write JUnit testcases to reconvert the XMLs back into java objects and verify selective properties 编写JUnit测试用例以将XML重新转换回Java对象并验证选择性属性

As for the tools, I have heard SoapUI is a good option to write Web service clients. 至于工具,我听说SoapUI是编写Web服务客户端的好选择。

But my main concern is how to make sure the data integrity is testable in case of web services. 但是我主要关心的是如何确保在Web服务的情况下数据完整性是可测试的。 If there was a UI based applicatio, things would be simpler. 如果有基于UI的应用程序,那么事情会更简单。 :( :(

I am keen to understand how others have tackled such requirement. 我很想了解其他人如何解决这种要求。 - Automation tools, intelligent parsing of output .. .. ? -自动化工具,智能分析输出.. ..?

On our project we have used SoapUi to test services with good results. 在我们的项目中,我们使用SoapUi来测试服务并获得良好的结果。 It has useful response assertions that you can use to examine the received XML. 它具有有用的响应断言,可用于检查收到的XML。 Also provides some load / performance testing options. 还提供了一些负载/性能测试选项。 Try and get some clarity beforehand on whether the services are actually going to return objects serialized as XML or Json. 事先尝试弄清楚服务是否实际上将返回序列化为XML或Json的对象。 This will affect your decision. 这会影响您的决定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM