Ask a Question

Groovy Script to Add New Property ?

SOLVED
ario
New Contributor

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

1 REPLY 1
nmrao
Champion Level 2

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}


Regards,
Rao.
cancel
Showing results for 
Search instead for 
Did you mean: