Package com.eviware.soapui.impl.wsdl.teststeps

Examples of com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep


        setPropertiesConfig(getConfig().getProperties());

        List<TestStepConfig> testStepConfigs = config.getTestStepList();
        List<TestStepConfig> removed = new ArrayList<TestStepConfig>();
        for (TestStepConfig tsc : testStepConfigs) {
            WsdlTestStep testStep = createTestStepFromConfig(tsc);
            if (testStep != null) {
                ensureUniqueName(testStep);
                testSteps.add(testStep);
            } else {
                removed.add(tsc);
View Full Code Here


    }

    private WsdlTestStep createTestStepFromConfig(TestStepConfig tsc) {
        WsdlTestStepFactory factory = WsdlTestStepRegistry.getInstance().getFactory(tsc.getType());
        if (factory != null) {
            WsdlTestStep testStep = factory.buildTestStep(this, tsc, forLoadTest);
            return testStep;
        } else {
            logger.error("Failed to create test step for [" + tsc.getName() + "]");
            return null;
        }
View Full Code Here

    public WsdlTestStep importTestStep(WsdlTestStep testStep, String name, int index, boolean createCopy) {
        testStep.beforeSave();
        TestStepConfig newStepConfig = (TestStepConfig) testStep.getConfig().copy();
        newStepConfig.setName(name);

        WsdlTestStep result = insertTestStep(newStepConfig, index, createCopy);
        if (result == null) {
            return null;
        }

        if (createCopy) {
View Full Code Here

    }

    public WsdlTestStep insertTestStep(TestStepConfig stepConfig, int ix, boolean clearIds) {
        TestStepConfig newStepConfig = ix == -1 ? getConfig().addNewTestStep() : getConfig().insertNewTestStep(ix);
        newStepConfig.set(stepConfig);
        WsdlTestStep testStep = createTestStepFromConfig(newStepConfig);

        if (!ensureUniqueName(testStep)) {
            testStep.release();
            getConfig().getTestStepList().remove(newStepConfig);
            return null;
        }

        if (clearIds) {
            ModelSupport.createNewIds(testStep);
        }

        if (ix == -1) {
            testSteps.add(testStep);
        } else {
            testSteps.add(ix, testStep);
        }

        testStep.afterLoad();

        if (getTestSuite() != null) {
            (getTestSuite()).fireTestStepAdded(testStep, ix == -1 ? testSteps.size() - 1 : ix);
        }

        notifyPropertyChanged("testSteps", null, testStep);

        Analytics.trackAction("AddRequestToTestCase", "Type", testStep.getClass().getSimpleName());

        return testStep;
    }
View Full Code Here

        if (modelItem instanceof SecurityTest) {
            modelItem = ((SecurityTest) modelItem).getTestCase();
        }

        if (modelItem instanceof WsdlTestStep || modelItem instanceof WsdlTestCase) {
            WsdlTestStep testStep = (WsdlTestStep) (modelItem instanceof WsdlTestStep ? modelItem : null);
            WsdlTestCase testCase = (WsdlTestCase) (testStep == null ? modelItem : testStep.getTestCase());

            int sepIx = pe.indexOf(PropertyExpansion.PROPERTY_SEPARATOR);
            Object property = null;

            if (sepIx > 0) {
                String step = pe.substring(0, sepIx);
                String name = pe.substring(sepIx + 1);
                String xpath = null;

                sepIx = name.indexOf(PropertyExpansion.PROPERTY_SEPARATOR);
                WsdlTestStep ts = testCase.getTestStepByName(step);

                if (sepIx != -1) {
                    xpath = name.substring(sepIx + 1);
                    name = name.substring(0, sepIx);
                }

                if (step != null) {
                    if (ts != null) {
                        TestProperty p = ts.getProperty(name);
                        if (p != null) {
                            property = p.getValue();
                        }
                    }
                } else {
View Full Code Here

                targetTestCase = targetTestSuite.addNewTestCase(targetTestCaseName);
            }

            boolean move = dialog.getBooleanValue(Form.MOVE);

            WsdlTestStep newTestStep = targetTestCase.importTestStep(testStep, name, -1, !move);
            if (newTestStep == null) {
                return;
            }

            if (dialog.getBooleanValue(Form.OPEN)) {
View Full Code Here

                if (!SoapUI.getTestMonitor().hasRunningTest(testCase)) {
                    continue;
                }

                for (int j = 0; j < testCase.getTestStepCount(); j++) {
                    WsdlTestStep testStep = (WsdlTestStep) testCase.getTestStepAt(j);
                    if (testStep.dependsOn(iface)) {
                        return true;
                    }
                }
            }
        }
View Full Code Here

            TestSuite testSuite = iface.getProject().getTestSuiteAt(c);
            for (int i = 0; i < testSuite.getTestCaseCount(); i++) {
                TestCase testCase = testSuite.getTestCaseAt(i);

                for (int j = 0; j < testCase.getTestStepCount(); j++) {
                    WsdlTestStep testStep = (WsdlTestStep) testCase.getTestStepAt(j);
                    if (testStep.dependsOn(iface)) {
                        return true;
                    }
                }
            }
        }
View Full Code Here

        // now check testsuites..
        for (TestSuite testSuite : iface.getProject().getTestSuiteList()) {
            for (TestCase testCase : testSuite.getTestCaseList()) {
                int testStepCount = testCase.getTestStepCount();
                for (int c = 0; c < testStepCount; c++) {
                    WsdlTestStep testStep = (WsdlTestStep) testCase.getTestStepAt(c);
                    if (testStep instanceof WsdlTestRequestStep) {
                        WsdlTestRequest testRequest = ((WsdlTestRequestStep) testStep).getTestRequest();
                        if (testRequest != null && testRequest.getOperation() != null
                                && testRequest.getOperation().getInterface() == iface) {
                            String newRequest = testRequest.getOperation().createRequest(buildOptional);

                            if (keepHeaders) {
                                newRequest = SoapUtils.transferSoapHeaders(testRequest.getRequestContent(), newRequest,
                                        iface.getSoapVersion());
                            }

                            if (keepExisting) {
                                newRequest = XmlUtils.transferValues(testRequest.getRequestContent(), newRequest);
                            }

                            // changed?
                            if (!newRequest.equals(testRequest.getRequestContent())) {
                                if (createBackups) {
                                    ((WsdlTestCase) testCase).importTestStep(testStep,
                                            "Backup of [" + testStep.getName() + "]", -1, true).setDisabled(true);
                                }

                                ((WsdlRequest) testRequest).setRequestContent(newRequest);
                                count++;
View Full Code Here

                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

TOP

Related Classes of com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep

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.