Author: AutomatedQA Corp.
Last updated: July 16, 2009
Applies to: Keyword-Driven Testing
Why Automated Tests?
Testing is an essential part of software development since it lets you measure software
quality. Without testing, there is no way to verify that the software works correctly
and bugs may be littered throughout the application and left unfound.
Testing is often done manually, by testers performing operations, step-by-step,
and indicating whether a particular step was accomplished successfully or whether
it failed. However, manual testing is a full-time effort, costly and often prone
to human error.
To improve the efficiency of your testing, the testing process can be automated.
Test automation allows companies to perform consistent and repeatable tests, save
time and money, and improve the testing coverage. Unlike manual tests, automated
tests perform precisely the same operations each time they are run, thereby eliminating
human error and even cutting costs. Automated tests also run a lot faster, faster
than any person could perform a manual test, so this allows companies to run more
tests against there application.
What is Keyword-Driven Testing?
In keyword-driven testing, each keyword corresponds to an individual testing action like a mouse click, selection
of a menu item, keystrokes, opening or closing a window or other actions. A keyword-driven
test is a sequence of operations, in a keyword format, that simulate user actions
on the tested application. Basically, to perform any testing actions, testers simply
drag and drop the keyword that corresponds to the desired operation or they can
just record their actions and the keyword-driven test is built for them.
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 automated testing
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 TestComplete
TestComplete is an automated testing tool
that supports a wide range of application types, including desktop, 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 a 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.
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.
Conclusion
This article describes the main benefits of using keyword-driven testing for automated testing. Creating keyword-driven tests is the easiest way to get
started automating your tests quickly and can include powerful functionality for
testing your applications. If you are interested in using keyword-driven testing with TestComplete,
download and try it today.