Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.0] [scout] validate config has tests before starting servers (#211918) #211941

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

…1918)

## 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)
@kibanamachine kibanamachine merged commit 6b1a23b into elastic:9.0 Feb 20, 2025
12 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @dmlemeshko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants