MantisBT - CDash
View Issue Details
0007063CDashpublic2008-05-20 22:522008-05-24 12:51
Timothy Shead 
Julien Jomier 
normalfeaturealways
closedfixed 
1.0 
1.2 
0007063: Support <Measurement> tags containing HTML
There are a number of situations where we'd like to write tests that provided formatted data to our CDash server. One example would be using the Google Chart API (http://code.google.com/apis/chart/ [^]) to create charts as part of a test. A second example is generating tabular output. The <Measurement type="text/html"> example described at http://public.kitware.com/Wiki/CDash:DartMeasurement [^] seems ideal for this, but appears to be ignored by either CMake or CDash, not sure which.
No tags attached.
? test.measurements.py (697) 2008-05-21 13:21
https://public.kitware.com/Bug/file/1482/test.measurements.py
txt CMakeLists.txt (138) 2008-05-21 17:50
https://public.kitware.com/Bug/file/1483/CMakeLists.txt
? CTestConfig.cmake (386) 2008-05-21 17:50
https://public.kitware.com/Bug/file/1484/CTestConfig.cmake
Issue History
2008-05-20 22:52Timothy SheadNew Issue
2008-05-20 22:59Julien JomierStatusnew => assigned
2008-05-20 22:59Julien JomierAssigned To => Julien Jomier
2008-05-20 23:00Julien JomierNote Added: 0012032
2008-05-21 13:21Timothy SheadFile Added: test.measurements.py
2008-05-21 13:28Timothy SheadNote Added: 0012037
2008-05-21 13:32Julien JomierNote Added: 0012038
2008-05-21 15:29Julien JomierNote Added: 0012043
2008-05-21 15:29Julien JomierStatusassigned => feedback
2008-05-21 17:48Timothy SheadNote Added: 0012049
2008-05-21 17:50Timothy SheadFile Added: CMakeLists.txt
2008-05-21 17:50Timothy SheadFile Added: CTestConfig.cmake
2008-05-21 17:50Timothy SheadNote Added: 0012050
2008-05-21 17:58Julien JomierNote Added: 0012051
2008-05-21 20:44Timothy SheadNote Added: 0012055
2008-05-23 02:40Timothy SheadNote Added: 0012088
2008-05-23 10:42Julien JomierNote Added: 0012091
2008-05-24 01:10Timothy SheadNote Added: 0012101
2008-05-24 12:51Julien JomierStatusfeedback => closed
2008-05-24 12:51Julien JomierNote Added: 0012103
2008-05-24 12:51Julien JomierResolutionopen => fixed
2008-05-24 12:51Julien JomierFixed in Version => 1.2

Notes
(0012032)
Julien Jomier   
2008-05-20 23:00   
Thanks for report. Do you have a simple example you can attach to this bug?. CDash support any types but I'm wondering if the parsing is not done correctly or the display. Thanks again.
(0012037)
Timothy Shead   
2008-05-21 13:28   
Not sure if this is what you mean by "example", but I've uploaded a sample Python script that I run using ADD_TEST() in my build. All it does is print several different types of <DartMeasurement> tag to stdout.

When I run this test and submit the results to CDash, all of the measurement types show-up except for text/html and text/xml.
(0012038)
Julien Jomier   
2008-05-21 13:32   
That's exactly what I needed thanks. I'll try to take a look soon.
(0012043)
Julien Jomier   
2008-05-21 15:29   
I just tested with CDash SVN and it displays HTML in the test details. The XML has this form:

<Test Status="notrun">
  <Name>CDashTest1</Name>
  <Path>.</Path>
  <FullName>./CDashTest1</FullName>
  <FullCommandLine></FullCommandLine>
  <Results>
    <NamedMeasurement name="Test_HTML" type="text/html"><Value><![CDATA[<table><tr><th>foo</th><th>bar</th></tr><tr><td>a</td><td>b</td></tr></table>]]></Value>
</NamedMeasurement>
    </Results>
    </Test>

Let me know if I'm missing something and/or provide me an XML example. Thanks.
(0012049)
Timothy Shead   
2008-05-21 17:48   
Uh, I guess you're referring to the XML that ctest generates for submission to cdash? After rooting around, here's what ctest is generating:

<Testing>
  <Test Status="passed">
    <Name>foo1</Name>
    <Path>.</Path>
    <FullName>./foo1</FullName>
    <FullCommandLine>/usr/bin/python /Users/tshead/src/cdash_test/test.measurements.py</FullCommandLine>
    <Results>
      <NamedMeasurement name="Test_Float" type="numeric/float"><Value>0.12</Value></NamedMeasurement>
      <NamedMeasurement name="Test_Integer" type="numeric/integer"><Value>12</Value></NamedMeasurement>
      <NamedMeasurement name="Test_String" type="text/string"><Value>A simple message</Value></NamedMeasurement>
      <NamedMeasurement name="Test_Text" type="text/text"><Value>A longer message</Value></NamedMeasurement>
      <NamedMeasurement type="numeric/double" name="Execution Time"><Value>0</Value></NamedMeasurement>
      <NamedMeasurement type="text/string" name="Completion Status"><Value>Completed</Value></NamedMeasurement>
      <NamedMeasurement type="text/string" name="Command Line"><Value>/usr/bin/python /Users/tshead/src/cdash_test/test.measurements.py</Value></NamedMeasurement>
      <Measurement>
        <Value>
</Value>
      </Measurement>
    </Results>
  </Test>
  <EndDateTime>May 21 15:40 MDT</EndDateTime>
  <EndTestTime>1211406053</EndTestTime>
<ElapsedMinutes>0</ElapsedMinutes></Testing>

Note that it is ignoring the text/html and text/xml tags. I guess this is really a ctest problem, but what version are you using? I thought I had the latest stable version:

$ ctest --version
ctest version 2.6-patch 0

Out of curiosity, I'm interested in why your XML has no command-line - are you specifying the measurement as a property instead of in the test's output?

Many thanks,
Tim
(0012050)
Timothy Shead   
2008-05-21 17:50   
In-case it matters, I've attached the listfile and CTestConfig.cmake for my little example.
(0012051)
Julien Jomier   
2008-05-21 17:58   
I was just putting a toy example, not particularly generated by CTest, that's why it doesn't have the command-line.

It looks like a CTest bug. Could you submit a bug in CMake's bug tracker (select the CTest component) and refer to this bug page?

Thanks again for the report.
(0012055)
Timothy Shead   
2008-05-21 20:44   
Done!
(0012088)
Timothy Shead   
2008-05-23 02:40   
So, I've submitted a patch to the CMake bug tracker so that CTest submits text/html and text/xml data to CDash:

http://public.kitware.com/Bug/view.php?id=7077 [^]

However, the HTML measurement data is escaped so that CDash displays the HTML text rather than incorporating the HTML into the page itself. Any thoughts on whether this could be special-cased?

Many thanks,
Tim
(0012091)
Julien Jomier   
2008-05-23 10:42   
I just put a fix in CDash SVN. Thanks for the report. Note that involves some security issues (HTML injection) but I think we should be OK. Thanks again
(0012101)
Timothy Shead   
2008-05-24 01:10   
Confirmed ... works like a charm! We're gonna have a lot of fun with this ... many thanks for the quick turnaround!

Cheers,
Tim
(0012103)
Julien Jomier   
2008-05-24 12:51   
Great. Thanks for the report!