Forum Discussion

Awesome's avatar
Awesome
Frequent Contributor
17 years ago

how do you access the global project properties from groovy

hi all,
How do you read the project (global) properties value within a groovy script.

I tried the following to read the property "SQL_Instance" set as a property for the project, but none seem to work:

x = testRunner.testCase.testSuite.project.properties("SQL_Instance")
x = $(#Project#("SQL_Instance"))
x = ${#Project#SQL_Instance}

Thanks in advance for your help!
  • Awesome's avatar
    Awesome
    Frequent Contributor
    ah ha! got it:

    def x = context.expand( '${#Project#SQL_Instance}' )