DVA-C02 Question 257
Select 3You are developing a CI/CD pipeline for your application using AWS CodePipeline. As part of your deployment process, you want to automate testing to ensure that the application behaves as expected after deployment. Which combination of steps will help you achieve this?
- A
Set up a testing stage in CodePipeline that uses AWS CodeBuild to execute integration tests after deployment.
- B
Add a manual approval stage in CodePipeline to verify deployment success before running tests.
- C
Use AWS Lambda in a testing stage to trigger automated end-to-end tests after deployment.
- D
Configure Amazon CloudWatch Events to monitor test results and notify the team in case of failures.
- E
Enable AWS CodeDeploy's built-in deployment validation hooks to run automated tests during deployment.
Show answer and explanation
Correct answers: A, C, E
Explanation
To automate deployment testing in a CI/CD pipeline, you can use AWS CodeBuild for integration tests, AWS Lambda for end-to-end test execution, and AWS CodeDeploy's validation hooks for deployment-time testing. These tools allow you to efficiently automate different levels of testing without human intervention, ensuring your application behaves as expected after deployment.
- A. Correct.
Correct: AWS CodeBuild can be used to run integration tests in a dedicated testing stage within CodePipeline to automate deployment testing.
- B. Incorrect.
Incorrect: While manual approval is useful for human validation, it does not align with the goal of automating deployment testing.
- C. Correct.
Correct: AWS Lambda can be leveraged to trigger and execute automated end-to-end tests after deployment in a testing stage.
- D. Incorrect.
Incorrect: While Amazon CloudWatch Events can be used for monitoring and notifications, it does not directly automate deployment testing.
- E. Correct.
Correct: AWS CodeDeploy's validation hooks allow you to run automated tests during the deployment process, ensuring the application behaves as expected.