AWS Certified Developer – Associate — Question 138

A team of developers is using an AWS CodePipeline pipeline as a continuous integration and continuous delivery (CI/CD) mechanism for a web application. A developer has written unit tests to programmatically test the functionality of the application code. The unit tests produce a test report that shows the results of each individual check. The developer now wants to run these tests automatically during the CI/CD process.

Which solution will meet this requirement with the LEAST operational effort?

Answer options

Correct answer: C

Explanation

Option C is correct because adding the test stage before the deployment ensures that the tests are run prior to any code being deployed, preventing issues in the production environment. Option A requires manual installation of hooks by each developer, which adds operational overhead. Option B runs tests after deployment, which is not ideal for catching issues early. Option D introduces Jenkins, which adds unnecessary complexity compared to using AWS CodeBuild directly in the pipeline.