tdrury
11 years agoContributor
Running _Pro_ TestCase via Java?
The online help shows an example of running a TestCase in Java:
However, my TestCase uses Datasources - a Pro feature - and when running this code the datasource entries are not resolved into my requests. I see in the Pro javadocs there is a WsdlProjectPro class, but just changing this was not enough. I don't see an equivalent Pro classes for TestSuite, TestCase, or TestRunner. How do I run this example on a soapui Pro TestCase?
Note: I don't want to use SoapUIProTestCaseRunner because I need access to the TestCase context after the test has run.
Thanks,
-tim
WsdlProject project = new WsdlProject( "src/dist/sample-soapui-project.xml" );
TestSuite testSuite = project.getTestSuiteByName( "Test Suite" );
TestCase testCase = testSuite.getTestCaseByName( "Test Conversions" );
// create empty properties and run synchronously
TestRunner runner = testCase.run( new PropertiesMap(), false );
assertEquals( Status.FINISHED, runner.getStatus() );
However, my TestCase uses Datasources - a Pro feature - and when running this code the datasource entries are not resolved into my requests. I see in the Pro javadocs there is a WsdlProjectPro class, but just changing this was not enough. I don't see an equivalent Pro classes for TestSuite, TestCase, or TestRunner. How do I run this example on a soapui Pro TestCase?
Note: I don't want to use SoapUIProTestCaseRunner because I need access to the TestCase context after the test has run.
Thanks,
-tim