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">
<#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 (testOutcome.isDataDriven())>
<#list testOutcome.dataTable.dataSets as dataSet >
Examples:<#if dataSet.name??> ${dataSet.name}
<#if dataSet.description??>
${dataSet.description}
<#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 testOutcome.dataTable.headers as header>
${inflection.of(header).asATitle()}
<#assign rowIndex = dataSet.startRow >
<#list dataSet.rows as row>
${rowIndex + 1}
<#list row.values as value>
<#if testOutcome.manual>
<#assign roeResult = testOutcome.result/>
<#else>
<#assign roeResult = row.result/>
${formatter.plainHtmlCompatible(value)}
<#assign rowIndex = rowIndex + 1 >
<#-- TABLE HEADER -->
<#if (testOutcome.manual)>
<#if (testOutcome.manual)>Manual
Steps
<#if testOutcome.hasScreenshots()>
Screenshots
Outcome
<#-- STEPS BREAKDOWN-->
<#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()>
<#macro restQueryData(restQuery, number) >
Response
<#if restQuery.path?has_content>
URL: ${restQuery.path}
<#if restQuery.statusCode?has_content>
Status code: ${restQuery.statusCode}
<#if restQuery.contentType?has_content>
Content Type: ${restQuery.contentType}
<#if restQuery.requestHeaders?has_content>
Request Headers
${(formatter.renderHeaders(restQuery.requestHeaders))!}
<#if restQuery.content?has_content>
Content Body
${(formatter.renderText(restQuery.content))!}
<#if restQuery.requestCookies?has_content>
Request Cookies
${(formatter.renderText(restQuery.requestCookies))!}
<#if restQuery.responseHeaders?has_content>
Response Headers
${(formatter.renderHeaders(restQuery.responseHeaders))!}
Response Body
<#if restQuery.responseHeaders?has_content>
${formatter.renderText(restQuery.responseBody)}
<#if restQuery.responseCookies?has_content && (!(restQuery.requestCookies?has_content) || restQuery.responseCookies!=restQuery.requestCookies)>
Response Cookies
${(formatter.renderText(restQuery.responseCookies))!}
<#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">
<#else>
<#assign step_class_root = "top-level">
<#assign step_indent = level*20>
<#if step.isAGroup()>
<#assign showAccordion = true/>
<#else>
<#assign showAccordion = false/>
<#-- ICON -->
<#if step_number?has_content>
<#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"/>-->
<#-- DESCRIPTION -->
<#if showAccordion>
<#if step.hasRestQuery()>
${formatter.restQuery(step.description)}
<#else>
${formatter.formatWithFields(step.description)}
<#if showAccordion>
<#if step.hasRestQuery()>
<#assign restDataNumber = "REST-${step.number}">
<@restQueryData restQuery=step.restQuery number=restDataNumber />
<#if step.hasData()>
<#list step.reportData as recordedData>
<#assign stepIndex=recordedData?index>
<#assign restDataNumber = "EVIDENCE-${step.number}-${stepIndex}">
<@reportData reportData=recordedData number=restDataNumber />
<#if (step.externalLink)?? && (step.externalLink.url)??>
<#-- SCREENSHOTS -->
<#if testOutcome.hasScreenshots()>
<#if step.hasMultipleScreenshots() >
<#if step.latestScreenshot?has_content>
<#assign actualScreenshotCount = screenshotCount + step.actualScreenshotCount />
<#if step.hasChildren()>
<#assign screenshotCount = screenshotCount + 1 />
<#else>
<#assign screenshotCount = screenshotCount + step.screenshotCount />
<#-- OUTCOME & TIME -->
${step.result}
${step.formattedDuration}
<#if (step.errorMessage?has_content) && !step.hasNestedErrors()>
 
<#if step.errorMessage?has_content>
<#assign errorMessageTitle = step.errorMessage?html>
<#else>
<#assign errorMessageTitle = "">
<#if testOutcome.hasScreenshots()>
<#-- Test step results -->
<#list testOutcome.testSteps as step>
<@write_step step=step step_number=step_index />
<#if testOutcome.hasNonStepFailure()>
<#assign step_outcome_icon = formatter.resultIcon().forResult(testOutcome.result) />
${step_outcome_icon}
<#if testOutcome.hasScreenshots()>
<#else>
<#if testOutcome.errorMessage?has_content>
${testOutcome.errorMessage}
<#else>
An error occurred outside of step execution
${formatter.htmlCompatibleStepDescription(testOutcome.result)}
${testOutcome.durationInSeconds}s
 
<#if testOutcome.hasScreenshots()>
<#else>
<#if (testOutcome.errorMessage)??>
<#if (testOutcome.nestedTestFailureCause)??>
<#assign formattedErrorMessageTitle = formatter.htmlAttributeCompatible(testOutcome.errorMessage, true) />
<@stacktrace title=formattedErrorMessageTitle cause=testOutcome.nestedTestFailureCause id="overall" />
<#if testOutcome.hasScreenshots()>
<#else>
${testOutcome.result}
${testOutcome.durationInSeconds}s
Serenity BDD version ${serenityVersionNumber!"SNAPSHOT-BUILD"}
<#---->