Definite's Extractor

My findings on Life, Linux, Open Source, and so on.

JUnit XML Skeleton fits for Hudson

Hudson built-in supports JUnit XML reports. But unfortunately, the thing I want Hudson to show is neither written in Java, nor generate by JUnit, yet I managed to create a minimal JUnit XML that is accepted by Hudson. Here is how it looks like:

<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="1" failures="1" hostname="HOSTNAME" name="PACKAGENAME" tests="3" time="3.0" timestamp="2010-06-30T05:16:00Z">
  <testcase name="TESTCASE1-SUCCESS" time="1.0" />
  <testcase name="TESTCASE2-ERROR" time="1.0">
    <error message="ERR_MSG">STACK_TRACE</error>
  </testcase>
  <testcase name="TESTCASE3-FAILURE" time="1.0">
    <failure message="FAIL_MSG">STACK_TRACE</failure>
  </testcase>
  <system-out>STDOUT</system-out>
  <system-err>STDERR</system-err>
</testsuite>

Replace all uppercase text strings with your strings, and attribute time,failure,error with real values.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: