nerdexam
Microsoft

AZ-400 · Question #557

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might h

The correct answer is B. No. Option B (No) is correct because the solution presented in the YAML definition does not fully satisfy all the stated requirements - most commonly, it fails to correctly configure the dependency chain so that Publish_Test_Results runs after all test stages complete while also ensu

Submitted by khalil_dz· Mar 6, 2026Design and implement build and release pipelines

Question

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it As a result these questions will not appear in the review screen. You need to use an Azure Pipelines pipeline to build and test an app and test the database of the app. The solution must meet the following requirements. - The test stages must be run in parallel. - The Publish_Test_Results stage must always be run. - The test stages must be run after successful completion of the build stage. - The Publish_Test_Results stage must be run after completion of all the test stages. Solution: You include the following elements in the YAML definition of the pipeline. Does this meet the goal?

Options

  • AYes
  • BNo

How the community answered

(26 responses)
  • A
    38% (10)
  • B
    62% (16)

Explanation

Option B (No) is correct because the solution presented in the YAML definition does not fully satisfy all the stated requirements - most commonly, it fails to correctly configure the dependency chain so that Publish_Test_Results runs after all test stages complete while also ensuring it always runs (even if test stages fail), typically requiring both dependsOn and condition: always(). Without the proper condition: always() clause on Publish_Test_Results, it would be skipped if any test stage fails, violating the "must always be run" requirement.

Option A (Yes) is wrong because the proposed YAML solution contains a flaw - either missing the condition: always() on Publish_Test_Results, incorrect dependsOn configuration for parallel test stages, or missing pool/jobs structure needed to run stages truly in parallel.

Why the distractor is tempting: The YAML may appear correct at a glance because it includes dependsOn references, making it look like the dependency order is properly defined - but the missing condition: always() is easy to overlook.

Memory Tip: Remember the phrase "Always After All" - for Publish_Test_Results, you need condition: always() (Always run), dependsOn pointing to all test stages (After All), ensuring both the parallel execution and unconditional run requirements are met.

Topics

#Azure Pipelines#YAML pipelines#Stage dependencies#Conditional execution

Community Discussion

No community discussion yet for this question.

Full AZ-400 Practice