Package com.eviware.soapui.model.testsuite

Examples of com.eviware.soapui.model.testsuite.TestStep


            long timestamp = System.currentTimeMillis();
            List<LoadTestStepSample[]> s = new ArrayList<LoadTestStepSample[]>();
            List<TestStepResult> testResults = testRunner.getResults();

            for (int c = 0; c < loadTest.getTestCase().getTestStepCount(); c++) {
                TestStep testStep = loadTest.getTestCase().getTestStepAt(c);
                List<LoadTestStepSample> results = new ArrayList<LoadTestStepSample>();

                for (int i = 0; i < testResults.size(); i++) {
                    TestStepResult stepResult = testResults.get(i);
                    if (stepResult == null) {
View Full Code Here


        // flag for detecting if running has been interrupted either by canceling
        // securityScanRequest
        // or if request result is null(backward compatibility for running
        // TestCase )
        boolean jumpExit = false;
        TestStep currentStep = runContext.getCurrentStep();
        securityTestStepListeners = securityTest.getTestStepRunListeners(currentStep);
        if (!currentStep.isDisabled() && !securityTest.skipTest(currentStep)) {
            TestStepResult stepResult = runTestStep(currentStep, true, true);
            if (stepResult == null) {
                jumpExit = true;
            }
            // if( !isRunning() )
            // return -2;

            SecurityTestStepResult securityStepResult = new SecurityTestStepResult(currentStep, stepResult);
            for (int i = 0; i < securityTestListeners.length; i++) {
                if (Arrays.asList(getSecurityTest().getSecurityTestRunListeners()).contains(securityTestListeners[i])) {
                    securityTestListeners[i].afterOriginalStep(this, getRunContext(), securityStepResult);
                }
            }

            for (int i = 0; i < securityTestListeners.length; i++) {
                if (Arrays.asList(getSecurityTest().getSecurityTestRunListeners()).contains(securityTestListeners[i])) {
                    securityTestListeners[i].beforeStep(this, getRunContext(), stepResult);
                }
            }
            for (int i = 0; i < securityTestStepListeners.length; i++) {
                if (Arrays.asList(getSecurityTest().getSecurityTestRunListeners())
                        .contains(securityTestStepListeners[i])) {
                    securityTestStepListeners[i].beforeStep(this, getRunContext(), stepResult);
                }
            }
            Map<String, List<SecurityScan>> secScanMap = securityTest.getSecurityScansMap();
            if (secScanMap.containsKey(currentStep.getId())) {
                List<SecurityScan> testStepScansList = secScanMap.get(currentStep.getId());
                for (int i = 0; i < testStepScansList.size(); i++) {
                    SecurityScan securityScan = testStepScansList.get(i);
                    // if security scan is disabled skip it.
                    if (securityScan.isDisabled() || securityScan.isSkipFurtherRunning()) {
                        continue;
View Full Code Here

    public synchronized void setProperty(String name, Object value) {
        if (context != null) {
            int ix = name.indexOf(PropertyExpansion.PROPERTY_SEPARATOR);
            if (ix > 0) {
                String teststepname = name.substring(0, ix);
                TestStep refTestStep = context.getTestCase().getTestStepByName(teststepname);
                if (refTestStep != null) {
                    TestProperty property = refTestStep.getProperty(name.substring(ix + 1));
                    if (property != null && !property.isReadOnly()) {
                        property.setValue(value.toString());
                        return;
                    }
                }
View Full Code Here

        for (SecurityTest secTest : oldTestCase.getSecurityTestList()) {
            SecurityTest newSecurityTest = addNewSecurityTest(secTest.getName());
            for (int i = 0; i < oldTestCase.getTestStepList().size(); i++)

            {
                TestStep oldStep = oldTestCase.getTestStepAt(i);
                TestStep newStep = getTestStepAt(i);
                for (SecurityScan secCheck : secTest.getTestStepSecurityScans(oldStep.getId())) {
                    newSecurityTest.importSecurityScan(newStep, secCheck, true);
                }
            }
        }
View Full Code Here

        return new WsdlTestRunContext(this, properties, this.getTestCase());
    }

    @Override
    protected int runCurrentTestStep(WsdlTestRunContext runContext, int currentStepIndex) {
        TestStep currentStep = runContext.getCurrentStep();
        if (!currentStep.isDisabled()) {
            TestStepResult stepResult = runTestStep(currentStep, true, true);
            if (stepResult == null) {
                return -2;
            }
View Full Code Here

    public TestCaseRunner getTestRunner() {
        return testRunner;
    }

    public Object getProperty(String testStepName, String propertyName) {
        TestStep testStep = getTestCase().getTestStepByName(testStepName);
        return testStep == null ? null : testStep.getPropertyValue(propertyName);
    }
View Full Code Here

        return oldValue;
    }

    public Object getProperty(String name) {
        WsdlTestCase testCase = (WsdlTestCase) getTestCase();
        TestStep testStep = currentStepIndex >= 0 && currentStepIndex < testCase.getTestStepCount() ? testCase
                .getTestStepAt(currentStepIndex) : null;

        return getProperty(name, testStep, testCase);
    }
View Full Code Here

            TestStepNode node = (TestStepNode) securityTestTree.getLastSelectedPathComponent();
            if (!node.getAllowsChildren()) {
                return;
            }

            TestStep testStep = node.getTestStep();

            String[] availableScanNames = SoapUI.getSoapUICore().getSecurityScanRegistry()
                    .getAvailableSecurityScansNames(testStep);
            availableScanNames = securityTest.getAvailableSecurityScanNames(testStep, availableScanNames);
View Full Code Here

            return propertyModelItem == contextModelItem
                    || (propertyModelItem instanceof TestSuite && ((TestCase) contextModelItem).getTestSuite() == propertyModelItem);
        }

        if (contextModelItem instanceof TestStep) {
            TestStep testStep = ((TestStep) contextModelItem);

            return propertyModelItem == contextModelItem
                    || (propertyModelItem instanceof TestSuite && testStep.getTestCase().getTestSuite() == propertyModelItem)
                    || (propertyModelItem instanceof TestCase && testStep.getTestCase() == propertyModelItem)
                    || (propertyModelItem instanceof TestStep && testStep.getTestCase() == ((TestStep) propertyModelItem)
                    .getTestCase());
        }

        if (contextModelItem instanceof MockService) {
            return propertyModelItem == contextModelItem;
        }

        if (contextModelItem instanceof MockOperation) {
            return propertyModelItem == contextModelItem
                    || (propertyModelItem instanceof MockService && ((MockOperation) contextModelItem).getMockService() == propertyModelItem);
        }

        if (contextModelItem instanceof MockResponse) {
            MockResponse testStep = ((MockResponse) contextModelItem);

            return propertyModelItem == contextModelItem
                    || (propertyModelItem instanceof MockService && testStep.getMockOperation().getMockService() == propertyModelItem)
                    || (propertyModelItem instanceof MockOperation && testStep.getMockOperation() == propertyModelItem)
                    || (propertyModelItem instanceof MockResponse && testStep.getMockOperation() == ((MockResponse) propertyModelItem)
                    .getMockOperation());
        }

        if (contextModelItem instanceof SecurityTest) {
            SecurityTest securityTest = ((SecurityTest) contextModelItem);
View Full Code Here

            if (securityTestTree.getSelectionCount() == 1) {
                SecurityScanNode node = (SecurityScanNode) securityTestTree.getLastSelectedPathComponent();
                SecurityScan securityScan = node.getSecurityScan();

                TestStep testStep = ((TestStepNode) node.getParent()).getTestStep();
                if (UISupport.confirm("Remove security scan [" + securityScan.getName() + "]", "Remove SecurityScan")) {
                    securityTest.removeSecurityScan(testStep, (SecurityScan) securityScan);
                }
            } else {
                SecurityScanNode node = (SecurityScanNode) securityTestTree.getLastSelectedPathComponent();

                TestStep testStep = ((TestStepNode) node.getParent()).getTestStep();
                if (UISupport.confirm("Remove all selected security scans", "Remove SecurityScan")) {
                    for (TreePath path : securityTestTree.getSelectionPaths()) {
                        if (path.getLastPathComponent() instanceof SecurityScanNode) {
                            SecurityScan securityScan = ((SecurityScanNode) path.getLastPathComponent()).getSecurityScan();
                            securityTest.removeSecurityScan(testStep, (SecurityScan) securityScan);
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.testsuite.TestStep

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.