Running UT Cases
Refer to the following procedure to run generated UT cases.
Procedure
- In the generated UT case folder, open the UT case to be run.Figure 1 Opening the file
- Right-click
or
in the file and choose Run to run the UT case. If you choose Run with Coverage, you can run the UT case and view the coverage information.Figure 2 Running a UT case
- In the Run window that is displayed, click
or
to run the UT case again. When the UT case is running, you can click
to stop it or click another button to perform another operation.Figure 3 Run
- After the UT case is run, the
icon changes to
. - If the UT case fails to run, the
icon changes to
.
- After the UT case is run, the
- View the coverage information. Code coverage is a metric that measures the software test quality. It indicates the proportion of the tested part to the whole part. Code coverage is classified into multiple dimensions.
Code coverage includes the class, method, and line percentages.
Figure 4 Coverage information
Class coverage: measures the proportion of the tested classes to all the test cases.
Function coverage: measures the proportion of called functions to all functions.
Line coverage: measures the proportion of executed lines of code to the total lines of code.
Parent topic: Tool Usage