Forum Discussion
nmrao
Champion Level 3
May be you use a jvm argument passed from command line.
In the load script, get system property value and if that matches certain condition, then execute the piece of code.
Does it sound ok?
In the load script, get system property value and if that matches certain condition, then execute the piece of code.
Does it sound ok?
sergeykh
6 years agoOccasional Contributor
What do you mean by jvm arguments?
I know that if I pass project level properties to be set from the command line, they are initiated after the project script is executed.
Can you please share an example so I can test if this behaves diffrently.
I would assume that there is some indication who is executin the project without something spesific, but seems that this is not the case.
- nmrao6 years agoChampion Level 3
I mean system arugument such as "-Dkey=value"
testrunner.bas <options to execute the project> -DIS_INVOKED_COMMANDLINE=true
In Load script
if ('true' == System.getProperty('IS_INVOKED_COMMANDLINE')) { //You business logic here }
- sergeykh6 years agoOccasional Contributor
Thanks, this seems to work and this properties are set before the project once.
One more thing. As I`m calling extenal jar from the project load script and passing both possible variablse in this context which are project and log. Is it possible to get the system properties from the project object?
Related Content
- 10 months ago
- 2 years ago
- 6 years ago
- 4 years ago
Recent Discussions
- 15 years ago