All Azure scenarios

Azure Scenario

Kubernetes Test Runner on AKS with Results in Azure SQL

AKS runs Playwright/JMeter Jobs scaled by KEDA from Service Bus; artifacts persist to Blob Storage while structured results land in Azure SQL Database for Power BI dashboards.

Architecture

Azure DevOps / Logic App ─► Service Bus queue: test-jobs
                                          │
                          KEDA on AKS (azure-servicebus scaler)
                                          │
                          K8s Job per message (Playwright / JMeter pod)
                          ├─ Workload Identity → Key Vault (SQL creds)
                          ├─ runs suite → /artifacts
                          └─ sidecar reporter
                                 ├─► Blob Storage (junit.xml, trace.zip, video)
                                 └─► Azure SQL Database
                                        ├─ TestRuns / TestCases / Artifacts
                          Azure Monitor + Container Insights
                          App Insights end-to-end correlation (traceparent)
                          Power BI ─► live dashboards from Azure SQL

Services used

Steps

  1. 1. Build + push runners

    Azure Pipelines builds Playwright/JMeter images and pushes to ACR with Microsoft Defender scanning. AKS pulls via Managed Identity — no image-pull secrets.

  2. 2. Provision DB

    Azure SQL Database with private endpoint; DACPAC deploys `TestRuns`, `TestCases`, `Artifacts` tables. Unique constraint on `(RunId, CaseName)` makes inserts idempotent.

  3. 3. Enqueue jobs

    Pipeline (or Logic App on a cron) sends one Service Bus message per shard: `{ runId, suite, shard, commit, targetUrl }`. Message TTL guards stuck work.

  4. 4. Scale on AKS

    KEDA `ScaledJob` with `azure-servicebus` trigger spawns one Kubernetes Job per message; Workload Identity Federation lets the pod read SQL credentials from Key Vault without a stored secret.

  5. 5. Run + persist

    Main container executes the suite; reporter sidecar streams JUnit/HAR/video to Blob (`qa-artifacts/{runId}/...`) and inserts case rows into Azure SQL via AAD token auth. Tests set `traceparent` so failures correlate with backend spans in App Insights.

  6. 6. Observe

    Container Insights tracks pod CPU/memory, restarts and OOMKills; Azure Monitor alert fires when Service Bus active-message count grows or Job failure rate breaches the SLO.

  7. 7. Report

    Power BI / Azure Data Studio connects directly to Azure SQL for live pass-rate, flake leaderboard and p95-duration dashboards; nightly pipeline archives older runs to Blob Parquet for cheap long-term storage.

Takeaways

  • AKS + KEDA scales the test fleet from zero on every commit, then back to zero.
  • Workload Identity + Key Vault removes long-lived DB credentials from pods.
  • Splitting bulky artifacts (Blob) from structured results (Azure SQL) keeps queries fast and storage cheap.
  • traceparent propagation makes every failed test clickable straight to the offending backend span.