nerdexam
Microsoft

AZ-400 · Question #559

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 A. Yes. Option A (Yes) is correct because the YAML definition includes the necessary configuration to satisfy all stated requirements: parallel test stages using dependsOn pointing to the build stage (causing them to run simultaneously after build completes), and the Publish_Test_Results

Submitted by cyberguy42· 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

(31 responses)
  • A
    84% (26)
  • B
    16% (5)

Explanation

Option A (Yes) is correct because the YAML definition includes the necessary configuration to satisfy all stated requirements: parallel test stages using dependsOn pointing to the build stage (causing them to run simultaneously after build completes), and the Publish_Test_Results stage configured with dependsOn referencing both test stages plus condition: always() to ensure it always runs regardless of test outcomes.

There are no distractors here since this is a Yes/No question, but "No" would be incorrect because the YAML structure properly implements all four requirements - parallel execution, always-run publishing, post-build test execution, and post-test publishing - without any configuration gaps or contradictions.

Memory Tip: Remember the three key YAML ingredients for this pattern: (1) use dependsOn: [BuildStage] on both test stages to make them run in parallel after the build, (2) use dependsOn: [TestStage1, TestStage2] on the publish stage to wait for all tests, and (3) add condition: always() to the publish stage to ensure it runs even if tests fail - think "Depend, Wait, Always."

Topics

#Azure Pipelines#YAML Pipelines#Stage Dependencies#Conditional Execution

Community Discussion

No community discussion yet for this question.

Full AZ-400 Practice