大多数情况下,API自动化常常与soapui一起使用 [英] API automation groovy soapui all together for most

查看:130
本文介绍了大多数情况下,API自动化常常与soapui一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在必须测试REST API,如何执行以及如何获得最终一致性报告时,需要做什么自动化处理,对于具有所有API测试报告详细信息的Excel工作簿非常有用。



输入文件可以是一个excel工作簿或XML文件,比如我们说excel具有API详细信息。



主要问题我在比较输入预期和响应有效负载时面临的问题,请考虑将其视为JSON,并因此决定是否应声明测试通过/失败。



在答案部分,将上传开发的脚本以执行大部分自动操作,在我看这里的JSON。

解决方案


  • 我在比较预期输入和响应负载时遇到的问题 - 您是否尝试过使用 zerocode休息测试库?
    您可以将JSON复制粘贴测试用例的请求响应中,然后框架负责比较 asserting ..
    和/或您可以将它们放置/组织到 src / test / resources 中,并从测试用例中指出它们(JUnit或套房)。然后,框架使用 apache HttpClient 来处理终点调用,也可以选择用你自己的方式覆盖HttpClient (如果你需要的话)。


  • 如何获得最终一致性报告,非常适合具有所有API测试报告细节的Excel工作簿 - 它以表格excel格式生成报告,并在最后一列 中显示 PASS / FAIL 结果(请参阅此处的示例报告)每个运行时间戳的目标文件夹。您还可以获得 Spike交互式报告,统计哪些API需要多少时间(以毫秒为单位)。 将鼠标悬停在单个尖峰上以列出详细信息。 strong>测试日志一节此处了解更多详情。


  • Beauty不需要额外的代码,而不是您的请求/响应JSON

  • 希望这有助于: - )


    What automation to do when have to test REST APIs, how to do, and how to get final conformance report, great to be in excel workbook having all API's test report detail.

    Input file can be an excel workbook or XML file, let's say excel having APIs detail.

    Main problem I am facing in comparing input expected and response payload, please consider it as JSON and as a result decision should be taken stating test PASS/FAIL.

    In answer section going to upload developed scripts to do most of the automation except conformance over JSON, which I am looking here.

    解决方案

    • "problem I am facing in comparing input expected and response payload" - Have you tried using zerocode rest test library ? You can copy paste the JSON into the request response of the test case and then the framework takes care of comparing and asserting.. And/Or You can place/organize them in the src/test/resources and point them from your test cases(JUnit or Suite). Frameworks then takes care of end point invocation using apache HttpClient, also optionally you can override the HttpClient in your way(if you need).

    • "how to get final conformance report, great to be in excel workbook having all API's test report detail" - It generates report in the tabular excel format with result PASS/FAIL in the last column(See here sample report) in to the target folder for every run with timestamped. Also you get a Spike Interactive Report with statistics of which API took how much time(in mili second). Hover the mouse on the individual spike to list the details.

    • See the Test Report and Test Log section here for more details.

    • Beauty is no extra code is needed other than your request/response JSON

    Hope this helps :-)

    这篇关于大多数情况下,API自动化常常与soapui一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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