nerdexam
Microsoft

AZ-400 · Question #572

You use an Azure Pipelines pipeline to build and test an app named App1. Your company's development department works in the feature branches. You need to ensure that a pull request will merge into the

The correct answer is B. Configure a branch policy for the main branch.. https://learn.microsoft.com/en-us/azure/devops/pipelines/test/codecoverage-for- pullrequests?view=azure-devops#protect-a-branch-using-a-code-coverage-policy

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

Question

You use an Azure Pipelines pipeline to build and test an app named App1. Your company's development department works in the feature branches. You need to ensure that a pull request will merge into the main branch only when testing covers more than 90 percent of the code. What should you do?

Options

  • AConfigure a branch policy for the feature branches.
  • BConfigure a branch policy for the main branch.
  • CCreate a Publish Test Results task,
  • DCreate a code coverage configuration YAML file.

How the community answered

(50 responses)
  • A
    6% (3)
  • B
    78% (39)
  • C
    2% (1)
  • D
    14% (7)

Explanation

https://learn.microsoft.com/en-us/azure/devops/pipelines/test/codecoverage-for- pullrequests?view=azure-devops#protect-a-branch-using-a-code-coverage-policy

Topics

#branch policy#code coverage threshold#pull request gate#main branch protection

Community Discussion

No community discussion yet for this question.

Full AZ-400 Practice