Forum Discussion

prouser's avatar
prouser
Contributor
12 years ago

[Resolved]How to add custom properties to a Groovy test step

How can we add more custom properties to a Groovy test step?
The only custom properties that are now available are "results" and "script"

Attached is an image which shows the default custom properties on the Groovy test step.
Also there is no '+' sign to add more custom properties unlike some other test steps

Is it even possible to add more custom properties to add to a Groovy test step?

2 Replies

  • Thank you for your quick response.
    So as it is not possible to add custom properties in the groovy test step

    I added my properties to the test case and updating these properties using a setter statemet
    "testRunner.testCase.setPropertyValue( "myproperty", myValue)"

    and accessing in other test steps using the following command:
    ${#TestCase#myproperty} (or) context.expand('${#TestCase#myproperty}') as required

    Regards
    ProUser