Package com.eviware.soapui.config

Examples of com.eviware.soapui.config.TestStepConfig


                .addNewInterface(INTERFACE_NAME, RestServiceFactory.REST_TYPE);
        RestResource restResource = restService2.addNewResource(RESOURCE_NAME, PATH);
        restResource.addNewMethod(METHOD_NAME);
        Mockito.when(testCase.getParent()).thenReturn(project);

        TestStepConfig config = TestStepConfig.Factory.newInstance();
        RestRequestStepConfig configConfig = (RestRequestStepConfig) config.addNewConfig().changeType(RestRequestStepConfig.type);
        configConfig.setService(INTERFACE_NAME);
        configConfig.setResourcePath(PATH);
        configConfig.setMethodName(METHOD_NAME);
        configConfig.setRestRequest(RestRequestConfig.Factory.newInstance());
View Full Code Here


        RestRequest restRequest = ModelItemFactory.makeRestRequest();
        restRequest.setMethod(RestRequestInterface.HttpMethod.POST);
        String requestBody = "Some meaningful data";
        restRequest.setRequestContent(requestBody);

        TestStepConfig testStepConfig = RestRequestStepFactory.createConfig(restRequest, "Rest Request");
        RestRequestStepConfig config = (RestRequestStepConfig) testStepConfig.getConfig();

        assertThat(config.getRestRequest().getRequest().getStringValue(), is(requestBody));
    }
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) {
                    WsdlTestStep testStep = testCase.addTestStep(newTestStepConfig);
                    UISupport.selectAndShow(testStep);
                }
            }
View Full Code Here

public class MoveXmlTest {

    @Test
    public void movesXmlCorrectly() throws Exception {
        TestCaseConfig testCase = TestCaseConfig.Factory.newInstance();
        TestStepConfig step1 = testCase.addNewTestStep();
        TestStepConfig step2 = testCase.addNewTestStep();
        TestStepConfig step3 = testCase.addNewTestStep();

        List<TestStepConfig> testSteps = testCase.getTestStepList();
        assertEquals(3, testSteps.size());
        assertEquals(testSteps.get(0), step1);
        assertEquals(testSteps.get(1), step2);
        assertEquals(testSteps.get(2), step3);

        XmlCursor cursor1 = step3.newCursor();
        XmlCursor cursor2 = step2.newCursor();

        cursor1.moveXml(cursor2);

        cursor1.dispose();
View Full Code Here

    public WsdlTestStep buildTestStep(WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest) {
        return new WsdlGroovyScriptTestStep(testCase, config, forLoadTest);
    }

    public TestStepConfig createNewTestStep(WsdlTestCase testCase, String name) {
        TestStepConfig testStepConfig = TestStepConfig.Factory.newInstance();
        testStepConfig.setType(GROOVY_TYPE);
        testStepConfig.setName(name);
        return testStepConfig;
    }
View Full Code Here

    }

    public TestStepConfig createConfig(String stepName) {
        ManualTestStepConfig testRequestConfig = ManualTestStepConfig.Factory.newInstance();

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

    public WsdlTestStep buildTestStep(WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest) {
        return new WsdlGotoTestStep(testCase, config, forLoadTest);
    }

    public TestStepConfig createNewTestStep(WsdlTestCase testCase, String name) {
        TestStepConfig testStepConfig = TestStepConfig.Factory.newInstance();
        testStepConfig.setType(GOTO_TYPE);
        testStepConfig.setName(name);
        testStepConfig.setConfig(GotoStepConfig.Factory.newInstance());
        return testStepConfig;
    }
View Full Code Here

        requestStepConfig.setService(request.getOperation().getInterface().getName());
        requestStepConfig.setResourcePath(request.getOperation().getFullPath());
        requestStepConfig.setMethodName(request.getRestMethod().getName());
        requestStepConfig.addNewRestRequest().set(request.getConfig().copy());

        TestStepConfig testStep = TestStepConfig.Factory.newInstance();
        testStep.setType(RESTREQUEST_TYPE);
        testStep.setConfig(requestStepConfig);
        testStep.setName(stepName);

        return testStep;
    }
View Full Code Here

                    entry.setValue(property.getDefaultValue());
                }
            }
        }

        TestStepConfig testStepConfig = TestStepConfig.Factory.newInstance();
        testStepConfig.setType(RESTREQUEST_TYPE);
        testStepConfig.setConfig(requestStepConfig);
        testStepConfig.setName(name);

        return testStepConfig;
    }
View Full Code Here

        // set parameters

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

        TestStepConfig testStep = TestStepConfig.Factory.newInstance();
        testStep.setType(RESTREQUEST_TYPE);
        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.