Package com.eviware.soapui.model.testsuite

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


        }

        samplesMap.get( testStep ).addTestStepResult( result );
      }

      TestCase testCase = loadTest.getTestCase();

      TestSample[] samples = new TestSample[testCase.getTestStepCount()];
      for( int c = 0; c < samples.length; c++ )
      {
        samples[c] = samplesMap.get( testCase.getTestStepAt( c ) );
      }

      addSamples( samples );
    }
View Full Code Here


    public void afterTestStep( LoadTestRunner loadTestRunner, LoadTestRunContext context, TestCaseRunner testRunner,
        TestCaseRunContext runContext, TestStepResult testStepResult )
    {
      if( loadTest.getUpdateStatisticsPerTestStep() )
      {
        TestCase testCase = testRunner.getTestCase();

        if( testStepResult == null )
        {
          log.warn( "Result is null in TestCase [" + testCase.getName() + "]" );
          return;
        }

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

        int index = testCase.getIndexOfTestStep( testStepResult.getTestStep() );
        sampleCounts[index]++ ;

        samples[index] += testStepResult.getTimeTaken();
        sizes[index] += testStepResult.getSize();
View Full Code Here

      if( testRunner.getStatus() == TestRunner.Status.CANCELED
          && testRunner.getReason().equals( NO_STATS_TESTCASE_CANCEL_REASON ) )
        return;

      List<TestStepResult> results = testRunner.getResults();
      TestCase testCase = testRunner.getTestCase();

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

        super(testSuite, testSuite.getProject(), treeModel);

        testSuite.addTestSuiteListener(internalTestSuiteListener);

        for (int c = 0; c < testSuite.getTestCaseCount(); c++) {
            TestCase testCase = testSuite.getTestCaseAt(c);
            testCase.addPropertyChangeListener(TestCase.NAME_PROPERTY, propertyChangeListener);
            testCaseNodes.add(new TestCaseTreeNode(testCase, getTreeModel()));
        }

        getTreeModel().mapModelItems(testCaseNodes);
View Full Code Here

                e.printStackTrace();
            }
        }

        if (httpRequest instanceof TestRequest) {
            TestCase tc = ((TestRequest) httpRequest).getTestStep().getTestCase();
            if (tc instanceof WsdlTestCase && ((WsdlTestCase) tc).isForLoadTest()) {
                initHeadersForLoadTest(httpMethod);
                return;
            }
        }
View Full Code Here

        }
        return "No reports..:";
    }

    public void afterRun(TestCaseRunner testRunner, TestCaseRunContext runContext) {
        TestCase testCase = testRunner.getTestCase();
        JUnitReport report = reports.get(testCase.getTestSuite().getName());

        if (Status.INITIALIZED != testRunner.getStatus() && Status.RUNNING != testRunner.getStatus()) {
            if (Status.CANCELED == testRunner.getStatus()) {
                report.addTestCase(testCase.getName(), testRunner.getTimeTaken());
            }
            if (Status.FAILED == testRunner.getStatus()) {
                String msg = "";
                if (failures.containsKey(testCase)) {
                    msg = failures.get(testCase).toString();
                }
                report.addTestCaseWithFailure(testCase.getName(), testRunner.getTimeTaken(), testRunner.getReason(), msg);
            }
            if (Status.FINISHED == testRunner.getStatus()) {
                report.addTestCase(testCase.getName(), testRunner.getTimeTaken());
            }

        }
    }
View Full Code Here

        }
    }

    public void afterStep(TestCaseRunner testRunner, TestCaseRunContext runContext, TestStepResult result) {
        TestStep currentStep = result.getTestStep();
        TestCase testCase = currentStep.getTestCase();

        if (result.getStatus() == TestStepStatus.FAILED) {
            if (maxErrors > 0) {
                Integer errors = errorCount.get(testCase);
                if (errors == null) {
View Full Code Here

            failures.put(testCase, buf.toString());
        }
    }

    public void beforeRun(TestCaseRunner testRunner, TestCaseRunContext runContext) {
        TestCase testCase = testRunner.getTestCase();
        TestSuite testSuite = testCase.getTestSuite();
        if (!reports.containsKey(testSuite.getName())) {
            JUnitReport report = new JUnitReport();
            report.setTestSuiteName(testSuite.getProject().getName() + "." + testSuite.getName());
            reports.put(testSuite.getName(), report);
        }
View Full Code Here

                                  SecurityTestStepResult result) {
    }

    @Override
    public void afterRun(TestCaseRunner testRunner, SecurityTestRunContext runContext) {
        TestCase testCase = testRunner.getTestCase();

        SecurityTest securityTest = ((SecurityTestRunner) testRunner).getSecurityTest();

        JUnitReport report = new JUnitReport();
        String reportName = securityTest.getName();
        report.setTestSuiteName(reportName);
        report.setPackage(testCase.getTestSuite().getProject().getName());
        int errorCount = 0;

        for (TestStep ts : testCase.getTestStepList()) {
            SecurityTestStepResult secuTestStepResult = securityTest.getSecurityTestStepResultMap().get(ts);
            if (secuTestStepResult != null) {
                for (SecurityScanResult scanResult : secuTestStepResult.getSecurityScanResultList()) {
                    List<SecurityScanRequestResult> resultList = scanResult.getSecurityRequestResultList();
                    Testcase secTestCase = report.addTestCase(ts.getName() + " - " + scanResult.getSecurityScanName(),
                            scanResult.getTimeTaken());

                    secTestCase.setPackage(testCase.getTestSuite().getProject().getName());

                    for (int i = 0; i < resultList.size(); i++) {
                        SecurityScanRequestResult scanRequestResult = resultList.get(i);
                        if (scanRequestResult.getStatus() == ResultStatus.FAILED) {
                            StringBuffer result = new StringBuffer();
View Full Code Here

                }

                samplesMap.get(testStep).addTestStepResult(result);
            }

            TestCase testCase = loadTest.getTestCase();

            TestSample[] samples = new TestSample[testCase.getTestStepCount()];
            for (int c = 0; c < samples.length; c++) {
                samples[c] = samplesMap.get(testCase.getTestStepAt(c));
            }

            addSamples(samples);
        }
View Full Code Here

TOP

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

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.