Siemens__s_r_o_
12 years agoOccasional Contributor
[Res] test is run from the commandline with groovy
Hi guys,
I'm writing a Setup Script for a Test Case that needs to execute different logic based on whether it's run from commandline or triggered in the UI. (UI interaction vs. dynamic ID generation, detail on this are not important
)
Question is:
Is there some context property (or other functionality), on which I can base the decision whether the test was triggered from the Command Line or the UI?
For example, to decide if the Test Case was run as a Load Test or separately, I can use:
I was unable to find this kind of functionality for commandline trigger
Thanks,
Jakub
I'm writing a Setup Script for a Test Case that needs to execute different logic based on whether it's run from commandline or triggered in the UI. (UI interaction vs. dynamic ID generation, detail on this are not important

Question is:
Is there some context property (or other functionality), on which I can base the decision whether the test was triggered from the Command Line or the UI?
For example, to decide if the Test Case was run as a Load Test or separately, I can use:
context.getProperty("LoadTestRunner") == null
I was unable to find this kind of functionality for commandline trigger

Thanks,
Jakub