如果请求更改为POST,则SoapUI将所有其他请求更改为POST方法(If a request is changed to POST, then SoapUI changing all other requests into POST method)

一个测试用例包含2个请求和1个groovy脚本。

现在第一个请求使用POST方法,第二个请求使用GET方法。

现在我面临一个问题,如果我将第二个请求更改为GET ,我的第一个请求也会变为GET请求,而我需要1ST请求保留为POST 。

如何处理这种情况?

我是Soap UI新成员。 任何建议都会有帮助。

A testcase contains 2 requests and 1 groovy script.

Now 1st request is using POST method and 2nd request is using GET method.

Now I am facing an issue that If I am changing the 2nd request as GET, my 1st request also gets turned into GET request while I need 1ST Request to remain as POST.

How to handle this situation?

I am new in Soap UI. any suggestion will be helpful.

最满意答案

您可以在同一端点下创建多个方法 - 这就是REST的设计目的!

在您的“Api”资源下,右键单击并选择“新建方法”。 选择这个新的类型为GET。 这将是你的“CheckingResponse”。 因此,端点的最终层次结构如下所示:

REST Project 1 +-[REST] http://endpoint.URL/... +-Api [] <--- THIS IS A RESOURCE +-[POST] Api <--- THIS IS YOUR CURRENT METHOD | +-3LevelProducts +-[GET] Api <--- THIS IS A NEW METHOD +-CheckingResponse

Refer my answer here:-

http://stackoverflow.com/questions/34786729/if-a-request-is-changed-to-post-then-soapui-changing-all-other-requests-into-po/34831359#34831359

there I have described a full example to achieve the issue

更多推荐