Code coverage is a very useful tool for the development of applications of all kinds. Coverage is most useful in test-driven-development, but also for other development methodologies where testing for code coverage adds significant value to quality.
Dbrad-jacocoverage uses www.elcemma.org jacocoagent to do on-the-fly code coverage, in that it instruments at run time and captures coverage data during the run. Then the coverage data is processed to obtain results.
Also, dbrad-jacocoverage is a significant modification to tikione-jacocoverage, which has been in an archived status since May/2016. There are modified and additional capabilities in dbrad-jacocoverage which handle project dependencies, include and exclude package patterns better and in a more configure-able manner (see following dbrad-jacocoverage capabilities ).
Dbrad-jacocoverage provides basic global-settings which does only a project's source folder coverage of a principle-project. Processing beyond just the principle-project, requires the project-specific settings to expand coverage components to include coverage for source & test-source folders, packages within folder(s), and selection of dependent/associated/sub-project projects as inclusive components. This implies that a Netbeans project as a whole and its coverage is achieve-able, with selective component management thrown in (say: just JUnits).
Coverage may be used in an operational/QA management process to assist in determining quality by adding coverage metrics as an additional measure, but by no means the only measure. However for development, coverage provides quick feedback as to a developer's exercise of their code (assuming they build supporting tests to exercise their code).
dbrad-jacocoverage came about due to a need to code-coverage a project which has multiple libraries as dependent/associate projects. The existing coverage tools on Netbeans IDE prior to dbrad-jacocoverage were limiting or expensive. Also, most other coverage tools for Netbeans appear to be retired, archived, or no longer maintained; so another reason for dbrad-jacocoverage.
dbrad-jacocoverage was created from tikione-jacocoverage as its base. The latter being limited to processing only the source-code folders for a single J2SE/J2EE project (that is: non-inclusive for dependent projects, test source code [JUnit,...]). Later in tikione's development, NB-module (NBM) coverage was added with a slightly different processing architecture suitable for NBMs, but it too is non-inclusive for test source code.
Tikione-jacocoverage has been archived by its author. See https://github.com/jonathanlermitage/tikione-jacocoverage.
A brief description of dbrad-jacocoverage capabilities follows: [ colored items are dbrad-jacocoverage enhancements]
Reporting |
|
Coverage of packages | Set which packages are to be explicitly included or excluded, for a project and/or its associate-projects and/or its source-folder(s). |
• Run w/jacocoverage • Test w/jacocoverage |
Invokes ANT code-coverage execution for a project, as
a Netbeans 'run' or 'test' component.
|
• Run file w/jacocoverage • Test file w/jacocoverage |
Invokes ANT code-coverage execution for a file, as a
Netbeans 'run file' or 'test file' component.
|
• Reset (w/jacocoverage) |
Resets the hi-lighting on the source files.
|
• Merge clear (w/jacocoverage) |
Clears the merge processing algorithm for all runs
of a project-specific configuration setting for a project. This menu item only shows
if merge capability is set in the configuration settings.
|
Associate-projects | A project may depend on other associated-projects as set via the project-properties > libraries tab, these are include-able in the processing upon configuration setting. |