How to run tests using client certificates

Prev Next

This page explains how to run a test by presenting a client certificate to a specific site.

[!NOTE]

  • This setting is configured from the "Advanced options" of the test plan settings.

  • The certificate files to be used (e.g., .pem, .key, .pfx, .p12) must be placed on the local file system of the test execution environment beforehand.

Configuration Steps

Client certificate configuration is done by entering specific JSON into the advanced options of the test plan settings.

  1. Open the edit screen for the corresponding test plan.

  2. Click the edit icon for "Advanced options".

  3. In the displayed input field, enter the information in one of the following JSON formats, depending on the format of your certificate file.

When using .pem and .key files

If the certificate and private key are provided as separate .pem files, use the following format.

{
  "clientCertificates": [
    {
      "origin": "https://example.com",
      "certPath": "C:¥path¥to¥your¥cert.pem",
      "keyPath": "C:¥path¥to¥your¥key.pem",
      "passphrase": "your-secret-password"
    }
  ]
}

When using .pfx or .p12 files

If the certificate and private key are combined into a single .pfx or .p12 file, use the following format.

{
  "clientCertificates": [
    {
      "origin": "https://example.com",
      "pfxPath": "C:¥path¥to¥your¥key-cert.pfx",
      "passphrase": "your-secret-password"
    }
  ]
}

Parameter Descriptions

The meaning of each parameter used in the JSON is as follows.

  • origin: Specifies the URL of the target site to which the client certificate will be applied.

  • certPath: Specifies the full path to the certificate file (e.g., .pem).

  • keyPath: Specifies the full path to the private key file (e.g., .pem, .key).

  • pfxPath: Specifies the full path to the PKCS#12 file (.pfx or .p12) containing the certificate and key.

  • passphrase: If the certificate file is password-protected, specify the password. If there is no password, delete this line or set the value to empty ("").