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

Introduction to Keyword Library

Background

Keyword-driven testing is a test automation technique that creates automated test cases by providing a set of "build blocks" called keywords. Keyword-driven testing can be used at different test levels, such as component testing and system testing. Its advantages lie in usability, understandability, maintainability, reuse of test information, support for test automation, saving potential costs, and promoting progress.

When designing test cases, you may often use the same pre-steps or test logic. If these steps are written in each test case, the workload is heavy and the maintenance is difficult. Test keywords can help reuse these test steps.

Keyword Library manages API keywords, system keywords, and combined keywords in a unified manner to build one-stop keyword management capabilities and ensure consistent user experience during test case scripting.

  • API keywords define the request of a single API, and can be generated by importing a Swagger file or saving a user-defined URL request.

    For details about API keywords, see Saving Test Procedure as an API Keyword.

  • Combined keywords encapsulate multiple test steps as common test logic. This test logic can be reused when the combined keywords are invoked by other test cases. For details about combined keywords, see Saving Test Procedure as a Combined Keyword.
  • System keywords cover authentication, protocols, middleware, and database, for various scenarios such as identity authentication, complex protocols, data processing, data preconfiguration, data verification, and API integration. For details about system keywords, see System Keywords.

Accessing Keyword Library

  1. After the operations described in Creating an Automated API Test Case Template are complete, choose Testing Case > Auto API Test and click the name of the test case to be edited.
  2. Click the Scripting tab. Keyword Library is displayed on the right of the page. (If it is not displayed, click .)

  3. Click the drop-down list on the API tab page and search with keywords of name, description, or address.