Knowledge Base > DCover CLI > Offline Licensing - Diffblue Cover CLI

Offline Licensing - Diffblue Cover CLI

Some computers will not have an active internet connection, or will be behind a firewall preventing online activation. The Diffblue Cover Enterprise Edition of Diffblue Cover CLI (DCover CLI) supports an offline mode which facilitates license activation in such situations.

In addition, the Diffblue Cover Enterprise Edition enables you to run the Diffblue Cover IntelliJ plugin using this offline licensing mechanism.

For pricing information on Diffblue Cover Enterprise Edition and our other editions, please see: https://www.diffblue.com/pricing/.

Overview

  1. Generate an offline activation request with the CLI
  2. Upload the request to the Diffblue website and download an offline license
  3. Apply the offline license with the CLI

Requests and licenses are not transferrable; your activation request and license will be specific to your target computer.

Detailed Workflow

The following instructions detail how to use the Diffblue Cover Enterprise Edition on a target computer that does not have internet access.

You will be required to copy files to and from the relevant user home directory of your target computer (represented here by <USER_HOME>). On Linux or macOS your home directory can be found at /Users/<username> (or ~). On Windows your user home can be found at C:\Users\<username>.

  1. Install DCover on the computer - further installation details can be found here.
  2. Locate your license key from Diffblue (represented here by XXXX-XXXX-XXXX-XXXX).
  3. Run DCover CLI to generate an offline activation request from your license key:

    dcover activate --offline XXXX-XXXX-XXXX-XXXX
    

    An offline activation request file will have been placed in the user home directory of the target computer at:

    <USER_HOME>/.diffblue/offline/ls_activation.req
    
  4. Locate and copy the request file.

    Upload the file to the Diffblue Offline Licensing Webtool. Download the resulting offline license file.

    NOTE: This step will need to be done from a computer with internet access.

  5. Copy the offline license file to the user home directory of your target computer at:

    <USER_HOME>/.diffblue/offline/ls_activation.lic
    
  6. Run DCover CLI to apply the offline license file and license key:

    dcover activate --offline XXXX-XXXX-XXXX-XXXX
    
  7. You are now ready to run dcover create on your target project.

Activating the Diffblue Cover IntelliJ plugin offline

Your copy of the Diffblue Cover IntelliJ plugin can be activated for offline use by using the dcover activate workflow above:

  1. Follow the process as described in the Detailed Workflow using dcover activate.
  2. Restart your IDE.
  3. You are now ready to Write Tests for your target project in offline mode.

Please ensure that you exit the IntelliJ IDEA application fully before opening in offline mode. Closing your project window is not sufficient.

Going back online

To move a license from offline to online usage, you will need to delete the offline directory and its contents:

<USER_HOME>/.diffblue/offline/

If you are using the Diffblue Cover IntelliJ plugin, please ensure that you exit the IntelliJ IDEA application fully before returning to online mode. Closing your project window is not sufficient.

Offline activation of a different license key

If you need a apply a different license key to your offline installation, you will need to delete the offline directory and its contents:

<USER_HOME>/.diffblue/offline/

Then generate a new offline activation request:

dcover activate --offline XXXX-XXXX-XXXX-XXXX

and continue the process as described in the Detailed Workflow section (from point 3.) above.