Package com.eviware.soapui.model.testsuite

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


      Project project = findProject( projectFilePath, workspace );

      project = openProject( projectFilePath, workspace, project );

      TestSuite testSuite = project.getTestSuiteByName( testSuiteName );
      TestCase testCase = testSuite.getTestCaseByName( testCaseName );

      showModelItem( testCase );
      bringToFront();
    }
    catch( Exception e )
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.addTestCaseWithFailure( testCase.getName(), testRunner.getTimeTaken(), testRunner.getReason(), "" );
      }
      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 )
      {
View Full Code Here

    }
  }

  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

  }

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

    for( int c = 0; c < iface.getProject().getTestSuiteCount(); c++ )
    {
      TestSuite testSuite = iface.getProject().getTestSuiteAt( c );
      for( int i = 0; i < testSuite.getTestCaseCount(); i++ )
      {
        TestCase testCase = testSuite.getTestCaseAt( i );
        if( !SoapUI.getTestMonitor().hasRunningTest( testCase ) )
          continue;

        for( int j = 0; j < testCase.getTestStepCount(); j++ )
        {
          WsdlTestStep testStep = ( WsdlTestStep )testCase.getTestStepAt( j );
          if( testStep.dependsOn( iface ) )
          {
            return true;
          }
        }
View Full Code Here

    for( int c = 0; c < iface.getProject().getTestSuiteCount(); c++ )
    {
      TestSuite testSuite = iface.getProject().getTestSuiteAt( c );
      for( int i = 0; i < testSuite.getTestCaseCount(); i++ )
      {
        TestCase testCase = testSuite.getTestCaseAt( i );

        for( int j = 0; j < testCase.getTestStepCount(); j++ )
        {
          WsdlTestStep testStep = ( WsdlTestStep )testCase.getTestStepAt( j );
          if( testStep.dependsOn( iface ) )
          {
            return true;
          }
        }
View Full Code Here

                }
              }
            }
            else
            {
              TestCase testCase = null;
              try
              {
                testCase = getModelItem().getTestSuiteByName( mainForm.getComponentValue( TESTSUITE ) )
                    .getTestCaseByName( mainForm.getComponentValue( TESTCASE ) );
              }
              catch( NullPointerException npe )
              {
              }
              if( testCase != null )
                securityTests.addAll( Arrays.asList( ModelSupport.getNames( testCase.getSecurityTestList() ) ) );
            }

            securityTests.add( 0, ALL_VALUE );
            mainForm.setOptions( SECURITYTEST, securityTests.toArray() );
View Full Code Here

            }
          }
        }
        else
        {
          TestCase testCase = null;
          try
          {
            testCase = getModelItem().getTestSuiteByName( mainForm.getComponentValue( TESTSUITE ) )
                .getTestCaseByName( mainForm.getComponentValue( TESTCASE ) );
          }
          catch( NullPointerException npe )
          {
          }
          if( testCase != null )
            securityTests.addAll( Arrays.asList( ModelSupport.getNames( testCase.getSecurityTestList() ) ) );
        }

        securityTests.add( 0, ALL_VALUE );
        mainForm.setOptions( SECURITY_TEST_NAME, securityTests.toArray() );
View Full Code Here

  {
    testSuite.removeTestSuiteListener( testSuiteListener );

    for( int j = 0; j < testSuite.getTestCaseCount(); j++ )
    {
      TestCase testCase = testSuite.getTestCaseAt( j );
      unmonitorTestCase( testCase );
    }
  }
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.