Configuration options
Cover Reports provides for a range of configuration options.
Non-Docker options
There are several config options available when Cover Reports is run as a Windows Service, Linux Service, Windows .bat, or macOS/Linux .sh. These can be configured locally via the application.properties
config file in the folder where the cover-reports
instance is running, or globally via environment variables.
Setting properties in the config file (local)
If needed, copy the "template"
application.properties
file from[install]/bin/
to the folder where thecover-reports
instance is running. Edit theapplication.properties
file and edit/add the following, as required - if you don't need to change the default values you can leave the line(s) commented out.
Field | Description |
---|---|
| Cover Reports listens on port 8080 by default. If this port is already in use, you can change it here. Note that if you change the port, this needs to be replicated when accessing the Cover Reports UI (via a browser) and when uploading reports bundles from Cover CLI and Cover Pipeline. |
| Cover Reports logs are saved to |
| Cover Reports uses a local H2 database for coverage details and general data. Data files are stored in the root directory of your Reports install - you can change the default path if needed. |
| |
|
Setting properties with environment variables (global)
Edit the cover-reports.xml
file in your Cover Reports installation. Edit/add the following environment variables in the <service>
section, as needed.
Field | Description |
---|---|
| Cover Reports listens on port 8080 by default. If this port is already in use, you can change it here. Note that if you change the port, this needs to be replicated when accessing the Cover Reports UI (via a browser) and when uploading reports bundles from Cover CLI and Cover Pipeline. |
| Cover Reports logs are saved to |
| Cover Reports uses a local H2 database for coverage details and general data. Data files are stored in the root directory of your Reports install - you can change the default path if needed. |
| Java JDK PATH. |
| macOS/Linux executable path for Cover Reports. |
| |
|
Using an external database server
When using Cover Reports in a production grade environment you also need to provide an external PostgreSQL database in place of the default H2 database:
Create a new database and user on the PostgreSQL server.
Grant all privileges on the new database to the new user.
Define the PostgreSQL settings as detailed above (local config or global environment variables).
Field | Description |
---|---|
| Profile type - set this value to |
| URL for the PostgreSQL database created for Cover Reports data, including the name of the database. |
| Username used to access the database. |
| Password used to access the database. |
Changing the default port (Docker)
Cover Reports listens on port 8080 by default. If this port is already in use, you can change it in the docker-compose.yml
file. Note that if you change the port, this needs to be replicated when accessing the Cover Reports UI (via a browser) and when uploading reports bundles from Cover CLI and Cover Pipeline. To change the port:
In your shell, navigate to
$COVER_REPORTS_HOME
and stop Cover Reports using:
Edit the
docker-compose.yml
file and update theports
value. Note that the value specified is in the format<external-port>:<internal-port>
- update the<external-port>
value only.
From the
$COVER_REPORTS_HOME
directory, start Cover Reports using:
Using telemetry in Cover Reports
Cover Reports can collect usage telemetry from Cover CLI and Cover Plugin installations to give you vital information on usage across your organization.
Telemetry configuration
Telemetry can be configured (if required) using environment variables, and/or a properties file, on the host machine (where Diffblue Cover is being used). Note that these configuration settings apply to Cover CLI and Cover Plugin.
Environment variables (listed below) always take priority and is the recommended method for configuring telemetry.
If you use a properties file, create a
telemetry.properties
file in the home directory under the.diffblue
folder (for example,/users/jbrown/.diffblue/telemetry.properties
) and define one or more of the properties listed below.If an individual environment variable or property is not found, the default value will be used.
Environment variable | Property | Description | Default |
---|---|---|---|
|
| Enable ( |
|
|
| Enable ( |
|
|
| Hostname of your Cover Reports server. |
|
|
| Port number of your Cover Reports instance |
|
|
| Protocol used to communicate with Cover Reports - |
|
* Disabling the Diffblue endpoint for telemetry data is only available to Diffblue Cover Enterprise Edition customers.
For general Telemetry config detail, refer to the telemetry topics for Cover CLI and Cover Plugin.
Example telemetry.properties
file:
Manage configurations
If you need to manage telemetry configuration across your organization, you can set the environment variables defined above (as needed) and apply these settings across your organization (for example, using a group policy).
Cover Reports - telemetry home page
To view telemetry data for your organization in Cover Reports, navigate to your Cover Reports telemetry home page, e.g. http://cover-reports.mycompany.com:8080
/ui/telemetry
. From this view, you can select either the CLI tab for CLI events, or the Plugin tab for plugin events:
Upload authentication
By default, any Diffblue Cover user can upload reports bundles to Cover Reports. However, you may want to restrict and/or secure access using upload authentication. For example, you may want to restrict upload to your CI processes only, so that the data and upload timings are consistent.
Enable upload authentication
Stop Cover Reports by running:
docker compose down
In your
docker-compose.yml
file, add two new environment variables (REPORTS_REQUIREDUSERNAME
andREPORTS_REQUIREDPASSWORD
), and replace<username>
and<password>
with the username and password to use for uploading reports bundles:
Note: Use ASCII characters only in your username and password. Also, do not use an empty string as this may cause unexpected behavior.
Save your changes to
docker-compose.yml
and start your Cover Reports instance by running:docker compose up
For Cover Reports Release 2023.11.01 or earlier, use dashboard.requiredusername
, dashboard.requiredpassword
, DASHBOARD_REQUIREDUSERNAME
, and DASHBOARD_REQUIREDPASSWORD
. For Cover Reports Release 2023.11.02 and later, use reports.requiredusername
, reports.requiredpassword
, REPORTS_REQUIREDUSERNAME
, and REPORTS_REQUIREDPASSWORD
.
Upload with authentication
Once upload authentication has been enabled, reports bundles can be uploaded from Cover CLI and Cover Pipeline using the username and password defined above. See Authenticated uploads for details.
Last updated