Cover CLI Usage


To execute the Cover CLI, the following scripts are available:

  • dcover.ps1 (Windows)
  • dcover (Linux/OS)


Enable PowerShell scripting (you only need to do it once):

Unblock-file -Path .\dcover.ps1
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine

Example command:

./dcover.ps1 create com.acme.MyClass --test-sources-root projectsrc/test/java -cp project/target/classes


./dcover create com.acme.MyClass --test-sources-root project/src/test/java -cp project/target/classes


All invocations of dcover take a single subcommand called create and two required options to generate the tests.


For example:

dcover create com.a

Will produce tests for all accessible functions within package com.a (but none for any classes in com.b)

The additional required arguments are:

--classpath or -cp

-cp target/classes/

Provide the classpath(s) of the project you want to generate tests. Multiple paths can be specified using : as separators for Linux/OSX and Windows ; respectively.


--test-sources-root src/test/java

Location for the generated tests relative to the current directory, provide the relative path for the directory where generated tests should be placed.

results matching ""

    No results matching ""