context
A context in which to perform tests. If no contexts are specified but a context is required by one or more tests, Doc Detective attempts to identify a supported context in the current environment and run tests against it. For example, if a browser isn't specified but is required by steps in the test, Doc Detective will search for and use a supported browser available in the current environment.
Referenced In
Fields
Field | Type | Description | Default |
---|---|---|---|
contextId | string | Optional. Unique identifier for the context. | |
platforms | one of: - string - array of string | Optional. Platforms to run tests on. | |
browsers | one of: - string - object(Browser) - array of one of: string, object(Browser) | Optional. Browsers to run tests on. |
Examples
{
"platforms": "linux",
"browsers": "chrome"
}
{
"platforms": [
"windows",
"mac",
"linux"
],
"browsers": [
"chrome",
"firefox",
"webkit"
]
}
{
"browsers": {
"name": "chrome",
"headless": true
}
}
{
"browsers": [
{
"name": "chrome",
"headless": true
},
{
"name": "firefox"
}
]
}
{
"platforms": [
"mac",
"linux"
],
"browsers": {
"name": "chrome",
"headless": true
}
}
{
"platforms": [
"windows",
"mac",
"linux"
],
"browsers": [
{
"name": "chrome",
"headless": true,
"window": {
"width": 1920,
"height": 1080
},
"viewport": {
"width": 1600,
"height": 900
}
},
{
"name": "firefox",
"window": {
"width": 1366,
"height": 768
}
},
{
"name": "webkit",
"headless": false,
"viewport": {
"width": 1440,
"height": 900
}
}
]
}
{
"platforms": "mac",
"browsers": [
{
"name": "safari",
"window": {
"width": 1280,
"height": 800
}
}
]
}