This article covers the seven Test Design Techniques I see most often and consider necessary for a tester writing test cases.
For Black-box Testing:
- EP — Equivalence Partitioning
- BVA — Boundary Value Analysis
- Decision Table
- State Transitioning
For White-box Testing:
- Statement Testing
- Decision/Branch Testing
- Path Testing
EP — Equivalence Partitioning
Equivalence Partitioning applies to features involving input or input data, where the requirement says the system’s behaviour depends on the input value.
More fully, it is a design technique for splitting test cases for requirements involving value ranges, when the system result specifically depends on the input value. The technique creates equivalence partitions: sets of input values that produce the same output. Since the output is the same, the tester does not need to test every value in every partition; one representative value for each partition is enough.
For example, a feature asks for a user’s age and classifies the user into four groups: child, teenager, adult and elder.
- Ages 0 to 12 are children.
- Ages 13 to 18 are teenagers.
- Ages 19 to 60 are adults.
- Ages 61 and above are elders.
For this requirement, splitting the test cases means applying EP:
- Based on differences in input and output, split the values into equivalence partitions.
- Choose a representative value for each partition, usually a middle value such as an average, to avoid bias.
First, we split the values into five equivalence partitions: below 0 is invalid, 0 to below 13, 13 to below 19, 19 to below 61, and 61 onwards.
----0----12----18----60----
Then choose representatives: -1 for the invalid partition, 6 for children, 15 for teenagers, 40 for adults and 70 for elders.
---(-1)-0--6--12--15--18--40--60--70--
| | | | |
We can now create five High Level Test Cases:
User can't input age -1User is identified as a child when age is 6User is identified as a teenager when age is 15User is identified as an adult when age is 40User is identified as an elder when age is 70
That is EP. How many equivalence partitions there are is how many test cases we get, including both invalid and valid partitions.
BVA — Boundary Value Analysis
BVA — Boundary Value Analysis — is a Test Design Technique created to support EP. Here is where the problem appears.
Developers have to implement the requirement in the product code. In the code, they compare the input variable with the boundaries of the value ranges using operators.
What if they get it wrong? Instead of children being 0<age<=12, they write 0<=age<12. When the input is 12, the system does not behave as required. EP-based testing often skips boundary values. Even if the tester deliberately chooses 12 as a representative value, if the developer also gets 0<age<12 wrong, 12 alone is not enough; we need 0 as well. That is why BVA exists.
The short version is that bugs frequently appear at boundaries because comparison operators are easy to get wrong. BVA is therefore combined with EP to split test cases and cover all situations that can occur.
BVA has two ways to split test cases around each boundary:
- 2-value testing: two test cases — one value close to the boundary on the invalid-partition side, and the boundary value itself.
- 3-value testing: three test cases — a value close to the boundary on the invalid side (or the left partition), the boundary value, and a value close to the boundary on the right side.
For boundary 0, I would usually use 2-value testing: -1 and 0. For boundary 12, I would usually use 3-value testing: 11, 12 and 13. Since 12 sits between two valid partitions, we need to check the boundary and one value on each side.
So the earlier example looks like this with BVA + EP:
---(-1)-0--11-12-13--17-18-19---60-61---
| | | | | | | | | |
After applying BVA, we have:
User can't input age -1User is identified as a child when age is 0User is identified as a child when age is 11User is identified as a child when age is 12User is identified as a teenager when age is 13User is identified as a teenager when age is 17User is identified as a teenager when age is 18User is identified as an adult when age is 19User is identified as an adult when age is 60User is identified as an elder when age is 61
You may argue that 0, 11 and 12 have the same result, so test case 11 can be removed; similarly, 17 can be removed from 13, 17 and 18. That is perfectly possible, but it depends on the specific problem. This is test-case simplification, reducing the number of cases we need to write.
Decision Table
The two techniques above apply to requirements involving a range of input values. What if there is more than one input? Like probability exercises at school: if A can have two values and B can have three, the combination of A and B has six values. That is the essence of a Decision Table.
A Decision Table is a Test Design Technique for requirements involving multiple inputs, where the output depends on a particular combination of input values. It creates a Decision Table to help split the test cases.
The table, also called a Conditions/Actions table, has two parts: Conditions and Actions. Conditions contain the inputs; Actions contain the corresponding outputs for each input set.

Decision Table template
Conditions are inputs, but what does that mean here?
- Each input has a set of values or a set of value combinations. With
usernameandpassword, we do not list every actual username and password; we need the combinationsCorrect username,Incorrect username,Correct passwordandIncorrect password. For numeric input, we do split the values as with EP and BVA — so this is a combination of three techniques. - After listing the value sets for each input, build the table by combining them into Input Combinations.
At first we have four combinations: Correct username + Correct password, Correct username + Incorrect password, Incorrect username + Correct password, and Incorrect username + Incorrect password.
With username and password, the Decision Table before Actions might look like this:

Decision Table with Conditions
Next, fill in the Actions — the expected results for each input set: Login for the first combination and Not Login for the other three.

Decision Table with Conditions and Actions
Almost done. The remaining problem is simplifying the table and removing unnecessary input sets. Consider two things:
- If an input does not affect the result, remove it and replace it with
-. If anIncorrect usernamealways prevents login, there is no need to test bothCorrect passwordandIncorrect password. - Remove combinations that do not make sense. Technically, an incorrect username is not in the database, so any password cannot be judged correct or incorrect. We do not evaluate the password when the username is already wrong; that is consistent with the simplification above.

Simplified Decision Table
Splitting by combinations is logical for covering all possible situations, but the number of test cases grows exponentially. Simplification is therefore necessary to avoid generating redundant cases.
We end up with three test cases. The Decision Table gives us the basic idea:
User can login with correct username and passwordUser can't login with correct username and incorrect passwordUser can't login with incorrect username
To finish the High Level Test Cases, give username and password concrete values:
User can login with correct username and password->User can login with username: duyvan, password: 123456User can't login with correct username and incorrect password->User can't login with username: duyvan, password: wrong123456User can't login with incorrect username->User can't login with username: wrongduyvan
State Transitioning
State Transitioning applies to requirements involving a workflow or use flow: the user performs a sequence of actions and the state of a specific object changes after each one. In theory it fits a sequence of events and conditions where system behaviour depends on events and conditions in the past.
In simple terms, imagine a login flow, then account settings, then a request to deactivate the account. If the user does not recover it after one week, the account is deleted completely. The object changing state is the account; its states are Active, Inactive and Deleted. Developers turn the requirement into a product, and testers apply State Transitioning to split the test cases.
The process is:
- Identify the initial and final state of the flow.
- From the initial state, identify all possible next states and the actions that cause the change.
- Draw a State Transition Diagram with states and the actions causing transitions.
- Repeat from the identified states, continuing to complete the diagram.
- Stop when every state leads to the final state.
Then write a test case for each state transition of the object.
Here is the same example with more detail:
A user can create an account. From creation, if there are no transactions for six months, the account is automatically deactivated. If it is not recovered during the following six months, it is deleted completely.
Depending on severity, a terms-of-use violation can deactivate the account or delete it immediately.
The user can open account settings and deactivate the account. After deactivation it becomes Inactive; after six months without recovery it is deleted completely.
There are three states: Active, Inactive and Deleted.
- A newly created account is
Active. - A deactivated account is
Inactive. - A completely deleted account is
Deleted. Activecan becomeInactivewhen the user deactivates it, six months pass without a transaction, or the user violates a low-severity term.Activecan becomeDeletedafter a high-severity terms violation.Inactivecan becomeDeletedafter six months without recovery.
This gives five test cases for five state transitions:
User can deactivate account from Active to InactiveAccount automatically change from Active to Inactive after 6 months no transactionAccount automatically change from Active to Inactive after violate low termAccount automatically change from Active to Deleted after violate high termAccount automatically change from Inactive to Deleted after 6 months no recovery
That is State Transitioning.
Statement Testing
Statement Testing, also called Statement Coverage, is a Test Design Technique for White-box Testing. We test the work product while caring about code structure, so this technique is used most often with Unit Tests and Integration Tests. The goal is to split test cases so every executable statement runs at least once.
For example:
if a > 0:
print('a is positive')
else:
print('a is negative')
To run every line, we need one case for the if block and one for the else block. They cannot run at the same time, so use a > 0 and a <= 0. With Python knowledge, we can see that handling those two cases is enough.
The two High Level Test Cases are:
a is positive with a = 5a is negative with a = -5
The values -5 and 5 represent two partitions; we are also applying EP. If you think the example is missing BVA + EP, you are mixing up the goals. We want every line of code to run, and that is all. Statement Testing, and White-box Testing generally, checks code structure — whether the code is well covered — not whether the logic is correct.
Look at this example:
if a > 0:
if a == -1:
print('a is -1')
else:
print('a is positive')
else:
print('a is negative')
There is a code problem: if a is greater than 0, how can if a == -1 ever run? print('a is -1') can never execute for any value of a, so no test combination can reach 100% line coverage. Statement Testing helps identify unreachable lines and simplify the code. It also helps cover faulty code cases.
With a is positive with a = 5, 3/7 lines execute; with a is negative with a = -5, 2/7 execute. Together they execute only 5/7 lines. The print('a is -1') line cannot be covered by any value, so there is a redundant code branch.
Statement Testing usually goes with tracking code coverage, measured as a percentage. Coverage shows the code that has not run. The target percentage should be decided by the team and the risk; 100% statement coverage still does not prove the code is correct.
Decision/Branch Testing
Based on Statement Testing, identify test cases for:
if type(a) == int and a > 0:
print('a is positive')
if type(a) == str and len(a) > 0:
print('a is not empty')
Statement Testing gives us two cases:
a is positive with a = 5a is not empty with a = 'test'
But what happens when a is an integer and a = -1? The code has result branches that Statement Testing does not cover because no statement handles them. Statement Testing alone is not enough here.
Decision or Branch Testing splits cases so all possible result branches can run, not merely all lines. Decision Testing is broader than Statement Testing: 100% Statement Coverage does not guarantee 100% Decision Coverage, while 100% Decision Coverage implies 100% Statement Coverage.
We need four cases:
a is positive with a = 5Nothing happen with a = -1a is not empty with a = 'test'Nothing happen with a = ''
No line executes for a = -1 and a = '', but we still need cases for those result branches because the unmet conditions can expose errors. With the four cases, all result branches are covered and the code appears sound.
Here is a clearer example of why Decision Testing matters:
if a > 0:
'a is positive'
global b
b = 1
if b == 1:
print('b is 1')
With Statement Testing alone, one case is enough:
a is positive and b is 1 with a = 5
At a = 5, all six lines run and Statement Coverage reaches 100%. But what happens with the opposite condition, a < 0? The definition of b does not run, causing b is not defined at if b == 1. The a < 0 branch was not handled properly, so we need a case for it:
Nothing happen with a = -1a is positive and b is 1 with a = 5
The first case will certainly fail, allowing us to conclude that the code is not sound yet.
Path Testing
Path Testing combines Statement Testing and Decision Testing: split cases so all lines and all result branches can run. It is one of the more complex Test Design Techniques and is also commonly used in White-box Testing.
The reason to combine them is to cover code that has flow, rather than simply running from top to bottom. Recursive code, loops and similar situations operate by conditions. In my understanding, when the code diagram contains loops, feedback or code involving several inputs, Path Testing is needed.
Consider:
def foo():
if A == 'red':
print('A is red')
if B == 'red':
print('B is red')
Start with Statement Testing. One case is enough:
A is red with A = 'red' and B is red with B = 'red'
That runs all four lines, giving 100% Statement Coverage.
What if A and B are not red? We need two cases to cover the two result branches for both if blocks:
A is red with A = 'red' and B is red with B = 'red'Nothing happen with A = 'blue' and B = 'black'
For paths, however, the Decision Table technique tells us there are four value combinations for inputs A and B. We therefore need four cases to cover every path through foo:
A is red with A = 'red' and B is red with B = 'red'A is red with A = 'red' and Nothing happen with B = 'black'Nothing happen with A = 'blue' and B is red with B = 'red'Nothing happen with A = 'blue' and B = 'black'
In short, without being too mechanical:
Statement Testing splits cases so each line of code runs at least once.
Decision Testing splits cases so each branch of a True/False decision runs at least once.
Path Testing splits cases so all lines and all branches of the code run at least once.