Forum Discussion

malacus's avatar
15 years ago

Can someone show me how to use SetProperty/SetPropertyValue?

I've searched and found multiple examples of ways to use SetPropertyValue (and some SetProperty..) but I have yet to find anything that will work on a startup script. I thought maybe it was a pro only feature so I started my trial and still cannot get anything to work.

I'd like a script that ideally can change the property on my TestSuite or Project.

I've found examples to set the properties value on a test step such as
testRunner.testCase.getTestStepByName('Properties').setPropertyValue("myProperty","myValue")
groovy.lang.MissingPropertyException: No Such property: testRunner for class: Script2

Any help would be greatly appreciated, thanks for taking the time to read this.

1 Reply

  • kamahade's avatar
    kamahade
    Regular Contributor
    testRunner.testCase.testSuite.getTestCaseByName("TESTCASE_NAME").setPropertyValue("PROP+NAME","VALUE")