Liberty_Informa
13 years agoRegular Contributor
Project Property manipulation
Hi Admin
We use web based tool for doing daily smoke testing of our web services. The web based tool is also used by developers to kick off tests manually by selecting 2-3 choices.
One of the choices is to select 'target Environmen't. It is a drop down on the web page having range of all environments that we have. For development environment, we have 4 instances like dev-a, dev-b and so on. User can select any target environment and select test project of his/her choice to execute tests.
In order to change the target environment selected by the user, we were hacking into the soapUI project xml file and changing targetEnv Project property value with the that of selected by the user. This hacking was required because in the Project load script I take certain decisions based on the value received in the target environment. I don’t know is that a right approach or not but it works very well.
My question to you is – is it possible to tell soapUI project the target environment value without hacking into the soapUI project xml file? See below I am also passing tergetEnv as one of the parameters to the testrunner.
When we pass targetEnv as a parameter does that replace default project property value and load script receives replaced value? I think it is not.
What is the best way to handle this kind of situation?
Again with the composite project it is some other file (setting.xml) to hack into as soapUI project xml file doesn’t exists for the composite project.
We use web based tool for doing daily smoke testing of our web services. The web based tool is also used by developers to kick off tests manually by selecting 2-3 choices.
One of the choices is to select 'target Environmen't. It is a drop down on the web page having range of all environments that we have. For development environment, we have 4 instances like dev-a, dev-b and so on. User can select any target environment and select test project of his/her choice to execute tests.
In order to change the target environment selected by the user, we were hacking into the soapUI project xml file and changing targetEnv Project property value with the that of selected by the user. This hacking was required because in the Project load script I take certain decisions based on the value received in the target environment. I don’t know is that a right approach or not but it works very well.
My question to you is – is it possible to tell soapUI project the target environment value without hacking into the soapUI project xml file? See below I am also passing tergetEnv as one of the parameters to the testrunner.
$TESTRUNNER -r -I -j -f$setupReportHome [b]-PtargetEnv=$env[/b] -t$SOAPUISETTING $SETUPPROJECT > $MONKEYHOME/logs/$RUNDIR/SetupProject/$setupResultFile 2>&1
When we pass targetEnv as a parameter does that replace default project property value and load script receives replaced value? I think it is not.
What is the best way to handle this kind of situation?
Again with the composite project it is some other file (setting.xml) to hack into as soapUI project xml file doesn’t exists for the composite project.