Testing Kibana plugins
Kibana plugins are tested at three levels. Each level has a different scope, speed, and tooling:
| Level | Scope | Tools | When to use |
|---|---|---|---|
| Unit | A single function, class, or component in isolation | Jest + mocks | Fast, exhaustive coverage of logic and edge cases |
| Integration | Interactions between systems (HTTP APIs, Elasticsearch, plugin contracts) | Jest + TestUtils or FTR | Verifying real behavior without full browser |
| End-to-end (E2E) | User-facing behavior through the browser or HTTP | Scout (Playwright) | Validating complete user flows and UI interactions |
Follow the testing pyramid: many unit tests, fewer integration tests, and a small number of E2E tests.
Use Jest for unit and integration tests:
- Unit tests — test logic in isolation with mocks
- Integration tests — test against real Kibana or Elasticsearch instances
Scout is Kibana's modern E2E test framework built on Playwright. Use it for UI and API tests.
- What is Scout — overview, packages, and FAQ
- Set up Scout in your plugin — add Scout to your plugin or package
- Run Scout tests — start servers and run tests locally
Core concepts:
How-to guides:
- Write UI tests
- Write API tests
- Debug test runs
- Browser authentication
- API authentication
- Accessibility checks
- Skip tests
- Feature flags in tests
The Functional Test Runner (FTR) is Kibana's legacy E2E framework. Existing FTR tests continue to run, and teams can migrate incrementally to Scout.
- Functional Test Runner — when to use FTR, how it works, and migration guidance
If you're testing a plugin developed outside the Kibana repository, see Testing Kibana plugins in the Tutorials section.