Forum Discussion

mriduk8s's avatar
mriduk8s
New Member
2 years ago

Display the environment name

Is there a command to display the environment name (command line for readyAPI)?

2 Replies

  • TNeuschwanger's avatar
    TNeuschwanger
    Champion Level 2

    Hello mriduk8s 

     

    You can use this code in a groovy script test step...

    log.info 'Test Step "' + testRunner.runContext.currentStep.name + '" start...';
    log.info "";
    
    def environmentName = testRunner.testCase.project.getActiveEnvironment().name;
    log.info "environmentName=$environmentName";
    
    log.info "";
    log.info 'Test Step "' + testRunner.runContext.currentStep.name + '" done...';

    Regards,

    Todd