Forum Discussion

sakthivel's avatar
sakthivel
Contributor
7 years ago

How to Create Properties in Test Steps using Groovy

Hi,

       How to create a Properties under Test Steps using Groovy Script in SOAP UI? I have a requirement that Groovy creates a Properties in Test Steps and Would store some Values. Would you please some help me out of this? I am new to Groovy with SOAP UI? Please find attached document that i have created Properties in Test Steps manually using SOAP UI. Same I wanted to do in Groovy Script.

 

 

Thanks

Sakthi

 

2 Replies

  • PaulMS's avatar
    PaulMS
    Super Contributor

    To add step in existing test case

     

    tc = context.testCase
    ts = tc.addTestStep( 'properties', 'PropertiesStepName' )
    ts.setPropertyValue( 'PropertyName', 'value' )

     

    • sakthivel's avatar
      sakthivel
      Contributor

      Awesome. Thanks for your help. Again Lot of thanks. :). It is working for me