Skip to content

Commit b284da5

Browse files
[9.2] [APM] Settings page: Migrate and fix flaky tests (elastic#237172) (elastic#240096)
# Backport This will backport the following commits from `main` to `9.2`: - [[APM] Settings page: Migrate and fix flaky tests (elastic#237172)](elastic#237172) <!--- Backport version: 10.1.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"jennypavlova","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-10-22T13:08:38Z","message":"[APM] Settings page: Migrate and fix flaky tests (elastic#237172)\n\nCloses elastic#237021\nCloses elastic#228236\nCloses elastic#228297\nCloses elastic#228238\nCloses elastic#206016\n\n## Summary\n\nThis PR migrates the APM settings page from Cypress to Playwright. It\naims to improve the structure and complexity by:\n- Keep the tests to a minimum and expand the component tests\n- Moves 'clears filter values when field is selected' e2e test to\n/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/index.test.tsx\n- Advanced configuration e2e test was moved to component test:\nx-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.test.tsx\n- Tries to cover Serverless vs ESS cases and permission-based tests as\ne2e, including the happy path\n\nTo cover the permission testing, I added 2 of the roles as custom roles\nfor APM in Scout - it required a small type change there.\n\n⚠️ As it is not 1 to 1 migration, we would need to review the changes\ncarefully\n\n## Bugs found 🐛 \n\n- elastic#237014 One issue was found\n(by one of the skipped flaky tests - we should include the test once we\nfix the issue! )- I wouldn't call it critical, but it would be nice to\nfix. I hope that migrating those tests is making them more stable, and\nwe will avoid such cases 🤞\n\n## Conclusions\nI asked Cursor about some metrics after the migration (not sure how much\nto trust it, but it felt faster 😅 )\n\n### 🔍 Real-World Impact\nBased on our migration data:\n\n#### Before: Running Cypress settings tests\nEstimated time: ~3-4 minutes for all settings tests\nMemory usage: High (experimental management)\nMaintenance: Complex (Cypress + FTR + Synthtrace)\n\n#### After: Running Scout settings tests \nActual time: 1.5 minutes for all settings tests ✅\nMemory usage: Optimized (native Playwright) ✅\nMaintenance: Simple (Scout + Playwright) ✅\n\n### 📊 Performance Summary\n🎉 Overall Performance Improvement: ~40-50% faster execution\nThe migration from Cypress to Scout for APM settings tests has delivered\nsignificant performance improvements:\n✅ Execution Speed: 40-50% faster (90s vs 150-180s)\n✅ Timeout Efficiency: 83% faster timeout handling (30s vs 180s)\n✅ Memory Usage: Significantly optimized\n✅ Developer Experience: Faster local testing and debugging\n✅ CI Efficiency: Reduced load and better parallelization\n✅ Maintenance: Simpler configuration and setup\n\n## Testing\n- We have instructions in[ the readme file\n](https://github.com/jennypavlova/kibana/blob/237021-apm-settings-page-migrate-and-fix-flaky-tests/x-pack/solutions/observability/plugins/apm/test/scout/README.md)\nhow to run scout\n- The flaky test runner requires a config change ( I am already running\nit but just fyi):\n \n<img width=\"1605\" height=\"278\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/8fd9f28b-1a70-4e28-a834-7e5d70b537e1\"\n/>\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"9007e6e03870a1a47782f6a26b3f149d3999d157","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-infra_services","backport:version","v9.1.0","v9.2.0","v9.1.3","v9.3.0"],"title":"[APM] Settings page: Migrate and fix flaky tests","number":237172,"url":"https://github.com/elastic/kibana/pull/237172","mergeCommit":{"message":"[APM] Settings page: Migrate and fix flaky tests (elastic#237172)\n\nCloses elastic#237021\nCloses elastic#228236\nCloses elastic#228297\nCloses elastic#228238\nCloses elastic#206016\n\n## Summary\n\nThis PR migrates the APM settings page from Cypress to Playwright. It\naims to improve the structure and complexity by:\n- Keep the tests to a minimum and expand the component tests\n- Moves 'clears filter values when field is selected' e2e test to\n/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/index.test.tsx\n- Advanced configuration e2e test was moved to component test:\nx-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.test.tsx\n- Tries to cover Serverless vs ESS cases and permission-based tests as\ne2e, including the happy path\n\nTo cover the permission testing, I added 2 of the roles as custom roles\nfor APM in Scout - it required a small type change there.\n\n⚠️ As it is not 1 to 1 migration, we would need to review the changes\ncarefully\n\n## Bugs found 🐛 \n\n- elastic#237014 One issue was found\n(by one of the skipped flaky tests - we should include the test once we\nfix the issue! )- I wouldn't call it critical, but it would be nice to\nfix. I hope that migrating those tests is making them more stable, and\nwe will avoid such cases 🤞\n\n## Conclusions\nI asked Cursor about some metrics after the migration (not sure how much\nto trust it, but it felt faster 😅 )\n\n### 🔍 Real-World Impact\nBased on our migration data:\n\n#### Before: Running Cypress settings tests\nEstimated time: ~3-4 minutes for all settings tests\nMemory usage: High (experimental management)\nMaintenance: Complex (Cypress + FTR + Synthtrace)\n\n#### After: Running Scout settings tests \nActual time: 1.5 minutes for all settings tests ✅\nMemory usage: Optimized (native Playwright) ✅\nMaintenance: Simple (Scout + Playwright) ✅\n\n### 📊 Performance Summary\n🎉 Overall Performance Improvement: ~40-50% faster execution\nThe migration from Cypress to Scout for APM settings tests has delivered\nsignificant performance improvements:\n✅ Execution Speed: 40-50% faster (90s vs 150-180s)\n✅ Timeout Efficiency: 83% faster timeout handling (30s vs 180s)\n✅ Memory Usage: Significantly optimized\n✅ Developer Experience: Faster local testing and debugging\n✅ CI Efficiency: Reduced load and better parallelization\n✅ Maintenance: Simpler configuration and setup\n\n## Testing\n- We have instructions in[ the readme file\n](https://github.com/jennypavlova/kibana/blob/237021-apm-settings-page-migrate-and-fix-flaky-tests/x-pack/solutions/observability/plugins/apm/test/scout/README.md)\nhow to run scout\n- The flaky test runner requires a config change ( I am already running\nit but just fyi):\n \n<img width=\"1605\" height=\"278\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/8fd9f28b-1a70-4e28-a834-7e5d70b537e1\"\n/>\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"9007e6e03870a1a47782f6a26b3f149d3999d157"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","9.2"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237172","number":237172,"mergeCommit":{"message":"[APM] Settings page: Migrate and fix flaky tests (elastic#237172)\n\nCloses elastic#237021\nCloses elastic#228236\nCloses elastic#228297\nCloses elastic#228238\nCloses elastic#206016\n\n## Summary\n\nThis PR migrates the APM settings page from Cypress to Playwright. It\naims to improve the structure and complexity by:\n- Keep the tests to a minimum and expand the component tests\n- Moves 'clears filter values when field is selected' e2e test to\n/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/index.test.tsx\n- Advanced configuration e2e test was moved to component test:\nx-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.test.tsx\n- Tries to cover Serverless vs ESS cases and permission-based tests as\ne2e, including the happy path\n\nTo cover the permission testing, I added 2 of the roles as custom roles\nfor APM in Scout - it required a small type change there.\n\n⚠️ As it is not 1 to 1 migration, we would need to review the changes\ncarefully\n\n## Bugs found 🐛 \n\n- elastic#237014 One issue was found\n(by one of the skipped flaky tests - we should include the test once we\nfix the issue! )- I wouldn't call it critical, but it would be nice to\nfix. I hope that migrating those tests is making them more stable, and\nwe will avoid such cases 🤞\n\n## Conclusions\nI asked Cursor about some metrics after the migration (not sure how much\nto trust it, but it felt faster 😅 )\n\n### 🔍 Real-World Impact\nBased on our migration data:\n\n#### Before: Running Cypress settings tests\nEstimated time: ~3-4 minutes for all settings tests\nMemory usage: High (experimental management)\nMaintenance: Complex (Cypress + FTR + Synthtrace)\n\n#### After: Running Scout settings tests \nActual time: 1.5 minutes for all settings tests ✅\nMemory usage: Optimized (native Playwright) ✅\nMaintenance: Simple (Scout + Playwright) ✅\n\n### 📊 Performance Summary\n🎉 Overall Performance Improvement: ~40-50% faster execution\nThe migration from Cypress to Scout for APM settings tests has delivered\nsignificant performance improvements:\n✅ Execution Speed: 40-50% faster (90s vs 150-180s)\n✅ Timeout Efficiency: 83% faster timeout handling (30s vs 180s)\n✅ Memory Usage: Significantly optimized\n✅ Developer Experience: Faster local testing and debugging\n✅ CI Efficiency: Reduced load and better parallelization\n✅ Maintenance: Simpler configuration and setup\n\n## Testing\n- We have instructions in[ the readme file\n](https://github.com/jennypavlova/kibana/blob/237021-apm-settings-page-migrate-and-fix-flaky-tests/x-pack/solutions/observability/plugins/apm/test/scout/README.md)\nhow to run scout\n- The flaky test runner requires a config change ( I am already running\nit but just fyi):\n \n<img width=\"1605\" height=\"278\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/8fd9f28b-1a70-4e28-a834-7e5d70b537e1\"\n/>\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"9007e6e03870a1a47782f6a26b3f149d3999d157"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <[email protected]>
1 parent d7412c9 commit b284da5

File tree

30 files changed

+2043
-1094
lines changed

30 files changed

+2043
-1094
lines changed

x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/e2e/settings/agent_configurations.cy.ts

Lines changed: 0 additions & 482 deletions
This file was deleted.

x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/e2e/settings/agent_explorer.cy.ts

Lines changed: 0 additions & 97 deletions
This file was deleted.

x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/e2e/settings/agent_keys.cy.ts

Lines changed: 0 additions & 102 deletions
This file was deleted.

x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/e2e/settings/anomaly_detection.cy.ts

Lines changed: 0 additions & 150 deletions
This file was deleted.

0 commit comments

Comments
 (0)