All GCP scenarios

GCP Scenario

Serverless Nightly Regression with Workflows

Cloud Scheduler kicks a Workflow that seeds data, runs API + UI automation in parallel Cloud Run Jobs, aggregates to BigQuery.

Architecture

Cloud Scheduler (0 2 * * *) ─► Workflows
   ├─► Cloud Function: seed Firestore fixtures
   ├─► Parallel
   │     ├─► Cloud Run Job: Newman (API tests)
   │     └─► Cloud Run Job: Playwright (UI tests, sharded)
   ├─► Cloud Function: merge JUnit → HTML + trend deltas
   ├─► GCS: upload report
   ├─► BigQuery: stream per-test metrics
   └─► Pub/Sub: emit qa.run.completed

Services used

Steps

  1. 1. Schedule

    Cloud Scheduler fires HTTP target on the Workflow with the run correlation id.

  2. 2. Seed

    Function clears + seeds Firestore collections used by tests.

  3. 3. Parallel automation

    Workflows runs Cloud Run Jobs concurrently — Newman for APIs, sharded Playwright for UI.

  4. 4. Aggregate + trend

    Function merges JUnit, computes duration deltas vs last 7 nights, builds HTML, uploads to GCS.

  5. 5. Metrics

    Per-test rows streamed into BigQuery for flakiness + duration analytics.

  6. 6. Notify

    Pub/Sub fans out to Slack + dashboards.

Takeaways

  • Zero idle infrastructure — pay only per nightly run.
  • BigQuery is the source of truth for QA telemetry and flaky-test detection.