Skip to content

Commit

Permalink
Only one error element is allowed
Browse files Browse the repository at this point in the history
Also error is not created if failure element is presented
  • Loading branch information
Vasilii Besschetnov authored and Vasilii-Besschetnov committed Mar 18, 2019
1 parent d72b6a4 commit 594ae06
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/runner/reporters/junit.xml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
<% if (assertions[i].screenshots && assertions[i].screenshots.length > 0) { %><system-out><% for (var j = 0; j < assertions[i].screenshots.length; j++) { %>[[ATTACHMENT|<%= assertions[i].screenshots[j] %>]]<% } %></system-out><% } %>
<% }
if (testcase.failed > 0 && testcase.stackTrace) {
%><failure message="<%= testcase.message %>"><%= testcase.stackTrace %></failure><% }
for (var i = 0; i < errorMessages.length; i++) { %>
<error message="Error executing test code"><%= errorMessages[i] %></error>
<% } %>
%><failure message="<%= testcase.message %>"><%= testcase.stackTrace %></failure><%
} else if (errorMessages.length > 0 ) {
%><error message="Error executing test code"><%= errorMessages.join('\n') %></error><%
} %>
</testcase><% if (systemerr != '') {%>
<system-err>
<%= systemerr %>
Expand Down

0 comments on commit 594ae06

Please sign in to comment.