The latest Microsoft AZ-400 Designing and Implementing Microsoft DevOps Solutions certification actual real practice exam question and answer (Q&A) dumps are available free, which are helpful for you to pass the Microsoft AZ-400 Designing and Implementing Microsoft DevOps Solutions exam and earn Microsoft AZ-400 Designing and Implementing Microsoft DevOps Solutions certification.
Exam Question 11
You have a branch policy in a project in Azure DevOps. The policy requires that code always builds successfully.
You need to ensure that a specific user can always merge changes to the master branch, even if the code fails to compile. The solution must use the principle of least privilege.
What should you do?
A. Add the user to the Build Administrators group.
B. Add the user to the Project Administrators group.
C. From the Security settings of the repository, modify the access control for the user.
D. From the Security settings of the branch, modify the access control for the user.
Correct Answer:
D. From the Security settings of the branch, modify the access control for the user.
Answer Description:
In some cases, you need to bypass policy requirements so you can push changes to the branch directly or complete a pull request even if branch policies are not satisfieFor these situations, grant the desired permission from the previous list to a user or group. You can scope this permission to an entire project, a repo, or a single branch. Manage this permission along the with other Git permissions.
References:
Microsoft Docs > Improve code quality with branch policies
Exam Question 12
Your company uses a Git repository in Azure Repos to manage the source code of a web application. The master branch is protected from direct updates.
Developers work on new features in the topic branches.
Because of the high volume of requested features, it is difficult to follow the history of the changes to the master branch.
You need to enforce a pull request merge strategy. The strategy must meet the following requirements:
Consolidate commit histories.
Merge the changes into a single commit.
Which merge strategy should you use in the branch policy?
A. squash merge
B. fast-forward merge
C. Git fetch
D. no-fast-forward merge
Correct Answer:
A. squash merge
Answer Description:
Squash merging is a merge option that allows you to condense the Git history of topic branches when you complete a pull request. Instead of each commit on the topic branch being added to the history of the default branch, a squash merge takes all the file changes and adds them to a single new commit on the default branch.
A simple way to think about this is that squash merge gives you just the file changes, and a regular merge gives you the file changes and the commit history.
Note: Squash merging keeps your default branch histories clean and easy to follow without demanding any workflow changes on your team. Contributors to the topic branch work how they want in the topic branch, and the default branches keep a linear history through the use of squash merges. The commit history of a master branch updated with squash merges will have one commit for each merged branch. You can step through this history commit by commit to find out exactly when work was done.
References:
Microsoft Docs > Squash merge pull requests
Exam Question 13
Your company uses cloud-hosted Jenkins for builds.
You need to ensure that Jenkins can retrieve source code from Azure Repos.
Which three actions should you perform? Each correct answer presents part of the solution.
A. Create a webhook in Jenkins.
B. Add the Team Foundation Server (TFS) plug-in to Jenkins.
C. Add a domain to your Jenkins account.
D. Create a personal access token in your Azure DevOps account.
E. Create a service hook in Azure DevOps.
Correct Answer:
B. Add the Team Foundation Server (TFS) plug-in to Jenkins.
D. Create a personal access token in your Azure DevOps account.
E. Create a service hook in Azure DevOps.
Answer Description:
Jenkins’ built-in Git Plugin or Team Foundation Server Plugin can poll a Team Services repository every few minutes and queue a job when changes are detected.
Use Azure DevOps/ Visual Studio Team Services to create an access token。
For those who need tighter integration, Team Services provides two additional ways to achieve it: 1) the Jenkins Service Hook, and 2) Jenkins build and release tasks.
References:
Microsoft Azure DevOps > Visual Studio Team Services Integration with Jenkins
How to setup automated builds using Jenkins and Visual Studio Team Foundation Server
Exam Question 14
You have an Azure Resource Manager template that deploys a multi-tier application.
You need to prevent the user who performs the deployment from viewing the account credentials and connection strings used by the application.
What should you use?
A. Azure Key Vault
B. a Web.config file
C. an Appsettings.json file
D. an Azure Storage table
E. an Azure Resource Manager parameter file
Correct Answer:
A. Azure Key Vault
Answer Description:
When you need to pass a secure value (like a password) as a parameter during deployment, you can retrieve the value from an Azure Key Vault. You retrieve the value by referencing the key vault and secret in your parameter file. The value is never exposed because you only reference its key vault IThe key vault can exist in a different subscription than the resource group you are deploying to.
References:
Microsoft Docs > Use Azure Key Vault to pass secure parameter value during deployment
Exam Question 15
You integrate a cloud-hosted Jenkins server and a new Azure DevOps deployment.
You need Azure DevOps to send a notification to Jenkins when a developer commits changes to a branch in Azure Repos.
Solution: You create an email subscription to an Azure DevOps notification.
Does this meet the goal?
A. Yes
B. No
Correct Answer:
B. No
Answer Description:
You can create a service hook for Azure DevOps Services and TFS with Jenkins.
References:
Microsoft Docs > Create a service hook for Azure DevOps Services and TFS with Jenkin
Exam Question 16
You integrate a cloud-hosted Jenkins server and a new Azure DevOps deployment.
You need Azure DevOps to send a notification to Jenkins when a developer commits changes to a branch in Azure Repos.
Solution: You create a service hook subscription that uses the code pushed event.
Does this meet the goal?
A. Yes
B. No
Correct Answer:
A. Yes
Answer Description:
You can create a service hook for Azure DevOps Services and TFS with Jenkins.
References:
Microsoft Docs > Create a service hook for Azure DevOps Services and TFS with Jenkin
Exam Question 17
You integrate a cloud-hosted Jenkins server and a new Azure DevOps deployment.
You need Azure DevOps to send a notification to Jenkins when a developer commits changes to a branch in Azure Repos.
Solution: You add a trigger to the build pipeline.
Does this meet the goal?
A. Yes
B. No
Correct Answer:
B. No
Answer Description:
You can create a service hook for Azure DevOps Services and TFS with Jenkins.
References:
Microsoft Docs > Create a service hook for Azure DevOps Services and TFS with Jenkin
Exam Question 18
You are automating the build process for a Java-based application by using Azure DevOps.
You need to add code coverage testing and publish the outcomes to the pipeline.
What should you use?
A. Cobertura
B. Bullseye Coverage
C. MSTest
D. Coverlet
E. NUnit
F. Coverage.py
Correct Answer:
A. Cobertura
Answer Description:
Use Publish Code Coverage Results task in a build pipeline to publish code coverage results to Azure Pipelines or TFS, which were produced by a build in Cobertura or JaCoCo format.
References:
Microsoft Docs > Publish Code Coverage Results task
Exam Question 19
Your company uses Azure DevOps.
Only users who have accounts in Azure Active Directory can access the Azure DevOps environment.
You need to ensure that only devices that are connected to the on-premises network can access the Azure DevOps environment.
What should you do?
A. Assign the Stakeholder access level all users.
B. In Azure Active Directory, configure risky sign-ins.
C. In Azure DevOps, configure Security in Project Settings.
D. In Azure Active Directory, configure conditional access.
Correct Answer:
D. In Azure Active Directory, configure conditional access.
Answer Description:
Conditional Access is a capability of Azure Active Directory. With Conditional Access, you can implement automated access control decisions for accessing your cloud apps that are based on conditions.
Conditional Access policies are enforced after the first-factor authentication has been completed.
References:
Microsoft Docs > What is Conditional Access?
Exam Question 20
You are automating the testing process for your company.
You need to automate UI testing of a web application.
Which framework should you use?
A. JaCoco
B. Selenium
C. Xamarin.UITest
D. Microsoft.CodeAnalysis
Correct Answer:
B. Selenium
Answer Description:
Performing user interface (UI) testing as part of the release pipeline is a great way of detecting unexpected changes, and need not be difficult. Selenium can be used to test your website during a continuous deployment release and test automation.
References:
Microsoft Docs > UI test with Selenium