Test Review
Last updated
Was this helpful?
Last updated
Was this helpful?
Test Review allows you to edit, analyse and manage each of the tests Diffblue Cover creates for you, as soon as those tests are available.
When enabled, you are given the opportunity to review and change the tests before they get added to your codebase.
To perform a review, simply write tests as normal. The number of tests available for review is shown in the tool panel. Once the first test is created the Review Now
button will become active; clicking this will take you to the first test waiting to be reviewed.
To help you review your tests, we display them inside a Diff Viewer. When comparing side-by-side, on the left you'll see your original test file (the file your tests will be inserted into). On the right, you'll see Diffblue Cover's test suggestion. This includes the test that has been created, as well as any other modifications to the test class required for the test to run.
You can use any of the features of the Diff Viewer to help you review your test, you can even edit the test inside the Diff Viewer if you wish.
You must accept any test that you wish to edit in the Diff Viewer. All changes made will be lost when you navigate away from the test.
Once you're happy with the test suggestion, you must accept it for the test to be added to your test file. If you have edited the test, these changes will be included when you accept.
Any tests that are not accepted will be lost and can only be recreated by running Diffblue Cover again on the method under test. Please make sure you accept any test you want to keep.
You might wish to inspect each test, and accept them all in one action. In which case, when you are happy with your tests, you can use the dropdown menu of the accept button and click "Accept all".
If you do not wish to keep a test suggestion, for whatever reason, you can reject it. All tests can be rejected in one click using the "Reject all" option within the dropdown menu of the reject button.
Once a test is rejected, it is lost. Rejected tests can only be recreated by running Diffblue Cover again on the method under test.
Once you have accepted or rejected a test, you will be automatically taken to the next test requiring your review.
There may be situations where Diffblue Cover creates multiple tests for a single method. In this case, a list of test methods will appear on the left. You can click through the items in this list to review the tests you're most interested in. This list can be resized or collapsed at any point while it is open.
Alternatively, you can navigate through these tests with the left/right arrow icons below the Diff Viewer.
From Diffblue Cover IntelliJ Plugin 2025.03.01, Test Review is enabled by default - but it can be turned on or off at any time. When Test Review is disabled, tests will automatically be accepted and merged into your codebase.
To enable or disable Test Review, follow these steps:
Open the Diffblue Settings menu via Diffblue
-> Change Settings
Find the section titled "Test Review".
Check or uncheck the Test Review
checkbox.
Apply the settings.
However, If you wish to inspect multiple tests before taking an action, or you wish to review a specific test, you can navigate through the tests to find what you want. The tree on the left displays all methods under test. If a method has any test requiring review, it will display a icon. Once all tests for the method have been reviewed, this icon will be replaced according to the status of the tests.