testrunner.bat: syntax of command line incorrect
I am trying to run a SOAPUI opensource test suite via TeamCity. In TeamCity, there is a step that calls testrunner.bat and constructs the command line based on the parameters/parameter values I add. The command line constructed is attached, along with the subsequent error:
[Step 1/1] The syntax of the command is incorrect.
[Step 1/1] Process exited with code 255
I have compared it to another SOAP project that runs successfully in TeamCity, and save for a few additional parameters in the other project, they look similar. In addition, I can run my test suite in SOAPUI successfully.
Is there a way to troubleshoot where in my command line it is failing? Are there any restrictions that I'm not aware of using OpenSource to do this?
Not exact sure what is the issue there.
Couple of suspects:
- The entire command should be in single line. Please check if it is in multiple lines.
- There are some slashes, colons etc in the property values. Wrap the value between double quotes (").
Suggestion:
There are so many properties that are being passed from the command line. Instead create a property file (key = value pair) and pass it to the testrunner utility. If you do so, then both above mentioned problem won't occur in first place.
For example:
Create Property file as below (have used only a few for demo, say project.properties
username=test@test.onmicrosoft.com tokenResource=http://test.mccadevdpat.onmicrosoft.com/ cAD=test.onmicrosoft.com cId=1111111-11111-2222-9560-b348ad0a5e89 pauseIntervalSeconds=60 maxAttempts=100 JS_workflowPath=adl://test.azuredatalakestore.net/opt/rhi/test-test/latest/conf/workflow.xml
How to pass property file to testrunner command?
testrunner.bat -Dsoapui.properties.MY_PROJECT_NAME="/abs/path/project.properties" <other options> <project path>
Note: In the above, replace MY_PROJECT_NAME with actual value of your project name( which you see in SoapUI tool)
Refer documentation for the same : https://www.soapui.org/scripting---properties/working-with-properties.html
Hope this is helpful.