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

Examples of com.eviware.soapui.impl.wsdl.teststeps.registry.WsdlTestStepFactory


     * @return TestStep
     */
    public static TestStep cloneTestStepForSecurityScan(WsdlTestStep sourceTestStep) {
        WsdlTestStep clonedTestStep = null;
        TestStepConfig testStepConfig = (TestStepConfig) sourceTestStep.getConfig().copy();
        WsdlTestStepFactory factory = WsdlTestStepRegistry.getInstance().getFactory(testStepConfig.getType());
        if (factory != null) {
            clonedTestStep = factory.buildTestStep(sourceTestStep.getTestCase(), testStepConfig, false);
            if (clonedTestStep instanceof Assertable) {
                for (TestAssertion assertion : ((Assertable) clonedTestStep).getAssertionList()) {
                    ((Assertable) clonedTestStep).removeAssertion(assertion);
                }
            }
View Full Code Here


            notifyPropertyChanged("maxResults", old, maxResults);
        }
    }

    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 addTestStep(TestStepConfig stepConfig) {
        return insertTestStep(stepConfig, -1, true);
    }

    public WsdlTestStep addTestStep(String type, String name) {
        WsdlTestStepFactory testStepFactory = WsdlTestStepRegistry.getInstance().getFactory(type);
        if (testStepFactory != null) {
            TestStepConfig newStepConfig = testStepFactory.createNewTestStep(this, name);
            if (newStepConfig != null) {
                return addTestStep(newStepConfig);
            }
        }
View Full Code Here

        return null;
    }

    public WsdlTestStep addTestStep(String type, String name, String endpoint, String method) {
        WsdlTestStepFactory requestStepFactory = WsdlTestStepRegistry.getInstance().getFactory(type);
        if (requestStepFactory instanceof HttpRequestStepFactory) {
            TestStepConfig newStepConfig = ((HttpRequestStepFactory) requestStepFactory).createNewTestStep(this, name, endpoint, method);
            if (newStepConfig != null) {
                return addTestStep(newStepConfig);
            }
View Full Code Here

        return null;
    }

    public WsdlTestStep insertTestStep(String type, String name, int index) {
        WsdlTestStepFactory testStepFactory = WsdlTestStepRegistry.getInstance().getFactory(type);
        if (testStepFactory != null) {
            TestStepConfig newStepConfig = testStepFactory.createNewTestStep(this, name);
            if (newStepConfig != null) {
                return insertTestStep(newStepConfig, index, false);
            }
        }
View Full Code Here

    }

    private TestStep cloneForSecurityScan(WsdlTestStep sourceTestStep) {
        WsdlTestStep clonedTestStep = null;
        TestStepConfig testStepConfig = (TestStepConfig) sourceTestStep.getConfig().copy();
        WsdlTestStepFactory factory = WsdlTestStepRegistry.getInstance().getFactory(testStepConfig.getType());
        if (factory != null) {
            clonedTestStep = factory.buildTestStep(securityTest.getTestCase(), testStepConfig, false);
            if (clonedTestStep instanceof Assertable) {
                for (TestAssertion assertion : ((Assertable) clonedTestStep).getAssertionList()) {
                    ((Assertable) clonedTestStep).removeAssertion(assertion);
                }
            }
View Full Code Here

        TestStepConfig testStepConfig = TestStepConfig.Factory.newInstance();
        testStepConfig.setType(HttpRequestStepFactory.HTTPREQUEST_TYPE);
        testStepConfig.setConfig(httpRequest);
        testStepConfig.setName("Separate Request");

        WsdlTestStepFactory factory = WsdlTestStepRegistry.getInstance().getFactory(
                (HttpRequestStepFactory.HTTPREQUEST_TYPE));
        return (HttpTestRequestStep) factory.buildTestStep((WsdlTestCase) testStep2.getTestCase(), testStepConfig,
                false);

    }
View Full Code Here

        WsdlTestStepRegistry registry = WsdlTestStepRegistry.getInstance();
        WsdlTestStepFactory[] factories = (WsdlTestStepFactory[]) registry.getFactories();

        for (int c = 0; c < factories.length; c++) {
            WsdlTestStepFactory factory = factories[c];
            if (factory.canCreate()) {
                DefaultActionMapping<WsdlTestStep> actionMapping = new DefaultActionMapping<WsdlTestStep>(
                        InsertWsdlTestStepAction.SOAPUI_ACTION_ID, null, factory.getTestStepIconPath(), false, factory);

                actionMapping.setName(factory.getTestStepName());
                actionMapping.setDescription(factory.getTestStepDescription());

                actions.add(actionMapping);
            }
        }
View Full Code Here

    public InsertWsdlTestStepAction() {
        super("Insert Step", "Inserts a TestStep at the position of this TestStep");
    }

    public void perform(WsdlTestStep testStep, Object param) {
        WsdlTestStepFactory factory = (WsdlTestStepFactory) param;
        WsdlTestCase testCase = testStep.getTestCase();

        if (!factory.canAddTestStepToTestCase(testCase)) {
            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

    public AddWsdlTestStepAction() {
        super("Add Step", "Adds a TestStep to this TestCase");
    }

    public void perform(WsdlTestCase testCase, Object param) {
        WsdlTestStepFactory factory = (WsdlTestStepFactory) param;

        if (!factory.canAddTestStepToTestCase(testCase)) {
            return;
        }

        String name = UISupport.prompt("Specify name for new step", "Add Step", factory.getTestStepName());

        if (name == null) {
            return;
        }
        while (testCase.getTestStepByName(name.trim()) != null) {
            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

TOP

Related Classes of com.eviware.soapui.impl.wsdl.teststeps.registry.WsdlTestStepFactory

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.