How should the Developer incorporate unit tests as part of CI/CD pipelines?
Create a separate CodePipeline pipeline to run unit tests
Update the AWS CodeBuild specification to include a phase for running unit tests
Install the AWS CodeDeploy agent on an Amazon EC2 instance to run unit tests
Create a testing branch in AWS CodeCommit to run unit tests
Explanations:
Creating a separate pipeline for unit tests is unnecessary. Unit tests should be part of the existing pipeline to ensure they run automatically before staging.
Updating the AWS CodeBuild specification to include a phase for running unit tests is the best practice. This integrates unit tests into the CI/CD pipeline, ensuring that they are executed before artifacts are staged.
The AWS CodeDeploy agent is used for deploying applications, not for running unit tests. Running tests on EC2 instances is not required in this context.
Creating a testing branch in AWS CodeCommit is unnecessary and inefficient. Unit tests should be integrated into the CI/CD pipeline, not based on separate branches.