Forum Discussion

TestingAutobot's avatar
TestingAutobot
New Contributor
11 years ago

Automatically get values from XML/DB and set them into TestSteps properties

I need to set properties values automatically from outside SoapUI. 
The source may sometimes be an XML and sometimes a DB. 

The target is properties in Test Steps (specifically for a SOAP request).

How do I get the values for the properties and then set them automatically into SoapUI?

These links are the closest I got:
http://www.soapui.org/scripting---properties/tips---tricks.html#1-1-get-and-set-properties

http://www.soapui.org/data-driven-tests/reference/datasources.html

But can't seem to know what to make of it. Everything seem to provide only partial information about this.

Thank you in advance,
Orit

3 Replies

  • nmrao's avatar
    nmrao
    Icon for Champion Level 1 rankChampion Level 1

    You can use groovy step to read the required variables, set the values at test case level and use  it to other steps. If it is request type, then have value ${#TestCase#PROPERTY_NAME} where it is required.

    • TestingAutobot's avatar
      TestingAutobot
      New Contributor

      Thank you for your reply!

       

      Problem is that I am yet to master SoapUI.

      I would really appriciate it if you could point me to relevant tutorials or someplace with detailed information on how to do it.

       

      All I found are the links attached above and I can't understand where to start off.

      They seem like fregmantes of information and not a full guide.

      • nmrao's avatar
        nmrao
        Icon for Champion Level 1 rankChampion Level 1

        May be you have to add more details then.

         

        If you want to read xml means either from previous step response or file. You can use xml slurper to read the value and set it as property at test case level. Similarly you can get the data from data base value and store it as property at test case. All you can do it in a groovy step.