Test condition

A test condition is a testable aspect of a component or system that someone has decided to test, such as a rule, a function, a quality or a state. Test conditions are found by analysing the test basis, and each one is then covered by one or more test cases that give it concrete inputs and expected results.

The longer version

The ISTQB glossary defines a test condition as "a testable aspect of a component or system that is intended to be tested", and lists test situation, test requirement and test idea as synonyms. A condition says what will be tested and stops short of saying how. For a feature that lets a customer change the email address on an account, the conditions might read: a new address must be confirmed before it replaces the old one, an address already used by another account is refused, and the old address is told about the change.

A condition sits between two other things. Above it is the test basis, which the glossary describes as the body of knowledge used as the basis for test analysis and test design: requirements, user stories, designs, the code itself. Below it are the test cases. Test analysis reads the basis and lists the conditions, and test design turns each condition into cases. The condition that a used address is refused becomes one case with an address belonging to another customer, one with that address typed in capitals and one with the customer's own current address. The ISTQB Foundation syllabus gives acceptance criteria as an example of test conditions, so a team with well-written criteria already has a first list.

Keeping the conditions as a list of their own pays off in two places. Coverage can be stated at a level stakeholders can read: twelve conditions were identified, eleven have passing cases and one is blocked. A missing condition is also easier to spot than a missing case, since the list is short and written in the language of the requirement. The level of detail varies. A team with a thin specification may record broad conditions, such as account email management, and leave the detail to exploratory sessions, where the syllabus notes that test objectives may be treated as high-level test conditions.

Common questions

What is a test condition in software testing?

A test condition in software testing is something about a component or system that can be tested and that the team intends to test, such as a business rule, a function, a transaction or a quality attribute. The ISTQB glossary defines it as a testable aspect of a component or system that is intended to be tested.

What is the difference between a test condition and a test case?

A test condition names what to test, for example that an email address already in use is refused. A test case fixes one check of it: the preconditions, the inputs, any steps and the expected result. One condition is normally covered by several test cases.

What is the difference between a test condition and a test scenario?

Both terms name what to test, and in some teams they are the same list. Where a distinction is drawn, a test condition is any single testable aspect, including a rule or a quality, while a test scenario names a situation a user is in and may touch several conditions.

How are test conditions identified?

Test conditions are identified during test analysis by reading the test basis, meaning the requirements, user stories, acceptance criteria, designs or code, and listing each aspect that could be checked. Test techniques, risk analysis and questions put to the product owner all add to the list.

What is an example of a test condition?

For a money transfer feature, test conditions include: a transfer cannot exceed the available balance, a transfer to a closed account is rejected, and both accounts show the transaction afterwards. Each is a statement of what must be checked, with no steps or data yet.

Bug reports that arrive ready to triage.

Collect replay, console, network and browser context with the Free plan.

<script src="…/widget.js" data-key="pb_pub_…">