How to generate HTML reports

hi
i am able to generate XML reports through Console Runner of Dotcover

Please tell me a way for generating HTML reports through Console Runner

8 comments

Hello Lokesh,
Assuming you have dotCover 1.1 EAP,
you just need to specify <ReportType>HTML</ReportType> in your ReportParams.

0

hi
just downloaded the 1.1 version
my Output.xml looks like this

<?xml version="1.0" encoding="utf-8"?>
<CoverageResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <IndexFiles>
    <string>C:\BuildAgent\temp\buildTmp\ssc00EF0.tmp</string>
    <string>C:\BuildAgent\temp\buildTmp\ssc04051.tmp</string>
  </IndexFiles>
</CoverageResult>



i mean there are two snapshots
while i am using

<?xml version="1.0" encoding="utf-8"?>
<ReportParams>
 <Source>Output.xml</Source>
 <Output>Results.html</Output>
 <ReportType>HTML</ReportType>
</ReportParams>



i am not getting the full results in the html file
0

PLz find the file attached

html file is not coming correctly

there is some blank space on the right and
the categorys i have boxed in blue are children of same parent, they shown wrongly



Attachment(s):
codecoverage.JPG
0

Hello Lokesh,
In your case before generating report you should merge results of coverage session (console runner "merge" command)
Or alternatively you can call "analyse" command which is a shortcut for "cover", "merge" and "report" commands.

0

Could you please tell what is your web-browser version?

0

hi.. i have tried it to open in IE 8 but it takes lot of time..
so i am opening it in Chrome

and this time i have used the anaylse option and set the ReportType Tag to HTML...
but resutls hav been similar....

0

Could you please specify your configuration xml file, console command you use for starting coverage and console output you get?
Thanks.

0

hi i am running the msbuild runner through teamcity the Final log is as follows :

[10:09:54]: [Exec] Disposing the test runner.
[10:09:54]: [Exec] Disposed test runner.' flowId='cab6d00a2462c8fb
[10:09:54]: [Exec] Stop time: 10:09 AM (Total execution time: 81.489 seconds)
[10:09:54]: [Exec] 104 run, 100 passed, 4 failed, 0 inconclusive, 0 skipped
[10:10:00]: [Exec] Analysed application exited with code '1'
[10:10:00]: [Exec] Coverage session finished [3/14/2011 10:10:00 AM]
[10:10:00]: [Exec] Snapshot merging started [3/14/2011 10:10:00 AM]
[10:10:00]: [Exec] Source snapshots number: 2
[10:10:00]: [Exec] Merging snapshots 1-2
[10:10:01]: [Exec] Snapshot merging finished [3/14/2011 10:10:01 AM]
[10:10:01]: [Exec] Report generation started [3/14/2011 10:10:01 AM]
[10:10:19]: [Exec] Report generation finished [3/14/2011 10:10:19 AM]
[10:10:19]: [CodeCoverage] Message
[10:10:19]: [Message] ##teamcity[importData type='dotNetCoverage' tool='dotcover' path='C:\CI Build\Products\transactionSHUTTLE\Code\Output.xml']
[10:10:19]: [test.config.teamcity] BuildAll
[10:10:19]: Importing data from 'C:\CI Build\Products\transactionSHUTTLE\Code\Output.xml' with 'dotNetCoverage' processor
[10:10:20]: Process exited with code 0
[10:10:20]: Waiting for 1 service processes to complete
[10:10:20]: Processing 1 coverage report(s)
[10:10:20]: Generating coverage report by dotcover for files: [C:\CI Build\Products\transactionSHUTTLE\Code\Output.xml]
[10:10:20]: Failed to find: null
[10:10:20]: Publishing artifacts
[10:10:20]: [Publishing artifacts] Paths to publish: [teamcity-info.xml]
[10:10:20]: [Publishing artifacts] Sending files
[10:11:02]: Build finished

Following is the Msbuild Target used :

<Target Name="CodeCoverage">
    <PropertyGroup>
      <DotCoverPath>C:\Program Files\JetBrains\dotCover\v1.1</DotCoverPath>
        <AnalyseFile>C:\CI Build\Products\transactionSHUTTLE\Code\analyse.xml</AnalyseFile> 
        <OutputXmlPath>C:\CI Build\Products\transactionSHUTTLE\Code\Output.xml</OutputXmlPath>
    </PropertyGroup>
 
    <Exec Command="&quot;$(DotCoverPath)\Bin\dotCover.exe&quot; a &quot;$(AnalyseFile)&quot;" ContinueOnError="true"></Exec> 
      <Message Text="##teamcity[importData type='dotNetCoverage' tool='dotcover' path='$(OutputXmlPath)']"></Message>
</Target>



Following is the Analyse.xml :

<?xml version="1.0" encoding="utf-8"?>
<AnalyseParams>
 <Executable>C:\Program Files\Gallio\bin\Gallio.Echo.exe</Executable>
 <Arguments>&quot;C:\CI Build\Products\transactionSHUTTLE\Code\ShuttleEngine.Test\bin\Debug\ShuttleEngine.Test.dll&quot;</Arguments>
 <WorkingDir>C:\CI Build\Products\transactionSHUTTLE\Code\ShuttleEngine.Test\bin\Debug</WorkingDir>
 <Output>C:\CI Build\Products\transactionSHUTTLE\Code\Output.html</Output>
 <ReportType>HTML</ReportType>
<Filters> 
 <IncludeFilters>
 <FilterEntry>
 <ModuleMask>ShuttleEngine</ModuleMask>
 <ClassMask>*</ClassMask>
 <FunctionMask>*</FunctionMask>
 </FilterEntry>
 </IncludeFilters> 
 <ExcludeFilters>
 </ExcludeFilters>
 </Filters>

</AnalyseParams>


From the above configuration xml file, i get the html as i had attached before... the hierarchy is correct if report type is XML
0

Please sign in to leave a comment.