Updated on 2025-01-09 GMT+08:00

Generating a Unit Test Report

The Unit Test Report action generates a visualized report by parsing the unit test result file that you have generated.

Currently, this action is only available in the ME-Riyadh region.

Prerequisites

Before running the Unit Test Report action, ensure that the test result file has been generated and the file framework is supported by CodeArts Build.

Build on GUI

Add Unit Test Report, when configuring build actions. Set the parameters according to Table 1.

Table 1 Parameters for generating the unit test report

Parameter

Description

Action Name

Assign a custom name to the build action. The name can contain:

  • Letters, digits, hyphens (-), underscores (_), commas (,), semicolons (;), colons (:), periods (.), slashes (/), and parentheses.
  • 1 to 128 characters.

Tool Version

Select a tool version that matches your current development environment.

For tool versions supported by CodeArts Build, see build tools and versions. If the current tools and versions do not meet your requirements, you can customize a build environment.

Continue After Failure

Specify whether to proceed after the current action fails by setting the parameter to either Yes or No.

Unit Test

  • Report Type: Select a unit test framework. Currently, only JUnit is supported.
  • Test Report: Enter a relative path to specify the location relative to the project root directory, for example, target/surefire-reports/TEST*.xml. Currently, only the test report in the .xml format is supported.
  • Print Unit Test Results: Specify whether to process unit test coverage report. If you select Yes, ensure that your project can use jacoco-maven-plugin to generate unit coverage reports.