Package com.eviware.soapui.config

Examples of com.eviware.soapui.config.TestCaseConfig


       * all old ids in new imported test case.
       *
       * Here needs to be done for all test cases separatly.
       */
            for (int cnt2 = 0; cnt2 < config.getTestCaseList().size(); cnt2++) {
                TestCaseConfig newTestCase = config.getTestCaseList().get(cnt2);
                TestCaseConfig importTestCaseConfig = newTestSuiteConfig.getTestSuite().getTestCaseList().get(cnt2);
                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 (SecurityTestConfig scan : newTestCase.getSecurityTestList()) {
                    for (TestStepSecurityTestConfig secStepConfig : scan.getTestStepSecurityTestList()) {
View Full Code Here


        return (WsdlTestCase) getWsdlModelItemById(testCases, testCaseId);
    }

    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);
View Full Code Here

        if (index >= testCases.size()) {
            index = -1;
        }

        TestCaseConfig testCaseConfig = index == -1 ? (TestCaseConfig) getConfig().addNewTestCase().set(
                testCase.getConfig().copy()) : (TestCaseConfig) getConfig().insertNewTestCase(index).set(
                testCase.getConfig().copy());
        testCaseConfig.setName(name);

        if (!includeLoadTests) {
            testCaseConfig.setLoadTestArray(new LoadTestConfig[0]);
        }

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

        WsdlTestCase oldTestCase = testCase;
        testCase = buildTestCase(testCaseConfig, false);
View Full Code Here

        } finally {
            testCase.release();
            getConfig().removeTestCase(ix);
        }

        TestCaseConfig newConfig = (TestCaseConfig) getConfig().insertNewTestCase(ix).set(newTestCase)
                .changeType(TestCaseConfig.type);
        testCase = buildTestCase(newConfig, false);
        testCases.add(ix, testCase);
        testCase.afterLoad();
        fireTestCaseAdded(testCase);
View Full Code Here

        resolveImportedTestCase(testCase);
    }

    public void importTestCase(File file) {
        TestCaseConfig importTestCaseConfig = null;

        if (!file.exists()) {
            UISupport.showErrorMessage("Error loading test case ");
            return;
        }

        try {
            importTestCaseConfig = TestCaseDocumentConfig.Factory.parse(file).getTestCase();
        } catch (Exception e) {
            SoapUI.logError(e);
        }

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

      /*
 
View Full Code Here

     * and configured for LoadTesting
     */

    private synchronized WsdlTestCase createTestCase() {
        WsdlTestCase testCase = loadTest.getTestCase();
        TestCaseConfig config = null;

        if (blueprintConfig == null) {
            try {
                blueprintConfig = TestCaseConfig.Factory.parse(testCase.getConfig().xmlText());
                blueprintConfig.setLoadTestArray(new LoadTestConfig[0]);
View Full Code Here

        testSteps.remove(ix);
        testSteps.add(ix + offset, step);

        TestStepConfig[] configs = new TestStepConfig[testSteps.size()];

        TestCaseConfig conf = getConfig();
        for (int c = 0; c < testSteps.size(); c++) {
            if (offset > 0) {
                if (c < ix) {
                    configs[c] = (TestStepConfig) conf.getTestStepArray(c).copy();
                } else if (c < (ix + offset)) {
                    configs[c] = (TestStepConfig) conf.getTestStepArray(c + 1).copy();
                } else if (c == ix + offset) {
                    configs[c] = (TestStepConfig) conf.getTestStepArray(ix).copy();
                } else {
                    configs[c] = (TestStepConfig) conf.getTestStepArray(c).copy();
                }
            } else {
                if (c < ix + offset) {
                    configs[c] = (TestStepConfig) conf.getTestStepArray(c).copy();
                } else if (c == ix + offset) {
                    configs[c] = (TestStepConfig) conf.getTestStepArray(ix).copy();
                } else if (c <= ix) {
                    configs[c] = (TestStepConfig) conf.getTestStepArray(c - 1).copy();
                } else {
                    configs[c] = (TestStepConfig) conf.getTestStepArray(c).copy();
                }
            }
        }

        conf.setTestStepArray(configs);
        for (int c = 0; c < configs.length; c++) {
            (testSteps.get(c)).resetConfigOnMove(conf.getTestStepArray(c));
        }

        (getTestSuite()).fireTestStepMoved(step, ix, offset);
    }
View Full Code Here

    private WsdlTestCase createTestCase(WsdlTestCase testCase) {
        // clone config and remove and loadtests
        testCase.beforeSave();

        try {
            TestCaseConfig config = TestCaseConfig.Factory.parse(testCase.getConfig().xmlText());
            config.setLoadTestArray(new LoadTestConfig[0]);

            // clone entire testCase
            WsdlTestCase wsdlTestCase = testCase.getTestSuite().buildTestCase(config, true);
            wsdlTestCase.afterLoad();
            return wsdlTestCase;
View Full Code Here

TOP

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

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.