Updated on 2024-10-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, automated performance 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. With this type of test cases designed according to the API design standards, user operations and input data are simulated to check whether the system can correctly process requests and return correct responses.

Test Case Library

In 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. Log in to the CodeArts homepage, search for your target project, and click the project name to access the project.
  2. On the top navigation bar, choose Testing > Testing Case. The test case library is displayed by default.

    You can select a test plan from the drop-down list of the test case library to view the test case details in the test plan.

Generating Test Cases Based on Features

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

  1. Log in to the CodeArts homepage, search for your target project, and click the project name to access the project.
  2. In the navigation pane, choose Testing > Testing Case.
  3. Click Features on the left of the page.

    • By default, all test cases belong to this Features directory, which has a default subdirectory Other. Click on the right of the Features directory to create another subdirectory. Click next to the new subdirectory to delete or rename the subdirectory, or create test cases or subdirectories.

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

Generating Test Cases Based on the Requirements

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

  1. Log in to the CodeArts homepage, search for your target project, and click the project name to access the project.
  2. In the navigation pane, choose Testing > Testing Case.
  3. Click Requirements on the left of the page. By default, all associated requirements of the project belong to this Requirements directory.

    To associate a project with requirements, see Creating a Work Item.

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