Run Scout tests
The commands below work the same way for both UI and API tests.
Scout requires Kibana and Elasticsearch to be running before running tests against a local deployment.
node scripts/scout.js start-server \
--arch <stateful|serverless> \
--domain <classic|search|observability_complete|observability_logs_essentials|security_complete|security_essentials|security_ease|workplaceai>
npx playwright test --config <plugin-path>/test/scout/ui/playwright.config.ts \
--project local \
--grep @<location>-<arch>-<domain>
- Use
--project localto target your locally running Kibana/Elasticsearch processes. - Use
--grepto filter by tag (for example@local-stateful-classic,@cloud-serverless-search). If you omit--grep, Playwright will run all suites in the config, including ones that may not be compatible with your target.
node scripts/scout.js run-tests \
--arch <stateful|serverless> \
--domain <classic|search|observability_complete|observability_logs_essentials|security_complete|security_essentials|security_ease|workplaceai> \
--config <plugin-path>/test/scout/ui/playwright.config.ts
When Scout starts Kibana and Elasticsearch locally, it saves the server configuration to .scout/servers/local.json and later reads it when running tests.
Directory:
node scripts/scout.js run-tests \
--arch <stateful|serverless> \
--domain <domain> \
--testFiles <plugin-path>/test/scout/ui/tests/some_dir
Comma-separated file list:
node scripts/scout.js run-tests \
--arch <stateful|serverless> \
--domain <domain> \
--testFiles <path/to/one.spec.ts>,<path/to/two.spec.ts>
All --testFiles paths must fall under the same Scout root (for example, scout/ui/tests vs scout/ui/parallel_tests) so Scout can discover the right config.
To run on Elastic Cloud you must provide a server config under
.scout/servers/.
Open <KIBANA_ROOT>/.scout/servers/cloud_ech.json:
{
"serverless": false,
"isCloud": true,
"cloudHostName": "<elastic_cloud_hostname>",
"cloudUsersFilePath": ".ftr/role_users.json",
"hosts": {
"kibana": "<kibana_deployment_url>",
"elasticsearch": "<elasticsearch_deployment_url>"
},
"auth": {
"username": "<deployment_username>",
"password": "<deployment_password>"
}
}
cloudHostName: the Cloud environment hostname (for exampleconsole.qa.cld.elstc.coorcloud.elastic.co)cloudUsersFilePath: credentials for Cloud role users (often<KIBANA_ROOT>/.ftr/role_users.json)
Run tests with --project ech:
npx playwright test --config <plugin-path>/test/scout/ui/playwright.config.ts \
--project ech \
--grep @cloud-stateful-<domain>
Example --grep values: @cloud-stateful-classic, @cloud-stateful-search.
Open <KIBANA_ROOT>/.scout/servers/cloud_mki.json:
{
"serverless": true,
"projectType": "es",
"isCloud": true,
"cloudHostName": "<elastic_cloud_hostname>",
"cloudUsersFilePath": ".ftr/role_users.json",
"hosts": {
"kibana": "<kibana_project_url>",
"elasticsearch": "<elasticsearch_project_url>"
},
"auth": {
"username": "testing-internal",
"password": "<operator_password>"
}
}
projectTypevalues:es,security,obltcloudHostName: the Cloud environment hostname (for exampleconsole.qa.cld.elstc.coorcloud.elastic.co)- More information on how to get the
<operator_password>in the info box below
Internal (Elasticians): testing-internal is an operator user with superuser privileges plus additional operator privileges.
To retrieve its password, call the _reset-internal-credentials Elastic Cloud API endpoint (this resets the credential and returns a new password):
curl -XPOST \
-H "Authorization: ApiKey $API_KEY" \
"${CLOUD_ENV_URL}/api/v1/serverless/projects/elasticsearch/${PROJECT_ID}/_reset-internal-credentials"
API_KEY: create in the Elastic Cloud UI (Organization → API keys)CLOUD_ENV_URL: base URL of your Cloud environment (for examplehttps://cloud.elastic.co)PROJECT_ID: serverless project ID from the Cloud UI
Run tests with --project mki:
npx playwright test --config <plugin-path>/test/scout/ui/playwright.config.ts \
--project mki \
--grep @cloud-serverless-<domain>
Example --grep values: @cloud-serverless-search, @cloud-serverless-observability_complete, @cloud-serverless-security_ease.
Internal (Elasticians): provisioning Cloud users/roles and populating <kibana root>/.ftr/role_users.json is internal-only; see internal AppEx QA documentation.
node scripts/scout.js run-tests \
--arch stateful \
--domain classic \
--location cloud \
--config <plugin-path>/test/scout/ui/playwright.config.ts
node scripts/scout.js run-tests \
--arch serverless \
--domain <search|observability_complete|observability_logs_essentials|security_complete|security_essentials|security_ease|workplaceai> \
--location cloud \
--config <plugin-path>/test/scout/ui/playwright.config.ts
QAF is an internal tool for Elasticians only. To run Scout tests with QAF, refer to internal AppEx QA documentation.