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.
Licensing the Diffblue Cover Plugin for IntelliJ in offline mode is performed using 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 --offline
Restart the IntelliJ IDE.
You're now ready to write tests using Diffblue Cover Plugin.
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 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.
Run dcover license to 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 product
This will create an offline directory at:
<USER_HOME>/.diffblue/offline/
Copy ls_activation.lic to 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 license
You'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_CONTENTS with the contents of the ls_activation.lic
DIFFBLUE_LICENSE_KEY with 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.