Forum Discussion
- Hi Horst,
both setup and tear down scripts for test cases should be run when using the command line runner. I just verified that it works in SoapUI 4.6.1, but it should also work in previous versions.
Try to just print something in the startup script and check if you can see that output.log.info "testcase started"
Let me know if you still have troubles.
Regards,
Anders
SmartBear Sweden - AAichholzerOccasional ContributorHi Anders
I try to execute this script:if (com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.globalProperties.getProperty('TESTID').value == 'SoapUI'){com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.globalProperties.setPropertyValue('TESTID','Soap"+TestID+"'+testCase.testSuite.name[0..2]+'_'+testCase.name[0..2])}
but is is only executed if the testcase is started from the GUI
If i try to write something to the log, it works......
regards
Horst - Hi Horst,
The problem could be that your script is trying to access the global property TESTID, which might not be set when you're running SoapUI from the command line.
This page describes the various command line arguments. Try using the -G flag as described there to pass global properties to the testrunner.
Regards,
Arian
SmartBear Sweden