Package com.eviware.soapui.impl.wsdl.testcase

Examples of com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase


        }

    }

    public WsdlTestCase buildTestCase(TestCaseConfig testCaseConfig, boolean forLoadTest) {
        return new WsdlTestCase(this, testCaseConfig, forLoadTest);
    }
View Full Code Here


    public WsdlTestCase cloneTestCase(WsdlTestCase testCase, String name) {
        testCase.beforeSave();
        TestCaseConfig newTestCase = getConfig().addNewTestCase();
        newTestCase.set(testCase.getConfig());
        newTestCase.setName(name);
        WsdlTestCase newWsdlTestCase = buildTestCase(newTestCase, false);
        ModelSupport.createNewIds(newWsdlTestCase);
        newWsdlTestCase.afterLoad();

        testCases.add(newWsdlTestCase);
        fireTestCaseAdded(newWsdlTestCase);

        return newWsdlTestCase;
View Full Code Here

        return newWsdlTestCase;
    }

    public WsdlTestCase addNewTestCase(String name) {
        WsdlTestCase testCase = buildTestCase(getConfig().addNewTestCase(), false);
        testCase.setName(name);
        testCase.setFailOnError(true);
        testCase.setSearchProperties(true);
        testCases.add(testCase);
        fireTestCaseAdded(testCase);

        return testCase;
    }
View Full Code Here

        if (createCopy) {
            testCaseConfig.setSecurityTestArray(new SecurityTestConfig[0]);
        }

        WsdlTestCase oldTestCase = testCase;
        testCase = buildTestCase(testCaseConfig, false);

        if (createCopy) {
            ModelSupport.createNewIds(testCase);
        }
View Full Code Here

     * @param ix
     * @param offset
     */

    public WsdlTestCase moveTestCase(int ix, int offset) {
        WsdlTestCase testCase = testCases.get(ix);

        if (offset == 0) {
            return testCase;
        }

View Full Code Here

        }

        if (importTestCaseConfig != null) {
            TestCaseConfig newConfig = (TestCaseConfig) getConfig().addNewTestCase().set(importTestCaseConfig)
                    .changeType(TestCaseConfig.type);
            WsdlTestCase newTestCase = buildTestCase(newConfig, false);
            ModelSupport.createNewIds(newTestCase);

      /*
             * security test keeps reference to test step by id, which gets changed
       * during importing, so old values needs to be rewritten to new ones.
       *
       * Create tarnsition table ( old id , new id ) and use it to replace
       * all old ids in new imported test case.
       */
            LinkedHashMap<String, String> oldNewIds = new LinkedHashMap<String, String>();
            for (int cnt = 0; cnt < importTestCaseConfig.getTestStepList().size(); cnt++) {
                oldNewIds.put(importTestCaseConfig.getTestStepList().get(cnt).getId(), newTestCase.getTestStepList()
                        .get(cnt).getId());
            }

            for (SecurityTest scan : newTestCase.getSecurityTests().values()) {
                for (TestStepSecurityTestConfig secStepConfig : scan.getConfig().getTestStepSecurityTestList()) {
                    if (oldNewIds.containsKey(secStepConfig.getTestStepId())) {
                        secStepConfig.setTestStepId(oldNewIds.get(secStepConfig.getTestStepId()));
                    }
                }
            }

            newTestCase.afterLoad();

            testCases.add(newTestCase);
            fireTestCaseAdded(newTestCase);

            resolveImportedTestCase(newTestCase);
View Full Code Here

    }

    public void afterCopy(WsdlTestSuite oldTestSuite) {

        for (int i = 0; i < testCases.size(); i++) {
            WsdlTestCase testCase = getTestCaseAt(i);
            WsdlTestCase oldTestCase = oldTestSuite.getTestCaseAt(i);

            testCase.afterCopy(oldTestSuite, oldTestCase);
            testCase.importSecurityTests(oldTestSuite, oldTestCase);
        }
View Full Code Here

        return restResource;
    }


    public WsdlTestCase makeTestCase() throws SoapUIException {
        return new WsdlTestCase(new WsdlTestSuite(project, TestSuiteConfig.Factory.newInstance()), TestCaseConfig.Factory.newInstance(), false);
    }
View Full Code Here

    public static WsdlProject makeWsdlProject() throws SoapUIException {
        return new WsdlProject((WorkspaceImpl) WorkspaceFactory.getInstance().openWorkspace("testWorkSpace", new StringToStringMap()));
    }

    public static WsdlTestCase makeTestCase() throws SoapUIException {
        return new WsdlTestCase(new WsdlTestSuite(makeWsdlProject(), TestSuiteConfig.Factory.newInstance()), TestCaseConfig.Factory.newInstance(), false);
    }
View Full Code Here

        try {
            String compositeLoadTestName = loadTests[0];
            String[] names = compositeLoadTestName.split(" - ");
            String testCaseName = names[0];
            String loadTestName = names[1];
            WsdlTestCase testCase = testSuite.getTestCaseByName(testCaseName);
            HashMap<String, Object> firstSamplerSettings;
            // String loadUITestCaseAddedTo = "";
            String loadUIProjectAddedTo = "";
            if (testCase != null) {
                WsdlLoadTest loadTest = (WsdlLoadTest) testCase.getLoadTestByName(loadTestName);
                if (loadTest != null) {
                    firstSamplerSettings = exportLoadTestToLoadUI(loadTest, loadUIProject, CREATE_NEW_OPTION,
                            CREATE_NEW_OPTION);
                    // loadUITestCaseAddedTo = ( String )firstSamplerSettings.get(
                    // ContextMapping.LOADUI_TEST_CASE_NAME );
                    loadUIProjectAddedTo = (String) firstSamplerSettings.get(ContextMapping.LOADUI_PROJECT_NAME);
                }

            }

            for (int i = 1; i < loadTests.length; i++) {
                compositeLoadTestName = loadTests[i];
                loadTestName = loadTests[i];
                WsdlLoadTest loadTest = (WsdlLoadTest) testCase.getLoadTestByName(loadTestName);
                testCaseName = names[0];
                loadTestName = names[1];
                testCase = testSuite.getTestCaseByName(testCaseName);
                if (testCase != null) {
                    loadTest = (WsdlLoadTest) testCase.getLoadTestByName(loadTestName);
                    if (loadTest != null) {
                        exportLoadTestToLoadUI(loadTest, loadUIProjectAddedTo, CREATE_NEW_OPTION, CREATE_NEW_OPTION);
                    }

                }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase

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.