Loading

Set up Scout in your plugin or package

This page shows the minimum setup to add Scout tests to a plugin/package. For choosing the right import (@kbn/scout vs solution packages), see Scout packages.

Generate a working scaffold (folders, configs, and sample tests):

node scripts/scout.js generate
		

Then, enable your plugin or package in the CI.

Create test/scout:

your-plugin/
└── test/
    └── scout/
        ├── ui/
        ├── api/
        └── common/
		
  1. UI tests (optional)
  2. API tests (optional)
  3. shared code (optional)

Create playwright.config.ts under test/scout/ui and/or test/scout/api:

import { createPlaywrightConfig } from '@kbn/scout';

export default createPlaywrightConfig({
  testDir: './tests',
});
		
Important

Name the file exactly playwright.config.ts so Scout tooling can discover it.

Then create the tests/ directory next to the config.

If your UI suites can be isolated, add parallel.playwright.config.ts under test/scout/ui and point it at parallel_tests/:

import { createPlaywrightConfig } from '@kbn/scout';

export default createPlaywrightConfig({
  testDir: './parallel_tests',
  workers: 2,
});
		
Important

Name the file exactly parallel.playwright.config.ts so Scout tooling can discover it.

See Parallelism and Global setup hook for recommended parallel patterns.

Finally, enable Scout test runs in the CI for your plugin or package.

To enable Scout CI for your plugin/package, add it to .buildkite/scout_ci_config.yml:

plugins:
  enabled:
    - <your_plugin_name>
  disabled:

packages:
  enabled:
    - <your_package_name>
  disabled: