cancel
Showing results for 
Search instead for 
Did you mean: 

Run SoapUI tests through Java

Occasional Contributor

Run SoapUI tests through Java

I need to run a SoapUI Test project through Java and get the Exit Code of that run.

I have tried using the below LOC:

 

Runtime.getRuntime().exec(new String[]{"C:/Program Files (x86)/SmartBear/SoapUI-Pro-5.0.0/bin/testrunner.bat","-EDefault","D:/Projects/UAT-soapui-project.xml"});

 

But this fails to work if the execution encounters any errors, i.e., if the test has any errors, the code just keeps running infinitely, niether returns a Exit Code.

I have also tried running a batch file through Java, which contains command line instructions to run the tests, but the Java code returns the Exit Code for the batch file and not for the test executed using the batch file.

Please provide a solution.

1 REPLY 1
Community Hero

Re: Run SoapUI tests through Java

May be you want to try from documentation http://www.soapui.org/test-automation/junit/junit-integration.html


Regards,
Rao.
New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors