Forum Discussion

itaykaldi's avatar
itaykaldi
Contributor
10 years ago

Get current environment by groovy script

Hey,
How Can I get the current environment by using groovy script.

10x.

1 Reply

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    You can use this script:
    def env = testRunner.testCase.testSuite.project.activeEnvironment.name
    log.info env


    Regards,

    Giscard
    SmartBear Support