nerdexam
Microsoft

AZ-400 · Question #507

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 increasing code coverage measures how much of the source code is exercised by tests, but it does nothing to address intermittent test failures that are unrelated to source code or environment changes - these are typically "flaky tests" caused by i

Submitted by carter_n· 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 have an Azure pipeline that is used to deploy a web app. The pipeline includes a test suite named TestSuite1. TestSuite1 is used to validate the operations of the web app. TestSuite1 fails intermittently. You identify that the failures are unrelated to changes in the source code and execution environment. You need to minimize troubleshooting effort for the TestSuite1 failures. Solution: You increase code coverage. Does this meet the goal?

Options

  • AYes
  • BNo

How the community answered

(39 responses)
  • A
    31% (12)
  • B
    69% (27)

Explanation

Option B (No) is correct because increasing code coverage measures how much of the source code is exercised by tests, but it does nothing to address intermittent test failures that are unrelated to source code or environment changes - these are typically "flaky tests" caused by issues like timing dependencies, race conditions, or external service instability.

The proper solution to minimize troubleshooting effort for flaky tests is to implement a retry mechanism (automatic test retries), which allows the pipeline to re-run failed tests automatically, reducing manual intervention and noise from non-deterministic failures.

Option A (Yes) is wrong because adding more code coverage would only add more tests to the suite, potentially introducing more flaky tests rather than resolving the intermittent failures already occurring.

Memory Tip: Think of it this way - "flaky tests need a retry, not more coverage." When a test fails randomly and the code/environment isn't the cause, you need resilience (retries), not more measurement (coverage). On the exam, watch for the keyword intermittent - it almost always points toward retry logic as the solution, not coverage, debugging, or refactoring.

Topics

#Azure Pipelines#Test Automation#Flaky Tests#Troubleshooting

Community Discussion

No community discussion yet for this question.

Full AZ-400 Practice