Comment on page
Diffblue Cover operates by making best-effort, automated decisions based on available data, in circumstances where multiple choices are available or where unsupported options are being used. This allows Cover to provide high quality tests without the need to pedantically “fix” every minor deviation from a perfect project. For example, if your project uses Java 4 and Java 5, Cover will automatically select Java 5 to ensure compatibility.
Operating in this manner, Cover provides warnings to highlight changes that you should consider and will only exit with errors if there’s a high chance of making an incorrect selection or if there’s an issue/option that can’t be resolved automatically.
Cover CLI also provides a
--strictcommand line option which forces the strict definition of all project environment options set by you and the strict use of supported options only - Diffblue Cover will not attempt to make automated selections. When using
--strict, you’ll need to resolve any issues that cause an error – for example, if your project uses Java 4 and Java 5, you will need to specify which Java version to use, on the command line.
Cover’s default behavior is useful during development to provide a little flexibility. Using
--strictis only necessary when preparing for production to help ensure “quality compliance” - once all errors have been addressed you will have the optimal conditions for test creation and therefore get the optimal quantity and quality of tests.