[SLO] Migrate synthetics to scout !!#225035
Conversation
|
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
x-pack/solutions/observability/plugins/slo/ui_tests/fixtures/index.ts
Outdated
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/slo/ui_tests/fixtures/page_objects/annotations_app.ts
Outdated
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/slo/ui_tests/fixtures/page_objects/index.ts
Outdated
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/slo/ui_tests/fixtures/page_objects/slo_app.ts
Outdated
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/slo/ui_tests/playwright.config.ts
Outdated
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/slo/ui_tests/services/slo_data_service.ts
Outdated
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/slo/ui_tests/tests/annotation_list.spec.ts
Outdated
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/slo/ui_tests/tests/slos_overview.spec.ts
Outdated
Show resolved
Hide resolved
| @@ -81,8 +69,8 @@ export class SLoDataService { | |||
| groupBy: ['user.id'], | |||
There was a problem hiding this comment.
Add this settings to the created slo payload, it might help with the time it takes to generate the SLO
settings: {
preventInitialBackfill: true
}
x-pack/solutions/observability/plugins/slo/ui_tests/fixtures/page_objects/annotations_app.ts
Show resolved
Hide resolved
| } | ||
|
|
||
| export function extendPageObjects(pageObjects: ObltPageObjects, page: ScoutPage): SLOPageObjects { | ||
| page.setDefaultTimeout(60_000); // Set a default timeout for all page actions |
There was a problem hiding this comment.
Isn't it too much? Every testing tool is encouraging to use explicit waiting over implicit, could you share if there was issue relying on defaults?
There was a problem hiding this comment.
I've removed the set default timeout but kept the timeout for the tests in slos_overview.spec.ts to 3 minutes because even with @kdelemme's suggestion it takes a long time to generate SLOs.
x-pack/solutions/observability/plugins/slo/ui_tests/tests/annotation_list.spec.ts
Outdated
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/slo/ui_tests/services/slo_data_service.ts
Outdated
Show resolved
Hide resolved
dmlemeshko
left a comment
There was a problem hiding this comment.
I left few questions + you need to update structure to follow a recent change #226411 (sorry for extra work)
|
|
||
| ```bash | ||
| // ESS | ||
| npx playwright test --config x-pack/solutions/observability/plugins/slo/ui_tests/playwright.config.ts --project=local --grep @ess |
There was a problem hiding this comment.
There was a recent restructuring of scout test directory in this PR. Which basically means we should move stuff under slo/test/scout/ui folder instead of slo/ui_tests
.buildkite/scout_ci_config.yml
Outdated
| ui_tests: | ||
| enabled: | ||
| - slo | ||
| disabled: |
There was a problem hiding this comment.
@dmlemeshko This is just for testing? Let's not forget to re-enable the plugins.
There was a problem hiding this comment.
totally, this is a workaround before we add flaky-test-runner support for Scout
| test('Go to slos overview', async ({ page }) => { | ||
| // Already navigated in beforeEach | ||
| // This test ensures the page loads | ||
| expect(page).toBeDefined(); | ||
| }); | ||
|
|
||
| test('validate data retention tab', async ({ page }) => { | ||
| await expect(async () => { | ||
| await page.getByTestId('querySubmitButton').click(); | ||
|
|
||
| await expect | ||
| .poll(() => page.locator('text=Test Stack SLO').count(), { timeout: 1000 }) | ||
| .toBeGreaterThan(5); | ||
| }).toPass({ | ||
| intervals: [10000], | ||
| timeout: TEST_TIMEOUT, | ||
| }); | ||
| }); |
There was a problem hiding this comment.
Maybe it makes sense to combine it into a single test block? It does look like a single flow and 2nd scenario won't work if page is not loaded anyways
dmlemeshko
left a comment
There was a problem hiding this comment.
LGTM, left a small nit
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
cc @cesco-f |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
## Summary Migrate synthetics based SLO plugin tests to scout !! ### How to test locally If you want to try it out locally here are the commands: Start the server ```bash // ESS node scripts/scout.js start-server --stateful // Serverless node scripts/scout.js start-server --serverless=[es|oblt|security] ``` Then run in another terminal: ```bash // ESS npx playwright test --config x-pack/solutions/observability/plugins/slo/test/scout/ui/playwright.config.ts --project=local --grep @ess // Serverless npx playwright test --config x-pack/solutions/observability/plugins/slo/test/scout/ui/playwright.config.ts --project=local --grep @svlOblt ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Francesco Fagnani <francesco.fagnani@elastic.co> Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co> Co-authored-by: Panagiota Mitsopoulou <giota85@gmail.com> Co-authored-by: Francesco Fagnani <fagnani.francesco@gmail.com>
## Summary Migrate synthetics based SLO plugin tests to scout !! ### How to test locally If you want to try it out locally here are the commands: Start the server ```bash // ESS node scripts/scout.js start-server --stateful // Serverless node scripts/scout.js start-server --serverless=[es|oblt|security] ``` Then run in another terminal: ```bash // ESS npx playwright test --config x-pack/solutions/observability/plugins/slo/test/scout/ui/playwright.config.ts --project=local --grep @ess // Serverless npx playwright test --config x-pack/solutions/observability/plugins/slo/test/scout/ui/playwright.config.ts --project=local --grep @svlOblt ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Francesco Fagnani <francesco.fagnani@elastic.co> Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co> Co-authored-by: Panagiota Mitsopoulou <giota85@gmail.com> Co-authored-by: Francesco Fagnani <fagnani.francesco@gmail.com>
## Summary Migrate synthetics based SLO plugin tests to scout !! ### How to test locally If you want to try it out locally here are the commands: Start the server ```bash // ESS node scripts/scout.js start-server --stateful // Serverless node scripts/scout.js start-server --serverless=[es|oblt|security] ``` Then run in another terminal: ```bash // ESS npx playwright test --config x-pack/solutions/observability/plugins/slo/test/scout/ui/playwright.config.ts --project=local --grep @ess // Serverless npx playwright test --config x-pack/solutions/observability/plugins/slo/test/scout/ui/playwright.config.ts --project=local --grep @svlOblt ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Francesco Fagnani <francesco.fagnani@elastic.co> Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co> Co-authored-by: Panagiota Mitsopoulou <giota85@gmail.com> Co-authored-by: Francesco Fagnani <fagnani.francesco@gmail.com> (cherry picked from commit 726042c) # Conflicts: # .buildkite/pipelines/pull_request/slo_plugin_e2e.yml # .buildkite/scout_ci_config.yml # .buildkite/scripts/steps/functional/slo_plugin_e2e.sh # x-pack/solutions/observability/packages/kbn-scout-oblt/src/playwright/fixtures/parallel_run_fixtures.ts # x-pack/solutions/observability/packages/kbn-scout-oblt/src/playwright/fixtures/single_thread_fixtures.ts # x-pack/solutions/observability/packages/kbn-scout-oblt/src/playwright/fixtures/types.ts # x-pack/solutions/observability/packages/kbn-scout-oblt/src/playwright/fixtures/worker/index.ts # x-pack/solutions/observability/plugins/slo/e2e/services/slo_data_service.ts # x-pack/solutions/observability/plugins/slo/e2e/tsconfig.json
## Summary Migrate synthetics based SLO plugin tests to scout !! ### How to test locally If you want to try it out locally here are the commands: Start the server ```bash // ESS node scripts/scout.js start-server --stateful // Serverless node scripts/scout.js start-server --serverless=[es|oblt|security] ``` Then run in another terminal: ```bash // ESS npx playwright test --config x-pack/solutions/observability/plugins/slo/test/scout/ui/playwright.config.ts --project=local --grep @ess // Serverless npx playwright test --config x-pack/solutions/observability/plugins/slo/test/scout/ui/playwright.config.ts --project=local --grep @svlOblt ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Francesco Fagnani <francesco.fagnani@elastic.co> Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co> Co-authored-by: Panagiota Mitsopoulou <giota85@gmail.com> Co-authored-by: Francesco Fagnani <fagnani.francesco@gmail.com> (cherry picked from commit 726042c) # Conflicts: # .buildkite/pipelines/pull_request/slo_plugin_e2e.yml # .buildkite/scout_ci_config.yml # .buildkite/scripts/steps/functional/slo_plugin_e2e.sh # x-pack/solutions/observability/packages/kbn-scout-oblt/src/playwright/fixtures/parallel_run_fixtures.ts # x-pack/solutions/observability/packages/kbn-scout-oblt/src/playwright/fixtures/single_thread_fixtures.ts # x-pack/solutions/observability/packages/kbn-scout-oblt/src/playwright/fixtures/types.ts # x-pack/solutions/observability/packages/kbn-scout-oblt/src/playwright/fixtures/worker/index.ts # x-pack/solutions/observability/plugins/slo/e2e/services/slo_data_service.ts # x-pack/solutions/observability/plugins/slo/e2e/tsconfig.json
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.19`: - [[SLO] Migrate synthetics to scout !! (#225035)](#225035) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"shahzad31comp@gmail.com"},"sourceCommit":{"committedDate":"2025-07-14T12:09:21Z","message":"[SLO] Migrate synthetics to scout !! (#225035)\n\n## Summary\n\nMigrate synthetics based SLO plugin tests to scout !!\n\n### How to test locally\n\nIf you want to try it out locally here are the commands:\n\nStart the server\n\n```bash\n// ESS\nnode scripts/scout.js start-server --stateful\n\n// Serverless\nnode scripts/scout.js start-server --serverless=[es|oblt|security]\n```\n\nThen run in another terminal:\n\n```bash\n// ESS\nnpx playwright test --config x-pack/solutions/observability/plugins/slo/test/scout/ui/playwright.config.ts --project=local --grep @ess\n\n// Serverless\nnpx playwright test --config x-pack/solutions/observability/plugins/slo/test/scout/ui/playwright.config.ts --project=local --grep @svlOblt\n```\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Francesco Fagnani <francesco.fagnani@elastic.co>\nCo-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>\nCo-authored-by: Panagiota Mitsopoulou <giota85@gmail.com>\nCo-authored-by: Francesco Fagnani <fagnani.francesco@gmail.com>","sha":"726042c9a91729511bbb4a7866890536f15b4010","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","Team:actionable-obs","author:obs-ux-management","ci:scout-ui-tests","v9.2.0"],"title":"[SLO] Migrate synthetics to scout !!","number":225035,"url":"https://github.com/elastic/kibana/pull/225035","mergeCommit":{"message":"[SLO] Migrate synthetics to scout !! (#225035)\n\n## Summary\n\nMigrate synthetics based SLO plugin tests to scout !!\n\n### How to test locally\n\nIf you want to try it out locally here are the commands:\n\nStart the server\n\n```bash\n// ESS\nnode scripts/scout.js start-server --stateful\n\n// Serverless\nnode scripts/scout.js start-server --serverless=[es|oblt|security]\n```\n\nThen run in another terminal:\n\n```bash\n// ESS\nnpx playwright test --config x-pack/solutions/observability/plugins/slo/test/scout/ui/playwright.config.ts --project=local --grep @ess\n\n// Serverless\nnpx playwright test --config x-pack/solutions/observability/plugins/slo/test/scout/ui/playwright.config.ts --project=local --grep @svlOblt\n```\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Francesco Fagnani <francesco.fagnani@elastic.co>\nCo-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>\nCo-authored-by: Panagiota Mitsopoulou <giota85@gmail.com>\nCo-authored-by: Francesco Fagnani <fagnani.francesco@gmail.com>","sha":"726042c9a91729511bbb4a7866890536f15b4010"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225035","number":225035,"mergeCommit":{"message":"[SLO] Migrate synthetics to scout !! (#225035)\n\n## Summary\n\nMigrate synthetics based SLO plugin tests to scout !!\n\n### How to test locally\n\nIf you want to try it out locally here are the commands:\n\nStart the server\n\n```bash\n// ESS\nnode scripts/scout.js start-server --stateful\n\n// Serverless\nnode scripts/scout.js start-server --serverless=[es|oblt|security]\n```\n\nThen run in another terminal:\n\n```bash\n// ESS\nnpx playwright test --config x-pack/solutions/observability/plugins/slo/test/scout/ui/playwright.config.ts --project=local --grep @ess\n\n// Serverless\nnpx playwright test --config x-pack/solutions/observability/plugins/slo/test/scout/ui/playwright.config.ts --project=local --grep @svlOblt\n```\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Francesco Fagnani <francesco.fagnani@elastic.co>\nCo-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>\nCo-authored-by: Panagiota Mitsopoulou <giota85@gmail.com>\nCo-authored-by: Francesco Fagnani <fagnani.francesco@gmail.com>","sha":"726042c9a91729511bbb4a7866890536f15b4010"}}]}] BACKPORT--> --------- Co-authored-by: Shahzad <shahzad31comp@gmail.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>

Summary
Migrate synthetics based SLO plugin tests to scout !!
How to test locally
If you want to try it out locally here are the commands:
Start the server
Then run in another terminal: