Learn how to write the tests.json
config for your project
tests.json
file allows you to specify your Openlayer tests.
This allows you to fully control your project’s tests with a single configuration file that
can be version-controlled, without needing to use the Openlayer UI to create and update tests.
This guide shows how you can write the tests.json
for your project.
tests.json
file, as in:
tests.json
file should contain an array
of Test
objects, each representing
a test in your project.
The Test
objects have a set of common attributes and a set of attributes that
depend on the mode
(i.e., if it is a development test or monitoring test).
Test
object common attributesmode
.
name
string
, required
The test name.
description
string
.
The test description.
type
string
, required.
The test type, which represents the test category. Must be one of integrity
, consistency
, or performance
.
subtype
string
, required.
The test subtype, which identifies the test on the platform. Must be one of the valid subtypes
.
thresholds
array
of Threshold
objects, required.
The thresholds that
Threshold object attributes
insightName
string
, required.Name of the insight from which the test is based. Must be one of the valid insight names.measurement
string
, required.Key from the insightName
on top of which the threshold will be applied. Must be one of the valid measurement names.operator
string
, required.Operator used to compare the measurement
and value
. Must be one of is
, >
, >=
, <
, <=
.value
number | string
, required.Threshold value.insightParameters
object
.Parameters needed to compute the insight. Might be null
depending on the insight.subpopulationFilters
object
.
Filters that define the subpopulation.
syncId
string
, required.
An id (UUID) that identifies the test.
mode
string
, required.
Defines to which mode the test applies to. Must be one of development
or monitoring
.
Test
object mode-specific attributesmode
, i.e., if it is a
development
or monitoring
mode test.