AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 22

A development team uses AWS CodeCommit for version control for applications. The development team uses AWS CodePipeline, AWS CodeBuild. and AWS CodeDeploy for CI/CD infrastructure. In CodeCommit, the development team recently merged pull requests that did not pass long-running tests in the code base. The development team needed to perform rollbacks to branches in the codebase, resulting in lost time and wasted effort.
A DevOps engineer must automate testing of pull requests in CodeCommit to ensure that reviewers more easily see the results of automated tests as part of the pull request review.
What should the DevOps engineer do to meet this requirement?

Answer options

Correct answer: C

Explanation

Option C is correct because it ensures that tests are run whenever a pull request is created or updated, providing timely feedback to reviewers. Options A and D focus on the wrong event triggers and do not cover the necessary updates to the pull request. Option B, while close, does not include the additional trigger for updates to the source branch, which is critical for complete test coverage.