How to read and set custom properties in Ready API at test suite level

1.1k Views Asked by At

I have a project with multiple test suites and each test suite have their own custom properties.So my question is: Is there a way to read from one file and set custom properties in different test suites.

1

There are 1 best solutions below

0
On

To read property value store in Test Suite from groovy script

def val = context.expand('${#TestSuite#PropertyName}') log.info val

And you can update the value but i am not sure if it is possible to add a custom property at Run Time

To update value at runtime you can use testRunner.testCase.testSuite.setPropertyValue('PropertyName',val);