All Azure scenarios

Azure Scenario

Event-Driven Nightly Automation

Logic Apps schedules nightly run; Service Bus dispatches to KEDA-scaled Container Apps workers; results to Cosmos + Blob.

Architecture

Logic App (cron 02:00)
   └─► enqueue per-shard jobs → Service Bus queue
            └─► KEDA scales Container Apps workers
                    ├─► run Playwright / Newman shard
                    ├─► write JUnit → Blob
                    └─► write run record → Cosmos
Blob upload event → Event Grid → Function (aggregate HTML + Teams notify)

Services used

Steps

  1. 1. Schedule

    Logic App recurrence fans out one Service Bus message per test shard with the run correlation id.

  2. 2. Scale

    KEDA scaler reads queue length; Container Apps workers scale from 0 to N within a minute.

  3. 3. Run

    Each worker executes its Playwright or Newman shard, uploads JUnit + trace + video to Blob, writes summary to Cosmos.

  4. 4. Aggregate

    Event Grid triggers a Function on the last blob; merges shards, computes duration deltas, generates a dashboard URL.

  5. 5. Notify

    Function posts an adaptive card to Microsoft Teams.

Takeaways

  • Zero idle cost — workers scale to zero between runs.
  • Cosmos powers fast historical dashboards for flakiness and duration trends.