AWS Certified Developer – Associate (DVA-C02) — Question 62

A developer is using AWS Amplify Hosting to build and deploy an application. The developer is receiving an increased number of bug reports from users. The developer wants to add end-to-end testing to the application to eliminate as many bugs as possible before the bugs reach production.
Which solution should the developer implement to meet these requirements?

Answer options

Correct answer: C

Explanation

The correct answer is C because adding a test phase to the amplify.yml build settings allows for automated end-to-end testing during the build process, helping to catch bugs before deployment. Option A is incorrect as the amplify add test command does not exist in the Amplify CLI. Option B focuses on unit tests rather than end-to-end tests, which do not fulfill the requirement. Option D is also incorrect because aws-exports.js is used for configuration and not for defining test phases.