QA How-To
Decision table testing (2026)
Learn decision table testing with step-by-step examples, rule reduction, test design, runnable automation, interview answers, and common mistakes for QA.
24 min read | 3,093 words
TL;DR
Decision table testing converts combinations of conditions into rules and expected actions. Enumerate relevant combinations, identify contradictions and impossible states, merge only rules with identical outcomes, then create one or more tests per retained rule plus boundary tests for value ranges.
Key Takeaways
- A decision table maps combinations of conditions to actions, making business rules, gaps, conflicts, and impossible combinations visible.
- Define conditions as independent business questions and actions as observable outcomes before enumerating rules.
- A complete limited-entry table starts with up to 2^n combinations for n binary conditions, then removes impossible rules and safely merges equivalent ones.
- Every retained rule should trace to at least one test, with boundary analysis added for condition values such as amounts, dates, and counts.
- Do not let the test designer invent unresolved policy, mark conflicts and gaps for a domain decision.
- Automate from reviewed rule data only when readability, validation, diagnostics, and ownership are stronger than hand-written cases.
Decision table testing is a black-box test design technique for behavior controlled by combinations of conditions. It places business questions in rows, combinations in rule columns, and expected actions below them, making missing rules, conflicting outcomes, impossible states, and redundant test cases visible before automation begins.
It is especially useful for pricing, eligibility, permissions, claims, routing, workflow transitions, and configuration logic. A decision table does not replace boundary analysis, state-transition testing, exploratory testing, or domain review. It gives those activities a precise map of combination logic. This guide shows how to build, reduce, execute, and automate that map in a defensible 2026 QA workflow.
TL;DR
| Element | Meaning | Example |
|---|---|---|
| Condition stub | Business question or input class | Is the customer a member? |
| Condition entry | Value for one rule | Yes, No, or don't care |
| Action stub | Observable outcome | Apply free shipping |
| Action entry | Expected action for one rule | Execute or do not execute |
| Rule | One relevant combination and its outcomes | Member=No, total>=50=Yes -> free shipping |
| Constraint | Combination that cannot occur | Account both active and closed |
Use one column per rule. Trace each retained rule to a test, then add boundary cases for values hidden behind categories such as "total at least 50."
1. What Is Decision Table Testing?
A decision table represents conditional business behavior in a form that people can inspect. The upper half lists conditions and their values. The lower half lists actions or outcomes. Each column is a rule: when all specified condition entries in that column are true, the listed action entries should occur.
A limited-entry decision table typically expresses each condition as binary, such as Yes or No, True or False, present or absent. An extended-entry table allows values or classes such as guest, member, and premium, or ranges such as < 50 and >= 50. Limited tables are easy to enumerate, while extended tables can express a domain more compactly.
The method is powerful when individual conditions are simple but their interactions are not. A password reset may depend on account status, verified contact, rate limits, and identity method. A loan rate may depend on credit band, term, collateral, and customer segment. Listing one test per field misses interactions, while an unstructured combination list becomes hard to review.
Decision tables are sometimes called cause-effect tables, although formal cause-effect graphing can be a separate technique that models logical relationships before generating a table. The core testing value is the same: expose the rule space and agreed outcomes. Do not use a decision table for every screen. A simple independent validation or a behavior driven mainly by sequence may be clearer with equivalence partitions, boundaries, or a state model.
2. When to Use a Decision Table and When Not to
Use a decision table when two or more conditions jointly determine an outcome, business policy can be expressed as rules, combinations are easy to overlook, or stakeholders disagree about edge cases. Authorization, discounts, insurance claims, tax, feature eligibility, notification routing, approval levels, and fraud responses are strong candidates. Tables also help review configuration engines and spreadsheet-like policy.
Look for language such as "if," "unless," "only when," "either," "except," and "depending on." A requirement that says "premium members receive free shipping, except hazardous goods require a fee unless a promotion overrides it" contains interacting causes. Turning it into examples without a model can miss a conflict between promotion and safety policy.
Do not force temporal workflows into a static table. If order matters, such as three failed attempts followed by a lock and timed recovery, use state-transition testing and perhaps a table within each state. Do not use a huge table for continuous numeric domains without first partitioning values. A condition such as account balance should become meaningful classes, then boundary-value analysis should test edges inside and around those classes.
A table is also a poor fit when the expected outcome is subjective or exploratory, such as whether a dashboard communicates urgency clearly. Use usability or exploratory methods there. The table can still model objective variants, such as role and data state, that seed sessions. Choose the technique that makes the risk easiest to reason about rather than the one with the most formal appearance.
3. Extract Conditions, Actions, and Constraints
Begin with a precise decision scope. Name the trigger, input state, decision point, and observable outcome. "Checkout rules" is too broad. "Select the standard shipping fee after address and cart validation" is testable. Identify the authoritative policy owner and source because test design should reveal ambiguity, not silently resolve it.
Write conditions as independent questions that have clear partitions. "Valid user" often bundles authentication, account status, role, and compliance state, which can interact differently. Split it only as far as the decision actually uses those facts. Conditions should describe business information, not UI steps. "User clicks Apply" may be a trigger, while "coupon is active" is a decision condition.
Write actions as observable results. Include returned decision, price or status, side effects, messages, audit records, notifications, and absence of prohibited actions when they matter. Keep distinct actions separate if they can vary independently. "Reject and show error" may need two rows when the system could reject silently or show an error while accidentally accepting.
Capture constraints before enumerating. Some combinations are logically impossible, invalid by data model, or excluded by scope. A customer cannot simultaneously be guest and premium if segment is a single-valued enum. A claim may not have an approval result before review. Mark why a rule is impossible and whether the system should prevent, reject, or safely handle the invalid state. The requirements traceability guide can connect the policy source, decision rule, test, and defect.
4. Build a Complete Limited-Entry Table Step by Step
For n independent binary conditions, the complete combination table contains up to 2^n columns. With three conditions, start with eight combinations. Fill values systematically so none are duplicated: the first condition changes halfway through, the second every quarter, and the third every column. A small generator or spreadsheet can help, but review the meaning manually.
Consider standard shipping. Conditions are: customer is a member, order subtotal is at least $50, and the address is remote. Actions are: free shipping, standard fee, and remote surcharge. Assume members or qualifying subtotals receive free base shipping, while a remote surcharge always applies.
| Row | R1 | R2 | R3 | R4 | R5 | R6 | R7 | R8 |
|---|---|---|---|---|---|---|---|---|
| Member? | Y | Y | Y | Y | N | N | N | N |
| Subtotal >= $50? | Y | Y | N | N | Y | Y | N | N |
| Remote address? | Y | N | Y | N | Y | N | Y | N |
| Free base shipping | X | X | X | X | X | X | ||
| Charge standard fee | X | X | ||||||
| Add remote surcharge | X | X | X | X |
Now review each column with the policy owner. The table makes the remote rule explicit: free base shipping does not remove the surcharge. If stakeholders expected "free shipping" to mean no charge at all, the conflict appears before test execution. This is one of the method's greatest benefits.
5. Use Extended Entries, Don't-Care Values, and Rule Reduction
Extended-entry tables replace several binary rows with named values or partitions. A customer-tier condition can contain guest, member, and premium. A total can contain < 50, 50 to 199.99, and >= 200. This can be more readable, but each entry must have a precise definition, especially at boundaries and for null or invalid data.
A don't-care entry, often shown as -, means the condition does not affect the actions for that rule. It does not mean unknown, not tested, or any random value without thought. In the shipping example, when Member=Y, subtotal does not change free base shipping. Two columns that differ only by subtotal and have identical actions can merge into a rule with Subtotal=-.
Merge rules only when their actions are identical and no hidden interaction is lost. If two rules produce the same visible fee but different audit, notification, tax, or explanation behavior, they are not equivalent. Keep a record of reduction so reviewers can reconstruct coverage. Automated combinatorial reduction is not a substitute for domain semantics.
| Reduced rule | Member | Subtotal >= $50 | Remote | Base fee | Surcharge |
|---|---|---|---|---|---|
| R1 | Y | - | N | Free | None |
| R2 | Y | - | Y | Free | Remote |
| R3 | N | Y | N | Free | None |
| R4 | N | Y | Y | Free | Remote |
| R5 | N | N | N | Standard | None |
| R6 | N | N | Y | Standard | Remote |
Reduction changes the number of rules, not necessarily all test data. For a merged member rule, choose a subtotal value that makes the test readable and add boundary coverage elsewhere. If membership and subtotal logic are independently high risk, retain representative values on both sides even though the action is unchanged.
6. Convert Rules Into Decision Table Test Cases
Create at least one test per retained rule. Each test identifies preconditions, exact input values, trigger, expected primary outcome, expected side effects, and evidence. Use concrete data that belongs unambiguously to each condition class. A subtotal of exactly $50 tests the boundary, while $75 is a clear interior value. Do not accidentally use a value whose fees or rounding create another rule.
Trace the test to the rule ID. A useful name is "R4 nonmember qualifying subtotal at remote address receives free base shipping plus surcharge." This explains the combination and expected outcome. Keep UI navigation out of the rule model unless it changes the decision. The same rules may be exercised at a domain, API, and selected end-to-end layer for different integration risks.
Add boundary-value analysis. If the rule uses subtotal >= 50, test values just below, at, and just above the threshold using the smallest meaningful currency unit, such as 49.99, 50.00, and 50.01 for a two-decimal currency. Clarify rounding, discounts, taxes, and currency conversion before selecting values. A floating-point representation issue is different from an unresolved pricing policy.
Add negative and robustness tests outside the decision table when necessary: missing membership state, invalid address classification, negative subtotal, duplicate request, stale price, concurrency, dependency timeout, and unauthorized changes. The table models valid decision logic unless invalid classes are explicitly included. Use the boundary value analysis guide to extend each condition partition without multiplying every boundary across every rule.
7. Detect Gaps, Contradictions, and Impossible Rules
A completeness review asks whether every valid combination has exactly one intended outcome. A blank action column may mean an unspecified rule. Multiple mutually exclusive actions in one column may mean a contradiction. Two columns with identical conditions and different actions reveal a direct conflict. Do not choose the result that seems most reasonable and encode it in automation. Record a policy question for the accountable stakeholder.
Check action consistency across systems. A rules service may return APPROVED, while the UI hides the action and the audit stream records MANUAL_REVIEW. The decision table should state which outcomes are part of the scope and where each is observed. Distributed effects may be eventually consistent, so define the time and reconciliation oracle.
Impossible combinations need deliberate handling. Some are prevented by the data type, some by upstream validation, and some only by convention. If an impossible state can arrive through migration, stale messages, or a direct API, test safe rejection or recovery at the responsible boundary. Marking a column "impossible" without evidence can hide a production path.
Review priority or precedence. When multiple rules could match an extended table, does the engine select the first, the most specific, all matching actions, or reject ambiguity? A table that assumes first-match order must display that order and test it. Prefer mutually exclusive conditions where possible because hidden precedence is difficult to maintain. Static analysis or a small rule validator can detect overlaps, but domain review determines whether overlap is intentional.
8. Automate Decision Table Testing With Data-Driven Tests
Automation works well when rules are stable, inputs can be created independently, and expected outcomes are explicit. Keep the reviewed rule data readable and validate its schema. Each generated case should report the rule ID and meaningful input on failure. Avoid a single loop that stops at the first assertion or produces only "expected 0, received 6.99" with no business context.
This complete Node.js file implements and tests the reduced shipping table. Save it as shipping-decision-table.test.mjs and run node --test shipping-decision-table.test.mjs on a current Node.js release. It uses only built-in node:test and node:assert APIs.
import assert from 'node:assert/strict';
import test from 'node:test';
function shippingQuote({ member, subtotal, remote }) {
if (subtotal < 0) throw new RangeError('subtotal must be nonnegative');
return {
baseFee: member || subtotal >= 50 ? 0 : 6.99,
remoteSurcharge: remote ? 4.5 : 0
};
}
const rules = [
{ id: 'R1', member: true, subtotal: 20, remote: false, baseFee: 0, remoteSurcharge: 0 },
{ id: 'R2', member: true, subtotal: 20, remote: true, baseFee: 0, remoteSurcharge: 4.5 },
{ id: 'R3', member: false, subtotal: 50, remote: false, baseFee: 0, remoteSurcharge: 0 },
{ id: 'R4', member: false, subtotal: 50, remote: true, baseFee: 0, remoteSurcharge: 4.5 },
{ id: 'R5', member: false, subtotal: 49.99, remote: false, baseFee: 6.99, remoteSurcharge: 0 },
{ id: 'R6', member: false, subtotal: 49.99, remote: true, baseFee: 6.99, remoteSurcharge: 4.5 }
];
for (const rule of rules) {
test(`${rule.id}: shipping decision`, () => {
assert.deepEqual(
shippingQuote(rule),
{ baseFee: rule.baseFee, remoteSurcharge: rule.remoteSurcharge }
);
});
}
Do not generate both product logic and expected results from the same unreviewed formula. That creates a shared-error oracle. The sample keeps expected values explicit. In a production suite, validate types, use exact money representations appropriate to the application, create data through supported interfaces, and test selected integration journeys. Generated tests should remain understandable to domain reviewers.
9. Apply Decision Tables to Real QA Domains
For role-based access, conditions might include authentication, role, tenant ownership, resource state, and requested action. Actions include allow, deny without revealing existence, require step-up authentication, and write an audit event. A table exposes horizontal and vertical permission combinations, but object identifiers, field-level authorization, caching, and direct API calls still need targeted tests.
For insurance or finance decisions, conditions can include product, region, amount band, customer status, document completeness, risk flag, and approval level. Actions can include accept, reject, manual review, price adjustment, notification, and audit. These domains require authoritative policy, effective dates, precision, traceability, access controls, and careful test data. The tester must not infer a regulated decision from intuition.
For workflow routing, conditions might include request type, urgency, agent skill, operating hours, and queue health. Actions include queue, escalation, automated response, or callback. Combine the decision table with state transitions and concurrency tests because a valid routing decision can still be lost, duplicated, or applied after state changes.
For feature flags, conditions include environment, tenant, cohort, user eligibility, kill switch, and dependency readiness. Actions cover old path, new path, or safe fallback. Test flag precedence, caching, rollout changes during a session, metrics, rollback, and cleanup. The table helps reveal dangerous combinations, but configuration distribution and production observability sit outside its static rules.
For form validation, use tables only where fields interact. Independent required and format rules are usually clearer as equivalence partitions. A table becomes valuable when country changes postal rules, account type changes required documents, or one date constrains another. This selective use keeps the artifact readable.
10. Review and Maintain Decision Table Testing Artifacts
Treat the decision table as versioned product knowledge. Give it a clear decision name, scope, policy source, owner, effective date, rule IDs, constraints, and unresolved questions. Store it near requirements or executable specifications where the team can review changes. A spreadsheet attachment with no owner quickly becomes a second, stale implementation.
When a rule changes, review all columns affected by the condition and action, not only the example mentioned in the story. Diff the table, update traceability, execute impacted tests, and assess migration or in-flight behavior. A new condition can double a limited table, but many combinations may be constrained or outcome-equivalent. Rebuild systematically before reducing.
Use production incidents and support cases to improve the model. Ask whether the failing combination was absent, marked impossible, assigned the wrong action, implemented incorrectly, or tested at an insufficient boundary. Add the smallest regression evidence that detects the first useful failure. Do not retain redundant end-to-end cases when a precise domain test and one integration check cover the lesson better.
Review tables with product, domain, development, and testing perspectives. Read rules column by column in plain language. Confirm terminology, boundaries, don't-care entries, precedence, invalid states, side effects, and observability. Archive obsolete policies so historical behavior remains explainable. Decision table testing is most valuable as a shared reasoning practice, not just a technique QA applies after requirements are signed.
Interview Questions and Answers
Q: What is decision table testing?
It is a black-box technique that maps combinations of conditions to expected actions. Each column represents a rule, which helps expose missing outcomes, contradictions, impossible states, and redundant cases in combination-heavy business logic.
Q: What is a limited-entry decision table?
A limited-entry table uses a small binary set for condition entries, commonly Yes and No. With n independent binary conditions, the complete starting table has up to 2^n rules before constraints and safe reduction.
Q: What is an extended-entry decision table?
It uses named values, classes, or ranges instead of only binary entries. It can represent customer tiers or amount bands compactly, but every class and boundary must be defined precisely.
Q: What does a don't-care entry mean?
It means that condition does not change the expected actions for that specific rule. It does not mean the value is unknown or can be omitted from test data without selecting a representative value.
Q: How do you reduce a decision table?
I merge rules that differ in only one condition and have identical relevant actions, replacing that condition with don't care. I preserve hidden side effects and trace the reduction so full combination reasoning remains reviewable.
Q: How do decision tables work with boundary-value analysis?
The table covers interactions among condition classes. Boundary analysis selects values just below, at, and just above class edges. I avoid multiplying every boundary across every rule unless risk justifies those interactions.
Common Mistakes
- Combining several business facts into a vague condition such as "valid customer."
- Starting with expected actions before identifying the authoritative policy and decision scope.
- Omitting valid combinations because they look unlikely or inconvenient.
- Marking a rule impossible without checking APIs, migration, stale data, and upstream controls.
- Using don't care to mean unknown, not applicable, or untested.
- Merging rules that share a visible result but differ in audit, notification, pricing detail, or other side effects.
- Generating product behavior and expected test results from the same formula.
- Treating categories such as
>= 50as complete without boundary-value tests. - Forcing sequence-heavy or subjective behavior into a static decision table.
Conclusion
Decision table testing turns complicated combinations into inspectable rules. Define the decision and policy source, extract independent conditions and observable actions, enumerate valid combinations, resolve gaps and conflicts, reduce carefully, and trace retained rules to concrete tests.
Choose one business rule that repeatedly creates clarification or defects. Build its complete table with a domain expert, automate the stable rules at the lowest useful layer, and add boundaries, state, and exploratory coverage where the table deliberately stops.
Interview Questions and Answers
Explain decision table testing.
Decision table testing represents conditions in rows, combinations as rule columns, and expected actions in lower rows. It is useful when behavior depends on interacting business facts. The table reveals missing, conflicting, impossible, and redundant rules.
How do you create a decision table?
I define the decision scope and policy owner, extract independent conditions, list observable actions, and record constraints. I enumerate valid combinations, assign outcomes with the domain expert, resolve gaps and conflicts, then reduce only equivalent rules. Each retained rule traces to a test.
How do you calculate the maximum number of rules?
For n independent binary conditions, the complete starting table has up to 2^n rules. Multi-valued conditions use the product of their number of partitions. Constraints can make some theoretical combinations impossible.
What is a limited-entry decision table?
It uses binary condition values, commonly Yes and No, with marked actions for each rule. It is systematic and easy to enumerate. Large numbers of binary conditions can still make it grow quickly.
What is an extended-entry decision table?
It allows named classes, ranges, or values such as guest, member, and premium. It can reduce the number of condition rows and improve domain readability. Its partitions, boundaries, null behavior, and precedence must be explicit.
How do you handle impossible combinations?
I document why the combination is impossible and identify the enforcing boundary. If migration, APIs, stale messages, or corrupted state could still create it, I test safe rejection or recovery. I do not discard it based only on a UI assumption.
How do you reduce decision table rules?
I merge columns that differ in one condition but have identical relevant actions, using a don't-care entry for that condition. I check audit, messages, side effects, and precedence before merging. The original combination logic remains traceable.
How do you derive tests from a decision table?
I create at least one concrete case per retained rule, selecting unambiguous values and verifying all relevant actions and prohibited effects. I use the rule ID in the test name. Boundaries, invalid values, sequence, concurrency, and resilience are added with other techniques.
What are the limitations of decision table testing?
It can grow combinatorially, depends on correct condition partitions, and represents static decisions better than temporal workflows. It does not judge usability or explore unknown risk. Reduction can hide behavior if side effects are omitted.
How would you automate a decision table?
I store reviewed rule inputs and explicit expected outputs in a typed or schema-validated dataset. The test runner creates one named case per rule and reports complete context. I keep the oracle independent of the production formula and add selected integration coverage.
Frequently Asked Questions
What is decision table testing with an example?
It maps condition combinations to outcomes. For shipping, membership, order threshold, and remote address can determine base fee and surcharge, with one rule column for each relevant combination.
How many rules are in a decision table?
A complete table with n independent binary conditions begins with up to 2^n combinations. Constraints remove impossible rules, and rules with identical actions may be merged using don't-care entries when no meaningful behavior is lost.
What is the difference between limited and extended decision tables?
Limited-entry tables use binary condition entries such as Yes and No. Extended-entry tables use multiple named values or ranges, making some domains more compact but requiring precise partitions and boundaries.
When should decision table testing be used?
Use it when several conditions jointly determine business outcomes, especially in eligibility, pricing, permissions, routing, claims, tax, and workflow policy. It is less useful for simple independent fields or behavior dominated by event sequence.
Can decision tables be automated?
Yes. Store reviewed rules as readable data and run one independently reported test per rule. Keep expected outcomes explicit, validate the rule schema, and avoid generating both the implementation and oracle from one formula.
What does a dash mean in a decision table?
It usually means don't care: that condition does not affect actions for that rule. The notation must be defined because teams may otherwise confuse it with unknown, not applicable, or untested.
Does decision table testing replace boundary testing?
No. Decision tables cover combinations among meaningful classes, while boundary-value analysis tests the edges that define those classes. Strong test design uses both without multiplying every value unnecessarily.