Forum Discussion

johandelaat's avatar
johandelaat
Occasional Contributor
9 years ago

activeEnvironment in Jenkins is not environment set in the command line using the -E paremter?

I'm using Ready! API 1.3.1 SoapUI NG PRO.

In some of the testcases I'm using a variable env to know in which environment I'm working.

def env = testRunner.testCase.testSuite.project.activeEnvironment.name

Based on this variable different values are used to run the testcases.

This works fine in the GUI.

 

When I run these testcases in Jenkins I include in the command line the parameter -E to set the environment (eg : -ESTAG).

 

With this setting the correct endpoints are used.

But it seems to me that the activeEnvironment is the environment in which I was working when I last saved the project and not the value of -E parameter.

 How can I tell Jenkins to change the activeEnvironment to the environment set in the command line using the -E parameter?

 

What is the correct way to set and use an environment in Jenkins?

 

Johan

 

 

3 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Johandelaat,

     

    The –E command-line argument is available only for the Pro version. So, please check that the SoapUI NG Pro license was activated indeed.  Also, could you please check if the same behavior is reproduced on the latest Ready! API version – v. 1.4.1?

  • johandelaat's avatar
    johandelaat
    Occasional Contributor

    Hi Tanya,

     

    First line of my post :

    I'm using Ready! API 1.3.1 SoapUI NG PRO.

    So yes the PRO license was activated.

    The fact that the correct endpoints are used proves for me that the parameter -E works correctly.

     

    We've downgraded to the version 1.3.1 because in version 1.4.1 the authorization is seriously f**cked up.

    It caused us a lot of useless rework of the testcases.

    So NO I will not check if there is the same behaviour in 1.4.1.

     

    Do you have any idea if there is a workaround for activeEnvironment to find out which the environment is?

    How can I get the value set by the -E parameter?

     

    Johan

     

    • TanyaYatskovska's avatar
      TanyaYatskovska
      SmartBear Alumni (Retired)

      Hi Johandelaat,

       

      It makes sense to add the /i command-line parameter in addition to /E. This will load some more UI classes that testrunner should use.