Diffblue Cover includes a number of test filtering options which are not currently operational. These are described below but should be disabled in order to produce tests in the current version of the plugin (set
Minimum Test Star Rating to one star and all
Tests Tags options to
Ignored) Otherwise, you are likely to see the error message
All Tests removed by filter options.
In order to change these settings, open the
IntelliJ IDEA -> Preferences (macOS) or
File -> Settings (Windows/Linux) menu and navigate to the
Diffblue Cover option under the
Filtering tab, it is possible to select the minimum star-rating of the tests generated. Only those tests ranked with at least the minimum number of stars will be added to the project.
It is also possible to select whether tests must (
Required), must not (
Excluded) or may (
Ignored) include the following features:
Assertionspresence of assertions
Mockingpresence of mocking
Reflectionpresence of reflection
Fuzzer- tests generated by a "fuzzer"
Verifiedtests run successfully
Failed teststests fail to compile or run
Failed runtests fail to run
Failed compiletest fails to compile
Test star ranking
The star-ranking system has been developed to qualify tests based on their readability, the complexity of the method under test and the quality of the inputs.
1 - 2 stars (★ - ★★)
Generated tests that have been ranked with 1 or 2 stars will include one or more of the following traits which may hamper readability:
- No assertion
3 - 5 stars (★★★ - ★★★★★)
Generated tests that have been ranked with 3 to 5 stars are considered to have a good level of readability, and only make use of mocking and reflection where necessary. Higher levels of ranking are awarded if the method under test is sufficiently complex and/or the inputs for that test are of high enough quality (for example, the input values use human-readable strings).