freemarker.requirements.ftl Maven / Gradle / Ivy
<#if requirements.parentRequirement.isPresent()>
<#assign pageTitle = inflection.of(requirements.parentRequirement.get().type).inPluralForm().asATitle() >
<#else>
<#assign pageTitle = "Requirements" >
#if>
<#assign requirementTypeTitle = inflection.of(requirements.type).asATitle() >
<#assign requirementsSectionTitle = inflection.of(requirements.type).inPluralForm().asATitle() >
${pageTitle}
<#include "libraries/common.ftl">
<#include "libraries/jquery-ui.ftl">
<#include "libraries/datatables.ftl">
<#assign pie = true>
<#include "libraries/jqplot.ftl">
<#include "components/test-outcomes.ftl">
<#include "components/requirements-list.ftl">
<#list requirements.types as requirementType>
<#assign successfulRequirements= requirements.requirementsOfType(requirementType).completedRequirementsCount >
<#assign pendingRequirements = requirements.requirementsOfType(requirementType).pendingRequirementsCount>
<#assign ignoredRequirements = requirements.requirementsOfType(requirementType).ignoredRequirementsCount >
<#assign failingRequirements = requirements.requirementsOfType(requirementType).failingRequirementsCount >
<#assign errorRequirements = requirements.requirementsOfType(requirementType).errorRequirementsCount >
<#assign compromisedRequirements = requirements.requirementsOfType(requirementType).compromisedRequirementsCount >
<#assign untesteddRequirements = requirements.requirementsOfType(requirementType).requirementsWithoutTestsCount >
<#else>
<#assign successfulRequirements= testOutcomes.totalTests.withResult("success") >
<#assign pendingRequirements = testOutcomes.totalTests.withResult("pending") >
<#assign ignoredRequirements = testOutcomes.totalTests.withResult("ignored") + testOutcomes.totalTests.withResult("skipped")>
<#assign failingRequirements = testOutcomes.totalTests.withResult("failure") >
<#assign errorRequirements = testOutcomes.totalTests.withResult("error") >
<#assign compromisedRequirements = testOutcomes.totalTests.withResult("compromised") >
<#assign untesteddRequirements = 0 >
#list>
<#if (requirements.parentRequirement.isPresent())>
<#assign parentRequirement = requirements.parentRequirement.get() >
<#assign parentTitle = inflection.of(parentRequirement.name).asATitle() >
<#assign parentType = inflection.of(parentRequirement.type).asATitle() >
<#if (parentRequirement.cardNumber?has_content) >
<#assign issueNumber = "[" + formatter.addLinks(parentRequirement.cardNumber) + "]" >
<#else>
<#assign issueNumber = "">
#if>
#if>
<#include "menu.ftl">
<#if requirements.parentRequirement.isPresent()>
<@main_menu selected="${requirements.parentRequirement.get().type}" />
<#else>
<@main_menu selected="requirements" />
#if>
<#if (requirements.parentRequirement.isPresent())>
${parentType}: ${issueNumber} ${parentTitle}
<#if parentRequirement.narrative.renderedText?has_content>
${formatter.renderDescription(parentRequirement.narrative.renderedText)}
#if>
<#foreach customField in parentRequirement.customFields >
<#if parentRequirement.getCustomField(customField).present>
${customField}
${parentRequirement.getCustomField(customField).get().renderedText}
#if>
#foreach>
#if>
<#if (requirements.totalTestCount > 0 || requirements.flattenedRequirementCount > 0)>
<#assign untestedCount = 0>
<#foreach requirementType in requirements.types>
<#assign untestedCount = untestedCount + requirements.requirementsOfType(requirementType).requirementsWithoutTestsCount>
#foreach>
Requirements Overview
Requirement Type
Total
Pass
Fail
Pending
Ignored
<#if (untestedCount > 0)>
Untested
#if>
<#foreach requirementType in requirements.types>
<#if requirements.type == requirementType>
<#assign requirementReport = "#requirements-tabs" />
<#else>
<#assign requirementReport = reportName.forRequirementType(requirementType) />
#if>
<#assign requirementTitle = inflection.of(requirementType).inPluralForm().asATitle() />
${requirementTitle}
${requirements.requirementsOfType(requirementType).requirementCount}
${requirements.requirementsOfType(requirementType).completedRequirementsCount}
${requirements.requirementsOfType(requirementType).failingRequirementsCount}
${requirements.requirementsOfType(requirementType).pendingRequirementsCount}
${requirements.requirementsOfType(requirementType).ignoredRequirementsCount}
<#if (untestedCount > 0)>
${requirements.requirementsOfType(requirementType).requirementsWithoutTestsCount}
#if>
#foreach>
<#assign requirementTestsTotalCount = testOutcomes.totalTests.total >
<#assign requirementTestsSuccessCount = testOutcomes.totalTests.withResult("success") >
<#assign requirementTestsPendingCount = testOutcomes.totalTests.withResult("pending") >
<#assign requirementTestsIgnoredCount = testOutcomes.totalTests.withResult("ignored") >
<#assign requirementTestsSkippedCount = testOutcomes.totalTests.withResult("skipped") >
<#assign requirementTestsFailureOrErrorCount = testOutcomes.totalTests.withFailureOrError() >
Acceptance Criteria (tests)
${requirementTestsTotalCount}
${requirementTestsSuccessCount}
${requirementTestsFailureOrErrorCount}
${requirementTestsPendingCount}
${requirementTestsIgnoredCount + requirementTestsSkippedCount}
<#include "test-result-summary.ftl"/>
#if>
<#if (requirements.requirementOutcomes?has_content || testOutcomes.total > 0)>
<#if (requirements.requirementOutcomes?has_content || (requirements.parentRequirement.isPresent() && requirements.parentRequirement.get().hasExamples()))>
<#if (requirements.requirementOutcomes?has_content)>
-
${requirementsSectionTitle} (${requirements.requirementCount})
#if>
<#if (requirements.parentRequirement.isPresent() && requirements.parentRequirement.get().hasExamples())>
- Examples (${requirements.parentRequirement.get().exampleCount}
)
#if>
#if>
<#if (requirements.requirementOutcomes?has_content)>
<@requirements_results requirements=requirements title=requirementTypeTitle requirementType=requirementsSectionTitle id="req-results-table"/>
#if>
<#if testOutcomes.tests?has_content >
<@test_results testOutcomes=testOutcomes title="Acceptance Criteria" id="test-results-table"/>
#if>
#if>
<#if (requirements.parentRequirement.isPresent() && requirements.parentRequirement.get().hasExamples())>
<#-- Examples -->
Description
<#assign examples = requirements.parentRequirement.get().examples >
<#foreach example in examples>
<#if example.cardNumber.isPresent() >
${formatter.addLinks(example.cardNumber.get())}
#if>
${formatter.addLineBreaks(example.description)}
#foreach>
#if>