All Products
Search
Document Center

Mobile Testing:Manage test cases

Last Updated:Jul 10, 2023

This topic describes how to manage test cases, including how to create a test case, import a test case, batch import scripts, and add test case parameters.

Prerequisites

(Optional) A test case library version is created for the specified app. For more information, see Create a test case library version.

Create a test case

  1. Log on to the Mobile Testing console.

  2. In the left-side navigation pane, choose Testing Management > Test Case. The Scripts tab appears.

  3. Select a test case library and a test case library version from the Case Library drop-down list.

    image..png
  4. Click the Test Case Management tab. If no data is displayed on the right side of the tab, click Create Test Case. You can also click the More icon to the right of Test Case Directory and select Create Test Case. The Create Test Case panel appears.

    image..png
  5. In the Create Test Case panel, configure the parameters. 新建用例集右侧栏1131The following table describes the parameters.

    Parameter

    Description

    Type

    The type of the test case. Valid values:

    • Recording Type: A test case of this type can contain one or more scripts generated by online recording.

    • Upload Type: A test case of this type can contain only a single uploaded script.

    Test Case Name

    The name of the test case.

    The name must be a string.

    The name must be 2 to 15 characters in length.

    The name can contain letters, digits, and underscores (_).

    Test Case Description

    The description of the test case. The description facilitates subsequent query and review.

    Directory

    The directory to which the test case belongs.

    Note

    You must set a custom directory in advance or use the default directory. For more information, see Create and import directories.

  6. Click OK.

    The created test case is displayed in the left-side hierarchy tree for the current test case library version. After you click the test case, the relevant content is displayed on the right side of the tab.

Import a test case

  1. In the left-side navigation pane, choose Testing Management > Test Case. The Scripts tab appears.

  2. Select an app and a test case library version from the Case Library drop-down list.

  3. Click the Test Case Management tab. If no data is displayed on the right side of the tab, click Import Case. You can also click the More icon to the right of Test Case Directory and select Import Test Case. The Import Test Case panel appears.

    导入用例集1440
  4. In the Import Test Case panel, configure the parameters.

    导入用例集右侧栏1442

    The following table describes the parameters.

    Parameter

    Description

    Test Case Library Version

    The version of the test case library to which the source test case belongs.

    Source Directory

    The directory to which the source test case belongs.

    Destination Directory

    The destination directory in the current test case library to which to import the source test case.

    Select Test Case

    The source test case.

  5. Click OK to import the specified test case to the destination directory in the current test case library version.

    The imported test case is displayed in the left-side hierarchy tree for the current test case library version. After you click the test case, the relevant content is displayed on the right side of the tab.

Batch import scripts

A Recording Type test case can contain one or more scripts generated by means of online recording. If you require multiple scripts in a test case, you can batch import scripts to the test case.

Important

The Import Script feature applies only to Recording Type test cases.

  1. In the left-side navigation pane, choose Testing Management > Test Case. The Scripts tab appears.

  2. Select an app and a test case library version from the Case Library drop-down list.

  3. Click the Test Case Management tab. In the hierarchy tree for the test case library version, click a test case. The editing page of the test case appears on the right side.

    On the editing page of a Recording Type test case, click Import Script. The Batch Import Scripts into Test Case panel appears.

    导入脚本1439
  4. In the Batch Import Scripts into Test Case panel, select one or more recorded scripts.脚本批量导入用例右侧栏1133

  5. Click OK to add the selected scripts to the test case.

    On the Test Case Management tab, view the batch imported scripts of the test case.

Add test case parameters

Important
  • The Add Parameter feature applies only to Recording Type test cases.

  • The value of a test case parameter overwrites the value of a common parameter that has the same name as the test case parameter.

  1. On the editing page of a Recording Type test case, click the Parameter tab.

  2. On the Parameter tab, select a created parameter group from the Parameter Group drop-down list or use the default parameter group.

    Note
    • You must configure parameter groups in advance. For more information, see Create a parameter group.

    • If the specified parameter group contains added or imported parameters, these parameters are saved as common parameters for the test case.

  3. Configure parameters.

    • You must configure parameter groups in advance. For more information, see Create a parameter group.

    • If the specified parameter group contains added or imported parameters, these parameters are saved as common parameters for the test case.

      image
  4. To add multiple parameters, right-click a configured parameter name and select Add row after selection. For more information, see Create a parameter group.

    image
    Note
    • A parameter name can contain only letters, digits, and underscores (_).

    • If a parameter is named account and you select the Account Conflict option when you submit a functional test, the same phone cannot run two test cases with the same account parameter at the same time.

  5. After you configure parameters, click Save Parameter.