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

ftl.jbehave-xml-output.ftl Maven / Gradle / Ivy

<#ftl strip_whitespace=true>
<#macro renderMultiline text>${text?replace("\n", "
")} <#macro renderMeta meta> <#assign metaProperties=meta.getProperties()> <#list metaProperties.keySet() as name> <#assign property = metaProperties.get(name)> <#macro renderNarrative narrative> <#assign isAlternative=narrative.isAlternative()?string> <#if isAlternative == "true"> ${narrative.asA} ${narrative.iWantTo} ${narrative.soThat} <#else> ${narrative.inOrderTo} ${narrative.asA} ${narrative.iWantTo} <#macro renderGivenStories givenStories> <#list givenStories.getStories() as givenStory> parameters="${givenStory.parameters}">${givenStory.path} <#macro renderLifecycle lifecycle> <#if !lifecycle.getBeforeSteps().isEmpty()> <#list lifecycle.getBeforeSteps() as step> ${step?xml} <#if !lifecycle.getAfterSteps().isEmpty()> <#list lifecycle.getOutcomes() as outcome>
${outcome} <#assign metaFilter=lifecycle.getMetaFilter(outcome)> <#if !metaFilter.isEmpty()><#assign metaFilterAsString=metaFilter.asString()>${metaFilterAsString} <#list lifecycle.getAfterSteps(outcome) as step> ${step?xml} <#macro renderTable table> <#assign rows=table.getRows()> <#assign headers=table.getHeaders()> <#list headers as header>
${header?xml}
<#list rows as row> <#list headers as header> <#assign cell=row.get(header)> ${cell?xml}
<#macro renderOutcomes table> <#assign outcomes=table.getOutcomes()> <#assign fields=table.getOutcomeFields()> <#list fields as field> ${field?xml} <#list outcomes as outcome> <#assign isVerified=outcome.isVerified()?string> <#if isVerified == "true"> <#assign verified="verified"><#else><#assign verified="notVerified"> ${outcome.description?xml}<@renderOutcomeValue outcome.getValue() table.getDateFormat()/>${outcome.matcher?xml}<#if isVerified == "true">${keywords.yes}<#else>${keywords.no} <#macro renderOutcomeValue value dateFormat><#if value?is_date>${value?string(dateFormat)}<#else>${value?xml} <#macro renderStep step> <#assign formattedStep = step.getFormattedStep(EscapeMode.XML, "{0}")> ${formattedStep}<#if step.getTable()??> <@renderTable step.getTable()/> <#if step.getFailure()??> ${step.failureCause?xml}<#if step.getOutcomes()??><@renderOutcomes step.getOutcomes()/> <#if story.getMeta()??><@renderMeta story.getMeta()/> <#if story.getNarrative()??><@renderNarrative story.getNarrative()/> <#if story.getLifecycle()??><@renderLifecycle story.getLifecycle()/> <#assign scenarios = story.getScenarios()> <#list scenarios as scenario> <#if scenario.getMeta()??><@renderMeta scenario.getMeta()/> <#if scenario.getGivenStories()??><@renderGivenStories scenario.getGivenStories()/> <#if scenario.getExamplesTable()??> <#list scenario.getExamplesSteps() as step> ${step?xml} <@renderTable scenario.getExamplesTable()/> <#if scenario.getExamples()??> <#list scenario.getExamples() as example> ${example?xml} <#assign steps = scenario.getStepsByExample(example)> <#list steps as step> <@renderStep step/> <#else> <#assign steps = scenario.getSteps()> <#list steps as step> <@renderStep step/> <#if story.isCancelled()?string == 'true'> <#if story.getPendingMethods()??> <#list story.getPendingMethods() as method> ${method?xml}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy