AZ-400 Practice Question: Design and implement build and release pipelines
A team is implementing a release pipeline for a Node.js application. They want to run integration tests against a temporary environment that is destroyed after the tests complete. Which strategy should they use?
⚠ Common exam trap
It's easy for candidates to confuse staging slots with ephemeral environments, but staging slots are persistent and not automatically destroyed after testing, whereas a new App Service instance can be fully removed to ensure cost and isolation compliance.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use a release pipeline that deploys to a new Azure App Service instance, runs tests, and then removes the instance.
It provisions a dedicated, isolated Azure App Service instance for integration testing, runs the tests against the real environment, and then destroys the instance to avoid ongoing costs. This aligns with the ephemeral environment pattern, ensuring tests validate actual deployment behavior without contaminating shared resources.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use a separate release pipeline that deploys to a production environment for testing.
Why it's wrong here
Using a separate release pipeline that deploys to a production environment for testing is risky because it exposes users to unvalidated changes, can degrade production availability, and violates the principle of not testing in a live environment unless using advanced techniques like canary releases, which are not described here.
- ✗
Use a single release pipeline that deploys to a staging slot and runs tests on the slot.
Why it's wrong here
A single release pipeline that deploys to a staging slot and runs tests on the slot is insufficient because the slot is not destroyed after the tests, leaving behind a persistent environment that can cause configuration drift, incur ongoing costs, and interfere with future slot swaps or deployments.
- ✗
Run integration tests in the build pipeline using a mock environment.
Why it's wrong here
Running integration tests in the build pipeline using a mock environment is inadequate because mocks do not accurately replicate the real dependencies, configuration, or behavior of production services, so tests can pass while actual integration issues, such as connection failures or version mismatches, remain undetected.
- ✓
Use a release pipeline that deploys to a new Azure App Service instance, runs tests, and then removes the instance.
Why this is correct
Using a release pipeline that deploys to a new Azure App Service instance, runs tests, and then removes the instance is correct because it provides an ephemeral, isolated environment that closely mirrors production, enabling realistic integration validation and automatic teardown, which avoids lingering state and reduces cost.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Environment
An environment is a dedicated set of computing resources, configurations, and services used to develop, test, or host software applications in a controlled and repeatable way.
Key term
Release pipeline
A Release pipeline is an automated sequence of steps that takes software from code commit to production deployment, ensuring quality and consistency.
About these practice questions
Courseiva writes every AZ-400 question from scratch — 823 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.