# Test your plugins end-to-end

[View as Markdown](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/)

You can test your plugins using [`@grafana/plugin-e2e`](https://www.npmjs.com/package/@grafana/plugin-e2e?activeTab=readme), a tool designed specifically for Grafana plugin developers. It extends [`@playwright/test`](https://playwright.dev/) capabilities with relevant fixtures, models, and expect matchers; enabling comprehensive end-to-end testing of Grafana plugins across multiple versions of Grafana. This package simplifies the testing process, ensuring your plugin is robust and compatible with various Grafana environments.

## Why use `@grafana/plugin-e2e`?[​](#why-use-grafanaplugin-e2e "Direct link to why-use-grafanaplugin-e2e")

As a plugin author you want your plugins to be compatible with a range of Grafana versions. This can be challenging because things such as environment, APIs and UI components may differ from one Grafana version to another. Therefore, manually testing a plugin across multiple versions of Grafana is a tedious process, so in most cases end-to-end testing offers a better solution.

The `@grafana/plugin-e2e` tool offers a consistent way to interact with the Grafana UI without having to handle UI deviations in the plugin test code. The APIs of `@grafana/plugin-e2e` are guaranteed to work with all the latest minor versions of Grafana since 8.5.0. In addition to cross-version compatibility, the tool provides a set of features that simplify the end-to-end testing experience:

* **Predefined fixtures:** Offers a set of predefined fixtures that are tailored for Grafana plugin testing.
* **Custom models:** Provides custom models that represent pages and components in Grafana, simplifying maintenance and creating reusable code to avoid repetition.
* **Expect matchers:** Includes a range of expect matchers that are specialized for Grafana plugin assertions, helping you validate plugin behavior more effectively.
* **Accessibility testing:** Integrates with [Axe](https://www.deque.com/axe/) to run configurable accessibility scans inside your tests, with default rules aligned with Grafana's [WCAG 2.1 AA](https://www.w3.org/TR/WCAG21/) target.
* **Integration with Playwright:** Seamlessly integrates with the Playwright testing framework, leveraging its powerful browser automation capabilities.

## End-to-end testing guides[​](#end-to-end-testing-guides "Direct link to End-to-end testing guides")

See the following guides to learn more about end-to-end testing:

* [Get started](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/get-started.md)Get started with plugin end-to-end testing.
* [Use the API](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/api.md)How to use the grafana/plugin-e2e API.
* [Select UI elements](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/selecting-elements.md)How to select UI elements on the page in end-to-end testing.
* [CI workflow](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/ci.md)How to run end-to-end tests in CI.
* [Authentication](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/use-authentication.md)Add authentication to end-to-end tests using the plugin-e2e tool.
* [Grafana feature toggles](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/feature-toggles.md)How to use Grafana feature toggles in end-to-end tests.
* [Configure necessary resources](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/setup-resources.md)Configure any dashboards, data sources or other Grafana resources necessary for end-to-end testing your plugin, through provisioning.
* [Accessibility testing](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/accessibility-testing.md)How to test the accessibility of a plugin in end-to-end tests.
* [Test an app plugin](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/test-an-app-plugin.md)How to test an app plugin with @grafana/plugin-e2e
* [Test a data source plugin](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/test-a-data-source-plugin.md)How to test a data source plugin with @grafana/plugin-e2e
* [Test a panel plugin](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/test-a-panel-plugin.md)How to test a panel plugin with @grafana/plugin-e2e.
* [Migrate from @grafana/e2e](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/migrate-from-grafana-e2e.md)Migrate from @grafana/e2e to @grafana/plugin-e2e.
