Package com.eviware.soapui.junit

Examples of com.eviware.soapui.junit.Testcase


    testsuiteDoc.getTestsuite().setSystemErr( systemerr );
  }

  public Testcase addTestCase( String name, double time )
  {
    Testcase testcase = testsuiteDoc.getTestsuite().addNewTestcase();
    testcase.setName( name );
    testcase.setTime( String.valueOf( time / 1000 ) );
    noofTestCases++ ;
    totalTime += time;
    return testcase;
  }
View Full Code Here


    return testcase;
  }

  public Testcase addTestCaseWithFailure( String name, double time, String failure, String stacktrace )
  {
    Testcase testcase = testsuiteDoc.getTestsuite().addNewTestcase();
    testcase.setName( name );
    testcase.setTime( String.valueOf( time / 1000 ) );
    Failure fail = testcase.addNewFailure();
    fail.setType( failure );
    fail.setMessage( failure );
    fail.setStringValue( stacktrace );
    noofTestCases++ ;
    noofFailures++ ;
View Full Code Here

    return testcase;
  }

  public Testcase addTestCaseWithError( String name, double time, String error, String stacktrace )
  {
    Testcase testcase = testsuiteDoc.getTestsuite().addNewTestcase();
    testcase.setName( name );
    testcase.setTime( String.valueOf( time / 1000 ) );
    com.eviware.soapui.junit.ErrorDocument.Error err = testcase.addNewError();
    err.setType( error );
    err.setMessage( error );
    err.setStringValue( stacktrace );
    noofTestCases++ ;
    noofErrors++ ;
View Full Code Here

      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();
              result.append( "<pre>" )
                  .append( XmlUtils.entitize( scanRequestResult.getChangedParamsInfo( i + 1 ) ) )
                  .append( "</pre>" );

              for( String message : scanRequestResult.getMessages() )
              {
                result.append( "<pre>" ).append( XmlUtils.entitize( message ) ).append( "</pre>" );
              }

              secTestCase.addNewError().setStringValue( result.toString() );
              errorCount++ ;
            }
          }
        }
      }
View Full Code Here

    public void setSystemErr(String systemerr) {
        testsuiteDoc.getTestsuite().setSystemErr(systemerr);
    }

    public Testcase addTestCase(String name, double time) {
        Testcase testcase = testsuiteDoc.getTestsuite().addNewTestcase();
        testcase.setName(name);
        testcase.setTime(String.valueOf(time / 1000));
        noofTestCases++;
        totalTime += time;
        return testcase;
    }
View Full Code Here

        totalTime += time;
        return testcase;
    }

    public Testcase addTestCaseWithFailure(String name, double time, String failure, String stacktrace) {
        Testcase testcase = testsuiteDoc.getTestsuite().addNewTestcase();
        testcase.setName(name);
        testcase.setTime(String.valueOf(time / 1000));
        Failure fail = testcase.addNewFailure();
        fail.setType(failure);
        fail.setMessage(failure);
        fail.setStringValue(stacktrace);
        noofTestCases++;
        noofFailures++;
View Full Code Here

        totalTime += time;
        return testcase;
    }

    public Testcase addTestCaseWithError(String name, double time, String error, String stacktrace) {
        Testcase testcase = testsuiteDoc.getTestsuite().addNewTestcase();
        testcase.setName(name);
        testcase.setTime(String.valueOf(time / 1000));
        com.eviware.soapui.junit.ErrorDocument.Error err = testcase.addNewError();
        err.setType(error);
        err.setMessage(error);
        err.setStringValue(stacktrace);
        noofTestCases++;
        noofErrors++;
View Full Code Here

        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();
                            result.append("<pre>")
                                    .append(XmlUtils.entitize(scanRequestResult.getChangedParamsInfo(i + 1)))
                                    .append("</pre>");

                            for (String message : scanRequestResult.getMessages()) {
                                result.append("<pre>").append(XmlUtils.entitize(message)).append("</pre>");
                            }

                            secTestCase.addNewError().setStringValue(result.toString());
                            errorCount++;
                        }
                    }
                }
            }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.junit.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.