Forum Discussion

jays's avatar
jays
Occasional Contributor
8 years ago
Solved

How to retrieve the active environment name in groovy script?

I need to set some variables based on the current active environment. How can I access the environment name in groovy script?
  • jays's avatar
    jays
    8 years ago

    Thank you and that works! And here is what I found which works too.

     

    testRunner.testCase.project.getActiveEnvironment().name

     

    gives you the active environment name in Pro.