# Get started - Cover Reports

Get started with Diffblue Cover Reports - in short, check the prerequisites, download and install Cover Reports, create and upload a reports bundle, and finally, visualize your coverage data.

Cover Reports is a server-side tool accessed via a web browser - Chrome, Edge, Safari, or Firefox. Cover CLI and/or Cover Pipeline are used to create and upload coverage data - Cover Reports is used to visualize that data. This getting started topic focuses on Cover CLI - for information on using Cover Reports with Cover Pipeline see [cover-pipeline](https://cover-docs.diffblue.com/features/cover-pipeline "mention").

{% hint style="info" %}
This topic covers Docker install only. As an alternative, Cover Reports can be installed from a zip archive or exe installer. These provide for running Cover Reports as a Windows Service, Linux Service, Windows .bat, or macOS/Linux .sh, and removes the need to use Docker. These also provide various database configuration options to provide further flexibility. See [installation](https://cover-docs.diffblue.com/features/cover-reports/cover-reports-administrator/installation "mention") for details.
{% endhint %}

## eLearning

Prefer video? No problem. Check out our overview video.

{% embed url="<https://youtu.be/vr217Qockfo>" %}

## 1. Check the prerequisites

A summary of Cover Reports prerequisites are listed below - see [specs-and-reqs](https://cover-docs.diffblue.com/get-started/specs-and-reqs "mention") for full details.

**Client workstation - Cover Reports Contributor:**

* Diffblue Cover CLI
* JaCoCo 0.8.3+
* Network connectivity between the user's workstation and the Cover Reports server.

**Client workstation - Cover Reports User:**

* The latest version of Chrome, Edge, Safari, or Firefox with a screen resolution of 1920 x 1080 or higher.
* Network connectivity between the user's workstation and the Cover Reports server.

**Server hosting Cover Reports - Cover Reports Administrator::**

* Docker Engine 20.10.17
* 4GB RAM (8GB recommended), 2GB\* minimum available disk space, 4 CPU cores.
* 2GB Java heap allocation, 4GB recommended.
* Docker Compose v2.10.2
* Network connectivity between the server and client workstations.
* Internet connection if using Docker Hub for install.

## 2. Install Diffblue Cover Reports

{% tabs %}
{% tab title="Docker Archive" %}

1. Using the link provided by Diffblue, download the Cover Reports `.tar.gz` file (e.g. `diffblue-cover-reports-2023.07.02.tar.gz`) to the server you plan to use to host Cover Reports. Contact [Diffblue Support](https://www.diffblue.com/support) if you don't have the download link.
2. From the directory containing the Cover Reports `.tar.gz` file, load the Docker bundle:

```
docker load -i /path/diffblue-cover-reports-<version>.tar.gz
```

3. In your shell, navigate to your preferred install directory (we'll now refer to this as `$COVER_REPORTS_HOME`). Using the link provided by Diffblue, download the Cover Reports Docker Compose file `docker-compose.yml` to `$COVER_REPORTS_HOME`. Contact [Diffblue Support](https://www.diffblue.com/support) if you don't have the download link.
4. From the `$COVER_REPORTS_HOME` directory, start Cover Reports:

```
docker compose up -d
```

5. Finally, open a browser on a client PC that has access to the Cover Reports server and navigate to the Cover Reports Home Page (`<HOSTURL>:8080`).

<div align="center"><figure><img src="https://1243928156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ7l8pn8qoIC3ubiJzuaF%2Fuploads%2Fgit-blob-abee528a5074aa24600f9d6ada3ee3721dd75ab1%2FFirst%20install.png?alt=media" alt=""><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Docker Hub" %}

1. To access the repository please [sign up to Docker Hub](https://hub.docker.com/) and provide [Diffblue Support](https://www.diffblue.com/support) with your username. Diffblue Support will grant access according to your subscription terms.
2. In your shell (from the server you plan to use to host Cover Reports), log in to Docker Hub using the `docker login` command with either your username and password or username and [Docker Hub Access Token](https://docs.docker.com/docker-hub/access-tokens), for example:

```
docker login -u <username> <password_or_token>
```

3. In your shell, navigate to your preferred install directory (we'll now refer to this as `$COVER_REPORTS_HOME`). Using the link provided by Diffblue, download the Cover Reports Docker Compose file `docker-compose.yml` to `$COVER_REPORTS_HOME`. Contact [Diffblue Support](https://www.diffblue.com/support) if you don't have the download link.
4. From the `$COVER_REPORTS_HOME` directory, start Cover Reports:

```
docker compose up -d
```

5. Finally, open your browser and navigate to the Cover Reports Home Page (`<HOSTURL>:8080`).

<div align="center"><figure><img src="https://1243928156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ7l8pn8qoIC3ubiJzuaF%2Fuploads%2Fgit-blob-abee528a5074aa24600f9d6ada3ee3721dd75ab1%2FFirst%20install.png?alt=media" alt=""><figcaption></figcaption></figure></div>
{% endtab %}
{% endtabs %}

## 3. Create and upload a reports bundle

Use Cover CLI to create a coverage data file for your project - this is referred to as a "reports bundle". You can do this on your own project, or you can use the example PetClinic Spring project that's used as part of the [get-started-cover-cli](https://cover-docs.diffblue.com/get-started/get-started/get-started-cover-cli "mention") topic.

Note that, to save you a little time, there's a demo project provided as part of Cover Reports so you can click `Open Demo Project` from the Reports splash screen and skip this Cover CLI step. If you or your organization have already used Cover Reports, this option won't be available.

```
cd demo-spring-petclinic
dcover create --coverage-reports
    --upload=http://my-cover-reports-service:8080
```

The optional arguments used with `dcover create` perform the following:

* `--coverage-reports` is used create the coverage data files using Cover and JaCoCo.
* `--upload` is used to define the URL to upload the reports bundle to - i.e. the URL for your Cover Reports server install. Note that HTTPS direct is currently not supported.

## 4. Visualize your data

Now the fun bit - taking a look at your coverage data. Please see [cover-reports-user](https://cover-docs.diffblue.com/features/cover-reports/cover-reports-user "mention") for a detailed guide through the visualisation dashboard.

## Next steps

Now you're up and running with Cover Reports, use Cover CLI to create reports bundles for your own projects and start to build your data sets over time. In general, Cover Reports is pretty straightforward to use, especially from a UI perspective, but check out the [cover-reports](https://cover-docs.diffblue.com/features/cover-reports "mention") topic for more details on using Cover Reports.
