If a request is changed to POST, then SoapUI changing all other requests into POST method

橙三吉。 提交于 2019-12-20 03:19:50

问题


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



来源:https://stackoverflow.com/questions/34786729/if-a-request-is-changed-to-post-then-soapui-changing-all-other-requests-into-po

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