
freemarker.default.ftl Maven / Gradle / Ivy
${testOutcome.unqualified.title}
<#include "libraries/favicon.ftl">
<#include "libraries/common.ftl">
<#include "libraries/jquery-ui.ftl">
<#include "libraries/datatables.ftl">
<#include "libraries/imgpreview.ftl">
<#include "components/report-data.ftl">
<#include "components/stacktrace.ftl">
<#-- HEADER
-->
<#include "menu.ftl">
<@main_menu selected="home" />
<#if testOutcome.result == "FAILURE"><#assign outcome_text = "failing-color">
<#elseif testOutcome.result == "ERROR"><#assign outcome_text = "error-color">
<#elseif testOutcome.result == "SUCCESS"><#assign outcome_text = "success-color">
<#elseif testOutcome.result == "PENDING"><#assign outcome_text = "pending-color">
<#elseif testOutcome.result == "COMPROMISED"><#assign outcome_text = "compromised-color">
<#else><#assign outcome_text = "ignore-color">
#if>
<#assign title_outcome_icon = formatter.resultIcon().inLarge().forResult(testOutcome.result) />
<#-- TEST TITLE-->
<#if (testOutcome.isDataDriven() && testOutcome.dataDrivenSampleScenario?has_content)>
Scenario Outline
${formatter.formatWithFields(testOutcome.dataDrivenSampleScenario)}
#if>
<#if (testOutcome.isDataDriven())>
<#list testOutcome.dataTable.dataSets as dataSet >
Examples:<#if dataSet.name??> ${dataSet.name}#if>
<#if dataSet.description??>
${dataSet.description}
#if>
<#if dataSet.tags??>
<#list dataSet.tags as exampleTag>
<#assign exampleTagReport = absoluteReportName.forRequirementOrTag(exampleTag) />
<#assign exampleTagTitle = inflection.of(exampleTag.shortName).asATitle() >
<#assign tagStyle = styling.tagStyleFor(tag) >
${formatter.htmlCompatible(exampleTagTitle)}
(${exampleTag.type})
#list>
#if>
#
<#list testOutcome.dataTable.headers as header>
${inflection.of(header).asATitle()}
#list>
<#assign rowIndex = dataSet.startRow >
<#list dataSet.rows as row>
${rowIndex + 1}
<#list row.values as value>
${formatter.plainHtmlCompatible(value)}
#list>
<#assign rowIndex = rowIndex + 1 >
#list>
#list>
#if>
<#if (testOutcome.manual)>
#if>
<#if testOutcome.hasScreenshots()>
<#if (testOutcome.manual)>Manual #if>
Steps
<#else>
<#if (testOutcome.manual)>Manual #if>
Steps
#if>
<#if testOutcome.hasScreenshots()>
Screenshots
#if>
Outcome
<#assign level = 1>
<#assign screenshotCount = 0>
<#macro write_step(step, step_number)>
<@step_details step=step step_number=step_number level=level/>
<#if step.isAGroup()>
<#if level == 1>
#if>
#if>
#macro>
<#macro restQueryData(restQuery, number) >
Response
<#if restQuery.statusCode?has_content>
Status code: ${restQuery.statusCode}
#if>
<#if restQuery.contentType?has_content>
Content Type: ${restQuery.contentType}
#if>
<#if restQuery.requestHeaders?has_content>
Request Headers
${(formatter.renderHeaders(restQuery.requestHeaders))!}
#if>
<#if restQuery.content?has_content>
Content Body
${(formatter.renderText(restQuery.content))!}
#if>
<#if restQuery.requestCookies?has_content>
Request Cookies
${(formatter.renderText(restQuery.requestCookies))!}
#if>
<#if restQuery.responseHeaders?has_content>
Response Headers
${(formatter.renderHeaders(restQuery.responseHeaders))!}
#if>
Response Body
<#if restQuery.responseHeaders?has_content>
${formatter.renderText(restQuery.responseBody)}
#if>
<#if restQuery.responseCookies?has_content && (!(restQuery.requestCookies?has_content) || restQuery.responseCookies!=restQuery.requestCookies)>
Response Cookies
${(formatter.renderText(restQuery.responseCookies))!}
#if>
#macro>
<#macro step_details(step, step_number, level)>
<#assign step_outcome_icon = formatter.resultIcon().forResult(step.result) />
<#assign step_outcome_style = formatter.resultIcon().colorFor(step.result) />
<#assign step_icon_size = 20>
<#if (level>1)>
<#if step.isAGroup()>
<#assign step_class_root = "nested">
<#else>
<#assign step_class_root = "nested-group">
#if>
<#else>
<#assign step_class_root = "top-level">
#if>
<#assign step_indent = level*20>
<#if level == 1 && step.isAGroup()>
<#assign showAccordion = true/>
<#else>
<#assign showAccordion = false/>
#if>
<#if step_number?has_content>#if>
<#if showAccordion>
<#--${step_outcome_icon}-->
<#--
<#--style="margin-left: 20px; float:left; padding-right:5px"/>-->
<#else>
<#--
<#--src="images/${step_outcome_icon}" class="${step_class_root}-icon"/>-->
#if>
<#if showAccordion>
#if>
<#if step.hasRestQuery()>
${formatter.restQuery(step.description)}
<#else>
${formatter.formatWithFields(step.description)}
#if>
<#if showAccordion>
#if>
<#if step.hasRestQuery()>
<#assign restDataNumber = "REST-${step.number}">
<@restQueryData restQuery=step.restQuery number=restDataNumber />
#if>
<#if step.hasData()>
<#list step.reportData as recordedData>
<#assign restDataNumber = "EVIDENCE-${step.number}-${recordedData?index}">
<@reportData reportData=recordedData number=restDataNumber />
#list>
#if>
<#if testOutcome.hasScreenshots()>
<#if step.hasMultipleScreenshots() >
#if>
<#if step.latestScreenshot?has_content>
<#assign actualScreenshotCount = screenshotCount + step.actualScreenshotCount />
<#if step.hasChildren()>
<#assign screenshotCount = screenshotCount + 1 />
<#else>
<#assign screenshotCount = screenshotCount + step.screenshotCount />
#if>
#if>
#if>
${step.result}
${step.durationInSeconds}s
<#if (step.errorMessage?has_content) && !step.hasNestedErrors()>
 
<#if step.errorMessage?has_content>
<#assign errorMessageTitle = step.errorMessage?html>
<#else>
<#assign errorMessageTitle = "">
#if>
<#if testOutcome.hasScreenshots()>
#if>
#macro>
<#-- Test step results -->
<#list testOutcome.testSteps as step>
<@write_step step=step step_number=step_index />
#list>
<#if testOutcome.hasNonStepFailure()>
<#assign step_outcome_icon = formatter.resultIcon().forResult(testOutcome.result) />
${step_outcome_icon}
<#if testOutcome.hasScreenshots()>
<#else>
#if>
<#if testOutcome.errorMessage?has_content>
${testOutcome.errorMessage}
<#else>
An error occurred outside of step execution
#if>
${formatter.htmlCompatibleStepDescription(testOutcome.result)}
${testOutcome.durationInSeconds}s
 
<#if testOutcome.hasScreenshots()>
<#else>
#if>
<#if (testOutcome.errorMessage)??>
<#if (testOutcome.nestedTestFailureCause)??>
<#assign formattedErrorMessageTitle = formatter.htmlAttributeCompatible(testOutcome.errorMessage, true) />
<@stacktrace title=formattedErrorMessageTitle cause=testOutcome.nestedTestFailureCause id="overall" />
#if>
#if>
<#--#if>-->
#if>
<#if testOutcome.hasScreenshots()>
<#else>
#if>
${testOutcome.result}
${testOutcome.durationInSeconds}s
Serenity BDD version ${serenityVersionNumber!"SNAPSHOT-BUILD"}
<#---->