code: protected String generateResultXml(String testName, Throwable exception, double executionTime) {
          int errors = 0;
          int failures = 0;
          String failureXml = "";
  
          if (exception != null) {
              failureXml = "<failure type=\"" + exception.getClass().getName()
                      + "\" message=\"" + getMessage(exception)
                      + "\"></failure>";
              if (exception instanceof AssertionError)
                  failures = 1;
              else
                  errors = 1;
          }
  
          return "<testsuite errors=\"" + errors + "\" skipped=\"0\" tests=\"1\" time=\""
                  + executionTime + "\" failures=\"" + failures + "\" name=\""
                  + testName + "\">" + "<properties></properties>" + "<testcase classname=\""
                  + testName + "\" time=\"" + executionTime + "\" name=\""
                  + testName + "\">" + failureXml + "</testcase>" + "</testsuite>";
      }
docs: Creates XML string describing test outcome.
  @param testName name of test.
  @param exception exception from test
  @param executionTime execution time in seconds
  @return XML description of test result