Keyword Driven Testing

More than just a few Words

What is Keyword Driven Testing?

Keyword Driven Testing uses reusable building blocks, known as keywords, to create test cases. These keywords form an easy-to-learn language that connects technical experts, testers and automation engineers. Each building block stands for a clearly defined test step, which makes the test cases easier to understand and facilitates collaboration within the team. This creates a common vocabulary for specific domains and application areas.

 

Special challenges in the specification of tests

Test managers face several challenges when defining and specifying tests:

Abstraction level of the test cases

The trick is to design test cases in such a way that they are understandable for non-technical stakeholders on the one hand and technically precise enough for implementation on the other. This balance is difficult to achieve.

Reusability of test steps

In the traditional test case specification, similar or identical test steps lead to redundant entries. This not only makes maintenance more difficult, but also increases the susceptibility to errors.

Independence from the implementation

Test cases that are closely linked to the implementation details of an application often require extensive adjustments when software changes are made.

Specifications for test automation

In order for test cases to serve as a basis for automation, they must be defined very precisely. At the same time, they must not lose their readability for humans.

Advantages of Keyword Driven Testing

Keyword Driven Testing offers numerous advantages that improve both the efficiency and the quality of the tests:

  • Reusability and maintainability: as each keyword is managed centrally, changes to a keyword immediately affect all associated test cases. Redundant adjustments are no longer necessary, which makes maintenance considerably easier.
  • Simplified test automation: Automation is limited to the implementation of individual keywords instead of automating complete test cases. This significantly reduces the implementation effort.
  • Speed and efficiency: Test cases can be quickly compiled from existing keywords. New keywords are only required for additional functionalities.
  • Collaborative: Keywords create a common foundation that enables subject matter experts and automation specialists to work together efficiently.

When is Keyword Driven Testing recommended?

Keyword Driven Testing is particularly suitable for system or acceptance tests where both technical precision and abstract documentation are required.

Areas of application:

  • Test cases that need to be repeated or adapted frequently.
  • Projects in which close co-operation between specialist departments and technology is required.
  • Automation projects with high demands on efficiency and maintainability.

The easy readability of test specifications and the ability to quickly achieve a high level of automation coverage make Keyword Driven Testing a versatile method.

How does Keyword Driven Testing work with TestBench?

TestBench is a tool that supports the practical application of Keyword Driven Testing. Keywords are defined as test steps and managed centrally.

Central functions of TestBench:

  • Test element view: Keywords are created and organised here. They can be integrated into test sequences and used multiple times.
  • Parameters and data: Each keyword can contain parameters that can be flexibly customised. This creates dynamic and reusable tests.
  • Versioning: Changes to keywords are tracked centrally to avoid errors caused by unintentional adjustments.

This structured approach not only supports compliance with standards such as ISO 29119-5, but also enables Keyword Driven Testing to be combined with Data Driven Testing.

Simple test sequence for a car configurator with six steps: start car configurator, select vehicle, select accessories, determine special model, check price and finish car configurator. Green icons mark the individual steps.

The illustration shows a simple test sequence without parameters. As an example, test sequences of a test are composed of individual keywords as follows.

Selection of a special model in a test application. The status is set to 'released', the default type is 'Flow'. Special models such as Gomera, Jazz and Luxury can be selected in the drop-down menu, accompanied by additional configuration options such as color and equipment.

A keyword from the test sequence shown can contain not only its name, but also a description in order to capture details precisely.

Where-used list in a test application with three configuration options: Configure base vehicle, Configure base vehicle with discount and Configure base vehicle without accessories. Option for updating the view in case of selection changes available, with indication of the last update time.

If a keyword is called up in a test sequence, a list of all calls is automatically generated – the so-called where-used list. The illustration shows a where-used list that only includes test case records.

Test sequence for a car configurator with six steps and associated parameters: 1. start car configurator, 2. select vehicle (parameter: vehicle), 3. select special model (parameter: special model), 4. select accessories (parameter: accessory list), 5. check price (parameter: total price), 6. end car configurator. Green icons mark the steps.

When specifying tests, it makes sense to separate the process from the data used in it. This makes it possible to use necessary values as variables. Therefore, each keyword in TestBench can contain any number of parameters. The illustration shows a test sequence with parameters.

Parameter list for a test sequence with four entries: 1. vehicle name (parameter: vehicle), 2. special model name (parameter: special model), 3. accessory name (parameter: accessory list), 4. price (parameter: total price). Green icons indicate the data types.

This makes it possible to define an individual parameter list for each test sequence. The illustration shows an example of such a list.

Table with test case data for various vehicle configurations: Contains columns for vehicle, special model, accessories list and total price. Examples: 'Rolo' without special model and accessories (€12,300.00), 'Rassant Family' with special model Jazz and accessories such as radio and floor mats (€19,549.00), 'Rassant' with special model Gomera (€16,056.60), and 'I5' with special model Luxury and extensive accessories (€32,065.20).

This creates a test that consists of a test sequence and the associated parameter list. The values for the parameters are stored in a table, with each row representing a data set for a specific run of the test sequence. The illustration shows a test case table for the parameter list.

Overview of a test sequence for a car configurator with associated parameters, parameter list and a test case data set. The test sequence includes steps such as select vehicle and check price. Parameter list defines fields such as vehicle name, special model and accessory list. The test case shows a configuration for 'Rassant Family' with special model Jazz and accessories (radio, sports rims, floor mats) for €19,549.00.

In TestBench, a test consists of a test sequence, the corresponding parameter list and a data table with the values to be used. This creates not just a single test case, but a whole set of test cases. Each test case combines the test sequence, the parameter list and a specific data row from the data table. An additional test case can easily be created by adding another row to the data table. The illustration shows a test sequence with parameter list and a data set from the test case table.

Test sequence for a car configurator with step-by-step selection of vehicle, special model, accessories and currency check. Overview with parameter fields for inputs such as vehicle type, special model, accessories list, total price and currency.

How is the test data managed?

In TestBench, test data is organised using data types. These bundle values of the same specialised type, e.g. vehicle names or special models, and serve as parameters for keywords. When a keyword is called, the parameter is transferred with a suitable value of the associated data type. Similar to test cases, keywords can use multiple parameters, which facilitates the management and flexibility of complex tests.

TestBench also seamlessly integrates Data Driven Testing with Keyword Driven Testing, as recommended by ISO 29119-5. Further information can be found here.

Test sequence with a hierarchical structure for the configuration of a basic vehicle in the car configurator. Steps include starting, vehicle configuration with parameters such as vehicle, special model and accessories, price check and closing the configurator. Illustration with subordinate steps such as vehicle, special model and accessory selection.

How can tests become even easier to understand?

Long keyword sequences can make it difficult to capture the test idea. TestBench offers a solution for this: keywords can contain their own test sequences. This allows several steps to be summarised in a new keyword, which shortens the test sequence and makes the test content clearer.

This abstraction makes it easier to understand complex tests without losing details. Additional abstraction levels mean that even long end-to-end tests can be designed in a comprehensible way while retaining the necessary level of detail for test execution.

Why Keyword Driven Testing for automation?

  • Efficiency: Only individual keywords are automated, which keeps the effort constant.
  • Flexibility: Changes to technical specifications are easy to implement.
  • Reduction of technical complexity: Specialist details can be presented at a higher level of abstraction, while technical details remain in subordinate keywords. A detailed explanation can be found on the Test Automation page.

Why Keyword Driven Testing for manual testing?

Keyword Driven Testing also shows its strength in manual tests:

  • Simpler test specification: Test sequences can be quickly recognised and clearly displayed thanks to keywording.
  • Consistency and quality: Tests are carried out consistently regardless of the experience of the person performing the test.
  • Speed: Test execution can be up to 40 % faster, as the focus is on the actual test execution rather than on understanding the specification.

This approach not only improves efficiency, but also the reproducibility and reliability of the test results.

Further information on test execution can be found on the Test Execution page and in the blog post ‘Less effort, more efficiency: the iTORX assistant

Your questions - our answers

Do you have questions about Keyword Driven Testing or are you looking for support in optimizing your testing processes? Our experts will be happy to help you. Contact us and we will help you to design your test strategies efficiently and successfully