<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 57: CPPUnit Test Run Report XML to HTML Report similar to Junit or CUnit</title><link>https://sourceforge.net/p/cppunit/feature-requests/57/</link><description>Recent changes to 57: CPPUnit Test Run Report XML to HTML Report similar to Junit or CUnit</description><atom:link href="https://sourceforge.net/p/cppunit/feature-requests/57/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 06 Oct 2014 19:01:05 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/cppunit/feature-requests/57/feed.rss" rel="self" type="application/rss+xml"/><item><title>#57 CPPUnit Test Run Report XML to HTML Report similar to Junit or CUnit</title><link>https://sourceforge.net/p/cppunit/feature-requests/57/?limit=25#85e1</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The feature you want is already implemented.  I have Ubuntu, but do not develop on it.  As a Windows developer, here is a script I use during my build process to create html output.  You will need to translate to your environment.  The output file I generate here is "UnitTestResults.xml", which is html internally.  You can probably pick a different name.  :-)&lt;/p&gt;
&lt;p&gt;@echo off&lt;/p&gt;
&lt;p&gt;setlocal enabledelayedexpansion&lt;/p&gt;
&lt;p&gt;@rem Expected parameters&lt;br /&gt;
@rem&lt;br /&gt;
@rem param1: location of targets for the solution (not the project)&lt;br /&gt;
@rem param2: &lt;span&gt;[optional]&lt;/span&gt; if non-blank, the unit test target (else all we can find)&lt;/p&gt;
&lt;p&gt;@rem Determine if we are running debug or release (or other)&lt;br /&gt;
cd %1&lt;br /&gt;
set where=%cd%&lt;br /&gt;
set where=%where:Debug=xx%&lt;br /&gt;
set build=Debug&lt;br /&gt;
if "%cd%" == "%where%" set build=Release&lt;/p&gt;
&lt;p&gt;@rem identify all files ending in &lt;em&gt;_test.dll and &lt;/em&gt;_unittest.dll&lt;br /&gt;
set params=%2&lt;br /&gt;
if "%params%" NEQ "" goto :skipparams&lt;br /&gt;
dir /b &lt;em&gt;_test.dll &amp;gt; filelist.tmp  2&amp;gt; NUL&lt;br /&gt;
dir /b &lt;/em&gt;_unittest.dll &amp;gt;&amp;gt; filelist.tmp  2&amp;gt; NUL&lt;/p&gt;
&lt;p&gt;for /f "usebackq delims=" %%a in (filelist.tmp) do set params=!params! %%a&lt;br /&gt;
del filelist.tmp&lt;br /&gt;
:skipparams&lt;/p&gt;
&lt;p&gt;goto %build%&lt;/p&gt;
&lt;p&gt;:debug&lt;br /&gt;
@rem del /Q  "UnitTestResults.xml"&lt;br /&gt;
echo DllPlugInTesterd_dll.exe -c -x UnitTestResults.xml -s UnitTestReport.xsl clockerplugind.dll %params%&lt;br /&gt;
DllPlugInTesterd_dll.exe -c -x UnitTestResults.xml -s UnitTestReport.xsl clockerplugind.dll %params% &lt;br /&gt;
goto :EOF&lt;/p&gt;
&lt;p&gt;:release&lt;br /&gt;
@rem del /Q  "UnitTestResults.xml"&lt;br /&gt;
echo DllPlugInTester_dll.exe -c -x UnitTestResults.xml -s UnitTestReport.xsl clockerplugin.dll %params%&lt;br /&gt;
DllPlugInTester_dll.exe -c -x UnitTestResults.xml -s UnitTestReport.xsl clockerplugin.dll %params%&lt;br /&gt;
goto :EOF&lt;/p&gt;
&lt;p&gt;:EOF&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bitwise</dc:creator><pubDate>Mon, 06 Oct 2014 19:01:05 -0000</pubDate><guid>https://sourceforge.netebea156ddfdc9843f0e0fd45656af298be4f9252</guid></item><item><title>CPPUnit Test Run Report XML to HTML Report similar to Junit or CUnit</title><link>https://sourceforge.net/p/cppunit/feature-requests/57/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br /&gt;
I am QA guy and beginner in C,C++ unit testing. &lt;br /&gt;
Please help.&lt;br /&gt;
Working on Ubuntu 14.04 64 bit.&lt;br /&gt;
Created sample cpp class and a corresponding Test.cpp.&lt;/p&gt;
&lt;p&gt;Have been able to create the .xml output file for the CPPUnit tests run using XmlOutputter.&lt;br /&gt;
But how to get the HTML report using this xml, is there any predefined XSL, DTD or something like that (as in case of CUnit), so that if these files are there in the same directory as the CPPUnit generated XML file then it would simply show an HTML report.&lt;br /&gt;
OR&lt;br /&gt;
Some way by which ANT can be used to generate the HTML report similar to JUnit.&lt;br /&gt;
Referred &lt;/p&gt;
&lt;h1 id="39-xslt-for-compatibility-with-ant-junit-xml-formatter"&gt;39 XSLT for compatibility with Ant junit xml formatter&lt;/h1&gt;
&lt;p&gt;But could not understand well as variable and paths assumed I am not sure of and new to ANT build.xml etc. too.&lt;br /&gt;
It is in closed status and the guideline is given at a high level, if someone can help &lt;br /&gt;
1 - provide the XSLT, DTD or whatever that needs to be just copied to the folder where CPPUnit generated test run report XML is there and the HTML would get displayed&lt;br /&gt;
OR&lt;br /&gt;
2 - build.xml with the required variables (to be able to understand the directories and paths assumed in the example given) and targets that can be actually used with ANT to generate JUnit like report&lt;/p&gt;
&lt;p&gt;Appreciate your patience to read through.&lt;br /&gt;
Thanks in advance&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">stl</dc:creator><pubDate>Sat, 20 Sep 2014 15:28:05 -0000</pubDate><guid>https://sourceforge.net4a8c7360872b483f04a978deda0e08353f87babf</guid></item></channel></rss>