html test output

vnext
Paul Schneider 3 years ago
parent e598321b52
commit 272366fbb1
3 changed files with 140 additions and 662 deletions

@ -35,7 +35,7 @@ debug:
- cp $yavsc_client_secret_json yavsc-client-secret.json - cp $yavsc_client_secret_json yavsc-client-secret.json
- dnu build - dnu build
- ASPNET_ENV=Testing dnx test -maxthreads 1 -xml test-results.xml - ASPNET_ENV=Testing dnx test -maxthreads 1 -xml test-results.xml
- xsltproc ../../assets/xunit_to_html.xsl test-results.xml > test-results.html - xsltproc ../../assets/dnx_xunit_to_html.xsl test-results.xml > test-results.html
release: release:
stage: deploy stage: deploy

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">]]></xsl:text>
<html>
<head>
<title>
xUnit.net Test Results - <xsl:value-of select="@name"/>
</title>
<style type="text/css">
body { font-family: Calibri, Verdana, Arial, sans-serif; background-color: White; color: Black; }
h2,h3,h4,h5 { margin: 0; padding: 0; }
h3 { font-weight: normal; }
h5 { font-weight: normal; font-style: italic; margin-bottom: 0.75em; }
pre { font-family: Consolas; font-size: 85%; margin: 0 0 0 1em; padding: 0; }
.divided { border-top: solid 1px #f0f5fa; padding-top: 0.5em; }
.row, .altrow { padding: 0.1em 0.3em; }
.row { background-color: #f0f5fa; }
.altrow { background-color: #e1ebf4; }
.success, .failure, .skipped { font-family: Arial Unicode MS; font-weight: normal; float: left; width: 1em; display: block; }
.success { color: #0c0; }
.failure { color: #c00; }
.skipped { color: #cc0; }
.timing { float: right; }
.indent { margin: 0.25em 0 0.5em 2em; }
.clickable { cursor: pointer; }
.testcount { font-size: 85%; }
</style>
<script language="javascript">
function ToggleClass(id) {
var elem = document.getElementById(id);
if (elem.style.display == "none") {
elem.style.display = "block";
}
else {
elem.style.display = "none";
}
}
</script>
</head>
<body>
<h3 class="divided"><b>Assemblies Run</b></h3>
<xsl:apply-templates select="//assembly"/>
<h3 class="divided"><b>Summary</b></h3>
<div>
Tests run: <a href="#all"><b><xsl:value-of select="sum(//assembly/@total)"/></b></a> &#160;
Failures: <a href="#failures"><b><xsl:value-of select="sum(//assembly/@failed)"/></b></a>,
Skipped: <a href="#skipped"><b><xsl:value-of select="sum(//assembly/@skipped)"/></b></a>,
Run time: <b><xsl:value-of select="sum(//assembly/@time)"/>s</b>
</div>
<xsl:if test="//assembly/collection/test[@result='Fail']">
<br />
<h2><a name="failures"></a>Failed tests</h2>
<xsl:apply-templates select="//assembly/collection/test[@result='Fail']"><xsl:sort select="@name"/></xsl:apply-templates>
</xsl:if>
<xsl:if test="//assembly/collection/failure">
<br />
<h2><a name="failures"></a>Failed fixtures</h2>
<xsl:apply-templates select="//assembly/collection/failure"><xsl:sort select="../@name"/></xsl:apply-templates>
</xsl:if>
<xsl:if test="//assembly/@skipped > 0">
<br />
<h2><a name="skipped"></a>Skipped tests</h2>
<xsl:apply-templates select="//assembly/collection/test[@result='Skip']"><xsl:sort select="@name"/></xsl:apply-templates>
</xsl:if>
<br />
<h2><a name="all"></a>All tests</h2>
<h5>Click test collection name to expand/collapse test details</h5>
<xsl:apply-templates select="//assembly/collection"><xsl:sort select="@name"/></xsl:apply-templates>
</body>
</html>
</xsl:template>
<xsl:template match="assembly">
<div><xsl:value-of select="@name"/></div>
</xsl:template>
<xsl:template match="test">
<div>
<xsl:attribute name="class"><xsl:if test="(position() mod 2 = 0)">alt</xsl:if>row</xsl:attribute>
<xsl:if test="@result!='Skip'"><span class="timing"><xsl:value-of select="@time"/>s</span></xsl:if>
<xsl:if test="@result='Skip'"><span class="timing">Skipped</span><span class="skipped">&#x2762;</span></xsl:if>
<xsl:if test="@result='Fail'"><span class="failure">&#x2718;</span></xsl:if>
<xsl:if test="@result='Pass'"><span class="success">&#x2714;</span></xsl:if>
<span class="clickable">
<xsl:attribute name="onclick">ToggleClass('class<xsl:value-of select="generate-id()"/>')</xsl:attribute>
&#160;<xsl:value-of select="@name"/>
</span>
<div class="indent">
<xsl:if test="@failed = 0"><xsl:attribute name="style">display: none;</xsl:attribute></xsl:if>
<xsl:attribute name="id">class<xsl:value-of select="generate-id()"/></xsl:attribute>
<xsl:if test="child::node()/message"> : <xsl:value-of select="child::node()/message"/></xsl:if>
<br clear="all" />
<xsl:if test="failure/stack-trace">
<pre><xsl:value-of select="failure/stack-trace"/></pre>
</xsl:if>
<xsl:if test="output">
<h4>Output</h4>
<pre><xsl:value-of select="output"/></pre>
</xsl:if>
</div>
</div>
</xsl:template>
<xsl:template match="failure">
<span class="failure">&#x2718;</span> <xsl:value-of select="../@name"/> : <xsl:value-of select="message"/><br clear="all"/>
Stack Trace:<br />
<pre><xsl:value-of select="stack-trace"/></pre>
</xsl:template>
<xsl:template match="collection">
<h3>
<span class="timing"><xsl:value-of select="@time"/>s</span>
<span class="clickable">
<xsl:attribute name="onclick">ToggleClass('class<xsl:value-of select="generate-id()"/>')</xsl:attribute>
<xsl:attribute name="ondblclick">ToggleClass('class<xsl:value-of select="generate-id()"/>')</xsl:attribute>
<xsl:if test="@failed > 0"><span class="failure">&#x2718;</span></xsl:if>
<xsl:if test="@failed = 0"><span class="success">&#x2714;</span></xsl:if>
&#160;<xsl:value-of select="@name"/>
&#160;<span class="testcount">(<xsl:value-of select="@total"/>&#160;test<xsl:if test="@total > 1">s</xsl:if>)</span>
</span>
<br clear="all" />
</h3>
<div class="indent">
<xsl:if test="@failed = 0"><xsl:attribute name="style">display: none;</xsl:attribute></xsl:if>
<xsl:attribute name="id">class<xsl:value-of select="generate-id()"/></xsl:attribute>
<xsl:apply-templates select="test"><xsl:sort select="@name"/></xsl:apply-templates>
</div>
</xsl:template>
</xsl:stylesheet>

@ -1,661 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.1" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="total_tests" select="sum(//testsuite/@tests[number(.) = number(.)])">
</xsl:variable>
<xsl:variable name="total_errors" select="sum(//testsuite/@errors[number(.) = number(.)])">
</xsl:variable>
<xsl:variable name="total_failures" select="sum(//testsuite/@failures[number(.) = number(.)])">
</xsl:variable>
<xsl:variable name="total_successful" select="$total_tests - ($total_errors + $total_failures)">
</xsl:variable>
<xsl:variable name="total_time" select="sum(//testsuite/testcase/@time[number(.) = number(.)])">
</xsl:variable>
<xsl:variable name="total_m" select="floor($total_time div 60)">
</xsl:variable>
<xsl:variable name="total_s" select="$total_time mod 60">
</xsl:variable>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"/>
<style>
.errorMessage {
font-size: 16px;
font-family: Lato;
font-weight: 300;
color: black;
display: inline;
border-radius: 5px;
padding: 1px;
}
.errorColor {
background-color: #f7e1d4;
}
.failureColor {
background-color: #f7d4d4;
}
</style>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<link href="https://cdn.jsdelivr.net/npm/semantic-ui@2.3.3/dist/semantic.min.css" rel="stylesheet"/>
<script crossorigin="anonymous" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" src="https://code.jquery.com/jquery-3.1.1.min.js">
</script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.3.3/dist/semantic.min.js">
</script>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.address/1.6/jquery.address.min.js">
</script>
</head>
<body style="color:rgba(47, 53, 69, 0.9);">
<div class="ui container" style="margin:40px;">
<h2 class="ui header">
<div class="content">
<span style="font-size:30px; font-weight:300; font-family:Open Sans;">
<span style="font-weight:600;">
Test
</span>
Result
</span>
<div>
<div class="ui active indicating progress" data-percent="33" style="margin-top:10px;">
<xsl:attribute name="data-percent">
<xsl:value-of select="($total_successful div ($total_failures + $total_errors + $total_successful)) * 100">
</xsl:value-of>
</xsl:attribute>
<div class="bar" style="width:33%">
<xsl:attribute name="style">
<xsl:value-of select="concat('width:', ($total_successful div ($total_failures + $total_errors + $total_successful)) * 100, '%;')">
</xsl:value-of>
</xsl:attribute>
</div>
</div>
</div>
<div class="ui divider">
</div>
<div class="sub header" style="margin-top: 15px;">
<div class="ui mini statistics">
<div class="statistic" data-tooltip="Total tests ran">
<div class="value">
<i class="folder open outline icon gray" style="padding-right:4px;">
</i>
<xsl:value-of select="$total_tests">
</xsl:value-of>
</div>
<div class="label">
Tests
</div>
</div>
<div class="statistic" data-tooltip="Total successful test runs">
<div class="value">
<i class="check circle outline icon green" style="padding-right:4px;">
</i>
<xsl:value-of select="$total_successful">
</xsl:value-of>
</div>
<div class="label">
Passed
</div>
</div>
<div class="statistic" data-tooltip="Total test runs with failed assertions">
<div class="value">
<i class="exclamation circle icon red" style="padding-right:4px;">
</i>
<xsl:value-of select="$total_failures">
</xsl:value-of>
</div>
<div class="label">
Failed
</div>
</div>
<div class="statistic" data-tooltip="Total test runs with unanticipated errors">
<div class="value">
<i class="flag outline icon orange" style="padding-right:4px;">
</i>
<xsl:value-of select="$total_errors">
</xsl:value-of>
</div>
<div class="label">
Errored
</div>
</div>
<div class="statistic" data-tooltip="Total runtime for all tests">
<div class="value">
<i class="hourglass half icon blue" style="padding-right:4px;">
</i>
<xsl:value-of select="format-number($total_time div 60, '00')">
</xsl:value-of>
<span style="text-transform:lowercase; font-size:12px;">
min
</span>
</div>
<div class="label">
Runtime
</div>
</div>
</div>
</div>
</div>
</h2>
<div class="ui styled fluid accordion" style="font-size: 16px; font-family: Open sans;">
<xsl:for-each select="//testsuite">
<xsl:variable name="suite_total_tests" select="sum(./@tests[number(.) = number(.)])">
</xsl:variable>
<xsl:variable name="suite_total_errors" select="sum(./@errors[number(.) = number(.)])">
</xsl:variable>
<xsl:variable name="suite_total_skipped" select="sum(./@skipped[number(.) = number(.)])">
</xsl:variable>
<xsl:variable name="suite_total_failures" select="sum(./@failures[number(.) = number(.)])">
</xsl:variable>
<xsl:variable name="suite_total_successful" select="$suite_total_tests - ($suite_total_errors + $suite_total_failures)">
</xsl:variable>
<xsl:variable name="suite_total_time" select="sum(./testcase/@time[number(.) = number(.)])">
</xsl:variable>
<div class="title">
<i class="angle right icon">
</i>
<b style="font-family: Lato; font-size: 15px; color: #2f2f2f; font-weight: bold;">
<xsl:value-of select="@name">
</xsl:value-of>
</b>
<!-- Time Label -->
<div class="ui blue label" data-tooltip="Test suite runtime" style="float:right;">
<i class="clock icon">
</i>
<b>
<xsl:value-of select="format-number($suite_total_time, '#.###')">
</xsl:value-of>
</b>
sec
</div>
<div class="ui label" style="border: 1px solid #80808045;">
<b>
Test Suite
</b>
</div>
<!-- Test Suite Labels -->
<xsl:choose>
<xsl:when test="$suite_total_failures > 0">
<div class="ui red label" data-tooltip="Total test runs with failed assertions" style="float:right;">
<i class="exclamation circle icon">
</i>
<b>
<xsl:value-of select="$suite_total_failures">
</xsl:value-of>
</b>
failed
</div>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="$suite_total_errors > 0">
<div class="ui orange label" data-tooltip="Total test runs with unanticipated errors" style="float:right;">
<i class="flag outline icon">
</i>
<b>
<xsl:value-of select="$suite_total_errors">
</xsl:value-of>
</b>
errored
</div>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="$suite_total_successful > 0">
<div class="ui green label" data-tooltip="Total successful test runs" style="float:right;">
<i class="check circle outline icon">
</i>
<b>
<xsl:value-of select="$suite_total_successful">
</xsl:value-of>
</b>
passed
</div>
</xsl:when>
</xsl:choose>
<!-- Skipped Label -->
<xsl:choose>
<xsl:when test="$suite_total_skipped > 0">
<div class="ui gray label" data-tooltip="Total number of skipped tests" style="float:right; border: 1px solid gray;">
<i class="ban icon">
</i>
<b>
<xsl:value-of select="$suite_total_skipped">
</xsl:value-of>
</b>
skipped
</div>
</xsl:when>
</xsl:choose>
<div class="ui active indicating progress" data-percent="33" style="margin-top:10px;">
<xsl:attribute name="data-percent">
<xsl:value-of select="($suite_total_successful div ($suite_total_failures + $suite_total_errors + $suite_total_successful)) * 100">
</xsl:value-of>
</xsl:attribute>
<div class="bar" style="width:33%">
<xsl:attribute name="style">
<xsl:value-of select="concat('width:', ($suite_total_successful div ($suite_total_failures + $suite_total_errors + $suite_total_successful)) * 100, '%;')">
</xsl:value-of>
</xsl:attribute>
</div>
</div>
</div>
<div class="content">
<div class="accordion" style="background-color:#00000017;">
<xsl:for-each select="./testcase">
<xsl:variable name="class_total_tests" select="count(current-group())">
</xsl:variable>
<xsl:variable name="class_total_errors" select="count(current-group()/error)">
</xsl:variable>
<xsl:variable name="class_total_failures" select="count(current-group()/failure)">
</xsl:variable>
<xsl:variable name="class_total_skipped" select="count(current-group()/skipped)">
</xsl:variable>
<xsl:variable name="class_total_successful" select="$class_total_tests - ($class_total_errors + $class_total_failures)">
</xsl:variable>
<xsl:variable name="class_total_time" select="sum(current-group()/@time[number(.) = number(.)])">
</xsl:variable>
<div class="title">
<i class="dropdown icon">
</i>
<b>
<xsl:value-of select="current-grouping-key()">
</xsl:value-of>
</b>
<!-- Time Label -->
<div class="ui blue label" data-tooltip="Test class runtime" style="float:right;">
<i class="clock icon">
</i>
<b>
<xsl:value-of select="format-number($class_total_time, '#.###')">
</xsl:value-of>
</b>
sec
</div>
<div class="ui label" style="background-color: rgba(255, 255, 255, 0.66); border: 1px solid #bbb6b6;">
<b>
Test Class
</b>
</div>
<!-- Skipped Label -->
<xsl:choose>
<xsl:when test="$class_total_skipped > 0">
<div class="ui gray label" data-tooltip="Total number of skipped tests" style="float:right; border: 1px solid gray;">
<i class="ban icon">
</i>
<b>
<xsl:value-of select="$class_total_skipped">
</xsl:value-of>
</b>
skipped
</div>
</xsl:when>
</xsl:choose>
<!-- Test Results Labels -->
<xsl:choose>
<xsl:when test="$class_total_successful = $class_total_tests">
<div class="ui green label" data-tooltip="Total successful test runs" style="float:right;">
<i class="check circle outline icon">
</i>
<b>
<xsl:value-of select="$class_total_successful">
</xsl:value-of>
</b>
</div>
</xsl:when>
<xsl:when test="$class_total_failures > 0">
<div class="ui red label" data-tooltip="Total test runs with failed assertions" style="float:right;">
<i class="exclamation circle icon">
</i>
<b>
<xsl:value-of select="$class_total_failures">
</xsl:value-of>
</b>
</div>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="$class_total_errors > 0">
<div class="ui orange label" data-tooltip="Total test runs with unanticipated errors" style="float:right;">
<i class="flag outline icon">
</i>
<b>
<xsl:value-of select="$class_total_errors">
</xsl:value-of>
</b>
</div>
</xsl:when>
</xsl:choose>
<div class="ui active indicating progress" data-percent="33" style="margin-top:10px;">
<xsl:attribute name="data-percent">
<xsl:value-of select="($class_total_successful div ($class_total_failures + $class_total_errors + $class_total_successful)) * 100">
</xsl:value-of>
</xsl:attribute>
<div class="bar" style="width:33%">
<xsl:attribute name="style">
<xsl:value-of select="concat('width:', ($class_total_successful div ($class_total_failures + $class_total_errors + $class_total_successful)) * 100, '%;')">
</xsl:value-of>
</xsl:attribute>
</div>
</div>
</div>
<div class=" content">
<div class="accordion">
<xsl:for-each select="current-group()">
<xsl:variable name="sanitized_test_name" select="encode-for-uri(@name)">
</xsl:variable>
<xsl:variable name="hasContent" select="boolean(boolean(./failure/@message) = boolean(0) and boolean(./error/@message) = boolean(0) and boolean(./system-out) = boolean(0) and boolean(./error) = boolean(0) and boolean(./system-err) = boolean(0) and boolean(./system-out) = boolean(0)) = boolean(0)">
</xsl:variable>
<xsl:variable name="cursor">
<xsl:if test="not($hasContent)">
<xsl:text>cursor:default;</xsl:text>
</xsl:if>
</xsl:variable>
<div class="title">
<xsl:attribute name="style">
<xsl:choose>
<xsl:when test="boolean(./failure)">
<xsl:value-of select="concat('color:#212121; background-color:rgb(255, 156, 156); ', $cursor)"/>
</xsl:when>
<xsl:when test="boolean(./error)">
<xsl:value-of select="concat('color:#212121; background-color:#ffa468;' , $cursor)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('color:#212121; background-color:#baf3b7;' , $cursor)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:choose>
<xsl:when test="boolean($hasContent)">
<i class="angle down icon" style="color:#5f5f5f; margin-right:15px;">
</i>
</xsl:when>
<xsl:otherwise>
<i class="check circle outline icon" style="color:#5f5f5f; margin-right:15px;">
</i>
</xsl:otherwise>
</xsl:choose>
<span style="font-family: Open Sans; font-weight: 300;">
<b style="font-family: Lato; font-weight: bold;">
<xsl:value-of select="@name">
</xsl:value-of>
</b>
</span>
<!-- Time Label -->
<div class="ui blue label" data-tooltip="Test runtime" style="float:right;">
<i class="clock icon">
</i>
<xsl:variable name="test_run_time" select="format-number(@time, '#.###')">
</xsl:variable>
<xsl:choose>
<xsl:when test="substring($test_run_time,1,5) = '.0'">
<b>
~ 0
</b>
sec
</xsl:when>
<xsl:otherwise>
<b>
<xsl:value-of select="$test_run_time">
</xsl:value-of>
</b>
sec
</xsl:otherwise>
</xsl:choose>
</div>
<xsl:choose>
<xsl:when test="boolean(./failure/@type)">
<div class="ui red label" data-tooltip="Exception/Error type" style="float:right;">
<i class="exclamation triangle icon">
</i>
<xsl:value-of select="./failure/@type">
</xsl:value-of>
</div>
</xsl:when>
<xsl:when test="boolean(./error/@type)">
<div class="ui orange label" data-tooltip="Exception/Error type" style="float:right;">
<i class="exclamation triangle icon">
</i>
<xsl:value-of select="./error/@type">
</xsl:value-of>
</div>
</xsl:when>
</xsl:choose>
</div>
<xsl:variable name="hasContent" select="boolean(boolean(./failure/@message) = boolean(0) and boolean(./error/@message) = boolean(0) and boolean(./system-out) = boolean(0) and boolean(./error) = boolean(0) and boolean(./system-err) = boolean(0) and boolean(./system-out) = boolean(0)) = boolean(0)">
</xsl:variable>
<xsl:choose>
<xsl:when test="boolean($hasContent)">
<div class="content">
<xsl:attribute name="style">
<xsl:choose>
<xsl:when test="boolean(./failure)">
<xsl:value-of select="'background-color:rgb(255, 156, 156);'">
</xsl:value-of>
</xsl:when>
<xsl:when test="boolean(./error)">
<xsl:value-of select="'background-color:#ffa468;'">
</xsl:value-of>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'background-color:#baf3b7;'">
</xsl:value-of>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<div style="background-color:rgb(243,243,243);border-radius:7px; padding: 25px;">
<xsl:choose>
<xsl:when test="string-length(./failure/@message) > 2000">
<p class="errorMessage failureColor">
<xsl:value-of select="substring(./failure/@message, 0, 1999)">
</xsl:value-of>
...
</p>
</xsl:when>
<xsl:when test="string-length(./failure/@message) > 0">
<p class="errorMessage failureColor">
<xsl:value-of select="./failure/@message">
</xsl:value-of>
</p>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="string-length(./error/@message) > 2000">
<p class="errorMessage errorColor">
<xsl:value-of select="substring(./error/@message, 0, 1999)">
</xsl:value-of>...
</p>
</xsl:when>
<xsl:when test="string-length(./error/@message) > 0">
<p class="errorMessage errorColor">
<xsl:value-of select="./error/@message">
</xsl:value-of>
</p>
</xsl:when>
</xsl:choose>
<div class="ui segment" style="padding-top: 15; background-color: #ffffff00; box-shadow: none; border: none;">
<div class="ui menu top" style="background-color: transparent; box-shadow: none; border: none;">
<xsl:choose>
<xsl:when test="boolean(./failure) and string-length('./failure') > 0">
<a class="active item" style="border-bottom: 3px solid #00000042; font-weight: bolder;">
<xsl:attribute name="data-tab">
<xsl:value-of select="concat('failure_', $sanitized_test_name)">
</xsl:value-of>
</xsl:attribute>
Failure
</a>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="boolean(./system-err) and string-length('./system-err') > 1">
<a style="border-bottom: 3px solid #00000042; font-weight: bolder;">
<xsl:attribute name="data-tab">
<xsl:value-of select="concat('syserr_', $sanitized_test_name)">
</xsl:value-of>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="(boolean(./failure) = boolean(0) or string-length('./failure') &lt; 1) and (boolean(./error) = boolean(0) or string-length('./error') &lt; 1)">
active item
</xsl:when>
<xsl:otherwise>
item
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
System-err
</a>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="boolean(./error) and string-length('./error') > 0">
<a style="border-bottom: 3px solid #00000042; font-weight: bolder;">
<xsl:attribute name="data-tab">
<xsl:value-of select="concat('error_', $sanitized_test_name)">
</xsl:value-of>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="boolean(./failure) = boolean(0) or string-length('./failure') &lt; 1">
active item
</xsl:when>
<xsl:otherwise>
item
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
Error
</a>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="boolean(./system-out) and string-length('./system-out') > 0">
<a style="border-bottom: 3px solid #00000042; font-weight: bolder;">
<xsl:attribute name="data-tab">
<xsl:value-of select="concat('sysout_', $sanitized_test_name)">
</xsl:value-of>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="(boolean(./failure) = boolean(0) or string-length('./failure') &lt; 1) and (boolean(./error) = boolean(0) or string-length('./error') &lt; 1) and (boolean(./system-err) = boolean(0) or string-length('./system-err') &lt; 1)">
active item
</xsl:when>
<xsl:otherwise>
item
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
System-out
</a>
</xsl:when>
</xsl:choose>
</div>
<xsl:choose>
<xsl:when test="boolean(./failure) and string-length('./failure') > 0">
<div class="ui tab active">
<xsl:attribute name="data-tab">
<xsl:value-of select="concat('failure_', $sanitized_test_name)">
</xsl:value-of>
</xsl:attribute>
<pre class="prettyprint" style=" overflow: scroll;padding: 20px; max-height: 400px; border: 1px solid #80808054; background-color: white;">
<code><xsl:value-of select="./failure"></xsl:value-of></code>
</pre>
</div>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="boolean(./error) and string-length('./error') > 0">
<div>
<xsl:attribute name="data-tab">
<xsl:value-of select="concat('error_', $sanitized_test_name)">
</xsl:value-of>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="boolean(./failure) = boolean(0) or string-length('./failure') &lt; 1">
ui tab active
</xsl:when>
<xsl:otherwise>
ui tab
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<pre class="prettyprint" style=" overflow: scroll;padding: 20px; max-height: 400px; border: 1px solid #80808054; background-color: white;">
<code><xsl:value-of select="./error"></xsl:value-of></code>
</pre>
</div>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="boolean(./system-err) and string-length('./system-err') > 0">
<div>
<xsl:attribute name="data-tab">
<xsl:value-of select="concat('syserr_', $sanitized_test_name)">
</xsl:value-of>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="(boolean(./failure) = boolean(0) or string-length('./failure') &lt; 1) and (boolean(./error) = boolean(0) or string-length('./error') &lt; 1)">
ui tab active
</xsl:when>
<xsl:otherwise>
ui tab
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<pre class="prettyprint" style=" overflow: scroll;padding: 20px; max-height: 400px; border: 1px solid #80808054; background-color: white;">
<code><xsl:value-of select="./system-err"></xsl:value-of></code>
</pre>
</div>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="boolean(./system-out) and string-length('./system-out') > 0">
<div>
<xsl:attribute name="data-tab">
<xsl:value-of select="concat('sysout_', $sanitized_test_name)">
</xsl:value-of>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="(boolean(./failure) = boolean(0) or string-length('./failure') &lt; 1) and (boolean(./error) = boolean(0) or string-length('./error') &lt; 1) and (boolean(./system-err) = boolean(0) or string-length('./system-err') &lt; 1)">
ui tab active
</xsl:when>
<xsl:otherwise>
ui tab
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<pre class="prettyprint" style=" overflow: scroll;padding: 20px; max-height: 400px; border: 1px solid #80808054; background-color:white;">
<code><xsl:value-of select="./system-out"></xsl:value-of></code>
</pre>
</div>
</xsl:when>
</xsl:choose>
</div>
</div>
</div>
</xsl:when>
<xsl:otherwise>
<div class="content" style="padding:0px;">
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</div>
</div>
</xsl:for-each>
</div>
</div>
</xsl:for-each>
</div>
</div>
<script>
$(document).ready(function(){
$('.ui.accordion').accordion();
$('.top.menu .item').tab();
});
</script>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Loading…