
html_res.adg.src-file-source-lines.vm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clover Show documentation
Show all versions of clover Show documentation
Clover is an award winning code coverage and testing tool for Java and Groovy.
It integrates easily with Maven, Ant, Grails, Eclipse and IntelliJ IDEA
as well as with continuous integration servers such as Bamboo, Jenkins or Hudson.
Note: before Clover 4.0 this artifact was named com.cenqua.clover:clover.
The newest version!
#* Renders the onclick for each line if covered by a test *#
#macro(testsOverLine $count $startLine $overTitle)
#if ($count > 0) onclick="return showTestsForLine(this, $startLine, '$overTitle');"#end
#end
#* Renders failure traces with line hilights *#
#macro(renderTracesPopupControl $lineNum $traceEntries)
#set($testsToRender = "[")
#set($sep = "")
#foreach($tEntry in $traceEntries)
## get the corresponding parent test and render it
#set($trace = ${tEntry.parentTrace})
#set($testInfo = ${trace.originatingTest})
#set($testsToRender = "$testsToRender $sep [$testInfo.id, $tEntry.id]")
#set($sep = ",")
#end
#set($testsToRender = "$testsToRender]")
#end
#* Renders two td elements with an interstitial for the stats.
$start must be of type HasMetrics. e.g MethodInfo, ClassInfo etc *#
#macro(summaryStats $start)
#set($hiddenEleId = "inlinestats-$start.startLine")
#set($toggleId = "inlineStatsToggle-$start.startLine")
#set($metrics = ${renderUtil.metricsFor($start)})
#set($empty = $metrics.empty)
#set($width = 40)
#set($pccovered = $metrics.pcCoveredElements)
#set($customBarPositive = "barPositive")
#set($customBarNegative = "barNegative")
#end
Source view
#if ($errormsg)
#end
#parse("html_res/adg/src-file-legend.vm")
#set ($fileHits = $cloverDb.mapTestsAndCoverageForFile($fileInfo))
#set ($openedTbody = false)
## note: this is a heavily used loop; not using whitespace here to reduce report size produced
#foreach ($line in $renderInfo)
#if (!$openedTbody) #set($openedTbody = true)#end
#if ($line.methodStart) #set($start = $line.methodStart)#end
#if ($line.classStart) #set($start = $line.classStart)#end
#if ($start)
#set ($hitCount = $renderUtil.tcisInHitRange($fileHits, $start).size())
#set ($overTitle = "Tests that hit $renderUtil.htmlEscapeStr($start.name)")
#summaryStats($start)
#else #set ($overTitle = "Tests that hit line # $velocityCount") #end
$velocityCount
#if ($line.Hilight) $line.CoverageStr#else ${line.CoverageStr}#end
#if($line.methodStart)
#elseif(${line.failedStackEntries})#renderTracesPopupControl($velocityCount ${line.failedStackEntries})#else#end#if($line.Hilight || $line.filtered)$!{line.Src}#else$!{line.Src}#end#if($line.methodStart) #end
#set($start = false)
#end ## foreach
#if ($openedTbody)#end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy