mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 09:26:43 -06:00
22eb2df602
* Rename to grafana-server / move scripts into new directory * Change grafana-server step command * Change scripts paths * Use test grabpl version * Update run-suite script * Further name updates * Update grabpl version * Update contribute/style-guides/e2e-core.md Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com> Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
1.7 KiB
1.7 KiB
End-to-End Tests for core Grafana
This document is specific to the Grafana repository. Be sure that you've read the generalized E2E document.
Commands
yarn e2e
Creates an isolatedgrafana-server
home under <repo-root>/e2e/tmp with provisioned data sources and dashboards. This copies locally build binary and frontend assets from your repo root so you need to have a built backend and frontend for this to run locally. The server starts on port 3001 so it does not conflict with your normal dev server.yarn e2e:debug
Same as above but runs the tests in chrome and does not shutdown after completion.yarn e2e:dev
Same as above but does not run any tests on startup. It lets you pick a test first.
If you already have a Grafana instance running, you can provide a specific URL by setting the BASE_URL
environment variable:
BASE_URL=http://172.0.10.2:3333 yarn e2e
The above commands use some utils scripts under <repo-root>/e2e that can also be used for more control.
./scripts/grafana-server/start-server
This creates a fresh new grafana server working dir, setup's config and starts the server. It will also kill any previously started server that is still running using pid file at <repo-root>/scripts/grafana-server/tmp/pid../scripts/grafana-server/wait-for-grafana
waits for$HOST
and$PORT
to be available. Per default localhost and 3001../e2e/run-suite <debug|dev|noarg>
Starts cypress in different modes.
Test suites
All the integration tests are located at <repo-root>/e2e/suite<x>/specs. The page objects and reusable flows are in the <repo-root>/packages/grafana-e2e package.