Getting Started with Cover CLI for Windows
- 1. Download Cover CLI
- 2. Prerequisites
- 3. Installing Cover CLI
- 3a. Installing from
- 3b. Installing from
- 4. Activate your license
- 5. Writing your first tests
- 6. Next steps
1. Download Cover CLI
If you do not already have a copy of Cover CLI, please download a trial copy.
Cover runs on Windows (64-bit Java only). You will also need to have installed the common Java build systems, Maven and/or Gradle.
See here for the full prerequisites for Cover CLI.
3. Installing Cover CLI
Please note that these are the instructions for installing Cover CLI on Windows. Instructions for installation on Linux / macOS are here.
Please follow either section 3a or 3b, depending on your installation preference.
3a. Installing from
Cover CLI can be installed manually using a setup wizard, or from the command line intended for unattended automated installations.
1. Double-click the executable installer file.
2. Confirm any
User Account Control prompt asking permission for the installer to make changes on your device.
I accept the terms of this license agreement and
4. Select the directory where you would like to install Cover and click
5. Confirm the creation of a new directory or overwriting an existing installation, if applicable.
6. After the installation progress is marked as completed, click
Generate an automatic installation script if you would like to save your settings for future installations.
1. Create an installation configuration containing the path to your desired installation location as illustrated below:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <AutomatedInstallation langpack="eng"> <com.izforge.izpack.panels.licence.LicencePanel id="panel.licence"/> <com.izforge.izpack.panels.target.TargetPanel id="TargetPanel_1"> <installpath>C:\Program Files\Diffblue</installpath> </com.izforge.izpack.panels.target.TargetPanel> <com.izforge.izpack.panels.install.InstallPanel id="InstallPanel_2"/> <com.izforge.izpack.panels.finish.FinishPanel id="FinishPanel_3"/> </AutomatedInstallation>
This file can also be generated by clicking
Generate an automatic installation script after manually installing Cover.
2. Install Cover using the following command:
3b. Installing from
Download the Zip file of Cover to your home directory (or your chosen location):
4. Activate your license
To activate your license, use the command
dcover activate XXXX-XXXX-XXXX-XXXX
5. Writing your first tests
We’re going to use Spring Project’s example application, PetClinic, and write some tests!
1. Firstly, clone PetClinic:
(If you are unable to clone using git you are able to download a zip for this repo as shown below:
You can then extract this zip to where you store projects on your computer.)
2. Navigate to the location of the project you just cloned.
3. The project now needs to be compiled which can be done using the command
mvnw package. (This can take a couple of minutes on a new machine). When this has finished, you will see the message
4. Next, you can either:
- Write tests for the owner class (org.springframework.samples.petclinic.owner):
C:\Diffblue\dcover.bat create org.springframework.samples.petclinic.owner
- Or, write tests for the whole project:
5. Run the tests (and the users tests):
6. Finally, run just the newly created Diffblue tests using the command:
mvnw test -Dtest=*DiffblueTest.java
The tests can also be inspected in an IDE of your choice.
6. Next steps
Please check out our documentation for more guides, videos and information, and in particular our User Manual.