Search Tutorials


AZ-400 - Deployments, Packages and Test Plans | JavaInUse

AZ-400 - Deployments, Packages and Test Plans

1. Deployment Strategies

Choosing the right deployment strategy is critical for minimizing downtime and risk. The AZ-400 exam covers several deployment patterns, each with distinct advantages and trade-offs.

Blue-Green Deployment

Blue-Green Pattern

Blue-green deployment maintains two identical production environments: Blue (current live) and Green (new version). Traffic is routed entirely to one environment at a time. After deploying and validating the new version on Green, traffic is switched from Blue to Green. If issues occur, traffic can be instantly switched back to Blue (rollback). This approach provides zero-downtime deployment with instant rollback capability.

Canary Deployment

Canary Pattern

Canary deployment gradually shifts a small percentage of traffic (e.g., 5%) to the new version while the majority continues using the current version. If metrics (error rate, latency, user feedback) are healthy, traffic is incrementally increased (10%, 25%, 50%, 100%). If problems are detected, traffic is routed back to the stable version. This reduces blast radius and catches issues before full rollout.

Rolling Deployment

Rolling Pattern

Rolling deployment updates instances in batches. For example, with 10 servers, update 2 at a time while the remaining 8 continue serving traffic. Each batch is validated before proceeding. This uses fewer resources than blue-green (no duplicate environment) but has a longer deployment window and mixed-version period. Azure Load Balancer health probes remove instances from rotation during updates.

Azure App Service Deployment Slots

Deployment Slots

Azure App Service deployment slots enable blue-green deployments natively. The production slot receives live traffic. A staging slot hosts the new version. After validation, the swap operation exchanges the routing between slots. Slot settings (connection strings, app settings) can be configured as slot-sticky so they remain with the slot rather than swapping. Auto-swap can be configured to automatically swap after deployment to a slot succeeds.

Azure Traffic Manager

Traffic Manager for Deployments

Azure Traffic Manager is a DNS-based traffic load balancer that distributes traffic across global endpoints. For deployments, the Weighted routing method enables canary patterns by assigning different traffic weights to endpoints (e.g., 95% to current, 5% to new). The Priority routing method supports failover scenarios. Traffic Manager works at the DNS level, so it does not see or modify HTTP requests.

2. Package Management

Azure Artifacts

Azure Artifacts Overview

Azure Artifacts is a package management service in Azure DevOps that supports NuGet (.NET), npm (JavaScript), Maven/Gradle (Java), pip/twine (Python), and Universal Packages (any file type). Artifacts hosts both private packages created by your team and cached copies of public packages (upstream sources).

Feeds and Views

A feed is a container for packages. Feeds can be organization-scoped or project-scoped. Views provide different perspectives on packages in a feed: @local (all published packages), @prerelease (pre-release versions), and @release (promoted stable versions). Upstream sources enable a feed to proxy packages from public registries (NuGet.org, npmjs.com, Maven Central), creating a single source for all packages.

Package Versioning

Follow Semantic Versioning (SemVer): MAJOR.MINOR.PATCH. MAJOR for breaking changes, MINOR for backward-compatible features, PATCH for backward-compatible fixes. Use pre-release labels (e.g., 1.0.0-beta.1) for testing versions. Azure Artifacts supports retention policies to automatically clean up old package versions.

3. Automated Testing

Selenium for UI Testing

Selenium Integration

Selenium is a browser automation framework for UI/functional testing. In Azure Pipelines, Selenium tests can run on: Microsoft-hosted agents (using headless Chrome/Firefox), Self-hosted agents with browser installations, or Selenium Grid for parallel execution across multiple browsers. Test results are published as pipeline test results. Selenium supports multiple languages including C#, Java, Python, and JavaScript.

Azure Test Plans

Test Plans Overview

Azure Test Plans provides three types of testing: Manual testing (exploratory and scripted test cases), Automated testing (associated with automated test methods), and User acceptance testing (stakeholder-driven validation). Test Plans includes: test suites (static, requirement-based, query-based), test configurations (OS/browser combinations), shared parameters for data-driven tests, and test result tracking with charts.

Exploratory Testing

The Test & Feedback browser extension enables exploratory testing sessions. Testers can capture screenshots, record screen, annotate findings, create bugs directly linked to test sessions, and attach session timelines. Exploratory testing helps find issues that scripted tests may miss and is valuable during early development cycles.

Exam Tip: Understand blue-green vs canary vs rolling deployment patterns and when to use each. Know how App Service deployment slots work (including slot-sticky settings and auto-swap). Understand Azure Artifacts feed concepts (views, upstream sources, retention). Know the difference between manual testing, automated testing, and exploratory testing in Azure Test Plans.

← Back to AZ-400 Preparation Topics


Popular Posts