Skip to content

[Synthetics] Migrate monitor create/edit API tests to Scout (batch 1)#272008

Draft
shahzad31 wants to merge 2 commits into
elastic:mainfrom
shahzad31:scout/migrate-synthetics-api-batch1
Draft

[Synthetics] Migrate monitor create/edit API tests to Scout (batch 1)#272008
shahzad31 wants to merge 2 commits into
elastic:mainfrom
shahzad31:scout/migrate-synthetics-api-batch1

Conversation

@shahzad31
Copy link
Copy Markdown
Contributor

Summary

Part of #263519 (Actionable Observability FTR → Scout migration). This is batch 1 of the synthetics deployment-agnostic API suite migration: monitor create/edit tests.

Migrated FTR suites → Scout API specs (x-pack/solutions/observability/plugins/synthetics/test/scout/api/tests/):

FTR file (removed) Scout spec Tests
create_monitor.ts (suite) create_monitor.spec.ts 2
create_monitor_public_api.ts create_monitor_public_api.spec.ts 9
create_monitor_public_api_private_location.ts create_monitor_public_api_private_location.spec.ts 14
edit_monitor_public_api.ts edit_monitor_public_api.spec.ts 5
edit_monitor_public_api_private_location.ts edit_monitor_public_api_private_location.spec.ts 13

Notes

  • Shared helpers added to the Scout api fixtures: omitMonitorKeys/keyToOmitList (reusing the plugin's transformPublicKeys/removeMonitorEmptyValues), parseMonitorResponse, an editMonitor PUT helper, LOCAL_PUBLIC_LOCATION, SYNTHETICS_MONITOR_SO_TYPES, and a typed http_monitor fixture.
  • Per-spec cleanup wipes only the monitor SO types (not the Fleet package / private locations), reusing the worker-shared private location — matching the existing get_filters Scout spec and the FTR suite's flake-avoidance design.
  • FTR create_monitor.ts is retained as a helpers-only module because addMonitorAPIHelper/omitMonitorKeys are still imported by unmigrated FTR suites (enable_default_alerting, get_monitor, sync_global_params, create_monitor_private_location, edit_private_location, get_private_location_monitors). Migrated loadTestFile entries are replaced with migrated to Scout pointers.
  • Deployment tags: @local-stateful-classic + @local-serverless-observability_complete (preserving the FTR skipCloud/skipMKI intent), consistent with the already-migrated get_filters/synthetics_enablement specs.

Test plan

  • node scripts/type_check --project x-pack/solutions/observability/plugins/synthetics/tsconfig.json
  • ESLint clean (Scout specs + modified FTR files)
  • Stateful local run green — 43/43 tests across all 5 specs (scout.js start-server --arch stateful --domain classic + playwright test --project=local)
  • Serverless (observability_complete) local run — pending (blocked locally by a port conflict from leftover containers; logic is not deployment-specific)

Made with Cursor

Migrates the synthetics monitor create/edit API integration tests from the
deployment-agnostic FTR suite to Scout API tests (part of elastic#263519):

- create_monitor (UI create + space namespace)
- create_monitor_public_api / _private_location
- edit_monitor_public_api / _private_location

Shared helpers (omitMonitorKeys, parseMonitorResponse, editMonitor,
LOCAL_PUBLIC_LOCATION, http_monitor fixture) are added to the Scout api
fixtures. The FTR create_monitor.ts is retained as a helpers-only module
because addMonitorAPIHelper/omitMonitorKeys are still used by unmigrated
FTR suites; the migrated loadTestFile entries are replaced with
"migrated to Scout" pointers.

Co-authored-by: Cursor <cursoragent@cursor.com>
@shahzad31 shahzad31 added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. labels May 29, 2026
@github-actions github-actions Bot added the author:actionable-obs PRs authored by the actionable obs team label May 29, 2026
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

infra-vault-gh-plugin-prod Bot commented May 29, 2026

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!
  • Click to trigger kibana-entity-store-performance-from-pr for this PR!
  • Click to trigger kibana-storybooks-from-pr for this PR!

@kibanamachine
Copy link
Copy Markdown
Contributor

kibanamachine commented May 29, 2026

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - Browser - base browser monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - Browser - base browser monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - Browser - base browser monitor with inline_script
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - Browser - base browser monitor with inline_script
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - Browser - returns error for empty browser monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - Browser - returns error for empty browser monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - HTTP - base http monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - HTTP - base http monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - HTTP - can disable retries
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - HTTP - can disable retries
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - HTTP - can enable retries
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - HTTP - can enable retries
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - HTTP - returns error for empty monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - HTTP - returns error for empty monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - ICMP - base icmp monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - ICMP - base icmp monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - TCP - base tcp monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - AddNewMonitorsPublicAPI - Public locations - TCP - base tcp monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - EditMonitorsPublicAPI - Public location - adds test monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - EditMonitorsPublicAPI - Public location - adds test monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - EditMonitorsPublicAPI - Public location - can add a second public location to existing monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - EditMonitorsPublicAPI - Public location - can add a second public location to existing monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - EditMonitorsPublicAPI - Public location - can change name of monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - EditMonitorsPublicAPI - Public location - can change name of monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - EditMonitorsPublicAPI - Public location - can remove public location from existing monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - EditMonitorsPublicAPI - Public location - can remove public location from existing monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - EditMonitorsPublicAPI - Public location - prevents duplicate name of monitor
  • [job] [logs] Scout Lane #2 - serverless-observability_complete / default / local-serverless-observability_complete - EditMonitorsPublicAPI - Public location - prevents duplicate name of monitor

Metrics [docs]

✅ unchanged

History

The serverless observability_complete Scout config only set
xpack.uptime.service.manifestUrl, so no Elastic-managed `dev` location
was created (getServiceLocations requires service.devUrl). The migrated
monitor create/edit public-API specs failed on serverless with
"Elastic managed Location(s) 'dev' not found".

Add devUrl/username/password to match the stateful Scout base config and
the FTR deployment-agnostic serverless base config.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author:actionable-obs PRs authored by the actionable obs team backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants