Is there a way to read data from excel and set global variable in SOAP UI and send those global variable?



  • Is there a way to read data from excel set global variable in SOAP UI and send those global variable in request payload and how to call multiple rest services?



  • Absolutely. You can use a Groovy test script. Use Apache-POI to read the spreadsheet, and store values in SoapUI properties, e.g.:

    testRunner.testCase.setPropertyValue("MyProperty", "MyValue")
    

    Then, in the XML request, parameterise it with:

    <SomeNode>${#TestCase#MyPropName}</SomeNode>
    

    You can have your Groovy test script loop over the spreadsheet and call e.g. a test case for each record:

    def soapTestStep = testRunner.testCase.getTestStepByName("SOAP Request1").name
    testRunner.runTestStepByName(soapTestStep)
    

    The second part of your question I don't have an answer for.


Log in to reply
 

Suggested Topics