db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "CodeCoverageWithEMMA" by VemundOstgaard
Date Mon, 03 Mar 2008 14:46:32 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by VemundOstgaard:

  Some ant targets have been created to help measure code coverage with EMMA for the Derby
tests written in junit. To use these ant targets you need to download EMMA and place the two
jar-files (emma.jar and emma_ant.jar) in the tools/java/ directory in your sandbox. Here they
will be found by the Derby build system and the ant targets related to EMMA should work as
intended. You can download the latest EMMA jar-files from http://emma.sourceforge.net/downloads.html.
+ The ant targets use your compiled jars (either sane or insane depending on your properties)
and instrument these with EMMA code. The Derby jars have to be built with the `buildjars`
target before using the EMMA targets. The instrumented jars are placed in a separate directory
under jars/emma/ and are used to execute the junit tests. The instrumentation process also
produces a file named coverage.em with data that EMMA later needs to produce the coverage
report, this file is placed in the same directory as the logs from the test. During the testruns,
data on coverage is written to a file named coverage.ec, also located in the directory with
the test logs. After the tests are finished, reports are produced using the data located in
the coverage.em and coverage.ec files and linked to your source code. The reports are named
coverage.txt, coverage.xml and coverage.html, and all contain the same information.
  = Ant Targets =
  || '''ant target''' || '''Comments''' ||
  || `emma-all` || Instruments the Derby jar files with EMMA and runs `junit-all` automatically
setting the classpath to the jar files instrumented with EMMA. When the tests are finished,
a code coverage report is produced in three copies (txt, html and xml) in the directory where
the test logs are placed. ||
@@ -19, +21 @@

  || `emma-clean` || Remove the EMMA-instrumented jar files located at jars/emma/ ||
  || `junit-clean` || Remove any folders from previous junit runs (with or without EMMA) through
ant targets. ||
+ = Community measurements =
+ Some code coverage numbers and reports produced by community members can be found here:

View raw message