Skip to content

Commit

Permalink
Merge pull request #924 from mvdbeek/test_reports_xunit
Browse files Browse the repository at this point in the history
Fix error if testcase.data.job does not exist
  • Loading branch information
mvdbeek authored Apr 24, 2019
2 parents 86261a0 + 4d5c1d0 commit a604435
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions planemo/reports/report_xunit.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,23 @@
skip="{{ raw_data.results.skips }}">
{% for testcase in raw_data.tests %}
<testcase classname="{{ testcase.id }}" name="{{ testcase.data.test_index }}" time="{{ testcase.data.time_seconds }}">
{% if testcase.data.status != 'success' %}
<error type="error" message="Tool exit code: {{ testcase.data.job.exit_code }}"><![CDATA[
{% if 'job' in testcase.data %}
{% if testcase.data.status != 'success' %}
<error type="error" message="Tool exit code: {{ testcase.data.job.exit_code }}"><![CDATA[
{{ testcase.data | tojson(indent=True) }}
]]></error>
{% endif %}
<system-out><![CDATA[
{{ testcase.data.job.stdout }}
]]></system-out>
<system-err><![CDATA[
{{ testcase.data.job.stderr }}
]]></system-err>
{% else %}
<error type="error" message="{{ testcase.data.execution_problem }}"><![CDATA[
{{ testcase.data | tojson(indent=True) }}
]]></error>
{% endif %}
<system-out><![CDATA[
{{ testcase.data.job.stdout }}
]]></system-out>
<system-err><![CDATA[
{{ testcase.data.job.stderr }}
]]></system-err>
</testcase>
{% endfor %}
</testsuite>

0 comments on commit a604435

Please sign in to comment.