Getting Started with DCover CLI for Windows

1. Download DCover CLI

Please contact Diffblue to obtain a trial copy of DCover CLI.

2. Prerequisites

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 DCover CLI.

3. Installing DCover CLI

Please note that these are the instructions for installing DCover CLI on Windows. Instructions for installation on Linux / macOS are here.

Install from .exe installer

DCover CLI can be installed manually using a setup wizard, or from the command line intended for unattended automated installations.

Setup wizard

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.

3. Click I accept the terms of this license agreement and Next.

4. Select the directory where you would like to install DCover and click Next.

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 Next.

7. Click Generate an automatic installation script if you would like to save your settings for future installations.

7. Click Done.

Unattended installation

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"/>
    < id="TargetPanel_1">
        <installpath>C:\Program Files\Diffblue</installpath>
    <com.izforge.izpack.panels.install.InstallPanel id="InstallPanel_2"/>
    <com.izforge.izpack.panels.finish.FinishPanel id="FinishPanel_3"/>

This file can also be generated by clicking Generate an automatic installation script after manually installing DCover.

2. Install DCover using the following command:

dcover-installer-<version>.exe path/to/your/file.xml

Install from .zip

Download the Zip file of DCover to your home directory (or your chosen location):

4. 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 BUILD SUCCESS.

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:
C:\Diffblue\dcover.bat create

5. Run the tests (and the users tests):

 mvnw test

6. Finally, run just the newly created Diffblue tests using the command:

mvnw test -Dtest=*

The tests can also be inspected in an IDE of your choice.

5. Next steps

Please check out the Knowledge Base for more guides, videos and information.