Forum Discussion
OK, if you wish to discuss this issue more in detail, please share the code of the Groovy script causing the error.
This is the first one that switches the environment:
def env = context.testCase.testSuite.project.getEnvironmentByName("Fastlane TEST DetectRX");
context.testCase.testSuite.project.setActiveEnvironment(env)
And then this is the step that switches it back:
def env = context.testCase.testSuite.project.getEnvironmentByName("DetectRx TEST");
context.testCase.testSuite.project.setActiveEnvironment(env)
- KarelHusa3 years agoSuper Contributor
Interesting issue; your code seems to work fine. Though, I think switching environments during the test might be risky.
If you decide to do that, you must ensure the test suites and test cases run sequentially and not in parallel (see the screenshot below). Did you check this setting? This might be why the sequential execution works, but the project level fails.
Best regards,
Karel