﻿---
title: Testing Kibana plugins
description: Kibana plugins are tested at three levels. Each level has a different scope, speed, and tooling: Follow the testing pyramid: many unit tests, fewer integration...
url: https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing
products:
  - Kibana
---

# 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](https://martinfowler.com/articles/practical-test-pyramid.html): many unit tests, fewer integration tests, and a small number of E2E tests.

## Unit and integration tests

Use **Jest** for unit and integration tests:
- [Unit tests](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/unit-tests) — test logic in isolation with mocks
- [Integration tests](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/integration-tests) — test against real Kibana or Elasticsearch instances


## End-to-end tests with Scout

**Scout** is Kibana's modern E2E test framework built on [Playwright](https://playwright.dev). Use it for UI and API tests.
- [What is Scout](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/scout) — overview, packages, and FAQ
- [Set up Scout in your plugin](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/setup-scout) — add Scout to your plugin or package
- [Run Scout tests](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/run-scout-tests) — start servers and run tests locally

**Core concepts:**
- [Fixtures](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/fixtures)
- [Page objects](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/page-objects)
- [API services](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/api-services)
- [Parallelism](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/parallelism)
- [Deployment tags](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/deployment-tags)
- [Global setup hook](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/global-setup-hook)

**How-to guides:**
- [Write UI tests](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/write-ui-tests)
- [Write API tests](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/write-api-tests)
- [Debug test runs](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/debugging)
- [Browser authentication](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/browser-auth)
- [API authentication](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/api-auth)
- [Accessibility checks](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/a11y-checks)
- [Skip tests](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/skip-tests)
- [Feature flags in tests](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/feature-flags)


## Legacy functional tests (FTR)

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](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/testing/ftr) — when to use FTR, how it works, and migration guidance


## External plugins

If you're testing a plugin developed outside the Kibana repository, see [Testing Kibana plugins](https://docs-v3-preview.elastic.dev/elastic/kibana/tree/main/extend/tutorials/testing-kibana-plugin) in the Tutorials section.