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

templates.default.usage.ftlh Maven / Gradle / Ivy

Go to download

The part of the Cucumber Reports library directly responsible for reports generation.

The newest version!
<#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> <#return result> <#macro emptyHystogram> 0.0s 0.0s Frequency Duration N/A <#macro filledHystogram source> Frequency Duration <#assign startX = 40 > <#assign endX = 320 > <#assign topY = 50 > <#assign bottomY = 240 > <#assign max = 0 > <#assign shiftX = 7 > <#assign shiftY = 8> <#assign stepX = (endX - startX) / source.frequencies?size > <#list source.frequencies as item> <#assign max = Math.max(max, item) > <#assign stepY = (bottomY - topY) / max > <#list source.frequencies as item> <#if item gt 0> ${item} <#assign step = (source.maxDuration - source.minDuration) / source.frequencies?size > ${(source.minDuration + item?index * step)?string("0.##")} <#-- source.maxDuration?string("0.##") --> 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) > <#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 > <#list 0..(lastKey/hstep + 1) as i> ${(i * hstep)?string("0")} <#list 0..(stepsUseMax/vstep + 1) as i> ${(i * vstep)?string("0")} <#assign totalSteps = 0> <#list usageCounts?keys as key> <#assign totalSteps += key * usageCounts?api.get(key)> <#if totalSteps == 0> <#assign usage = 0> <#else> <#assign usage = 100 * (1 - sum(usageCounts?values)/ totalSteps)> <#assign statusColor = "silver"> <#if (usage lt 30)> <#assign statusColor = "red" > <#elseif (usage gt 70)> <#assign statusColor = "green"> <#else> <#assign statusColor = "#BBBB00"> Average: ${stepsUseAverage?string("0.#")}" Median: ${stepsUseMedian} ${usage?string("0.#")}% Re-use Step re-use count Steps count

Overview Table

<#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> <#else> <#assign groupColor = "red"> <#if !step?has_content> <#else>
# Expression Occurences Duration
Average Median Minimal Maximal Total
${step?counter} ${step.source.source}${step.totalUsed}-----${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

Cucumber Usage Detailed Information

<#list stepsData as source>

${source.source.source}

<#list source.source.steps as step> <#list step.durations as duration>
Step Name Duration Location
${step.name} 
${duration.getDuration()} ${duration.getLocation()}

<#if source.totalUsed lt 6> <@emptyHystogram /> <#else> <@filledHystogram source=source/>

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

To Overview Table





© 2015 - 2024 Weber Informatics LLC | Privacy Policy