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

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


  public void beforeLoadTest( LoadTestRunner loadTestRunner, LoadTestRunContext context )
  {
    super.beforeLoadTest( loadTestRunner, context );
    stateDependantComponents.setEnabled( false );

    WsdlLoadTest wsdlLoadTest = ( ( WsdlLoadTest )loadTestRunner.getLoadTest() );
    wsdlLoadTest.setThreadCount( startThreadCount );
  }
View Full Code Here


    // 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

    String name = UISupport.prompt( "Specify name of LoadTest", "New LoadTest",
        "LoadTest " + ( testCase.getLoadTestCount() + 1 ) );
    if( name == null )
      return;

    WsdlLoadTest loadTest = testCase.addNewLoadTest( name );
    UISupport.selectAndShow( loadTest );
  }
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

    }
  }

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

    super.beforeLoadTest( loadTestRunner, context );
    startTime = System.currentTimeMillis();
    if( infoLabel != null )
      infoLabel.setText( "starting.." );

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

    // 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

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

      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 ["
View Full Code Here

TOP

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

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.