Forum Discussion

mcbootus's avatar
mcbootus
Contributor
15 years ago

[Res] Getting Testsuite level property in Groovy

Dear support,

I have a simple question - I have a property in the testsuite properties section and I would like to access this value via Groovy.

I can already access testcase properties via groovy like:

XMLCount = testRunner.testCase.testSteps["Properties"].getPropertyValue("XML Row Count")


But I want to access this property in the Testsuite level:

PR_ID = '${#TestSuite#PR_ID}'


I tried to combine the groovy code to point to the testsuite property without success.

Thanks in advance,
Armen
  • Hi,

    For accessing TestSuite level property in the same way as in your example for test step you can use

    prId= testRunner.testCase.testSuite.getPropertyValue("PR_ID");

    Hope I understood you right and that was what you where looking for.

    Regards,
    Dragica
    /www.eviware.com
  • Dear Dragica,

    That's exactly what I was looking for!

    Many thanks,
    Armen