自动化测试网络服务 [英] Automation Testing web services

查看:29
本文介绍了自动化测试网络服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为 Midtier 团队工作 &我一直在使用 SOAP UI 手动测试 Web 服务.我的任务是让回归测试用例自动化.我们现在没有任何自动化团队&因此,我可以完全自由地使用我想要的任何工具 &让我的经理知道哪种工具适合......但我还没有学习自动化测试.任何人都对哪个将成为自动化测试 Midtier 的好工具有任何建议?我们有许多服务,可以使用 SAP 中的结果来验证结果.例如,如果我在 Midtier 中测试某个商品的价格,我应该检查返回的价格是否与 SAP 中的价格匹配.我一直在手动执行此操作,在登录 SAP 时转到提供的事务代码 &检查该项目的价格,有人能想到我可以处理这种情况的任何好的自动化测试工具吗?

I work for a Midtier team & I've been pretty much testing web services Manually using SOAP UI. I got a task of getting the regression testcase to be Automated. We dont have any Automation team right now & hence I am given the full freedom of using whatever tool I want to & let my manager know which tool fits well..But I am yet to learn Automation Testing. Anyone any suggestions about which will be a good tool for Automation testing Midtier? We have many services where we validate the results with the results in SAP. For example if I am testing the price for an item in Midtier, I should go check if the price returned matches the price in SAP. Ive been doing this manually where I login to SAP go to the provided transaction code & checking the price for that item, can someone think of any good Automation Testing tool where I can handle this kind of situation?

推荐答案

我正在处理类似的请求.由于客户已经使用 soapUI (OS) 自动化了一些服务,我的工作有点困难.

I am working through a similar request. As the client already has automated some of the servies using soapUI (OS) my job is a little harder.

操作系统版本没有数据源、数据循环测试步骤来制作数据驱动的测试套件,但总有解决办法.

The OS version doesn't have the data source, data loop test steps to make a data driven test suite but there is always a work around.

您甚至可以使用开源版本来实现三种流行的自动化框架.

You can use even the Open Source version to implement the three kinds of prevalent automation frameworks.

  1. Action Driven framework - 要将这个框架应用到soapUI,您必须确定服务设置、执行和验证中的一些常见测试步骤.确定后,将它们分离到测试套件和/或测试用例中,然后简单地调用适当的测试套件/测试步骤.

  1. Action Driven framework - To apply this framework to soapUI you have to identify some common test steps in the setup, execution and validation of the service. Once identified, separate them out in a test suite and/or test cases and simply call the appropriate test suite/test step.

例如:我有一个测试步骤,验证服务已在数据库中创建订单条目,因此我将创建一个测试套件 + 测试用例,并在其中添加一个 jdbc 测试步骤以根据我提供的数据搜索订单 ID.查询将被参数化.在实际脚本中,我将执行服务并提取运行 db 查询所需的所有值.这些值将使用运行测试测试步骤传递给可重用的测试用例.

For example: I have a test step that validated that an order entry has been made in the db by the service so i'll create a test suite + test case and add a jdbc test step in there to search for order id based on the data i supply. The query will be parameterized. In the actual script, i'll execute the service and extract all the values necessary to run the db query. These values will be passed to the reusable test case using the run test test step.

要记住的一些事情是,如果您有大量测试用例/参数并认为需要修改服务,则将参数放入一个 excel 文件中,并使用测试套件设置脚本中的 groovy 加载它们区域.

A few things to remember, is if you have a large number of test cases/parameters and think that the service will need to be modified then put the parameters in an excel file and load them using groovy from the test suite setup script area.

您需要 scriptom api 才能使用 excel 或 Jxl(实现稍微复杂一点)

You'll need scriptom api to work with excel or Jxl (a little more complicated implementation)

数据驱动框架,在这个框架中,您基本上确定要在服务上运行的不同场景,并使用相关数据填充 excel,然后使用 groovy 和 scriptom 或 jexcel 或 jxl api 循环遍历所有行excel 并使用不同的数据元素执行服务.这种方法可以随心所欲地复杂化,也可以随心所欲地简单化.

Data Driven framework, in this framework you basically identify different scenario that you want to run on the service and populate an excel with relevant data, then using groovy and scriptom or jexcel or jxl api loop through all the rows in the excel and execute the service with different data elements. This approach can be made as complex as you like and as simple as you want.

关键字驱动的框架 - 这可能是最复杂的框架,因为它需要您进行大量的规划、开发等工作.我目前正在设计这样一个框架.如果没有保密协议,我会与您分享一些细节.

Keyword driven framework - this is probably the most complex frameworks of all to implement as it requres you to do a lot of planning, development and such. I am currently designing such a framework. I would have shared some details with you if there weren't confidentiality agreements in place.

我也知道您是 groovy 的新手,您应该查看 soapUI 和 groovy 的网站,他们有很多非常好的示例,并记住总是有 stackoverflow 来回答您的查询.

I also understand that you are new to groovy, you should check out soapUI and groovy's site they have a lot of really good examples and remember there is always stackoverflow to answer your queries.

让我知道你如何完成这项工作.

Let me know how you make out with this effort.

这篇关于自动化测试网络服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆