Microsoft DevOps Engineer Expert (AZ-400) · Section 3 · 53% of the exam
Implement tests in a pipeline, including configuring test tasks, configuring test agents, and integration of test results
One of the objectives of the Exam AZ-400: Designing and Implementing Microsoft DevOps Solutions exam, in the section “Design and implement build and release pipelines”. Here is what it covers, the points to remember and a question to try.
What it covers
How to block bad changes with branch policies, environment checks, release gates and security controls, how to layer local, unit, integration and load tests, how to run and publish tests and results in pipelines, and how to measure code coverage.
Points to remember
- Gates sit before merge (branch policies, branch protection), before deploy (checks, approvals, protection rules) and after deploy (monitor alerts).
- YAML approvals and checks belong to the resource and are not editable from the YAML; check order is static, pre-approvals, dynamic, post-approvals, exclusive lock.
- Classic release gates: Invoke Azure Function, Invoke REST API, Query Azure Monitor alerts, Query work items.
- Branch control + Required template + Evaluate artifact are the governance checks; Business Hours limits the deployment window.
- Test pyramid: many unit tests, fewer integration tests, few UI and load tests; shift left and shift right.
Try a question
UI tests that open a visible browser pass on a developer machine but fail on the Ubuntu Microsoft-hosted agent with no display. The team wants to keep using hosted agents. What is the best fix?
- ARun the browser headless, for example with Playwright
- BUse a larger Microsoft-hosted agent size
- CDisable the tests on pull requests permanently
- DRemote desktop into the hosted agent to start the browser
Show the answer
A. UI tests need a display unless the browser runs headless. Hosted Windows agents offer a desktop session, but headless runs are simpler and portable.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Quality gates, testing strategy and code coverage teaches this objective (about 50 minutes), and 26 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.
More in this section
- Recommend package management tools including GitHub Packages and Azure Artifacts
- Design and implement package feeds and views for local and upstream packages
- Design and implement a dependency versioning strategy for code assets and packages, including semantic versioning (SemVer) and date-based (CalVer)
- Design and implement a versioning strategy for pipeline artifacts
- Design and implement quality and release gates, including security and governance
- Design a comprehensive testing strategy, including local tests, unit tests, integration tests, and load tests
- Implement code coverage analysis
- Select a deployment automation solution, including GitHub Actions and Azure Pipelines
- Design and implement a GitHub runner or Azure DevOps agent infrastructure, including cost, tool selection, licenses, connectivity, and maintainability
- Design and implement integration between GitHub repositories and Azure Pipelines
- Develop and implement pipeline trigger rules
- Develop pipelines by using YAML