Project Load Script executed before the command line arguments are used.
I`m using the option to execute the soapUI project from command line and using the P argument to pass project level properites.
P : Specifies a value of a project property for the test run. The specified value will override the variable's value during the run. Usage: -P<variable>=<value>. If the value includes spaces, enclose the entire argument in quotes. To override several variable values, specify the -P argument several times.
In the Project Load Script I want to load project level properties from previously saved property file using the ENV_NAME property which is passed in the command line arguments.
The problem that I`ve encountered is that the Project Load Script is executed before the argument from the command line is used to set the ENV_NAME property. As a work around I have added a new testSuite which will run the script instead of the Project Script.
But this seems patchy and also reflects in the test report.
Can someone explain the logic why to run the Project Load Script before the command line arguments were used?
Is there some other way to pass an argument to the project which can be used in the Project Load Script?