AWS Certified DevOps Engineer – Professional — Question 151

A development team uses AWS CodeCommit, AWS CodePipeline, and AWS CodeBuild to develop and deploy an application. Changes to the code are submitted by pull requests. The development team reviews and merges the pull requests, and then the pipeline builds and tests the application.

Over time, the number of pull requests has increased. The pipeline is frequently blocked because of failing tests. To prevent this blockage, the development team wants to run the unit and integration tests on each pull request before it is merged.

Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

Option B is the correct solution as it allows for the automatic execution of unit and integration tests upon the creation of a pull request, ensuring that only successfully tested code is merged. Option A requires a manual approval process which does not prevent the blockage caused by failing tests. Option C modifies the pipeline behavior but does not run tests before merging, and Option D only sets up notifications without ensuring tests are executed prior to merging the pull request.