Offline license activation
How to activate your Diffblue Cover license offline
Licensing Diffblue Cover in the offline mode detailed here is available only when purchased with the Enterprise Edition offline option. To use Diffblue Cover in an offline environment, such as a high-security or air-gapped network, requires this Enterprise Edition offline option.
Otherwise Diffblue Cover requires a remote license check with the Diffblue licensing server each time it is used.
Activating an offline license
This section describes how to activate a Diffblue Cover offline license.
Licensing the Diffblue Cover Plugin for IntelliJ in offline mode is performed using Cover CLI.
Install Diffblue Cover Plugin and install Diffblue Cover CLI.
Before entering a license key, completely exit all instances of the IntelliJ IDE. Note that closing the project window is not sufficient.
Follow the Cover CLI steps detailed in the tab above to activate your license in offline mode, using the Diffblue Cover CLI command
dcover activate --offlineRestart the IntelliJ IDE.
You're now ready to write tests using Diffblue Cover Plugin.
Activating Diffblue Cover CLI offline:
Install Diffblue Cover CLI.
Obtain your licence file and license key. To activate Diffblue Cover offline you will require your license file
ls_activation.lic, along with your license keyXXXX-XXXX-XXXX-XXXX. These can be obtained from: - Your Diffblue Cover welcome email received following license purchase. - Your organization's internal file/app/license store. - Or contact Diffblue Support for help finding this information.Run
dcover licenseto prepare a directory for license installation:
➜ dcover license
12:55:23.365 INFO Diffblue Cover 2022.02.02
12:55:23.368 INFO There is no license linked to your productThis will create an offline directory at:
<USER_HOME>/.diffblue/offline/Copy
ls_activation.licto the Diffblue offline license directory:On Linux or macOS your home directory can be found at
~/.diffblue/offline/On Windows your user home can be found at
C:\Users\<username>\.diffblue\offline\Run
dcover activate --offline <license key>to install the offline license:
➜ dcover activate --offline XXXX-XXXX-XXXX-XXXX
15:48:35.064 INFO Found an offline license file at '<USER_HOME>/.diffblue/offline/ls_activation.lic'
15:48:35.494 INFO Successfully activated offline licenseYou're now ready to write tests using Diffblue Cover CLI.
Diffblue Cover CLI (also as used in Docker images and Diffblue Cover Pipelines) can be configured using environment variables. Please note that environment variables for offline license activation will not work for the plugin.
Obtain your license file and license key. To activate Diffblue Cover offline you will require your license file ls_activation.lic, along with your license key XXXX-XXXX-XXXX-XXXX. These can be obtained from:
- Your Diffblue Cover welcome email received following license purchase.
- Your organization's internal file/app/license store.
- Or contact Diffblue Support for help finding this information.
Configure the following environment variables:
DIFFBLUE_OFFLINE_LICENSE_ACTIVATION_FILE_CONTENTSwith the contents of thels_activation.licDIFFBLUE_LICENSE_KEYwith the value of your license key.
Windows only note: due to Windows environment variable size limitations (e.g. cmd.exe, Windows system variables, etc.), please configure using PowerShell to ensure the license activation file environment variable can be stored. Note that third party software such as git bash usually support larger environment variables.
You can now activate your license with
dcover activate --offlineDistributing an offline license
This section describes how to make an offline Enterprise license for Diffblue Cover available to users without them requiring their own activation or access to the license key. This is typically useful when users have managed environments where new software can be rolled out to their environment, or as an alternative to environment variables in a CI environment.
First, the license will need to be activated as above using the Diffblue Cover CLI and provided
ls_activation.licand license key, e.g.:dcover activate --offline <DIFFBLUE LICENSE KEY>this will put alicense.keyfile into<USER_HOME>/.diffblue/.The
license.keyfile above can now be placed into the<USER_HOME>/.diffbluedirectory of any user and this will be recognized by Diffblue Cover (Plugin and CLI).
Last updated
Was this helpful?

