Test Directory
Last updated
Last updated
The tests created by Cover Plugin for IntelliJ will be placed in a location within the project according to the following:
If a test source directory (e.g src/test/java
) exists in the current project module, Cover Plugin will add the tests there.
If no existing test source directory could be found for the current project module, Cover Plugin will add tests to src/test/java
in the same module as the class for which tests are written (project_root/module/src/test/java
).
We recommend always explicitly creating a test source directory src/test/java
in the relevant module so that Cover Plugin knows where to put new test classes.
Cover Plugin does not add a duplicate test if exactly the same test already exists.
If you have multiple test source directories set up for a module, you can use the Override Test Directory
setting to ensure that Cover Plugin creates tests in your preferred directory - go to Diffblue > Change Settings
and expand the Diffblue Cover
settings menu on the left. Note that this is a project setting.
For example, you may have a Gradle configuration similar to the following:
Use the Override Test Directory
setting to make sure that Cover Plugin adds tests to the src/diffblueTest/java
directory: