Forum Discussion

mriduk8s's avatar
mriduk8s
New Member
3 years ago

Display the environment name

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

  • TNeuschwanger's avatar
    TNeuschwanger
    Champion Level 1

    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