Forum Discussion

ario's avatar
ario
New Contributor
8 years ago

Groovy Script to Add New Property ?

Hi,

 

Is that possible to add a new property using groovy script?

 

I have added a "Properties(0)" test step without any property in it, is that possible to use groovy script to add a property and its value?

 

Thanks,

Ario

  • A test case level property?
    context.testCase.setProperty('PROP_NAME', 'string value')

    To access the above value, use property expansion in other request steps such as ${#TestCase#PROP_NAME}
  • nmrao's avatar
    nmrao
    Champion Level 3
    A test case level property?
    context.testCase.setProperty('PROP_NAME', 'string value')

    To access the above value, use property expansion in other request steps such as ${#TestCase#PROP_NAME}