Courseiva
Design and implement build and release pipelinesmediumMultiple SelectObjective-mapped

AZ-400 Practice Question: Design and implement build and release pipelines

Which TWO are valid strategies for reducing build times in Azure Pipelines? (Choose two.)

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

Implement caching for package dependencies (e.g., npm, NuGet, Maven) to avoid restoring on every build.

Caching package dependencies (e.g., npm, NuGet, Maven) avoids restoring them on every build, reducing download time. Incremental builds (e.g., using 'dotnet build --no-restore' with appropriate flags or MSBuild's incremental building) skip projects that haven't changed, reducing compilation time. Option A is incorrect because reducing parallel jobs and adding steps increases build time. Option B is incorrect because removing unit tests compromises quality and is not a valid strategy. Option E is incorrect because increasing agents without parallelizing jobs or running all jobs on the same agent does not reduce build time.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Reduce the number of parallel jobs and increase the number of steps in a single job.

    Why it's wrong here

    Reducing the number of parallel jobs and adding more steps to a single job forces previously concurrent work to run sequentially, increasing the critical path of the pipeline. In Azure Pipelines, wall-clock time is minimized by parallelizing across jobs/agents, not by consolidating steps into one job, so this strategy actually lengthens builds.

  • Remove unit tests from the build pipeline and run them only in the release pipeline.

    Why it's wrong here

    Moving unit tests to the release pipeline does shorten the build phase, but it sacrifices early feedback on code correctness and can let regressions slip through until deployment, making them far more expensive to fix. A better practice is to keep fast unit tests in the build and defer only slow integration/UI tests to release.

  • Implement caching for package dependencies (e.g., npm, NuGet, Maven) to avoid restoring on every build.

    Why this is correct

    Caching package dependencies avoids redundant network downloads of unchanged packages across pipeline runs, which is often the biggest time sink in a cold build. Use Azure Pipelines' Cache task or built-in caching (keyed on lockfiles) so restores are near-instant when dependencies haven't changed.

  • Configure incremental builds by enabling 'Build in parallel' and using 'msbuild' or 'dotnet' build with appropriate flags to skip unchanged projects.

    Why this is correct

    Incremental builds leverage MSBuild's up-to-date checks or dotnet build flags to skip recompiling projects whose inputs haven't changed, and the /m switch enables parallel project builds. This reduces build time by only doing work for changed components, rather than rebuilding everything every time.

  • Increase the number of agents in the pool and run all jobs on the same agent.

    Why it's wrong here

    Adding more agents to the pool has no effect if all your work remains on a single agent, because a single job's steps cannot be split across agents. To benefit from a larger pool you must actually distribute jobs or tasks across multiple agents; otherwise the extra capacity sits idle and build time is unchanged.

About these practice questions

This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.