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
- After the operations described in Creating an Automated API Test Case Template are complete, choose and click the name of the test case to be edited.
- Click the Scripting tab. Keyword Library is displayed on the right of the page. (If it is not displayed, click .)
- The Swagger import keywords are placed on the API tab page. For details, see Saving Test Procedure as an API Keyword.
- Keyword test cases and combined keywords are placed on the Combine tab page. You can create combined keywords from test case keywords and then save them. For details, see Saving Test Procedure as a Combined Keyword.
- Practical keyword types such as authentication, database operation, middleware, and protocol are placed on the System tab page. For details, see automated API test keywords.
- Click the drop-down list on the API tab page and search with keywords of name, description, or address.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot