ArticleslgStudy

computer science

Keyword-driven testing

Keyword-driven testing is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Keyword-driven testing rather than just read about it. In short: Keyword-driven testing, also known as action word based testing (not to be confused with action driven testing), is a software testing methodology suitable for both manual and automated testing. This method separates the documentation of test cases – including both the data and functionality to use – from the prescription of the way the test cases are executed.

Key takeaways

  • Keyword-driven testing belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Keyword-driven testing to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Keyword-driven testing from memory before moving on to harder problems.

Reference excerpt

Keyword-driven testing, also known as action word based testing (not to be confused with action driven testing), is a software testing methodology suitable for both manual and automated testing. This method separates the documentation of test cases – including both the data and functionality to use – from the prescription of the way the test cases are executed. As a result, it separates the test creation process into two distinct stages: a design and development stage, and an execution stage. The design substage covers the requirement analysis and assessment and the data analysis, definition, and population.

Overview This methodology uses keywords (or action words) to symbolize a functionality to be tested, such as Enter Client. The keyword Enter Client is defined as the set of actions that must be executed to enter a new client in the database. Its keyword documentation would contain:

the starting state of the system under test (SUT) the window or menu to start from the keys or mouse clicks to get to the correct data entry window the names of the fields to find and which arguments to enter the actions to perform in case additional dialogs pop up (like confirmations) the button to click to submit an assertion about what the state of the SUT should be after completion of the actions Keyword-driven testing syntax lists test cases (data and action words) using a table format (see example below). The first column (column A) holds the keyword, Enter Client, which is the functionality being tested. Then the remaining columns, B-E, contain the data needed to execute the keyword: Name, Address, Postcode and City.

To enter another client, the tester would create another row in the table with Enter Client as the keyword and the new client's data in the following columns. There is no need to relist all the actions included. In it, you can design your test cases by:

Indicating the high-level steps needed to interact with the application and the system in order to perform the test. Indicating how to validate and certify the features are working properly. Specifying the preconditions for the test. Specifying the acceptance criteria for the test. Given the iterative nature of software development, the test design is typically more abstract (less specific) than a manual implementation of a test, but it can easily evolve into one.

Advantages Keyword-driven testing reduces the sensitivity to maintenance caused by changes in the System/Software Under Test (SUT). If screen layouts change or the system is migrated to another OS hardly any changes have to be made to the test cases: the changes will be made to the keyword documentation, one document for every keyword, no matter how many times the keyword is used in test cases, and it implies a deep process of test design. Also, due to the very detailed description of the way of executing the keyword (in the keyword documentation) the test can be performed by almost anyone. Thus keyword-driven testing can be used for both manual testing and automated testing. Testing is the feedback mechanism in the software development process. It tells you where corrections need to be made to stay on course at any given iteration of a development effort. It also tells you about the current quality of the system being developed. The activity of implementing tests involves the design and development of reusable test scripts that implement the test case. After the implementation, it can be associated with the test case. Implementation is different in every testing project. In one project, you might decide to build both automated test scripts and manual test scripts. Designing tests, instead, is an iterative process. You can start designing tests before any system implementation by basing the test design on use case specifications, requirements, prototypes, and so on. As the system becomes more clearly specified, and you have builds of the system to work with, you can elaborate on the details of the design. The activity of designing tests answers the question, "How am I going to perform the testing?" A complete test design informs readers about what actions need to be taken with the system and what behaviors and characteristics they should expect to observe if the system is functioning properly. A test design is different from the design work that should be done in determining how to build your test implementation.

Methodology The keyword-driven testing methodology divides test process execution into several stages:

Model basis/prototyping: analysis and assessment of requirements. Test model definition: on the result of requirements assessment, approach an own software model. Test data definition: on the basis of the defined own model, start keyword and main/complement data definition. Test preparation: intake test basis etc. Test design: analysis of test basis, test case/procedure design, test data design. Manual test execution: manual execution of the test cases using keyword documentation as execution guideline. Automation of test execution: creation of automated script that perform actions according to the keyword documentation. Automated test execution.

Definition A Keyword or Action Word is a defined combination of actions on a test object which describes how test lines must be executed. An action word contains arguments and is defined by a test analyst. The test is a key step in any process of development and shall to apply a series of tests or checks to an object (system / SW test — SUT). Always remembering that the test can only show the presence of errors, not their absence. In the RT system test, it is not sufficient to check whether the SUT produces the correct outputs. It must also verify that the time taken to produce that output is as expected. Furthermore, the timing of these outputs may also depend on the timing of the inputs. In turn, the timing of future inputs applicable is determined from the outputs.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Keyword-driven testing

Start with the simplest possible case. Write down what Keyword-driven testing claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Keyword-driven testing before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Keyword-driven testing ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Keyword-driven testing

In research
Keyword-driven testing appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Keyword-driven testing in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Keyword-driven testing is common in secondary-school and first-year university syllabi. It links to neighbouring topics Software testing, so understanding it makes those chapters shorter.
In everyday life
Look for Keyword-driven testing outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Keyword-driven testing” →

How to study Keyword-driven testing in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Keyword-driven testing means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Keyword-driven testing out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Keyword-driven testing in simple terms?

Keyword-driven testing, also known as action word based testing (not to be confused with action driven testing), is a software testing methodology suitable for both manual and automated testing. This method separates the documentation of test cases – including both the data and functionality to use…

Why does Keyword-driven testing matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Keyword-driven testing?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Keyword-driven testing.

Tags

  • Software testing

Keep exploring