About Me

My photo
London, United Kingdom
SOA tester in London

Thursday, September 29, 2011

SOAPUI : running from Java program

import com.eviware.soapui.SoapUIProTestCaseRunner;
import com.eviware.soapui.support.*;
import com.eviware.soapui.model.*;
import com.eviware.soapui.impl.wsdl.*;
import com.eviware.soapui.*;

public class runsoapui {

public static void main(String[] args) {
SoapUIProTestCaseRunner myrunner = new com.eviware.soapui.SoapUIProTestCaseRunner();
myrunner.setProjectFile("C:/Bskyb/soapui-project-files/PMAPI-WEB-soapui-project.xml");
myrunner.setTestSuite("webtestsuite");
myrunner.setTestCase("webtestcase");
try {
myrunner.run();
}
catch(Exception ex)
{
System.out.println ("I'm here with Exception " + ex.getMessage());
System.exit(1);
}
}
}

3 comments:

Unknown said...

Hello Karthi,
Can you post the latest equivalent to this piece of code ?

I guess the libraries have undergone change since 2011.

I am getting an error that the setProjctFile function is not available in the class.

Also, is there a functionality without using the 'pro' version of SoapUI ?

Cheers
Srinivas

Whizdom Trainings said...

hi,we provide online training & video tutorial for soapui
for free videos refer
http://soapui-tutorial.com/soapui-tutorial/introduction-to-webservices/

shera40 said...

Hey Has anyone knows what goes in the pom.xml?? dependency, plugins etc