- Loading...
This page contains recommendations on solving various problems related to JCov
Table of Contents |
---|
JCov is a Java code Coverage tool which provides a means to measure and analyze dynamic code coverage of Java programs. "Dynamic" means that code coverage data is collected when a program executes, unlike static code coverage which is collected without running the program. JCov provides functionality to collect method, linear block and branch coverage. It is also able to show a program's source code annotated with coverage information.
...
We encourage you to contribute source code to the JCov project. In accordance with the OpenJDK project governance process, you can submit code to the project leader either as a user, a developer, or as a committer. If your code is accepted to be integrated into the source tree, you will be asked to sign a Contributor's Agreement similar to what Apache Software Foundation requires. For more information about the governance process and the various roles for members in the community, please review OpenJDK Governance.
...
with JCov you can perform these steps separately (which is called static instrumentation), and simultaneously (which is dynamic instrumentation mode).
...
The procedure to collect code-coverage data for a JRE (or similar product) is generally the same as any other product (same as the question above).
...
Panel |
---|
# java -jar jcov.jar repgen -o report-bNN/ [-src jdk/src/] result.xml |
...
Please visit jtreg support for jcov page
...
...
It's very unlikely that code inserted by jcov could make an application hang. The two most probable reasons if it does happen:
...
The most possible reason for malformed XML is that JCov processes have been terminated while saving data to a file. The solution is to use the JCov grabber - saving data to a file requires much more time than sending code coverage data to a JCov server.
...
You can use the JCov extension jtobserver.jar (or write your own implementation of the javatest interface Harness.Observer) to receive total test coverage - as well as individual test coverage. Running tests with jtobserver will make JCov send data from the grabber after finishing each test. Sending testname for this covered data, the grabber will receive these coverage data from each test and merge them into one result.xml file - saving information about each tests coverage.
...