Demo: Generating Reports to View Test results

AWS CodeBuild allows us to create test reports and code coverage reports for the tests that run along with the build and get more visual insights into how the code is performing. AWS CodeBuild achieves this using report groups. If the build specification file includes a report group name that doesn’t exist, CodeBuild will create one. However, it's a good practice to create the report group explicitly and specify the arn of this resource in the build specification file.

Creating a report group using AWS CLI

The following AWS CLI command is used to create a report group. This command accepts three arguments:

  • name: The name of the report group.

  • type: Indicates the report group type. Possible values are TEST and CODE_COVERAGE.

  • export-config: We can specify a JSON value, including the export type and S3 destination. If the report results are not exported, this parameter will have the value NO_EXPORT.

Get hands-on with 1200+ tech skills courses.