Examples of TestStepResult


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

    @Override
    public TestStepResult runTestStep(TestStep testStep, boolean discard, boolean process) {
        if (!runBeforeSteps(testStep)) {
            return null;
        }
        TestStepResult stepResult = testStep.run(this, getRunContext());
        getResults().add(stepResult);
        setResultCount(getResultCount() + 1);
        // enforceMaxResults( getTestRunnable().getMaxResults() );

        // discard?
View Full Code Here

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

        // 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;
                    }
                    //if step is failed and scan not applicable to failed steps just set it to skipped
                    //run scan otherwise
                    if (stepResult.getStatus() == TestStepStatus.FAILED && !securityScan.isApplyForFailedStep()) {
                        SecurityScanResult securityScanResult = new SecurityScanResult(securityScan);
                        if (securityScan.getAssertionCount() > 0) {
                            securityScanResult.setStatus(ResultStatus.OK);
                        } else if (securityScan instanceof AbstractSecurityScanWithProperties) {
                            if (((AbstractSecurityScanWithProperties) securityScan).getParameterHolder().getParameterList()
View Full Code Here

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

            long[] samples = new long[testCase.getTestStepCount()];
            long[] sizes = new long[samples.length];
            long[] sampleCounts = new long[samples.length];

            for (int c = 0; c < results.size(); c++) {
                TestStepResult testStepResult = results.get(c);
                if (testStepResult == null) {
                    log.warn("Result [" + c + "] is null in TestCase [" + testCase.getName() + "]");
                    continue;
                }

                int index = testCase.getIndexOfTestStep(testStepResult.getTestStep());
                if (index >= 0) {
                    sampleCounts[index]++;

                    samples[index] += testStepResult.getTimeTaken();
                    sizes[index] += testStepResult.getSize();
                }
            }

            pushSamples(samples, sizes, sampleCounts, testRunner.getStartTime(), testRunner.getTimeTaken(), true);
        }
View Full Code Here

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

    @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;
            }

            if (!isRunning()) {
View Full Code Here

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

    public TestStepResult runTestStep(TestStep testStep, boolean discard, boolean process) {
        if (!runBeforeSteps(testStep)) {
            return null;
        }

        TestStepResult stepResult = testStep.run(this, getRunContext());

        testStepResults.add(stepResult);
        resultCount++;
        // TODO check all replacements of getTestRunnable with getTestCase in the
        // method
        // enforceMaxResults( getTestRunnable().getMaxResults() );
        enforceMaxResults(getTestCase().getMaxResults());

        for (int i = 0; i < testRunListeners.length; i++) {
            if (Arrays.asList(getTestCase().getTestRunListeners()).contains(testRunListeners[i])) {
                testRunListeners[i].afterStep(this, getRunContext(), stepResult);
            }
        }

        // discard?
        // if( discard && stepResult.getStatus() == TestStepStatus.OK &&
        // getTestRunnable().getDiscardOkResults()
        if (discard && stepResult.getStatus() == TestStepStatus.OK && getTestCase().getDiscardOkResults()
                && !stepResult.isDiscarded()) {
            stepResult.discard();
        }

        if (process && stepResult.getStatus() == TestStepStatus.FAILED) {
            // if( getTestRunnable().getFailOnError() )
            if (getTestCase().getFailOnError()) {
                setError(stepResult.getError());
                fail("Cancelling due to failed test step");
            } else {
                getRunContext().setProperty(TestCaseRunner.Status.class.getName(), TestCaseRunner.Status.FAILED);
            }
        }
View Full Code Here

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

    public abstract WsdlTestCase getTestCase();

    public long getTimeTaken() {
        long sum = 0;
        for (int c = 0; c < testStepResults.size(); c++) {
            TestStepResult testStepResult = testStepResults.get(c);
            if (testStepResult != null) {
                sum += testStepResult.getTimeTaken();
            }
        }

        return sum;
    }
View Full Code Here

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

                TestCaseLogItem logItem = (TestCaseLogItem) value;
                String msg = logItem.getMsg();
                setText(msg == null ? "" : msg);
            }

            TestStepResult result = logListModel.getResultAt(index);
            if (result != null && !getText().startsWith(" ->")) {
                hyperlinkLabel.setText(getText());
                hyperlinkLabel.setBackground(getBackground());
                hyperlinkLabel.setEnabled(list.isEnabled());

                if (result.getStatus() == TestStepStatus.OK) {
                    hyperlinkLabel.setIcon(UISupport.createImageIcon("/valid_assertion.gif"));
                } else if (result.getStatus() == TestStepStatus.FAILED) {
                    hyperlinkLabel.setIcon(UISupport.createImageIcon("/failed_assertion.gif"));
                } else {
                    hyperlinkLabel.setIcon(UISupport.createImageIcon("/unknown_assertion.gif"));
                }
View Full Code Here

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

    private final class LogListMouseListener extends MouseAdapter {
        public void mouseClicked(MouseEvent e) {
            int index = testLogList.getSelectedIndex();
            if (index != -1 && (index == selectedIndex || e.getClickCount() > 1)) {
                TestStepResult result = logListModel.getResultAt(index);
                if (result != null && result.getActions() != null) {
                    result.getActions().performDefaultAction(new ActionEvent(this, 0, null));
                }
            }

            selectedIndex = index;
        }
View Full Code Here

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

            if (testLogList.getSelectedIndex() != row) {
                testLogList.setSelectedIndex(row);
            }

            TestStepResult result = logListModel.getResultAt(row);
            if (result == null) {
                return;
            }

            ActionList actions = result.getActions();

            if (actions == null || actions.getActionCount() == 0) {
                return;
            }
View Full Code Here

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

            LoadTestStatistics statisticsModel = loadTest.getStatisticsModel();

            long sum = 0;
            List<TestStepResult> results = testRunner.getResults();
            for (int c = 0; c < results.size(); c++) {
                TestStepResult result = results.get(c);
                if (result == null) {
                    log.warn("Result [" + c + "] is null in TestCase [" + testRunner.getTestCase().getName() + "]");
                    continue;
                }

                sum += result.getTimeTaken();
            }

            if (statisticsModel.getStatistic(LoadTestStatistics.TOTAL, Statistic.COUNT) >= minRequests
                    && sum >= maxValue) {
                return returnErrorOrFail("Time [" + sum + "] exceeds limit [" + maxValue + "]", maxErrors, loadTestRunner,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.