<?xml version="1.0" encoding="UTF-8" ?>
<% for (var i=0; i < suites.length; i++) { %>
  <% var suite=suites[i]; %>
  <testsuite name="<%= suite.name %>"
             errors="<%= suite.errorCount %>"
             failures="<%= suite.failureCount %>"
             tests="<%= suite.tests %>"
             time="<%= (suite.end - suite.start)/1000 %>"
             >
    <% for (var testCaseName in suite.testcases) { %>
      <% var testcase=suite.testcases[testCaseName]; %>
      <testcase name="<%= testcase.name %>" time="<%= (testcase.end - testcase.start)/1000 %>">
        <% if (testcase.failure) { %>
          <failure message="<%= testcase.failure.message %>">
            <% if (testcase.failure.backtrace) { %><%= testcase.failure.backtrace %><% } %>
          </failure>
        <% } %>
      </testcase>
    <% } %>
  </testsuite>
<% } %>
