Create a report group (buildspec) - AWS CodeBuild

Create a report group (buildspec)

A report group created using the buildspec does not export raw test result files. You can view your report group and specify export settings. For more information, see Update a report group.

To create a report group using a buildspec file
  1. Choose a report group name that is not associated with a report group in your AWS account.

  2. Configure the reports section of the buildspec file with this name. In this example, the report group name is new-report-group and the use test cases are created with the JUnit framework:

    reports: new-report-group: #surefire junit reports files: - '**/*' base-directory: 'surefire/target/surefire-reports'

    The report group name can also be specified by using environment variables in the buildspec:

    version: 0.2 env: variables: REPORT_GROUP_NAME: "new-report-group" phases: build: commands: - ... ... reports: $REPORT_GROUP_NAME: files: - '**/*' base-directory: 'surefire/target/surefire-reports'

    For more information, see Specify test files and Reports syntax in the buildspec file.

  3. In the commands section, specify the command to run your tests. For more information, see Specify test commands .

  4. Run the build. When the build is complete, a new report group is created with a name that uses the format project-name-report-group-name. For more information, see Report group naming.