Forum Discussion
SuperSingh
7 years agoContributor
Hi nmrao
How do you set a new property in Setup Script at TestSuite level ?
say, I want to create a property "Counter" at Test Suite level via groovy. How do we do that?
I tried the following but it doesn't work.
testRunner.testSuite.setPropertyValue("Counter", "" )
Thanks,
SuperSingh
SuperSingh, Setup script will not work if you use testrunner. as this object is not supported.
If you pay close attention to the UI it says "Setup Script is invoked with virtRunner, log,runner, context,testSuite variables"
So try: runner.testSuite.setPropertyValue("Counter", "PropValue" ) or
testSuite.setPropertyValue("Counter", "PropValue" )