On the fly instrumentation - modification of the bytecode of classes in order to measure coverage, that occurs when the class is loaded into the JVM.
To instrument the loaded classes, it is necessary to connect a JVM agent to the Java application being launched.
Getting a readable reportTo get a readable coverage report, you need to:
-javaagent:<path_to_agent_jar>=file:<path_to_settings_file>
. Example of an application launch command java -javaagent:/opt/kover-jvm-agent-0.9.1.jar=file:/tmp/agent.args -jar application.jar
.The arguments file is a set of settings, each of which is written on a new line. Line format: argument_name=argument_value
report.file
argument is required, while the rest are optional.
List of all available arguments:
report.file
- path to the file, which will contain a binary coverage report in ic format. The file is created if it did not exist beforereport.append
- it is acceptable to specify true or false. if true, then if the file will be appended if the coverage is already stored in itexclude
- specify which classes do not need to be modified when loading. For such classes, the coverage will always be 0.
It is acceptable to use *
and ?
wildcards, *
means any number of arbitrary characters (including no chars), ?
means one arbitrary character.
exclude.regex
- specify which classes do not need to be modified when loading. For such classes, the coverage will always be 0.
It is acceptable to specify regex.
include
- specify which classes will be modified when loading, all other classes will not.
It is acceptable to use *
and ?
wildcards, *
means any number of arbitrary characters (including no chars), ?
means one arbitrary character.
include.regex
- specify which classes will be modified when loading, all other classes will not.
It is acceptable to specify regex.
It is possible to use exclude
and exclude.regex
at the same time, also include
and include.regex
.
Example of arguments file:
report.file=/tmp/kover-report.ic
exclude=com.example.*
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4