templates.default.usage.ftlh Maven / Gradle / Ivy
Show all versions of cucumber-report-generator Show documentation
<#escape x as x?html?replace("\n","
")>
<#assign Math=statics['java.lang.Math'] >
<#function sum values>
<#assign result = 0>
<#list values as value>
<#assign result = result + value>
#list>
<#return result>
#function>
<#macro emptyHystogram>
#macro>
<#macro filledHystogram source>
#macro>
Cucumber Steps Usage Report
Cucumber Usage Statistics
Overview Graph
<#assign hsize = 400 >
<#assign vsize = 400 >
<#assign hstart = 40 >
<#assign vstart = 30 >
<#assign hend = 350 >
<#assign vend = 300 >
<#assign hstep = 0 >
<#assign vstep = 0 >
<#assign lastKey = 0>
<#if !usageCounts?has_content >
<#assign hscale = 1>
<#assign vscale = 1>
<#else>
<#assign lastKey = usageCounts?keys?last >
<#assign hscale = (hend - 2 * hstart) / (lastKey + 1) >
<#assign vscale = (vend - 2 * vstart) / (stepsUseMax + 1) >
#if>
<#assign stepScale = 30 >
<#assign hstep = (stepScale / hscale) + 1>
<#assign vstep = (stepScale / vscale) + 1>
<#assign hsizeMargin = 100 >
<#assign smallMargin = 5 >
<#assign midMargin = 10 >
<#assign largeMargin = 20 >
Overview Table
#
Expression
Occurences
Duration
Average
Median
Minimal
Maximal
Total
<#list stepsData as step>
<#assign groupColor = "silver">
<#if stepsData?size gt 3>
<#switch (step?index / (stepsData?size / 3))?floor?string("0")>
<#case "0">
<#assign groupColor = "lightgreen">
<#break>
<#case "1">
<#assign groupColor = "gold">
<#break>
<#case "2">
<#assign groupColor = "tomato">
<#break>
<#default>
<#break>
#switch>
<#else>
<#assign groupColor = "red">
#if>
${step?counter}
${step.source.source} ${step.totalUsed}
<#if !step?has_content>
- - - - -
<#else>
${step.averageDuration?string("0.##")}s
${step.medianDuration?string("0.##")}s
${step.minDuration?string("0.##")}s
${step.maxDuration?string("0.##")}s
${step.totalDuration?string("0.##")}s
#if>
#list>
Cucumber Usage Detailed Information
<#list stepsData as source>
${source.source.source}
Step Name
Duration
Location
<#list source.source.steps as step>
${step.name}
<#list step.durations as duration>
${duration.getDuration()}
${duration.getLocation()}
#list>
#list>
<#if source.totalUsed lt 6>
<@emptyHystogram />
<#else>
<@filledHystogram source=source/>
#if>
Duration Characteristic
Average ${source.averageDuration?string("0.##")}s
Median ${source.medianDuration?string("0.##")}s
Variance ${source.variance?string("0.##")}
Skewness ${source.skewness?string("0.##")}
Minimum ${source.minDuration?string("0.##")}s
Maximum ${source.maxDuration?string("0.##")}s
Total ${source.totalDuration?string("0.##")}s
#list>
#escape>