Examples of LoadTestStatistics


Examples of com.eviware.soapui.impl.wsdl.loadtest.data.LoadTestStatistics

    loadStrategy = factory.build( ls.getConfig(), this );
    loadStrategy.addConfigurationChangeListener( loadStrategyListener );

    addLoadTestRunListener( loadStrategy );

    statisticsModel = new LoadTestStatistics( this );

    if( getConfig().xgetSampleInterval() == null )
      setSampleInterval( LoadTestStatistics.DEFAULT_SAMPLE_INTERVAL );

    statisticsModel.setUpdateFrequency( getSampleInterval() );
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.loadtest.data.LoadTestStatistics

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

Examples of com.eviware.soapui.impl.wsdl.loadtest.data.LoadTestStatistics

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

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

      if( maxRelativeErrors > 0 && relativeErrors > maxRelativeErrors )
        loadTestRunner.fail( "Maximum relative number of errors [" + maxRelativeErrors + "] exceeded" );
    }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.loadtest.data.LoadTestStatistics

  {
    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

Examples of com.eviware.soapui.impl.wsdl.loadtest.data.LoadTestStatistics

      TestCaseRunContext runContext )
  {
    if( ALL_TEST_STEPS.equals( getTargetStep() ) )
    {
      WsdlLoadTest loadTest = ( WsdlLoadTest )loadTestRunner.getLoadTest();
      LoadTestStatistics statisticsModel = loadTest.getStatisticsModel();

      long tps = statisticsModel.getStatistic( LoadTestStatistics.TOTAL, Statistic.TPS );

      if( statisticsModel.getStatistic( LoadTestStatistics.TOTAL, Statistic.COUNT ) > minRequests && tps < minValue )
      {
        return returnErrorOrFail( "TPS [" + tps + "] is less than limit [" + minValue + "]", maxErrors,
            loadTestRunner, context );
      }
    }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.loadtest.data.LoadTestStatistics

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

Examples of com.eviware.soapui.impl.wsdl.loadtest.data.LoadTestStatistics

  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,
            loadTestRunner, context );
      }
    }
    else if( ALL_TEST_STEPS.equals( getTargetStep() ) )
    {
      long average = statisticsModel.getStatistic( LoadTestStatistics.TOTAL, Statistic.AVERAGE );
      long count = statisticsModel.getStatistic( LoadTestStatistics.TOTAL, Statistic.COUNT );
      if( count > minRequests && ( count % sampleInterval == 0 ) && average >= maxAverage )
      {
        return returnErrorOrFail( "Average [" + average + "] exceeds limit [" + maxAverage + "]", maxErrors,
            loadTestRunner, context );
      }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.loadtest.data.LoadTestStatistics

  {
    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

Examples of com.eviware.soapui.impl.wsdl.loadtest.data.LoadTestStatistics

      TestCaseRunContext runContext )
  {
    if( ALL_TEST_STEPS.equals( getTargetStep() ) )
    {
      WsdlLoadTest loadTest = ( WsdlLoadTest )loadTestRunner.getLoadTest();
      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,
            context );
      }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.loadtest.data.LoadTestStatistics

        loadStrategy = factory.build(ls.getConfig(), this);
        loadStrategy.addConfigurationChangeListener(loadStrategyListener);

        addLoadTestRunListener(loadStrategy);

        statisticsModel = new LoadTestStatistics(this);

        if (getConfig().xgetSampleInterval() == null) {
            setSampleInterval(LoadTestStatistics.DEFAULT_SAMPLE_INTERVAL);
        }
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.