Search in sources :

Example 1 with SoapUIException

use of com.eviware.soapui.support.SoapUIException in project iesi by metadew.

the class SOAPUIIntegration method main.

public static void main(String[] args) {
    try {
        getTestSuite();
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    System.exit(0);
    // https://www.soapui.org/test-automation/junit/junit-integration.html#_ga=2.157007227.1117033134.1563254348-690893157.1557407813
    // out-app-analytics-provider-5.5.0.jar causes issues in eclipse on the build
    // path
    SoapUITestCaseRunner runner = new SoapUITestCaseRunner();
    runner.setProjectFile("c:/Data/ApiCase-soapui-project.xml");
    try {
        runner.run();
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    WsdlProject project;
    try {
        project = new WsdlProject("c:/Data/ApiCase-soapui-project.xml");
        TestSuite testSuite = project.getTestSuiteByName("https://sandbox.api.belfius.be:8443 TestSuite");
        // TestCase testCase = testSuite.getTestCaseByName( "Test Conversions" );
        // create empty properties and run synchronously
        TestRunner runner2 = testSuite.run(new PropertiesMap(), false);
        System.out.println(runner2.getStatus());
    } catch (XmlException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (SoapUIException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}
Also used : TestSuite(com.eviware.soapui.model.testsuite.TestSuite) TestRunner(com.eviware.soapui.model.testsuite.TestRunner) XmlException(org.apache.xmlbeans.XmlException) SoapUITestCaseRunner(com.eviware.soapui.tools.SoapUITestCaseRunner) PropertiesMap(com.eviware.soapui.model.support.PropertiesMap) IOException(java.io.IOException) WsdlProject(com.eviware.soapui.impl.wsdl.WsdlProject) IOException(java.io.IOException) SoapUIException(com.eviware.soapui.support.SoapUIException) XmlException(org.apache.xmlbeans.XmlException) SoapUIException(com.eviware.soapui.support.SoapUIException)

Aggregations

WsdlProject (com.eviware.soapui.impl.wsdl.WsdlProject)1 PropertiesMap (com.eviware.soapui.model.support.PropertiesMap)1 TestRunner (com.eviware.soapui.model.testsuite.TestRunner)1 TestSuite (com.eviware.soapui.model.testsuite.TestSuite)1 SoapUIException (com.eviware.soapui.support.SoapUIException)1 SoapUITestCaseRunner (com.eviware.soapui.tools.SoapUITestCaseRunner)1 IOException (java.io.IOException)1 XmlException (org.apache.xmlbeans.XmlException)1