Automated Code Testing with AWS: Best Practices

Automated Code Testing with AWS

Prev Question Next Question

Question

You need to use AWS resources to automatically test the new code when there are new commits in the version control system.

When the testing is finished, the test result should be sent to the development team through email.

Which of the following actions is suitable?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - B.

Option A is incorrect because AWS Config is a service to discover the configuration changes of AWS resources and should not be used in this scenario.

Option B is CORRECT because the EC2 instance can configure CloudFormation stacks for the testing as soon as it detects a new feature from the version control system.

The test result can be sent through the SNS subscription.

Options C and D are incorrect because Amazon Kinesis is not suitable to send the email notifications.

Instead, SNS should be used.

The appropriate action to use AWS resources to automatically test new code when there are new commits in the version control system and send the test results to the development team through email is option D: Use AWS CloudFormation to launch an Amazon EC2 instance to run any testing harnesses to verify application functionality and then use Amazon Kinesis to notify the development team of the results.

Here's a more detailed explanation of why option D is the most suitable approach:

Option A suggests launching an Amazon EC2 instance in response to a development request, which may not be an efficient way to automate testing when new commits are made. Additionally, using AWS Config to understand configuration changes related to the application may not be necessary for automating testing.

Option B suggests using an Amazon EC2 instance that frequently polls the version control system to detect new code commits. However, constantly polling the version control system could result in unnecessary resource usage, and it may not be an efficient approach to automate testing.

Option C suggests using an Elastic Beanstalk application to poll the version control system and detect new code commits. While Elastic Beanstalk can help simplify the deployment of applications, it may not be necessary for automating testing.

Option D suggests using AWS CloudFormation to launch an Amazon EC2 instance to run any testing harnesses to verify application functionality. CloudFormation is a powerful tool for creating and managing AWS resources in an automated and repeatable manner. By using CloudFormation to launch the Amazon EC2 instance, the testing process can be standardized and automated. Additionally, using Amazon Kinesis to notify the development team of the results allows for quick and efficient communication of the test results to the team.

In summary, option D is the most appropriate approach as it uses AWS CloudFormation to launch an Amazon EC2 instance to automate testing, and Amazon Kinesis to notify the development team of the results. This approach allows for standardized and automated testing while ensuring efficient communication of test results to the development team.