Test Review
Last updated
Last updated
This feature is in beta and is turned off by default. See Enabling Test Review to find out how to turn it on.
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 theReview 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.
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, you can navigate through these tests with the left/right arrow icons.
You must accept any test that you wish to make changes to. All changes made will be lost when you navigate away from the test.
Test Review is only available with Diffblue Cover IntelliJ Plugin 2024.09.01 or later
Test Review is currently in a beta state and so it is disabled by default. To enable Test Review, follow these steps:
Open the Diffblue Settings menu via Diffblue
-> Change Settings
Find the section titled "Test Review".
Ensure the Test Review
checkbox is ticked.
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.