Forum Discussion

Kalyan2020's avatar
Kalyan2020
New Contributor
6 years ago

How do I know SOAP UI pro executed on a specific environment?

Hi,   I have set up various test environments test1, test2, test3. However I am not able to find out whether its executed on a specific test environment test1, test2 or test3. I am executing usin...
  • JoostDG's avatar
    JoostDG
    6 years ago

    Hi Kalyan2020,

     

    Perhaps there are other ways, but you could put the below in your project setup/teardown script:

     

    log.info "Project run executed on environment: " + project.activeEnvironment.name

    That way, at the beginning/end of the run you can see your chosen environment name in the log. Should be equal to the one you selected with your -E parameter.

    So --> "Project run executed on environment: test1"

     

    You could write this name to a project property, some reports also log these by doing this:

    def active_environment = project.activeEnvironment.name
    project
    .setPropertyValue("active_environment", active_environment)