Getting started with Diffblue Cover

Initial use, signup, and login

Once Diffblue Cover is running within your network you should be able to access the main user interface on the installed IP/Hostname in a browser. This is the hostname that you set up to access the product:

http://[your hostname]/

Our recommended browser is Chrome.

On the login screen click Sign up to create a new user:


On a clean installation no users will be present.


Enter the details for your initial user. Usernames cannot contain spaces or special characters except - and _. Passwords must be at least 10 characters long and can contain any characters.

Note: All users have the same level of access. They can monitor projects from all other users on the installation.

Once you have created your user, you will automatically be logged in to the Dashboard for that user.


Adding a project for analysis

The dashboard shows your projects and their status. From here you can add new projects and run analyses.

The first step is to connect your project by clicking Add project. From here, you can either choose to have a walkthrough using our java-demo project as an example, (this is provided with your shipped version of the product, it is a zip file called or move straight on to analyzing your own repository archive.


The Add a new Project prompt will ask for a project name and whether the required project is from a Git repository, publicly accessible repository URL (for private repositories see Adding Credentials), or an Archive upload which can be any archive of code from your machine.

Adding an archive upload


If you choose the Archive upload button, you will be presented with a file browser where you can add your source code or the shipped with Diffblue Cover. Your code archive should be in zip or tar format. Once the name and archive are selected you can then click Add project at the bottom of the dialog to add the project.

Adding a repository


If you choose the Git repository option, you will need a link to your project from your version control system.

Using the example of Java Demo, input the Git repository URL to, name it in a relevant way, like in this instance java-demo, and then click Continue.


This will then fetch and display the branch information for the repository, allowing you to select the branch you wish to analyze. In the case of java-demo we recommend master. On selecting master the Add project button at the bottom of the screen will be enabled, allowing you to add the repository as a project. You have the option of specifying build and test commands.

Note: Before running an analysis you will need to define how you compile and test your Java project. You can do this by specifying the required command using the included boxes Build Command and Test Command. See section Configuring Diffblue Cover for more information and different methods of how to successfully configure your project. If you run an analysis and nothing happens it is probably because you have not specified the build and test commands.

Running an analysis


Once the project is created it will begin cloning the repo or processing the archive selected when the project was created. Once this is complete the project will show the read icon (the Diffblue owl) and the Start analysis button will be enabled.

Clicking Start a new analysis will trigger the application to run a full analysis. The UI will show Analysis running along with the percentage of the analysis that has completed:


This screen shows the analyses that have been started, including any currently running. Each analysis can be expanded to provide more information about the specific run and allow the analysis to be stopped:


Once the analysis starts the View results button becomes available. If the analysis is still running a progress bar will be displayed at the top of the results pages until it completes.

Analysis results

On clicking View results you will be presented with the coverage view:


The examples in this section assume an archive upload analysis of Java Demo. The results are shown as coverage increase over your project, which is broken down into the directory structure of your project. Green shows coverage provided by the tests within the project, blue shows the coverage Diffblue can provide with the tests produced, and red shows where no coverage from either existing test coverage or Diffblue analysis exists. Directories can be expanded and collapsed, and clicking an entry in the list gives a more detailed code view which shows the individual line coverage. The first file in your project will be opened by default.

At this stage all of the tests produced can be downloaded using the Download All Tests button which will provide you with an archive of all of the tests. See section Executing Diffblue Tests for more information about integrating the tests back into your test suite. Clicking the Tests tab will take you to the following test list view:


This shows all of the tests Diffblue Cover has produced, along with the class they test against and the number of lines of additional coverage these tests provide. Clicking on any test will expand the line to show a breakdown of the input, output and relevant state variables for that test. To see the contents of the test itself click View Test:


Note: Each test shows the blocks of code that it covers in a comment at the top. This can be omitted if you wish to use the test in your own test suite

Here you can Copy test into your system clipboard or select Download java file. If you want to use this unit test in your test suite, please ensure you have appropriately set up the Diffblue utilities. See Executing Diffblue tests for more information. If you are working in an offline environment without access to the Maven package repository you can use the link in the product to directly download the utilities tar file deeptestutils.x-y-z.tar and incorporate the files into your environment. For more details see section Executing Diffblue tests without Maven access .

results matching ""

    No results matching ""