Search code examples
soapuitestcase

Endpoint as variable in SoapUI 5 pro


I'm struggling with creating following test case:

  1. GET /businesses - returns list of all businesses in the system
  2. GET /businesses/{bussinessID}/messages - returns all messages for particular business. Where {bussinessID} - id of one of the businesses from the first step

I'm wondering if I can achieve this and determine endpoint as a variable and send value of endpoint using property transfer or something like that?


Solution

  • You could use a dynamic property directly in the requests template parameter {bussinessID}.

    ${x#ResponseAsXml#y}
    

    Where x = the test step name of the call you want to reference and y = xpath that specifies the node value you want to pull.