AZ-400 · Question #610
Hotspot Question You have a project that includes a .NET app and a database backend. You have a pipeline that includes the following YAML code. For each of the following statements, select Yes if the
The correct answer is The Test_Database stage will always run. = No; The Test_DotNet_App and Test_Database stages will run concurrently. = No; The Test_DotNet_App and Test_Database stages will run once the Build_DotNet_App stage has completed successfully. = Yes. In Azure DevOps YAML pipelines, when stages explicitly define 'dependsOn' pointing to a single stage (Build_DotNet_App), both Test_DotNet_App and Test_Database will only execute after Build_DotNet_App completes successfully - this is the default behavior when using 'dependsOn' wi
Question
Exhibits
Answer Area
- The Test_Database stage will always run.No
- The Test_DotNet_App and Test_Database stages will run concurrently.No
- The Test_DotNet_App and Test_Database stages will run once the Build_DotNet_App stage has completed successfully.Yes
Explanation
In Azure DevOps YAML pipelines, when stages explicitly define 'dependsOn' pointing to a single stage (Build_DotNet_App), both Test_DotNet_App and Test_Database will only execute after Build_DotNet_App completes successfully - this is the default behavior when using 'dependsOn' without 'condition' overrides. Because both test stages independently depend on the same build stage (rather than depending on each other), they are eligible to run in parallel, but they are NOT guaranteed to run concurrently unless the pipeline has available agents/jobs to do so. The Test_Database stage will NOT always run because if Build_DotNet_App fails, the dependent stages are skipped by default.
Topics
Community Discussion
No community discussion yet for this question.

