Updated on 2024-10-11 GMT+08:00

Refreshing a Keyword in Multiple Test Cases

If you have used a keyword to write test cases and then want to modify the keyword in all these test cases, you can refresh the keyword. At present, this refresh feature is limited to combined keywords and the keywords generated by importing YAML files.

Prerequisites

You have used a keyword in test cases or combined keywords.

Procedure

  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. On the Auto API Test tab page, click a case name and click the Scripting tab.
  4. On the Keyword Library part on the right, click next to the keyword and click Refresh to All.

  5. On the right of the displayed dialog box, configure the refresh rule. Parameter values can be inherited. Example:

    Change the parameter name name1 in the YAML file to name2.

    Import the new YAML file. The value of name1 is not automatically inherited to name2 yet.

    Configure a refresh rule. The figure below shows an example.

    Click OK. The value is inherited.

    For the refresh rule:

    • Parameter name must be unique.
    • The content in the text box of script will not refresh with the keyword.

  6. On the left of the dialog box for refreshing keyword, you can configure whether to refresh the keyword in the test cases that were removed to the recycle bin.

    • Test cases marked with are in the recycle bin.
    • Test cases marked with can be used normally.

  7. If there are cases or combined keywords that you do not want to refresh, click next to them to remove them from the list. These removed items can still be searched.
  8. Click OK.

    Refresh operation cannot be rolled back. Exercise caution before performing this operation.