CDash:XML: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
This page provides the validation schemata and example files for direct submission of XML to CDash.
This page provides the validation schemata and example files for direct submission of XML to CDash.
= Manually submitting to CDash =
  PUT /CDash/submit.php?project=<MyProject>&FileName=<filename.xml>&MD5=<md5ofcontents>


= Examples XML files and Schema =
= Examples XML files and Schema =
Line 34: Line 38:
*buildname = name (com.kitware.cjh.Test)
*buildname = name (com.kitware.cjh.Test)
*sitename = hostname (ulmus)
*sitename = hostname (ulmus)
*timestamp = 20121120-2047-Nightly based on the timestamp value
*timestamp = 20121120-2047-Nightly based on the timestamp value (the default is Nightly)
*os.name = property.os.name
*os.name = property.os.name
*os.version= property.os.version
*os.version= property.os.version
*compiler.name= property.java.vm.name
*compiler.name= property.java.vm.name
*compiler.version= property.java.vm.version
*compiler.version= property.java.vm.version
if <testsuite> '''does not have the hostname attribute''' or the '''timestamp attribute''', CDash will assume the timestamp is made as the current time of the CDash server. The hostname can be defined in the
  <property name="hostname" value="MySite" />


== Coverage ==
== Coverage ==

Latest revision as of 19:58, 10 October 2016

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

Manually submitting to CDash

 PUT /CDash/submit.php?project=<MyProject>&FileName=<filename.xml>&MD5=<md5ofcontents> 

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 (the default is Nightly)
  • os.name = property.os.name
  • os.version= property.os.version
  • compiler.name= property.java.vm.name
  • compiler.version= property.java.vm.version

if <testsuite> does not have the hostname attribute or the timestamp attribute, CDash will assume the timestamp is made as the current time of the CDash server. The hostname can be defined in the

 <property name="hostname" value="MySite" />

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