Package com.eviware.soapui.model.testsuite

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


    public void setStartStep(int startStep) {
        this.startStep = startStep;
    }

    public void onCancel(String reason) {
        TestStep currentStep = getRunContext().getCurrentStep();
        if (currentStep != null) {
            currentStep.cancel();
        }
    }
View Full Code Here


            currentStep.cancel();
        }
    }

    public void onFail(String reason) {
        TestStep currentStep = getRunContext().getCurrentStep();
        if (currentStep != null) {
            currentStep.cancel();
        }
    }
View Full Code Here

            testStepResults.remove(0);
        }
    }

    public void gotoStepByName(String stepName) {
        TestStep testStep = getTestCase().getTestStepByName(stepName);
        if (testStep != null) {
            gotoStep(getTestCase().getIndexOfTestStep(testStep));
        }
    }
View Full Code Here

    public String assertResult(LoadTestRunner loadTestRunner, LoadTestRunContext context, TestStepResult result,
                               TestCaseRunner testRunner, TestCaseRunContext runContext) {
        WsdlLoadTest loadTest = (WsdlLoadTest) loadTestRunner.getLoadTest();
        LoadTestStatistics statisticsModel = loadTest.getStatisticsModel();

        TestStep step = result.getTestStep();

        if (targetStepMatches(step)) {
            int index = step.getTestCase().getIndexOfTestStep(step);

            if (statisticsModel.getStatistic(index, Statistic.COUNT) >= minRequests
                    && result.getStatus() == TestStepStatus.FAILED) {
                return returnErrorOrFail("TestStep [" + step.getName() + "] result status is "
                        + result.getStatus().toString() + "; " + Arrays.toString(result.getMessages()), maxErrors,
                        loadTestRunner, context);
            } else {
                return null;
            }
View Full Code Here

    public String assertResult(LoadTestRunner loadTestRunner, LoadTestRunContext context, TestStepResult result,
                               TestCaseRunner testRunner, TestCaseRunContext runContext) {
        WsdlLoadTest loadTest = (WsdlLoadTest) loadTestRunner.getLoadTest();
        LoadTestStatistics statisticsModel = loadTest.getStatisticsModel();

        TestStep step = result.getTestStep();
        if (targetStepMatches(step)) {
            int index = step.getTestCase().getIndexOfTestStep(step);

            long average = statisticsModel.getStatistic(index, Statistic.AVERAGE);
            long count = statisticsModel.getStatistic(index, Statistic.AVERAGE);
            if (count > minRequests && (count % sampleInterval == 0) && average >= maxAverage) {
                return returnErrorOrFail("Average [" + average + "] exceeds limit [" + maxAverage + "]", maxErrors,
View Full Code Here

        maxErrors = reader.readInt(MAX_ERRORS_ELEMENT, -1);
    }

    public String assertResult(LoadTestRunner loadTestRunner, LoadTestRunContext context, TestStepResult result,
                               TestCaseRunner testRunner, TestCaseRunContext runContext) {
        TestStep step = result.getTestStep();
        if (targetStepMatches(step)) {
            WsdlLoadTest loadTest = (WsdlLoadTest) loadTestRunner.getLoadTest();
            LoadTestStatistics statisticsModel = loadTest.getStatisticsModel();

            int index = step.getTestCase().getIndexOfTestStep(step);

            long maximum = result.getTimeTaken();
            if (statisticsModel.getStatistic(index, Statistic.COUNT) > minRequests && maximum >= maxValue) {
                return returnErrorOrFail("Time [" + maximum + "] exceeds limit [" + maxValue + "]", maxErrors,
                        loadTestRunner, context);
View Full Code Here

                    List<SecurityScan> scanList = new ArrayList<SecurityScan>();
                    if (testStepSecurityTestListConfig != null) {
                        if (!testStepSecurityTestListConfig.getTestStepSecurityScanList().isEmpty()) {
                            for (SecurityScanConfig secScanConfig : testStepSecurityTestListConfig
                                    .getTestStepSecurityScanList()) {
                                TestStep testStep = null;
                                for (TestStep ts : testCase.getTestSteps().values()) {
                                    if (testStepSecurityTestListConfig.getTestStepId().equals(ts.getId())) {
                                        testStep = ts;
                                        SecurityScan securityScan = SoapUI.getSoapUICore().getSecurityScanRegistry()
                                                .getFactory(secScanConfig.getType())
View Full Code Here

    public Object getProperty(String name) {
        return getProperty(name, testStep, testStep == null ? null : (WsdlTestCase) testStep.getTestCase());
    }

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

                + maxRelativeErrors;
    }

    public String assertResult(LoadTestRunner loadTestRunner, LoadTestRunContext context, TestStepResult result,
                               TestCaseRunner testRunner, TestCaseRunContext runContext) {
        TestStep step = result.getTestStep();
        if (targetStepMatches(step)) {
            WsdlLoadTest loadTest = (WsdlLoadTest) loadTestRunner.getLoadTest();
            LoadTestLog loadTestLog = loadTest.getLoadTestLog();

            int errorCount = loadTestLog.getErrorCount(step.getName());
            if (maxAbsoluteErrors >= 0 && errorCount > maxAbsoluteErrors) {
                loadTestRunner.fail("Maximum number of errors [" + maxAbsoluteErrors + "] exceeded for step ["
                        + step.getName() + "]");
            }

            int index = step.getTestCase().getIndexOfTestStep(step);

            LoadTestStatistics statisticsModel = loadTest.getStatisticsModel();
            long totalSteps = statisticsModel.getStatistic(index, Statistic.COUNT);
            float relativeErrors = (float) errorCount / (float) totalSteps;

            if (maxRelativeErrors > 0 && relativeErrors > maxRelativeErrors) {
                loadTestRunner.fail("Maximum relative number of errors [" + maxRelativeErrors + "] exceeded for step ["
                        + step.getName() + "]");
            }
        }

        return null;
    }
View Full Code Here

        maxErrors = reader.readInt(MAX_ERRORS_ELEMENT, -1);
    }

    public String assertResult(LoadTestRunner loadTestRunner, LoadTestRunContext context, TestStepResult result,
                               TestCaseRunner testRunner, TestCaseRunContext runContext) {
        TestStep step = result.getTestStep();
        if (targetStepMatches(step)) {
            WsdlLoadTest loadTest = (WsdlLoadTest) loadTestRunner.getLoadTest();
            LoadTestStatistics statisticsModel = loadTest.getStatisticsModel();

            int index = step.getTestCase().getIndexOfTestStep(step);

            long tps = statisticsModel.getStatistic(index, Statistic.TPS);
            if (statisticsModel.getStatistic(index, Statistic.COUNT) >= minRequests && tps < minValue) {
                return returnErrorOrFail("TPS [" + tps + "] is less than limit [" + minValue + "]", maxErrors,
                        loadTestRunner, context);
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.