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 "CodeCoverageWithJaCoCo" by BryanPendleton
Date Fri, 05 Jul 2013 16:08:04 GMT
Dear Wiki user,

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

The "CodeCoverageWithJaCoCo" page has been changed by BryanPendleton:
https://wiki.apache.org/db-derby/CodeCoverageWithJaCoCo

New page:
!JaCoCo, the Java Code Coverage library, is an open source code coverage tool; the project's
home website is [[http://www.eclemma.org/jacoco/|JaCoCo Java Code Coverage Library]]

The Derby build tools support both the Emma tool and the JaCoCo tool.

Support for !JaCoCo was added by [[https://issues.apache.org/jira/browse/DERBY-5817|DERBY-5817]]

Although some community members publish regular test results using the Emma tool, there are
reasons to believe that the !JaCoCo tool will be a superior tool in the future: [[http://mail-archives.apache.org/mod_mbox/db-derby-dev/201206.mbox/%3C4FD70619.6090300@oracle.com%3E|see
this mailing list thread]]

Setting up to run tests using !JaCoCo is straightforward; here is what you do:
 * Download a current build of !JaCoCo from the [[http://www.eclemma.org/jacoco/|web site]]
 * place the two jar files jacocoant.jar and jacocoagent.jar in tools/java

To test your installation, run:
 * {{{ant -Dderby.junit.testclass=org.apache.derbyTesting.functionTests.tests.lang.SimpleTest
jacoco-junit-single}}}

The primary code coverage Ant targets for working with !JaCoCo are:
 * '''jacoco-junit''': Runs all the Derby JUnit tests with !JaCoCo to obtain code coverage
 * '''jacoco-junit-single''': Runs the specified Derby JUnit test with !JaCoCo to obtain code
coverage.

There are some other !JaCoCo Ant targets but you generally don't need to use them; you can
read the build.xml file to learn more about them.

After you have run the chosen tests, look in the '''junit_YYYYMMDD_HHMM/coverage-report/index.html'''
file to find the report of the code coverage analysis.

Mime
View raw message