Using the v10 Tech Preview offline tokens

Offline tokens are generated from the v10 Tech Preview that enable you to access the v10 Tech Preview from HCL OneTest™ API primarily to retrieve the secrets defined in the v10 Tech Preview project and use the secrets in tests.

Prerequisites

You must have completed certain tasks before you can use the offline tokens to access the v10 Tech Preview:
  • You must have installed and configured the v10 Tech Preview.
  • You must have set up your project in the v10 Tech Preview and created secrets under a secret collection associated with your project.

Generating an offline token

  1. Log in to the v10 Tech Preview. For more information, see the v10 Tech Preview documentation.
  2. Click the Overflow menu in the v10 Tech Preview Header and click the Offline Token option.
  3. Click within the token field to copy the token to the clipboard.
    You can paste the copied offline token in a text document to use the offline token at a later time.
Note: The offline token generated is specific to the member who generated the token and the token is neither stored on the v10 Tech Preview nor is retrievable from the v10 Tech Preview at a later time.

Using the offline token

The offline token enables you to connect to the v10 Tech Preview and access the secrets configured in the v10 Tech Preview project. You can use the secrets defined on the v10 Tech Preview across different testing environments. The generated offline token that you copied from the v10 Tech Preview can be used to access and retrieve secrets during test execution.

You can paste the offline token in the HCL OneTest API UI. See Accessing the v10 Tech Preview from HCL OneTest API.

Locating the used offline token

The offline token you generated and copied from the v10 Tech Preview and used in the HCL OneTest API UI is stored in the .userProfile file. The token is stored under the attribute server.securityToken with the generated token as its value.

The .userProfile file can be found in the .integrationtester subdirectory of the User's home directory. For example, the path to the .userProfile file can be C:\Users\<CurrentUser>\.integrationtester.

Offline token environment variable

HCL OneTest API uses the HCL_ONETEST_OFFLINE_TOKEN variable in certain circumstances. In the HCL OneTest API UI, when no offline token is specified in the v10 Tech Preview tab or Project Preferences option as detailed in Accessing the v10 Tech Preview from HCL OneTest API and when executing tests the HCL_ONETEST_OFFLINE_TOKEN variable is used as the token to connect to the v10 Tech Preview.

If the token environment variable is not set, then the token stored in the .userProfile file is used during RunTests execution to connect to the v10 Tech Preview.

Feedback