I am doing code coverage Testing using jmockit. I need to exclude some classes from code coverage. The VM argument used to exclude classes in eclipse is
-Djmockit-coverage-excludes=com\.jmockit\.beans\..+
I referred this documentation.
What I need now is, I need to exclude multiple classes.
How can I combine packages and pass it as an argument
say -Djmockit-coverage-excludes=packageA+packageB
to exclude both the packages from code coverage.
You can use the |
character to separate multiple regular expressions, each for a specific package or group of packages. For example:
-Djmockit-coverage-excludes=packageA\..+|packageB\..+|com\.mydomain\..+