nerdexam
Amazon

DVA-C02 · Question #426

A developer is setting up AWS CodePipeline for a new application. During each build, the developer must generate a test report. Which solution will meet this requirement?

The correct answer is A. Create an AWS CodeBuild build project that runs tests. Configure the buildspec file with the test. AWS CodeBuild natively supports generating test reports via the reports section in a buildspec file, making it the correct tool in CodePipeline for this requirement.

Submitted by helene.fr· Mar 5, 2026Deployment

Question

A developer is setting up AWS CodePipeline for a new application. During each build, the developer must generate a test report. Which solution will meet this requirement?

Options

  • ACreate an AWS CodeBuild build project that runs tests. Configure the buildspec file with the test
  • BCreate an AWS CodeDeploy deployment that runs tests. Configure the AppSpec file with the test
  • CRun the builds on an Amazon EC2 instance that has AWS Systems Manager Agent (SSM Agent)
  • DCreate a repository in AWS CodeArtifact. Select the test report template.

How the community answered

(23 responses)
  • A
    91% (21)
  • B
    4% (1)
  • C
    4% (1)

Why each option

AWS CodeBuild natively supports generating test reports via the reports section in a buildspec file, making it the correct tool in CodePipeline for this requirement.

ACreate an AWS CodeBuild build project that runs tests. Configure the buildspec file with the testCorrect

CodeBuild's buildspec.yml supports a reports block where you specify the test framework and results file path. CodeBuild publishes these results to the CodeBuild Test Reports console automatically after the build, with no additional tooling required.

BCreate an AWS CodeDeploy deployment that runs tests. Configure the AppSpec file with the test

AWS CodeDeploy manages application deployments to compute resources and does not have a built-in test reporting feature; the AppSpec file handles deployment lifecycle hooks, not test result generation.

CRun the builds on an Amazon EC2 instance that has AWS Systems Manager Agent (SSM Agent)

Running builds on an EC2 instance with SSM Agent requires manual configuration of the build environment and report aggregation, adding significant operational overhead compared to CodeBuild's native reporting.

DCreate a repository in AWS CodeArtifact. Select the test report template.

AWS CodeArtifact is a package repository for storing and sharing software artifacts; it does not provide test report generation or display capabilities.

Concept tested: CodeBuild test reporting via buildspec reports block

Source: https://docs.aws.amazon.com/codebuild/latest/userguide/test-reporting.html

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice