If a request is changed to POST, then SoapUI chang

2020-04-12 09:35发布

问题:

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.

回答1:

You can create multiple methods under the same endpoint - this is what REST is designed to do!

Under your "Api" resource, right-click, and select "New Method". Select this new one to be of type GET. This is going to be your "CheckingResponse". So the final hierarchy for your endpoint will look like:

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


回答2:

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



标签: rest soapui