Forum Discussion
If you see that approach clearly, you can only call SoapUI test cases only through VAPI-XP-TEST in QC through the VB script which calls the testrunner.bat. It should not be possible to call SoapUI test cases from normal test cases created in HPE ALM.
Also, what does this sentence mean - "the text files are not created"
Thanks,
Kondasamy
- JanPot9 years agoOccasional Contributor
Hi,
Sorry, maybe I was not clear enough :-) But yes, the call is made through VAPI-XP-TEST, and yes it is a VB call to testrunner.bat with the propre arguments (the same ones I used when calling through a command line).
This being said, the SoapUI scripts creates text files (with results of the run). I also have a groovy scripts that writes a specific formatted text for QC to read, so it can fill in the information directly in the test lab to say if the test pass or failed, in which case it will also fill the reason of the failure.
Like I said, all these files are created when I run the SoapUI test directly, through the Launch TestRunner and also when run by command line... but none are created when I run it through VAPI-XP-TEST:
The command line is in this form:
"C:\Program Files\SmartBear\SoapUI-5.2.1\bin\testrunner.bat" -seRxOTP -cRequestOTP -r -a -j -J -fC:\2delete\test\ -I -tC:\Users\xxxxxx\soapui-settings.xml -i G:\DA-QA\001-etest\Automation\Soap-soapui-project.xml
- kondasamy9 years agoRegular Contributor
I guess we need to ensure whether the script has run the test case; then we can move forward verifying the text file availability. Please try the below VB script in QC and run the test case,
On Error Resume Next TDOutput.Clear Dim WshShell, oExec Set WshShell = CreateObject("WScript.Shell") Set oExec = WshShell.Exec("""C:\Program Files (x86)\SmartBear\ReadyAPI-1.3.0\bin\testrunner.bat"" ""C:\Don't Delete\Sample Project\Google Maps REST\Google-Maps-soapui-project - REST XML.xml"" ""-sDirections API TestSuite"" ""-cSimple Tests"" 2>&1") Do While Not oExec.Stdout.atEndOfStream TDOutput.Print oExec.StdOut.ReadLine() Loop
Thanks,
Kondasamy
- JanPot9 years agoOccasional Contributor
Thanks Kondasamy !
Now, it works a little better... A made a couple of discoveries:
1) I was using the XTools.run command, and unless I was using it wrong, it did not seems to work properly... For instance, to simplify to the maximum, I wrote the command line in a batch file (testrunner1.bat):
testrunner1.bat look like this:
"C:\Program Files\SmartBear\SoapUI-5.2.1\bin\testrunner.bat" -seRxOTP -cRequestOTP -r -a -j -J -fC:\2delete\test\ -I -tC:\Users\T850437\soapui-settings.xml -i G:\DA-QA\001-ePrescribe\Automation\STS-SDF-DEV-soapui-project.xml
When I run in QC, the following line:
XTools.run "C:\2delete\testrunner1.bat", "", -1, true
Produce (in the Output):
c:\2delete>"C:\Program Files\SmartBear\SoapUI-5.2.1\bin\testrunner.bat" -seRxOTP -cRequestOTP -r -a -j -J -fC:\2delete\test\ -I -tC:\Users\T850437\soapui-settings.xml -i G:\DA-QA\001-ePrescribe\Automation\STS-SDF-DEV-soapui-project.xml
del %TEMP%\jfxrtpath
set CLASSPATH=%CLASSPATH%;%JFXRTPATH%
rem JVM parameters, modify as appropriate
set JAVA_OPTS=-Xms128m -Xmx1024m -Dsoapui.properties=soapui.properties "-Dsoapui.home=%SOAPUI_HOME%\"
if "%SOAPUI_HOME%\" == "" goto START
set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.ext.libraries="%SOAPUI_HOME%ext"
set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.ext.listeners="%SOAPUI_HOME%listeners"
set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.ext.actions="%SOAPUI_HOME%actions"
:START
rem ********* run soapui testcase runner ***********
Plusÿ?
Test < RequestOTP > is completed.
Which does not seems to work at all! I even think that SoapUI is not really called !
So I based myself on your call (the use of WshShell.Exec) to call the same batch file, so it is now:
Set oExec = WshShell.Exec("C:\2delete\testrunner1.bat")
This produced a result that is exactly the same as when I run the batch file manually... a GOOD result.
I still a little bit puzzled as why the XTools.run does not produce anything... but at least I have a work around for my scripts.
If you have an idea ?
Thanks
Jan
Related Content
- 3 years ago
- 8 years ago
- 5 years ago