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