Package com.eviware.soapui.model.testsuite

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


      if( !isRunning() )
        return null;
    }

    TestStepResult stepResult = testStep.run( this, getRunContext() );

    testStepResults.add( stepResult );
    resultCount++ ;
    // TODO check all replacements of getTestRunnable with getTestCase in the
    // method
    // enforceMaxResults( getTestRunnable().getMaxResults() );
    enforceMaxResults( getTestCase().getMaxResults() );

    for( int i = 0; i < testRunListeners.length; i++ )
    {
      if( Arrays.asList( getTestCase().getTestRunListeners() ).contains( testRunListeners[i] ) )
        testRunListeners[i].afterStep( this, getRunContext(), stepResult );
    }

    // discard?
    // if( discard && stepResult.getStatus() == TestStepStatus.OK &&
    // getTestRunnable().getDiscardOkResults()
    if( discard && stepResult.getStatus() == TestStepStatus.OK && getTestCase().getDiscardOkResults()
        && !stepResult.isDiscarded() )
    {
      stepResult.discard();
    }

    if( process && stepResult.getStatus() == TestStepStatus.FAILED )
    {
      // if( getTestRunnable().getFailOnError() )
      if( getTestCase().getFailOnError() )
      {
        setError( stepResult.getError() );
        fail( "Cancelling due to failed test step" );
      }
      else
      {
        getRunContext().setProperty( TestCaseRunner.Status.class.getName(), TestCaseRunner.Status.FAILED );
View Full Code Here


  public long getTimeTaken()
  {
    long sum = 0;
    for( int c = 0; c < testStepResults.size(); c++ )
    {
      TestStepResult testStepResult = testStepResults.get( c );
      if( testStepResult != null )
        sum += testStepResult.getTimeTaken();
    }

    return sum;
  }
View Full Code Here

    WsdlTestRequestStep testStep = ( WsdlTestRequestStep )testCase.getTestStepByName( "SEK to USD Test" );

    MockTestRunner testRunner = new MockTestRunner( ( WsdlTestCase )testStep.getTestCase() );
    MockTestRunContext testRunContext = new MockTestRunContext( testRunner, ( WsdlTestStep )testStep );

    TestStepResult result = testStep.run( testRunner, testRunContext );

    WsdlTestRequestStepResult wsdlResult = ( WsdlTestRequestStepResult )result;
    assertNotNull( wsdlResult );
    // assertEquals(TestStepResult.TestStepStatus.OK, wsdlResult.getStatus());
  }
View Full Code Here

  protected int runCurrentTestStep( WsdlTestRunContext runContext, int currentStepIndex )
  {
    TestStep currentStep = runContext.getCurrentStep();
    if( !currentStep.isDisabled() )
    {
      TestStepResult stepResult = runTestStep( currentStep, true, true );
      if( stepResult == null )
        return -2;

      if( !isRunning() )
        return -2;
View Full Code Here

        TestCaseLogItem logItem = ( TestCaseLogItem )value;
        String msg = logItem.getMsg();
        setText( msg == null ? "" : msg );
      }

      TestStepResult result = logListModel.getResultAt( index );
      if( result != null && !getText().startsWith( " ->" ) )
      {
        hyperlinkLabel.setText( getText() );
        hyperlinkLabel.setBackground( getBackground() );
        hyperlinkLabel.setEnabled( list.isEnabled() );

        if( result.getStatus() == TestStepStatus.OK )
        {
          hyperlinkLabel.setIcon( UISupport.createImageIcon( "/valid_assertion.gif" ) );
        }
        else if( result.getStatus() == TestStepStatus.FAILED )
        {
          hyperlinkLabel.setIcon( UISupport.createImageIcon( "/failed_assertion.gif" ) );
        }
        else
        {
View Full Code Here

    public void mouseClicked( MouseEvent e )
    {
      int index = testLogList.getSelectedIndex();
      if( index != -1 && ( index == selectedIndex || e.getClickCount() > 1 ) )
      {
        TestStepResult result = logListModel.getResultAt( index );
        if( result != null && result.getActions() != null )
          result.getActions().performDefaultAction( new ActionEvent( this, 0, null ) );
      }

      selectedIndex = index;
    }
View Full Code Here

      if( testLogList.getSelectedIndex() != row )
      {
        testLogList.setSelectedIndex( row );
      }

      TestStepResult result = logListModel.getResultAt( row );
      if( result == null )
        return;

      ActionList actions = result.getActions();

      if( actions == null || actions.getActionCount() == 0 )
        return;

      JPopupMenu popup = ActionSupport.buildPopup( actions );
View Full Code Here

  }

  @Override
  public TestStepResult runTestStep( TestStep testStep, boolean discard, boolean process )
  {
    TestStepResult stepResult = testStep.run( this, getRunContext() );
    getResults().add( stepResult );
    setResultCount( getResultCount() + 1 );
    // enforceMaxResults( getTestRunnable().getMaxResults() );

    // discard?
View Full Code Here

    boolean jumpExit = false;
    TestStep currentStep = runContext.getCurrentStep();
    securityTestStepListeners = securityTest.getTestStepRunListeners( currentStep );
    if( !currentStep.isDisabled() && !securityTest.skipTest( currentStep ) )
    {
      TestStepResult stepResult = runTestStep( currentStep, true, true );
      if( stepResult == null )
        jumpExit = true;
      // if( !isRunning() )
      // return -2;

      SecurityTestStepResult securityStepResult = new SecurityTestStepResult( currentStep, stepResult );
      for( int i = 0; i < securityTestListeners.length; i++ )
      {
        if( Arrays.asList( getSecurityTest().getSecurityTestRunListeners() ).contains( securityTestListeners[i] ) )
          securityTestListeners[i].afterOriginalStep( this, getRunContext(), securityStepResult );
      }

      for( int i = 0; i < securityTestListeners.length; i++ )
      {
        if( Arrays.asList( getSecurityTest().getSecurityTestRunListeners() ).contains( securityTestListeners[i] ) )
          securityTestListeners[i].beforeStep( this, getRunContext(), stepResult );
      }
      for( int i = 0; i < securityTestStepListeners.length; i++ )
      {
        if( Arrays.asList( getSecurityTest().getSecurityTestRunListeners() )
            .contains( securityTestStepListeners[i] ) )
          securityTestStepListeners[i].beforeStep( this, getRunContext(), stepResult );
      }
      Map<String, List<SecurityScan>> secScanMap = securityTest.getSecurityScansMap();
      if( secScanMap.containsKey( currentStep.getId() ) )
      {
        List<SecurityScan> testStepScansList = secScanMap.get( currentStep.getId() );
        for( int i = 0; i < testStepScansList.size(); i++ )
        {
          SecurityScan securityScan = testStepScansList.get( i );
          // if security scan is disabled skip it.
          if( securityScan.isDisabled() || securityScan.isSkipFurtherRunning() )
            continue;
          //if step is failed and scan not applicable to failed steps just set it to skipped
          //run scan otherwise
          if( stepResult.getStatus() == TestStepStatus.FAILED && !securityScan.isApplyForFailedStep() )
          {
            SecurityScanResult securityScanResult = new SecurityScanResult( securityScan );
            if( securityScan.getAssertionCount() > 0 )
              securityScanResult.setStatus( ResultStatus.OK );
            else if( securityScan instanceof AbstractSecurityScanWithProperties )
View Full Code Here

      Map<TestStep, TestSample> samplesMap = new HashMap<TestStep, TestSample>();
      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 [" + testCase.getName() + "]" );
          continue;
        }

        TestStep testStep = result.getTestStep();

        if( !samplesMap.containsKey( testStep ) )
        {
          samplesMap.put( testStep, new TestSample( testStep ) );
        }
View Full Code Here

TOP

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

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.