For the complete documentation index, see llms.txt. This page is also available as Markdown.

Writing tests

How to automatically write Java unit tests using Cover CLI

To write tests using Cover CLI:

  • To write tests for your entire project, open Windows PowerShell (Windows) or Terminal (macOS/Linux), navigate to your project, and enter the command dcover create

  • To restrict tests to an individual package, class, or method, specify one or more entry points on the command line using dcover create [<entryPoint>...] - for example, dcover create io.diffblue.corebanking.account.Account.

  • For a quick summary of core Cover CLI commands, see Command summary . For full details - every command, every argument, every option - see Commands & Arguments.

  • In general, dcover create will write complete tests for your methods, classes, modules, and projects. However, Cover is not always able to create a complete test, instead it may only be able to create partial tests - see Creating partial tests.

  • Once Diffblue Cover starts to run, you can cancel the operation at any point by pressing CTRL-C.

Last updated

Was this helpful?