Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[scout] validate config has tests before starting servers (#211918)
## Summary There is no need to start servers (~1.5 min run time) if there are no tests matching filters or maybe config itself has all tests skipped. This PR uses Playwright cli with `--list` flag to quickly validate playwright config and exit with status code `2` (`1` is reserved for errors during servers start or test failures). it also useful to know in advance how many tests were about to run: case 1: tests found ``` $ node scripts/scout.js run-tests --config x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts --serverless=security info scout: Test server configuration saved at /Users/dmle/github/kibana/.scout/servers/local.json info scout: Validate Playwright config has tests info scout: Total: 5 tests in 2 files info Verifying Docker is installed. │ info Docker version 20.10.14, build a224086349 ... ``` case 2: no tests found ``` $ node scripts/scout.js run-tests --config x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts --stateful info scout: Test server configuration saved at /Users/dmle/github/kibana/.scout/servers/local.json info scout: Validate Playwright config has tests ERROR scout: No tests found in [x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts] ``` (cherry picked from commit 30c4275)
- Loading branch information