All Downloads are FREE. Search and download functionalities are using the official Maven repository.

template.macros.scenario.ftl Maven / Gradle / Ivy

There is a newer version: 2.9.4
Show newest version
<#--
Copyright 2019 trivago N.V.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<#import "../macros/common.ftl" as common>

<#macro table status numberOfScenarios>
    <#assign skippedRequested = status == "skipped">
    <#assign failedRequested = status == "failed">
    <#assign passedRequested = status == "passed">
    <#assign allRequested = status == "all">

    <#if
    (skippedRequested && hasSkippedScenarios()) ||
    (failedRequested && hasFailedScenarios()) ||
    (passedRequested && hasPassedScenarios()) ||
    allRequested
    >
        
        
<#switch status> <#case "skipped">
${numberOfScenarios} <@common.pluralize word="skipped Scenario" unitCount=numberOfScenarios/> <@common.status status="skipped"/>
<#break> <#case "failed">
${numberOfScenarios} <@common.pluralize word="failed Scenario" unitCount=numberOfScenarios/> <@common.status status="failed"/>
<#break> <#case "passed">
${numberOfScenarios} <@common.pluralize word="passed Scenario" unitCount=numberOfScenarios/> <@common.status status="passed"/>
<#break> <#case "all">
Scenario Sequence (${numberOfScenarios})
<#break>
<#if allRequested> <#if allRequested> <#list reports as report> <#assign tooltipText = ""> <#if report.description?has_content> <#assign tooltipText = "${report.description} | "> <#assign tooltipText = "${tooltipText}${report.uri}"> <#list report.elements as element> <#if (skippedRequested && element.skipped) || (failedRequested && element.failed) || (passedRequested && element.passed) || allRequested> <#if allRequested> <#if allRequested>
# Feature Scenario Started DurationStatus
${element.scenarioIndex} ${report.name?html} ${element.name?html} ${element.startDateString}
${element.startTimeString}
${element.returnTotalDurationString()} <@common.status status=element.status.statusString/>
<#macro attachments step> <#if step.embeddings??> <#list step.embeddings as attachment>
<#if attachment.name != "">
${attachment.name}
<#if attachment.image> Attachment ${attachment.filename} <#elseif attachment.mimeType == "HTML"> <#elseif attachment.mimeType == "TXT" || attachment.mimeType == "XML" || attachment.mimeType == "JSON" || attachment.mimeType == "APPLICATION_XML">
${attachment.decodedData}
<#elseif attachment.mimeType == "MP4"> <#if attachment.externalContent> <#elseif attachment.mimeType == "UNKNOWN">

Unknown content type.

<#else>
<#macro errorMessage step> <#if step.result.hasErrorMessage()>
${step.result.returnErrorMessageWithClickableLinks()}
<#macro output step> <#if step.hasOutputs()>
${step.returnEscapedOutputs()?join("

")}
<#macro stepHooks hooks> <#list hooks as hook>
${hook.glueMethodName}
${hook.result.returnDurationString()}
<@common.status status=hook.consolidatedStatusString/>
<@scenario.errorMessage step=hook/> <@scenario.output step=hook/> <@scenario.attachments step=hook/>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy