Package com.eviware.soapui.config

Examples of com.eviware.soapui.config.TestStepConfig


    public TestStepConfig createConfig(WsdlMonitorMessageExchange me, String stepName) {
        AMFRequestTestStepConfig testRequestConfig = AMFRequestTestStepConfig.Factory.newInstance();

        testRequestConfig.setEndpoint(me.getEndpoint());

        TestStepConfig testStep = TestStepConfig.Factory.newInstance();
        testStep.setType(AMF_REQUEST_TYPE);
        testStep.setConfig(testRequestConfig);
        testStep.setName(stepName);
        return testStep;
    }
View Full Code Here


            return;
        }

        String name = UISupport.prompt("Specify name for new step", "Insert Step", factory.getTestStepName());
        if (name != null) {
            TestStepConfig newTestStepConfig = factory.createNewTestStep(testCase, name);
            if (newTestStepConfig != null) {
                int ix = testCase.getIndexOfTestStep(testStep);
                testStep = testCase.insertTestStep(newTestStepConfig, ix + 1);
                if (testStep != null) {
                    UISupport.selectAndShow(testStep);
View Full Code Here

        }
    }

    @Override
    public void afterLoad() {
        TestStepConfig config = getConfig();

        if (config.getConfig() == null) {
            gotoStepConfig = (GotoStepConfig) config.addNewConfig().changeType(GotoStepConfig.type);
        } else {
            gotoStepConfig = (GotoStepConfig) config.getConfig().changeType(GotoStepConfig.type);
            for (int c = 0; c < gotoStepConfig.sizeOfConditionArray(); c++) {
                conditions.add(new GotoCondition(gotoStepConfig.getConditionArray(c)));
            }
        }
View Full Code Here

        if (!dialog.show()) {
            return false;
        }

        TestStepConfig config = WsdlMockResponseStepFactory.createConfig(operation, request, false);
        MockResponseStepConfig mockResponseStepConfig = ((MockResponseStepConfig) config.getConfig());

        config.setName(dialog.getValue(Form.STEP_NAME));
        mockResponseStepConfig.setPath(dialog.getValue(Form.PATH));
        mockResponseStepConfig.setPort(dialog.getIntValue(Form.PORT, 8181));
        CompressedStringConfig responseContent = mockResponseStepConfig.getResponse().getResponseContent();

        if (request.getResponse() == null && !request.getOperation().isOneWay()) {
View Full Code Here

            name = UISupport.prompt("Specify unique name of TestStep", "Rename TestStep", name);
            if (StringUtils.isNullOrEmpty(name)) {
                return;
            }
        }
        TestStepConfig newTestStepConfig = factory.createNewTestStep(testCase, name);
        if (newTestStepConfig != null) {
            WsdlTestStep testStep = testCase.addTestStep(newTestStepConfig);
            if (testStep != null) {
                UISupport.selectAndShow(testStep);
            }
View Full Code Here

            if (!dialog.show()) {
                return null;
            }

            TestStepConfig testStepConfig = TestStepConfig.Factory.newInstance();
            testStepConfig.setType(MOCKRESPONSE_TYPE);
            testStepConfig.setName(dialog.getValue(CreateForm.NAME));

            MockResponseStepConfig config = MockResponseStepConfig.Factory.newInstance();
            config.setInterface(dialog.getValue(CreateForm.INTERFACE));
            config.setOperation(dialog.getValue(CreateForm.OPERATION));
            config.setPort(dialog.getIntValue(CreateForm.PORT, 8080));
            config.setPath(dialog.getValue(CreateForm.PATH));
            config.addNewResponse();
            config.getResponse().addNewResponseContent();

            if (dialog.getBooleanValue(CreateForm.CREATE_RESPONSE)) {
                WsdlInterface iface = (WsdlInterface) project.getInterfaceByName(config.getInterface());
                String response = iface.getOperationByName(config.getOperation()).createResponse(
                        project.getSettings().getBoolean(WsdlSettings.XML_GENERATION_ALWAYS_INCLUDE_OPTIONAL_ELEMENTS));

                CompressedStringSupport.setString(config.getResponse().getResponseContent(), response);
            }

            testStepConfig.addNewConfig().set(config);
            return testStepConfig;
        } finally {
            WsdlMockResponseStepFactory.project = null;
        }
    }
View Full Code Here

            dialog.setValue(CreateForm.OPERATION, operation.getName());
            dialog.setBooleanValue(CreateForm.CREATE_RESPONSE, request.getResponse() == null);

            return createFromDialog(operation.getInterface().getProject(), request.getName() + " Response");
        } else {
            TestStepConfig testStepConfig = TestStepConfig.Factory.newInstance();
            testStepConfig.setType(MOCKRESPONSE_TYPE);
            testStepConfig.setName("Mock Response");

            MockResponseStepConfig config = MockResponseStepConfig.Factory.newInstance();
            config.setInterface(operation.getInterface().getName());
            config.setOperation(operation.getName());
            MockResponseConfig response = config.addNewResponse();
            response.addNewResponseContent();

            if (request != null && request.getResponse() != null) {
                CompressedStringSupport.setString(response.getResponseContent(), request.getResponse()
                        .getContentAsString());
            }

            testStepConfig.addNewConfig().set(config);

            return testStepConfig;
        }
    }
View Full Code Here

                XmlBeansRestParamsTestPropertyHolder tempParams = new XmlBeansRestParamsTestPropertyHolder(testCase,
                        httpRequest.addNewParameters());
                tempParams.addParameters(params);
                tempParams.release();

                TestStepConfig testStep = TestStepConfig.Factory.newInstance();
                testStep.setType(HTTPREQUEST_TYPE);
                testStep.setConfig(httpRequest);
                testStep.setName(dialog.getValue(Form.STEPNAME));

                return testStep;
            } else {
                return null;
            }
View Full Code Here

                httpRequest.addNewParameters());
        tempParams.addParameters(params);

        httpRequest.setEndpoint(HttpUtils.completeUrlWithHttpIfProtocolIsNotHttpOrHttpsOrPropertyExpansion(endpoint));

        TestStepConfig testStep = TestStepConfig.Factory.newInstance();
        testStep.setType(HTTPREQUEST_TYPE);
        testStep.setConfig(httpRequest);
        testStep.setName(name);

        return testStep;
    }
View Full Code Here

        testRequestConfig.setParameters(parametersConfig);

        // String requestContent = me.getRequestContent();
        // testRequestConfig.addNewRequest().setStringValue( requestContent );

        TestStepConfig testStep = TestStepConfig.Factory.newInstance();
        testStep.setType(HTTPREQUEST);
        testStep.setConfig(testRequestConfig);
        testStep.setName(stepName);
        return testStep;
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.config.TestStepConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.