Prerequisites
(Optional) A use case library version is created for the specified app. For more information, see Create a use case library version.
(Optional) A script directory is created. For more information, see Create a script directory.
(Optional) The script in other use case library versions is created.
The Use Cases page of the specified app is displayed. For more information, see Go to the Use Cases page.
Create a script
Step 1: On the Use Cases page of the specified app, click the Scripts tab.
Step 2: Select a use case library version from the version drop-down list or use the default version.
Use case library versions must be configured in advance. For more information, see Create a use case library version.
Step 3: If no data is displayed on the right side of the page, click Create Script, or click the More icon and select Create Script to open the Create Script panel.

Step 4: In the Create Script panel, configure the script.

The following table describes the parameters.
Parameter | Description |
---|---|
Script Name | The name of the script. The name must be a string. The name must be 2 to 50 characters in length. The name can contain letters, digits, underscores (_), and hyphens (-). The name is unique. |
Script Description | The information of the script, which facilitates subsequent query and review. |
Storage Directory | The directory where the script is saved. Note The script directory must be set in advance, or the script must be saved to Root Directory. For more information, see Create a script directory. |
Script Type | The type used to set the script. Valid values:
|
Uploaded Script | When Script Type is set to Uploaded Script, select and upload script files. Note
|
Step 5: Click OK to save the script.
Import a script
Step 1: On the Use Cases page of the specified app, click the Scripts tab.
Step 2: Select a use case library version from the version drop-down list or use the default version.
Use case library versions must be configured in advance. For more information, see Create a use case library version.
Step 3: If no data is displayed on the right side of the page, click Import Script, or click the More icon and select Import Script to open the Import Script panel.

Step 4: In the Import Script panel, configure the script.

The following table describes the parameters.
Parameter | Description |
---|---|
Destination Directory | The directory where the imported script is saved. Note The script directory must be set in advance, or the script must be saved to Root Directory. For more information, see Create a script directory. |
Use Case Library Version | The version of the use case library where the source script is deployed. |
Select Script File | Selects the source script. Note You must import the directory where the source script is deployed at the same time. |
Step 5: Click OK to import the source script of the specified use case library version to the specified directory of the current use case library version.
After the script is imported, the script is displayed in the left-side list based on the hierarchy tree.
