Updated on 2026-08-11 GMT+08:00

Generating a Test Case

A test case describes a test task for a specific software product, including the test solution, method, technique, and policy. The content includes the test objective, test environment, input data, test procedure, expected result, and test script.

In CodeArts TestPlan, you can create test cases for manual testing, automated API testing, and custom automated testing.

You can directly create test cases, or design the test on a mind map and then generate test cases on the map.

Concepts related to test case:

  • Test case library: It stores all types of cases in different versions of a project. For details, see Test Case Library.
  • Manual test case: It includes test steps for a specific test scenario, their expected results, the test case result, and the test case status.
  • Automated API test case: It is used to automate the testing of predefined APIs to verify system functions and performance. These test cases simulate user operations and input data based on API design standards to check whether the system processes requests correctly and returns accurate responses.

Test Case Library

In the test case library, you can view, manage, and use all test cases of the versions of a project.

  • You can add test cases from the test case library to test plans.
  • You can view, manage, and use only the test cases in the current test plan.
  • The test cases created in test plans are collected to the test case library.

To view the test case library, perform the following steps:

  1. On the top navigation bar, choose Testing > Testing Case. The test case library is displayed by default.

    Select a test plan from the drop-down list of the test case library to view the test case details of the plan.

Generating Test Cases Based on Test Features

You can create a feature folder in the Test Features directory and then create test cases in the folder.

  1. In the navigation pane, choose Testing > Testing Case.
  2. Click Test Features on the left of the page.

    • By default, all test cases belong to this Test Features directory, which has a preset default subdirectory Other. (Note that the Other folder cannot contain additional subdirectories). Click on the right of the Test Features directory to create another subdirectory. Click next to the new subdirectory to delete or rename the subdirectory, or create test cases or subdirectories.

  3. Click the subdirectory, select an execution type tab, and click Create Case. Then, the created test case is saved in the subdirectory.

Filtering Test Feature Directories

Click on the right of the test feature directory and select one of the following criteria to display the directories you want.

  • Hide empty directories: Only the directories that contain test cases are displayed.
  • Show empty directories only:
    • If a subdirectory is empty and its parent directory contains cases, both of them are displayed, and their numbers of cases are displayed.
    • If the parent directory and subdirectory are empty, both of them are displayed, and their numbers of cases are displayed.
    • If the parent directory is empty and the subdirectory contains cases, neither of them is displayed.
    • If both the parent and subdirectories contain cases, neither of them is displayed.
  • Sort A to Z: Display directories by name in ascending or descending order.

Filtering Test Cases by Test Feature Directory

Above the test case list, enable or disable the toggle switch for collapsing cases of subdirectories.

Moving a Test Feature Directory

Right-click the test feature directory you want to move and choose Move to Folder. In the displayed dialog box, select the destination directory and click OK.

Deleting a Test Feature Directory

Click on the right of a directory to delete it. After the directory is deleted, the test cases in it will be moved to the Other directory.

When you delete an empty test feature directory from a version's test case library, a confirmation dialog will appear for the first time. If you check Do not show again, this confirmation dialog will not be displayed for future deletions.

Generating Test Cases Based on Test Requirements

If a project has been associated with a requirement, you can create test cases for the requirement in the Test Requirements directory.

  1. In the navigation pane, choose Testing > Testing Case.
  2. Click Test Requirements on the left of the page. By default, all associated requirements of the project belong to this Test Requirements directory.

    To associate a project with requirements, create a work item.

  3. Click a requirement in the Test Requirements directory, all test cases associated with the requirement are displayed. To create a test case, click an execution type tab and click Create Case. The new test case is associated with the requirement by default.
  4. On the right of the requirement name, click and choose to view the requirement details or create a test case for the requirement.