CrazyFrog
10 years agoContributor
[Res]execute a single teststep from Intellij
Hello,
I want to execute a single teststep from Intellij but how can i do that.
Execute a specified TestCase is no problem, that work perfectly (http://www.soapui.org/Test-Automation/integrating-with-junit.html).
The problem is: I don't know how to implement the testStep.run command
My code that i use is:
Please can anybody help me?
I want to execute a single teststep from Intellij but how can i do that.
Execute a specified TestCase is no problem, that work perfectly (http://www.soapui.org/Test-Automation/integrating-with-junit.html).
The problem is: I don't know how to implement the testStep.run command
My code that i use is:
public void fullControl() throws Exception {
WsdlProject project = new WsdlProject("myTestProject-soapui-project.xml");
List<TestSuite> testSuites = project.getTestSuiteList();
for( TestSuite suite : testSuites ) {
System.out.println("Running SoapUI TestSuite [" + suite.getName() + "]");
List<TestCase> testCases = suite.getTestCaseList();
for( TestCase testCase : testCases ) {
//System.out.println("Running SoapUI test [" + testCase.getName() + "]");
//TestRunner runner2 = testCase.run(new PropertiesMap(), false);
//assertEquals(Status.FINISHED, runner2.getStatus());
System.out.println("TestStep count [" + testCase.getTestStepCount() + "]");
for (TestStep testStep : testCase.getTestStepList()) {
System.out.println("TestSteps [" + testStep.getName() + "]");
//public TestStepResult run( TestCaseRunner testRunner, TestCaseRunContext testRunContext );
testStep.run(testRunner, runContext); // <---- to to implement this call
}
}
}
}
Please can anybody help me?