Search in sources :

Example 1 with WsdlTestRequestStep

use of com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep in project microcks by microcks.

the class SoapUIProjectImporter method collectWsdlTestRequests.

/**
 * Collect and filter by operation all the WsldTestrequest from the current project.
 */
private Map<String, WsdlTestRequest> collectWsdlTestRequests(Operation operation) {
    Map<String, WsdlTestRequest> result = new HashMap<>();
    for (TestSuite testsuite : project.getTestSuiteList()) {
        for (TestCase testcase : testsuite.getTestCaseList()) {
            for (TestStep teststep : testcase.getTestStepList()) {
                if (teststep instanceof WsdlTestRequestStep) {
                    WsdlTestRequestStep ws = (WsdlTestRequestStep) teststep;
                    WsdlTestRequest wr = ws.getHttpRequest();
                    if (wr.getOperationName().equals(operation.getName())) {
                        result.put(wr.getName(), wr);
                    }
                }
            }
        }
    }
    return result;
}
Also used : TestStep(com.eviware.soapui.model.testsuite.TestStep) WsdlTestRequestStep(com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep) TestSuite(com.eviware.soapui.model.testsuite.TestSuite) TestCase(com.eviware.soapui.model.testsuite.TestCase) WsdlTestRequest(com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequest)

Aggregations

WsdlTestRequest (com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequest)1 WsdlTestRequestStep (com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep)1 TestCase (com.eviware.soapui.model.testsuite.TestCase)1 TestStep (com.eviware.soapui.model.testsuite.TestStep)1 TestSuite (com.eviware.soapui.model.testsuite.TestSuite)1