Forum Discussion

potluj's avatar
potluj
New Contributor
7 years ago

Set Test Suite Property as Groovy List and access via another Groovy

Hello,

 

  I am beginner to SOAP UI and I am working on a task - Determine all unique values from the SOAP response xpath.

 

 

  I have to do the following steps

 

0. In Groovy Script, have to set the test suite property (uniqueSet) using TestRunner object and setProperty method

1. Load keys from csv file using DataSource 

2. Create a SOAP request by passing key to it

3. From response, pick a particular xpath and add the xpath value to uniqueSet

4. Log the set of  value

5. DataSource Loop 

 

  I was able to read the records from csv, send soap request and able to get the particular xpath from response. But I am not sure how to create a testsuite property as a Groovy Set/List and access it in another Groovy Script.

 

  Could you please help on this

  • sanj's avatar
    sanj
    Super Contributor

    I would imagine this to be similar to ready api

    do note api calls may be different

    here is how you do in ready api

    testRunner.testCase.testSuite.setPropertyValue("tsprop", "blah")

     

    • potluj's avatar
      potluj
      New Contributor

      I guess my question might be misunderstood.

       

      I am aware on how to create a property for values of String Type. But I looking for a way to create a property for List/Set globally and access it via another groovy script.