Marc R. Hoffmann | 0b8331b | 2012-09-19 20:45:37 +0200 | [diff] [blame^] | 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 | <link rel="stylesheet" href=".resources/doc.css" charset="UTF-8" type="text/css" /> |
| 7 | <link rel="shortcut icon" href=".resources/report.gif" type="image/gif" /> |
| 8 | <title>JaCoCo - FAQ</title> |
| 9 | </head> |
| 10 | <body> |
| 11 | |
| 12 | <div class="breadcrumb"> |
| 13 | <a href="../index.html" class="el_report">JaCoCo</a> > |
| 14 | <a href="index.html" class="el_group">Documentation</a> > |
| 15 | <span class="el_source">FAQ</span> |
| 16 | </div> |
| 17 | <div id="content"> |
| 18 | |
| 19 | <h1>FAQ</h1> |
| 20 | |
| 21 | <p> |
| 22 | This is a compilation of questions that have been asked by JaCoCo users |
| 23 | before. |
| 24 | </p> |
| 25 | |
| 26 | <h3>Does JaCoCo have a plug-in for [Eclipse|Netbeans|Whatever...]?</h3> |
| 27 | <p> |
| 28 | See <a href="integrations.html">this list</a> for current integrations with |
| 29 | various tools. |
| 30 | <p> |
| 31 | |
| 32 | <h3>Why do I get the error "Can't add different class with same name"?</h3> |
| 33 | <p> |
| 34 | For coverage report generation all classes within a group must have unique |
| 35 | names. You get this error during report generation if JaCoCo is supplied with |
| 36 | multiple different class files with the same name. To fix this remove those |
| 37 | duplicate classes or create separate reports or report groups for each version. |
| 38 | <p> |
| 39 | |
| 40 | <h3>Why does the coverage report not show line coverage figures?</h3> |
| 41 | <p> |
| 42 | JaCoCo is based on class files analysis. To calculate line coverage the class |
| 43 | files must contain line number information. For this class files must be |
| 44 | compiled with debug information. |
| 45 | </p> |
| 46 | |
| 47 | <h3>Why does the coverage report coverage report not show highlighted source code?</h3> |
| 48 | <p> |
| 49 | Make sure the following prerequisites are fulfilled to get source code |
| 50 | highlighting in JaCoCo coverage reports: |
| 51 | </p> |
| 52 | <ul> |
| 53 | <li>Class files must be compiled with debug information to contain line numbers.</li> |
| 54 | <li>Source files must be properly supplied at report generation time. I.e. |
| 55 | specified source folders must be the direct parent of the folders that |
| 56 | define the Java packages.</li> |
| 57 | </ul> |
| 58 | |
| 59 | <h3>Why does a class show as not covered although it has been executed?</h3> |
| 60 | <p> |
| 61 | First make sure execution data has been collected. For this select the |
| 62 | <i>Sessions</i> link on the top right corner of the HTML report and check |
| 63 | whether the class in question is listed. If it is listed but not linked the |
| 64 | class at execution time is a different class file. Make sure you're using the |
| 65 | exact same class file at runtime as for report generation. |
| 66 | </p> |
| 67 | |
| 68 | <h3>Why are Java interface types not shown in the coverage reports?</h3> |
| 69 | <p> |
| 70 | Java interface methods do not contain code, therefore code coverage cannot |
| 71 | be evaluated. Indeed code coverage is recorded for the implementation classes. |
| 72 | The same applies to abstract methods in abstract classes. |
| 73 | </p> |
| 74 | |
| 75 | </div> |
| 76 | <div class="footer"> |
| 77 | <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span> |
| 78 | <a href="license.html">Copyright</a> © @copyright.years@ Mountainminds GmbH & Co. KG and Contributors |
| 79 | </div> |
| 80 | |
| 81 | </body> |
| 82 | </html> |