freemarker.components.requirements-list.ftl Maven / Gradle / Ivy
<#macro requirements_results(requirements, title, requirementType, id)>
<#include "feature-coverage.ftl">
<#include "test-coverage.ftl">
ID
${title}
<#if (requirements.childrenType?has_content) >
<#assign childrenTitle = inflection.of(requirements.childrenType).inPluralForm().asATitle()>
${childrenTitle}
#if>
Automated
Tests
<#if reportOptions.showManualTests>
Manual
Tests
#if>
Test Results
<#if (requirements.childrenType?has_content) >
Working ${childrenTitle}
#if>
<#foreach requirementOutcome in requirements.requirementOutcomes>
<#assign totalAutomated = requirementOutcome.tests.count("AUTOMATED").withAnyResult()/>
<#assign automatedPassedPercentage = requirementOutcome.tests.getFormattedPercentage("AUTOMATED").withResult("SUCCESS")/>
<#assign automatedFailedPercentage = requirementOutcome.tests.getFormattedPercentage("AUTOMATED").withFailureOrError()/>
<#assign automatedPendingPercentage = requirementOutcome.tests.getFormattedPercentage("AUTOMATED").withIndeterminateResult()/>
<#assign automatedPassed = requirementOutcome.tests.count("AUTOMATED").withResult("SUCCESS")/>
<#assign automatedPending = requirementOutcome.tests.count("AUTOMATED").withIndeterminateResult()/>
<#assign automatedFailed = requirementOutcome.tests.count("AUTOMATED").withResult("FAILURE")/>
<#assign automatedError = requirementOutcome.tests.count("AUTOMATED").withResult("ERROR")/>
<#assign automatedCompromised = requirementOutcome.tests.count("AUTOMATED").withResult("COMPROMISED")/>
<#assign totalManual = requirementOutcome.tests.count("MANUAL").withAnyResult()/>
<#assign manualPassedPercentage = requirementOutcome.tests.getFormattedPercentage("MANUAL").withResult("SUCCESS")/>
<#assign manualFailedPercentage = requirementOutcome.tests.getFormattedPercentage("MANUAL").withFailureOrError()/>
<#assign manualPending = requirementOutcome.tests.count("MANUAL").withIndeterminateResult()/>
<#assign manualPendingPercentage = requirementOutcome.tests.getFormattedPercentage("MANUAL").withIndeterminateResult()/>
<#assign manualPassed = requirementOutcome.tests.count("MANUAL").withResult("SUCCESS")/>
<#assign manualFailed = requirementOutcome.tests.count("MANUAL").withResult("FAILURE")/>
<#assign manualError = requirementOutcome.tests.count("MANUAL").withResult("ERROR")/>
<#assign status_icon = formatter.resultIcon().forResult(requirementOutcome.testOutcomes.result) />
<#assign status_rank = formatter.resultRank().forResult(requirementOutcome.testOutcomes.result) />
<#assign background_bar_style = 'percentagebar'>
<#if (totalAutomated + totalManual == 0) >
<#assign status_icon = formatter.resultIcon().forResult('PENDING') />
<#assign status_rank = formatter.resultRank().forResult('PENDING') />
<#assign background_bar_style = 'darkpercentagebar'>
#if>
${status_icon}
${requirementOutcome.cardNumberWithLinks}
<#assign requirementReport = reportName.forRequirement(requirementOutcome.requirement) >
<#---->
${formatter.htmlCompatibleStoryTitle(requirementOutcome.requirement.displayName)}
${formatter.renderDescription(requirementOutcome.requirement.narrative.renderedText)}
<#if (requirements.childrenType?has_content) >
${requirementOutcome.requirement.childrenCount}
#if>
${totalAutomated}
<#if reportOptions.showManualTests>
${totalManual}
#if>
<@test_coverage requirementOutcome=requirementOutcome barWidth=125 />
<#if (requirements.childrenType?has_content) >
<@feature_coverage requirementOutcome=requirementOutcome requirementType=childrenTitle barWidth=125 />
#if>
#foreach>
#macro>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy