All Downloads are FREE. Search and download functionalities are using the official Maven repository.

html.class-results.html.vm Maven / Gradle / Ivy

Go to download

ReportNG is a simple HTML reporting plug-in for the TestNG unit-testing framework

There is a newer version: 1.1.4
Show newest version
## This macro formats the results (whether passed, skipped or failed) of the test
## methods in a single class for inclusion in the HTML report.  It assumes that the
## the results are in a variable called $sortedResults and that the class is referred
## to by the $testClass variable.  $id is a page scope variable that is used to assign
## unique identifiers to divs.

#foreach( $testResult in $sortedResults.get($testClass) )

  
    #if( $testResult.method.description.length() > 0 )
      $testResult.name
    #else
      $testResult.name
    #end
  
  
    $utils.formatDuration($testResult.startMillis, $testResult.endMillis)s
  
  
    ## Display the dependencies for skipped test methods.
    #if( $testResult.status == 3 ) ## 3 means skipped.
      #if( $utils.hasDependentGroups($testResult) )
        Depends on group(s): 
        #foreach( $group in $testResult.method.groupsDependedUpon )
          #if( $velocityCount < $arrayLength - 1 )
            ${group},
          #else
            ${group}
          #end
        #end
        
#end #if( $utils.hasDependentMethods($testResult) ) Depends on method(s): $utils.getDependentMethods($testResult) #end #end #if( $utils.hasArguments($testResult) ) Method Arguments: $utils.getArguments($testResult)
#end ## Show logger output for the test. #set( $output = $utils.getTestOutput($testResult) ) #if( $output.size() > 0)
#foreach( $line in $output ) #if( $meta.shouldEscapeOutput() ) $utils.escapeHTMLString($line)
#else $line #end #end
#end #if( $testResult.throwable && ( $testResult.status == 2 || $meta.shouldShowExpectedExceptions() )) $utils.escapeHTMLString( $testResult.throwable.toString() )
#foreach( $element in $testResult.throwable.stackTrace ) $utils.escapeHTMLString( $element.toString() )
#end #set( $causes = $utils.getCauses($testResult.throwable) ) #foreach( $throwable in $causes ) #set ($id = $id + 1) Caused by: $utils.escapeHTMLString( $throwable.toString() )
#foreach( $element in $throwable.stackTrace ) $utils.escapeHTMLString( $element.toString() )
#end
#end
#end #set ($id = $id + 1) #end




© 2015 - 2024 Weber Informatics LLC | Privacy Policy