freemarker.home.ftl Maven / Gradle / Ivy
Serenity Reports
<#include "libraries/favicon.ftl">
<#include "libraries/common.ftl">
<#include "libraries/jquery-ui.ftl">
<#include "libraries/datatables.ftl">
<#include "components/tag-list.ftl">
<#include "components/test-outcomes.ftl">
<#assign manualTests = testOutcomes.count("manual")>
<#assign automatedTests = testOutcomes.count("automated")>
<#assign totalTests = testOutcomes.count("automated")>
<#assign testResultData = resultCounts.byTypeFor("success","pending","ignored","skipped","failure","error","compromised") >
<#assign testLabels = resultCounts.percentageLabelsByTypeFor("success","pending","ignored","skipped","failure","error","compromised") >
<#assign graphType="automated-and-manual-results"/>
<#assign successfulManualTests = (manualTests.withResult("SUCCESS") > 0)>
<#assign pendingManualTests = (manualTests.withResult("PENDING") > 0)>
<#assign ignoredManualTests = (manualTests.withResult("IGNORED") > 0)>
<#assign failingManualTests = (manualTests.withResult("FAILURE") > 0)>
<#assign tagsTitle = 'Related Tags' >
<#if (testOutcomes.label == '')>
<#assign resultsContext = ''>
<#assign pageTitle = 'Test Results: All Tests' >
<#else>
<#assign resultsContext = '> ' + testOutcomes.label>
<#if (currentTagType! != '')>
<#assign pageTitle = " " + inflection.of(currentTagType!"").asATitle() + ': ' + tagInflector.ofTag(currentTagType!"", testOutcomes.label).toFinalView() >
<#else>
<#assign pageTitle = inflection.of(testOutcomes.label).asATitle() >
<#---->
<#if (customFields?has_content) && (customFields?size > 0) >
<#list customFields as customField>
${customField}
<#list customFieldValues as customFieldValue>
${customFieldValue}
<#include "menu.ftl">
<@main_menu selected="home" />
${pageTitle}
${testOutcomes.total} test scenarios <#if (testOutcomes.hasDataDrivenTests())>
(including ${testOutcomes.totalDataRows} rows of test data)
<#if (csvReport! != '')> |
<#assign successReport = reportName.withPrefix(currentTag).forTestResult("success") >
<#assign brokenReport = reportName.withPrefix(currentTag).forTestResult("broken") >
<#assign failureReport = reportName.withPrefix(currentTag).forTestResult("failure") >
<#assign errorReport = reportName.withPrefix(currentTag).forTestResult("error") >
<#assign compromisedReport = reportName.withPrefix(currentTag).forTestResult("compromised") >
<#assign pendingReport = reportName.withPrefix(currentTag).forTestResult("pending") >
<#assign skippedReport = reportName.withPrefix(currentTag).forTestResult("skipped") >
<#assign ignoredReport = reportName.withPrefix(currentTag).forTestResult("ignored") >
<#assign totalCount = testOutcomes.totalScenarios.total >
<#assign successCount = testOutcomes.totalScenarios.withResult("success") >
<#assign pendingCount = testOutcomes.totalScenarios.withResult("pending") >
<#assign ignoredCount = testOutcomes.totalScenarios.withResult("ignored") >
<#assign skippedCount = testOutcomes.totalScenarios.withResult("skipped") >
<#assign failureCount = testOutcomes.totalScenarios.withResult("failure") >
<#assign errorCount = testOutcomes.totalScenarios.withResult("error") >
<#assign brokenCount = failureCount + errorCount >
<#assign compromisedCount = testOutcomes.totalScenarios.withResult("compromised") >
<#assign badTestCount = failureCount + errorCount + compromisedCount>
<#if testOutcomes.haveFlags()>
|
<#list testOutcomes.flags as flag>
<#assign flagTitle = inflection.of(flag.message).inPluralForm().asATitle() >
<#assign flagTag = "flag_${inflection.of(flag.message).asATitle()}" >
<#assign flagReport = reportName.forTag(flagTag) >
<#assign flagCount = testOutcomes.flagCountFor(flag)>
${flagTitle} (${flagCount})
<#if testOutcomes.total != 0>
Scenario Results (including rows of test
data)
Automated
<#if resultCounts.hasManualTests() >
Manual
Total
<#if (resultCounts.getOverallTestCount("success") != 0)>
Passing
<#else>
Passing
${resultCounts.getAutomatedTestCount("success")}
${resultCounts.getAutomatedTestPercentageLabel("success")}
<#if resultCounts.hasManualTests() >
${resultCounts.getManualTestCount("success")}
${resultCounts.getManualTestPercentageLabel("success")}
${resultCounts.getOverallTestCount("success")}
${resultCounts.getOverallTestPercentageLabel("success")}
<#if (resultCounts.getOverallTestCount("pending") != 0)>
Pending
<#else>
Pending
${resultCounts.getAutomatedTestCount("pending")}
${resultCounts.getAutomatedTestPercentageLabel("pending")}
<#if resultCounts.hasManualTests() >
${resultCounts.getManualTestCount("pending")}
${resultCounts.getManualTestPercentageLabel("pending")}
${resultCounts.getOverallTestCount("pending")}
${resultCounts.getOverallTestPercentageLabel("pending")}
<#if (resultCounts.getOverallTestCount("ignored") != 0)>
Ignored
<#else>
Ignored
${resultCounts.getAutomatedTestCount("ignored")}
${resultCounts.getAutomatedTestPercentageLabel("ignored")}
<#if resultCounts.hasManualTests() >
${resultCounts.getManualTestCount("ignored")}
${resultCounts.getManualTestPercentageLabel("ignored")}
${resultCounts.getOverallTestCount("ignored")}
${resultCounts.getOverallTestPercentageLabel("ignored")}
<#if (resultCounts.getOverallTestCount("skipped") != 0)>
Skipped
<#else>
Skipped
${resultCounts.getAutomatedTestCount("skipped")}
${resultCounts.getAutomatedTestPercentageLabel("skipped")}
<#if resultCounts.hasManualTests() >
${resultCounts.getManualTestCount("skipped")}
${resultCounts.getManualTestPercentageLabel("skipped")}
${resultCounts.getOverallTestCount("skipped")}
${resultCounts.getOverallTestPercentageLabel("skipped")}
<#if resultCounts.hasManualTests() >
<#if (resultCounts.getOverallTestsCount("failure","error","compromised") != 0)>
Unsuccessful
<#else>
Unsuccessful
<#else>
<#if (resultCounts.getOverallTestsCount("failure","error","compromised") != 0)>
Unsuccessful
<#else>
Unsuccessful
<#if (resultCounts.getOverallTestCount("failure") != 0)>
Failed
<#else>
Failed
${resultCounts.getAutomatedTestCount("failure")}
${resultCounts.getAutomatedTestPercentageLabel("failure")}
<#if resultCounts.hasManualTests() >
${resultCounts.getManualTestCount("failure")}
${resultCounts.getManualTestPercentageLabel("failure")}
${resultCounts.getOverallTestCount("failure")}
${resultCounts.getOverallTestPercentageLabel("failure")}
<#if (resultCounts.getOverallTestCount("error") != 0)>
Broken
<#else>
Broken
${resultCounts.getAutomatedTestCount("error")}
${resultCounts.getAutomatedTestPercentageLabel("error")}
<#if resultCounts.hasManualTests() >
${resultCounts.getManualTestCount("error")}
${resultCounts.getManualTestPercentageLabel("error")}
${resultCounts.getOverallTestCount("error")}
${resultCounts.getOverallTestPercentageLabel("error")}
<#if (resultCounts.getOverallTestCount("compromised") != 0)>
Compromised
<#else>
Compromised
${resultCounts.getAutomatedTestCount("compromised")}
${resultCounts.getAutomatedTestPercentageLabel("compromised")}
<#if resultCounts.hasManualTests() >
${resultCounts.getManualTestCount("compromised")}
${resultCounts.getManualTestPercentageLabel("compromised")}
${resultCounts.getOverallTestCount("compromised")}
${resultCounts.getOverallTestPercentageLabel("compromised")}
Total
${resultCounts.getTotalAutomatedTestCount()}
<#if resultCounts.hasManualTests() >
${resultCounts.getTotalManualTestCount()}
${resultCounts.getTotalOverallTestCount()}
Execution Time
Clock Time
Fastest Test
Slowest Test
Average Execution Time
${totalTestDuration}
${totalClockDuration}
${minTestDuration}
${maxTestDuration}
${averageTestDuration}
<#if coverage?has_content>
Functional Coverage Overview
<#list coverage as tagCoverageByType>
<#if tagCoverageByType.tagCoverage?has_content>
<#if tagCoverageByType.tagCoverage?size <= 10>
<#assign coverageTableClass="feature-coverage-table">
<#else>
<#assign coverageTableClass="feature-coverage-table-with-pagination">
<#assign sectionTitle = inflection.of(tagCoverageByType.tagType).inPluralForm().asATitle() >
${sectionTitle}
${formatter.humanReadableFormOf(tagCoverageByType.tagType)}
Scenarios
% Pass
Result
Coverage
<#assign tagCoverageEntries = tagCoverageByType.tagCoverage />
<#list tagCoverageEntries as tagCoverage>
<#if tagCoverage.testCount = 0>
${tagCoverage.tagName}
<#else>
${tagCoverage.tagName}
${tagCoverage.testCount}
${tagCoverage.successRate}
<#if tagCoverage.testCount = 0>
<#else>
${tagCoverage.resultIcon}
<#list tagCoverage.coverageSegments as coverageSegment>
<#if badTestCount != 0>
Test Failure Overview
Most Frequent Failures
<#list frequentFailures as frequentFailure>
${frequentFailure.resultIcon} ${frequentFailure.name}
${frequentFailure.count}
Most Unstable Features
<#list unstableFeatures as unstableFeature>
${unstableFeature.name}
${unstableFeature.failurePercentage}%
<#if tagResults?has_content >
Tags
<#list tagResults as tagResultGroup >
<#if tagResultGroup.tagType?has_content>
${inflection.of(tagResultGroup.tagType).asATitle()}
<#list tagResultGroup.tagResults as tagResult >
${tagInflector.ofTag(tagResult.tag.type, tagResult.tag.name).toFinalView()} ${tagResult.count}
Automated Tests
<#if (automatedTestCases?has_content)>
${leafRequirementType}
Scenario
Steps
Started
Duration
Result
<#list automatedTestCases as scenario>
<#assign outcome_icon = formatter.resultIcon().forResult(scenario.result) />
<#if scenario.parentName?has_content>
${scenario.parentName}
${scenario.title}
<#if scenario.hasExamples() >
(${scenario.numberOfExamples})
${scenario.stepCount}
${scenario.formattedStartTime}
${scenario.formattedDuration}
${outcome_icon}
<#else>
No automated tests were executed
Manual Tests
<#if (manualTestCases?has_content)>
${leafRequirementType}
Scenario
Steps
Result
<#list manualTestCases as scenario>
<#assign outcome_icon = formatter.resultIcon().forResult(scenario.result) />
<#if scenario.parentName?has_content>
${scenario.parentName}
${scenario.title}
<#if scenario.hasExamples() >
(${scenario.numberOfExamples})
${scenario.stepCount}
${outcome_icon}
<#else>
No manual tests were recorded
<#if evidence?has_content>
Evidence
Scenario
Title
Details
<#list evidence as evidenceRecord>
${evidenceRecord.scenario}
${evidenceRecord.title}
${evidenceRecord.detailsLink}
Serenity BDD version ${serenityVersionNumber!"SNAPSHOT-BUILD"}