5.2 Adding EMMA Report

Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 1 changes. View first change.

 To add [EMMA|http://emma.sourceforge.net] report, you only need two steps:
 # Generate EMMA *XML* report from [Ant|http://ant.apache.org] or [Maven|http://maven.apache.org] or any other build tool.
 # Publish EMMA report in the [configuration|1. Working with Configuration].
  
 h2. Generate EMMA Report
  
  QuickBuild will NOT generate [EMMA|http://emma.sourceforge.net] report automatically, so first make sure that the EMMA report is produced by [ANT|http://ant.apache.org] or by any other build tool. The following example shows how to generate EMMA [code coverage|Glossary#code coverage] by [Ant EMMA task|http://emma.sourceforge.net/reference/ch02s02s02.html]:
  QuickBuild will NOT generate [EMMA|http://emma.sourceforge.net] report automatically, so first make sure that the EMMA report is produced by [ANT|http://ant.apache.org] or by any other build tool. The following example shows how to generate EMMA [code coverage|Glossary#code coverage] with [Ant EMMA task|http://emma.sourceforge.net/reference/ch02s02s02.html]:
 {code:xml|title=EMMA target in build.xml}
 <target name="emma_coverage">
  <emmajava enabled="${emma.enabled}" libclasspathref="emma.lib"
  filter="${emma.filter}" sourcepath="${src.dir}"
  classname="Main" classpathref="run.classpath">
  <arg value="someargvalue" />
  
  <xml outfile="reports/emma/coverage.xml" />
  </emmajava>
 </target>
 {code}
 The code snippet will generate the XML report for all the source code. XML report coverage.xml will be generated in 'reports/emma directory' directory which is relative to the [workspace|Glossary#workspace] directory.
  
 After adding the target above, generate the XML code coverage report for your source code, and after that you can tell QuickBuild to publish the results.
  
 h2. Publish EMMA Report
  
 Just like all other [build reports|5. Publish Build Reports], you can add EMMA report by [adding a publish step|Working With Step] in a [configuration|1. Working with Configuration]. When you add publish EMMA Report step, the following screen will be displayed:
  
 !emma_step.png|width=32,height=32!
  
 In source files field, QuickBuild uses Ant style file patterns to collect the reports, and the directory you specified is *relative* to the [workspace|Workspace Directory] directory.