Configuration
The Jikken CLI tool supports configuration of the runtime and of variable definitions to be used for tests. These settings can be defined in configuration files or environment variables.
Settings
Settings allow you to customize the runtime environment. This modifies how the CLI tool behaves when executing tests.
Setting | Default Value | Description |
---|---|---|
API Key | The API Key setting is what allows you to send telemetry information to the Jikken cloud platform. | |
Bypass Certificate Verification | false | When this setting is enabled, Jikken will bypass the SSL certificate verification step when executing HTTPS requests. |
Continue on Failure | false | The Continue on Failure setting controls whether the runtime exits after a single test fails. The default behavior is that as soon as a test fails, the application exits with an error code. When this setting is enabled, the test runner will execute all tests regardless of failures. |
Environment | The Environment setting is used to specify which environment label should be applied for the test runner’s execution. This label can be used to organize and filter test runs in the dashboard, and allows you to define triggers and metrics tracking specific to an environment. It can be any string value and is limited to 50 characters. By default, no environment is attached to the test runs. |
Variables
Variables allow you to embed values into tests at runtime. This is useful for injecting URL paths that are environment-specific. For more information on variables in general, see the Variables page of the User Guide.
Configuration files
The Jikken CLI tool looks for a .jikken
file in the folder it is being executed from. The .jikken
file is defined in the TOML format.
Setting | Default | Description |
---|---|---|
apiKey | The apiKey setting is used to provide a key for reporting test runs and status with the Jikken cloud platform. This key is associated with your account and can be obtained from the web application. | |
bypassCertVerification | false | When enabled, Jikken will bypass SSL certificate verification when executing HTTPS requests. |
continueOnFailure | false | When running Jikken, by default, it will stop execution as soon as it encounters a test failure. The continueOnFailure setting allows you to execute all tests regardless of prior test execution. It is possible some test failures may cause other tests to fail, but for independent tests, it can be useful to get a full picture of the pass/fail state of all tests. |
environment | Jikken provides multiple ways to provide an environment label. This setting provides a label at the configuration file level, which will apply it to all tests. This value will be overridden by the env field if it is provided in a test definition. |
Globals are a way to define global variables which are used across all of your tests. This is useful for values such as base URLs for API endpoints, environment variables, and authentication credentials.
Environment variables
Jikken supports environment variables as overrides to the .jikken
configuration file.
EnvVar | Value | Description |
---|---|---|
JIKKEN_API_KEY | string | Overrides the apiKey setting, as defined in the .jikken configuration file. |
JIKKEN_BYPASS_CERT_VERIFICATION | boolean | Overrides the bypassCertVerification setting, as defined in the .jikken configuration file. |
JIKKEN_CONTINUE_ON_FAILURE | boolean | Overrides the continueOnFailure setting, as defined in the .jikken configuration file. |
JIKKEN_ENVIRONMENT | string | Overrides the environment setting, as defined in the .jikken configuration file. |
Jikken also supports global variable definition as environment variables. These may override values in the .jikken
configuration file, or simply define new ones that are not contained in the file. These variables must have a prefix of JIKKEN_GLOBAL_
.
The prefix should be in all caps (JIKKEN_GLOBAL_
) but everything after that can use whichever case you prefer, as long as it matches the case of the variable definition in the test file(s).
Secrets
To protect sensitive data, Jikken also offers support for secrets. Secrets are a special type of global environment variable, the only difference being that they are automatically redacted from any telemetry data that is sent to the Jikken cloud platform.
Secrets must be defined with a prefix of JIKKEN_SECRET_
.