Is there an advantage in using SOAP UI over REST-assured to automate REST Services for CI

怎甘沉沦 提交于 2020-01-14 19:21:32

问题


I have to automate REST API testing in my project and integrate it in to existing CI in jenkins.

I am about to start coding using REST-assured.However I happened to see SOAP UI REST tutorial and understand that there is a maven plugin in SOAP UI to help jenkins integration. Before I progress, just wanted to know if there is an obvious advantage to using SOAP UI over Rest-assured. I have to complete the automation of around 30 requests with complex JSON responses in about a month - including schema validation for responses.


回答1:


I haven't used REST-assured, but I had a quick look and I see it's a java DSL for testing rest services. Given that it does what it says it does, here's my answer...

I've used SOAP UI for testing of web services. Generally, SOAP UI has been very good for manual testing, but I found it difficult for automated testing.

The main reason was that many of the file paths are hard corded into SOAP UI projects, and so a project referring to c:\development\myproject\wsdl\myservice.wsdl would suddenly not work on another developer machine at /dev/myproject/wsdl/myservice.wsdl.

I also found not being able to effectively edit the SOAP UI projects in intellij meant I was constantly alt-tabbing.

Yes, the soap ui maven plugin did work, but I found it cumbersome.

Note that I haven't used SOAP UI REST, just "normal" SOAP UI, but if your use case is purely to implement automated testing, and that the REST-assured framework does what it says, I would certainly recommend to use the DSL.




回答2:


Given your current use case, the simplest among the 2 would be to use rest assured (+points to java dsl; bonus readability for testing; but you can always use other clients if you want to). Given that you intend to automate your test and integrate it on CI, you can simply create a module which runs your test suite on a given phase and gather the results.

PS: i currently use jbehave + rest-assured



来源:https://stackoverflow.com/questions/37646402/is-there-an-advantage-in-using-soap-ui-over-rest-assured-to-automate-rest-servic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!