CDash:XML

From KitwarePublic
Revision as of 14:38, 28 November 2012 by Jjomier (talk | contribs)
Jump to navigationJump to search

This page provides the validation schemata and example files for direct submission of XML to CDash.

Examples XML files and Schema

CDash with NUnit

As of version 2.2, CDash partially supports NUnit XML files for tests. The files can either be submitted via CTest or directly uploaded to CDash (via the submit.php as usual). Here's we describe the expected values for direct submission:

 <test-results name="C:\Users\hoffman\Work\osera\MDWS\mdo\mdo-test\bin\Debug\mdo-test.dll" total="309" errors="0" failures="1" not-run="0" inconclusive="0" ignored="0" skipped="0" invalid="0" date="2012-11-09" time="13:51:43">
   <environment nunit-version="2.6.2.12296" clr-version="2.0.50727.5456" os-version="Microsoft Windows NT 6.1.7601 Service Pack 1" platform="Win32NT" cwd="C:\Users\hoffman\Work\osera\MDWS" machine-name="EXARIUS" user="hoffman" user-domain="KHQ" />

In that case CDash performs the following matches:

  • buildname = environment.platform (com.kitware.cjh.Test)
  • sitename = environment.machine-name (EXARIUS)
  • timestamp = 20121109-1351-Nightly based on the timestamp value (based on test-results.date + test-results.time)
  • os.name = environment.platform
  • os.version= environment.os-version
  • compiler.name= 'CLR'
  • compiler.version= environment.clr-version

The timestamp is always set as Nightly when a direct submission (without CTest) is done to CDash.

CDash with JUnit

As of version 2.2, CDash partially supports NUnit XML files for tests and coverage. The files can either be submitted via CTest or directly uploaded to CDash (via the submit.php as usual). Here's we describe the expected values for direct submission:

Testing

CDash uses the <testsuite> tag in order to determine the buildname, sitename and timestamp, necessary for CDash.

 <testsuite hostname="ulmus" name="com.kitware.cjh.Test" timestamp="2012-11-20T20:47:07">

In that case CDash performs the following matches:

  • buildname = name (com.kitware.cjh.Test)
  • sitename = hostname (ulmus)
  • timestamp = 20121120-2047-Nightly based on the timestamp value
  • os.name = property.os.name
  • os.version= property.os.version
  • compiler.name= property.java.vm.name
  • compiler.version= property.java.vm.version

Coverage

CDash support coverage files from JUnit (more information to produce them should be added here). CDash requires CTest in order to submit the files since no information about the build can be determined.

From the following XML:

 <sessioninfo id="ulmus-944b97d" start="1353437105692" dump="1353437105736" />

The timestamp start and dump determine the time for the coverage to run.

 <counter type="INSTRUCTION" missed="14" covered="8" />
 <counter type="LINE" missed="4" covered="2" />
 <counter type="COMPLEXITY" missed="4" covered="4" />
 <counter type="METHOD" missed="4" covered="4" />
 <counter type="CLASS" missed="0" covered="2" />
  • Ligne of codes: LINE
  • Branches: COMPLEXITY
  • Functions: METHOD

CDash doesn't support the coverage per class.

Tools