Forum Discussion
ijasjit
New Contributor
Hi nmrao,
The groovy Script - GetCoupns (part of AddCouponsToACard test-case) is setting a project variable ids.
The next test-case RemoveCouponsFromACard is supposed to use the project variable ids. This will be used in the test-step RemoveCouponsFromACard.
Its like, I can only remove coupon number which I had added.
This all works good when I execute the testcase via GUI by click on Play button.
I can manually see thet the ids is always updated with a new value, each time the AddCouponsToACard test case is run.
The issue comes when I execute AddCouponsToACard by using the command line testrunner.sh
testrunner.sh -sExternal_Web_PROD -cAddCouponsToACard -r -a -f/opt/SOAR_Test/work/External_Web_PROD -I /opt/External_SoapUI_Project/External_Web_Prod.xml
With this command line execution, the project variable 'ids' is not being set and hence when RemoveCouponsFromACard is run the 'ids' used is not the one which was used by AddCouponsToACard
testrunner.sh -sExternal_Web_PROD -cRemoveCouponsFromACard -r -a -f/opt/SOAR_Test/work/External_Web_PROD -I /opt/External_SoapUI_Project/External_Web_Prod.xml
I tried adding another step, a groovy script to RemoveCouponsFromACard test-case, to log the project id it will be using. But unfortunately the ids logged was not what AddCouponsToACard had used.
def test = context.expand( '$(#Project#ids}' )
log.info = ("Coupon id picked by the RemoveCouponsFromACard Script =" + test
--
Thanks,
JASJIT SINGH
JASJIT SINGH
HeikoStudt
9 years agoOccasional Contributor
How about using "-S" for save the project? Be carefull, though, as it might collide with your running SoapUI GUI or your source control.
A second option might be an "startup" groovy script for calling a "init" testcase in all the others and then go further. IMHO this might work...
MFG
Heiko Studt
Related Content
- 5 years agoEmilija
- 5 years agoKrishna_Kumar
- 2 years agoTestQA1
- 3 years agoloricotton
Recent Discussions
- 5 days agoemoya