mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
## Summary This PR introduces a new package, **kbn-scout**, designed to streamline the setup and execution of Playwright tests for Kibana. The `kbn-scout` package consolidates server management and testing capabilities by wrapping both the Kibana/Elasticsearch server launcher and the Playwright test runner. It includes: - Test and worker-scoped fixtures for reliable setup across test suites - Page objects combined into the fixture for Kibana UI interactions - Configurations for seamless test execution in both local and CI environments (`Cloud` execution is out of scope) - This package aims to simplify test setup and enhance modularity, making it easier to create, run, and maintain deployment-agnostic tests, that are located in the plugin they actually test. Tests example is available in `x-pack/plugins/discover_enhanced` plugin under `ui_tests` folder How to run: 1) As a single script (servers + tests): ``` node scripts/scout_test.js --config=x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts --serverless=es ``` 2) Start servers first ``` node scripts/scout_start_servers.js --serverless=es ``` then run tests: ``` npx playwright test --config=x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts ``` if you have Playwright plugin in IDEA, just use it to run tests files --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
11 lines
544 B
JavaScript
11 lines
544 B
JavaScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the "Elastic License
|
|
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
|
* Public License v 1"; you may not use this file except in compliance with, at
|
|
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
|
*/
|
|
|
|
require('../src/setup_node_env');
|
|
require('@kbn/scout').startServersCli();
|