Which solution will meet this requirement?
Create an AWS CodeBuild build project that runs tests. Configure the buildspec file with the test report information.
Create an AWS CodeDeploy deployment that runs tests. Configure the AppSpec file with the test report information.
Run the builds on an Amazon EC2 instance that has AWS Systems Manager Agent (SSM Agent) installed and activated.
Create a repository in AWS CodeArtifact. Select the test report template.
Explanations:
This option correctly identifies AWS CodeBuild as the service to run tests during the build process. By configuring the buildspec file with the appropriate commands and test report output locations, it allows the generation of test reports which can be integrated into AWS CodePipeline.
AWS CodeDeploy is primarily used for deploying applications, not for running tests during the build phase. While you can run scripts during deployment, it does not natively generate test reports as part of a continuous integration pipeline. The AppSpec file is meant for defining deployment actions rather than test execution.
Running builds on an Amazon EC2 instance with AWS Systems Manager Agent installed is not an optimal solution for generating test reports in the context of AWS CodePipeline. This approach adds unnecessary complexity and does not directly integrate with CodePipeline’s automated workflows for building and testing applications.
AWS CodeArtifact is a package repository service and does not pertain to the generation of test reports during the build process. While it can store artifacts, it does not handle the execution of tests or the reporting of their results as required in this scenario.