Keyword-Driven Tests are Easy to Create
Keywords are organized into tables that represent a test to be executed. You can create keyword-driven tests visually by adding and deleting operations and edit them directly by changing an operation’s parameters and position. The easiest way to create keyword-driven tests is to record them. This technique does not require testers to know the application’s internal objects, just a test plan of what they want to test. After recording, you can modify the keyword-driven test and customize it to fit your needs.
Keyword-Driven Tests vs. Test Scripts
Writing scripts requires knowledge of scripting languages provided by the automated testing tool, whether it is VBScript, JScript or any other scripting language. As you can imagine, creating keyword-driven tests is much easier and faster than writing scripts. Unlike scripts, keyword-driven tests do not require detailed knowledge of scripting languages and can be used to quickly create automated tests. Also, if an testing automation tool only provides scripting, it becomes harder for new testers to become acquainted with the tool, making the learning process for new testers a lot longer and the overall success rate of automated testing suffers.
Create Automated Tests Earlier With Keyword-Driven Testing
Many authorities recommend that you start test automation at the beginning of the application’s design and not wait for the application to be completed. This means creating automated tests for checking each added feature as early as possible. It is a well known fact that fixing bugs detected early is a lot easier and cheaper than finding them later in the development process. However, knowing what and when to automate is very important and there are some best practices for automated testing. With keyword-driven testing, you can create simple functional tests in the earlier stages of development, testing the application, piece-by-piece, and improving your automated testing success rate and do this without having to learn a scripting language.
Create Automated Test Batches With Logic From Keyword-Driven Tests
Keyword-driven tests allow you to introduce logic into the organization of your automated tests. By building some simple decision making logic into a keyword-driven test, you can control how your tests are run. For example, say you have three different tests, Test A, Test B and Test C. Test B is dependent on Test A and Test C is dependent on Test B. With this simple decision making logic in your keyword-driven tests, you can run your automated tests in batches and tailor your workflow so that if Test A fails, Tests B and C won’t run.
About Keyword Testing in TestComplete
TestComplete is an automated testing tool that supports a wide range of application types, including desktop, mobile, Web and Rich Internet applications, and technologies, including, but not limited to: .NET, WPF and Java. With TestComplete you can create different types of automated tests, for instance, unit tests, functional tests, data-driven tests, regression tests, and many others.
TestComplete can easily be used by experienced and inexperienced testers. Not all testers have a programming or scripting background, so it is important to support all types of testers. TestComplete includes a handy Keyword-Driven Testing feature for users who do not know how to write automated test scripts.
TestComplete provides a number of keyword-driven test operations that let you perform various actions in your keyword-driven tests: performing common tasks, calling object methods, checking object states, searching for an object, and many others. TestComplete also keeps track of keyword-driven test operations that you use most often in your tests and provides quick access to them.
Also, TestComplete provides special keyword-test operations and wizards for data-driven test creation. Using these operations, you can configure your test in several clicks to automatically retrieve data from a database, Excel sheet or CSV file and use this data for simulating user actions on the tested application's windows and dialogs. View a video on our web site to see how easy it is: TestComplete Lesson 5: Creating Data-Driven Tests.
Keyword-driven tests can be made as simple or as powerful as you want them to be. It may not be as powerful as scripting, but when you combine the two you can see benefits that people never thought existed.