Package com.eviware.soapui.impl.wsdl.loadtest

Examples of com.eviware.soapui.impl.wsdl.loadtest.WsdlLoadTest


    public void recalculate(LoadTestRunner loadTestRunner, LoadTestRunContext context) {
        // calculate thread count
        WsdlLoadTestRunner runner = (WsdlLoadTestRunner) loadTestRunner;
        float progress = runner.getProgress();
        if ((int) progress != -1) {
            WsdlLoadTest wsdlLoadTest = ((WsdlLoadTest) loadTestRunner.getLoadTest());
            synchronized (wsdlLoadTest) {
                int newThreadCount = (int) (startThreadCount + (progress * (endThreadCount - startThreadCount) + 0.5));
                if (newThreadCount != wsdlLoadTest.getThreadCount() && newThreadCount <= endThreadCount) {
                    log.debug("Changing threadcount to " + newThreadCount + ", progress = " + progress);
                    wsdlLoadTest.setThreadCount(newThreadCount);
                }
            }
        }
    }
View Full Code Here


        }
    }

    private final class Updater implements Runnable {
        public void run() {
            WsdlLoadTest loadTest = statistics.getLoadTest();

            while (resolution > 0 && loadTest.isRunning()) {
                try {
                    if (loadTest.getHistoryLimit() != 0) {
                        updateHistory();
                    }

                    // chunck wait so we can get canceled..
                    long res = resolution;
                    while (res > 100 && resolution > 0 && loadTest.isRunning()) {
                        Thread.sleep(res);
                        res -= 100;
                    }

                    if (resolution > 0 && loadTest.isRunning()) {
                        Thread.sleep(res);
                    }
                } catch (InterruptedException e) {
                    SoapUI.logError(e);
                    break;
View Full Code Here

                "Copy of " + loadTest.getName());
        if (name == null) {
            return;
        }

        WsdlLoadTest newLoadTest = loadTest.getTestCase().cloneLoadTest(loadTest, name);
        UISupport.selectAndShow(newLoadTest);
    }
View Full Code Here

        return "testStep: " + getTargetStep() + ", minRequests: " + minRequests + ", maxErrors: " + maxErrors;
    }

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

        if (threadCount < 1) {
            threadCount = 1;
        }

        WsdlLoadTest wsdlLoadTest = ((WsdlLoadTest) loadTestRunner.getLoadTest());
        if (wsdlLoadTest.getThreadCount() != (int) threadCount) {
            log.debug("Changing threadcount to " + threadCount);
            wsdlLoadTest.setThreadCount((int) threadCount);
        }
    }
View Full Code Here

            wsdlLoadTest.setThreadCount((int) threadCount);
        }
    }

    public void afterLoadTest(LoadTestRunner testRunner, LoadTestRunContext context) {
        WsdlLoadTest wsdlLoadTest = (WsdlLoadTest) testRunner.getLoadTest();
        wsdlLoadTest.setThreadCount(baseThreadCount);
        stateDependantComponents.setEnabled(true);
    }
View Full Code Here

        startTime = System.currentTimeMillis();
        if (infoLabel != null) {
            infoLabel.setText("starting..");
        }

        WsdlLoadTest wsdlLoadTest = (WsdlLoadTest) loadTestRunner.getLoadTest();
        threadCount = wsdlLoadTest.getThreadCount();
        wsdlLoadTest.setThreadCount(0);
    }
View Full Code Here

    public void recalculate(LoadTestRunner loadTestRunner, LoadTestRunContext context) {
        // get time passed since start of test
        long timePassed = System.currentTimeMillis() - startTime;

        if (loadTestRunner.getStatus() == Status.RUNNING) {
            WsdlLoadTest wsdlLoadTest = (WsdlLoadTest) loadTestRunner.getLoadTest();
            String label = null;

            long mod = timePassed % (burstDelay + burstDuration);
            if (mod < burstDelay) {
                wsdlLoadTest.setThreadCount(0);
                label = (burstDelay - mod) / 1000 + "s delay left";
            } else {
                wsdlLoadTest.setThreadCount(threadCount);
                label = ((burstDelay + burstDuration) - mod) / 1000 + "s burst left";
            }

            if (infoLabel != null && !infoLabel.getText().equals(label)) {
                infoLabel.setText(label);
View Full Code Here

        if (infoLabel != null) {
            infoLabel.setText("");
        }

        // restore threadcount to original
        WsdlLoadTest wsdlLoadTest = (WsdlLoadTest) loadTestRunner.getLoadTest();
        wsdlLoadTest.setThreadCount(threadCount);
    }
View Full Code Here

        sampleInterval = reader.readInt(SAMPLE_INTERVAL_ELEMENT, 20);
    }

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

TOP

Related Classes of com.eviware.soapui.impl.wsdl.loadtest.WsdlLoadTest

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.