Concept Architecture
Black-Box Testing of Health Economic Models
Black-box testing checks a programmed health economic model from the outside, by setting inputs to values whose consequences are known in advance and seeing whether the results follow. The approach matters in health technology assessment because errors in submitted models can change the cost-effectiveness estimate a committee relies on. Ghabri and colleagues describe a NICE appraisal of azacitidine for acute myeloid leukaemia where the company's ICER of about GBP 21,000 per QALY gained rose to about GBP 63,000 once undisputed errors in model construction were corrected. The term means a verification test of calculations, distinct from the opacity covered on the black box model page.
Verification and validation
Sargent adopts the definition of verification as ensuring that a computerised model and its implementation are correctly coded, and treats validation as the separate question of whether the model is accurate enough for its intended use. Black-box testing sits on the verification side. A model can pass every black-box test and still be the wrong model for the decision, because the tests compare the code with its own specification and not with observed data.
The two depend on each other. The CADTH model validation tool by Coyle and colleagues asks for validation of the conceptual model before technical verification, since a technically correct model may still be invalid if the decision problem or the clinical pathway is misspecified. Büyükkaramikli and colleagues, authors of the TECH-VER checklist, add that model validity is conditional on verification, because a wrongly implemented model fails to represent the real world even when its conceptualisation is right.
The name comes from software engineering. TECH-VER separates white-box testing, done with knowledge of how the code works, from black-box testing, done without that knowledge by running the code with given inputs and judging whether the output meets expectations. Many such tests match what Sargent calls degenerate tests and extreme condition tests, which choose particular or extreme input values and check that the model still behaves plausibly.
Standard tests for a cohort model
Each test pairs an input change with a result that can be stated before the model is run. TECH-VER offers a long list from which reviewers build their own, and the CADTH tool gives a baseline of minimal tests that it says is not exhaustive.
| Input change or check | Expected result | Listed in |
|---|---|---|
| Effectiveness, utility and safety inputs set equal across arms | Same life-years and QALYs in every arm | TECH-VER, CADTH tool |
| Those inputs swapped between two arms | Accumulated life-years and QALYs swap as well | TECH-VER, CADTH tool |
| All utilities set to 1 and disutilities to 0 | QALYs equal life-years | TECH-VER, CADTH tool |
| Mortality set to 0 | Nobody dies, and undiscounted life-years per person equal the time horizon | TECH-VER, CADTH tool |
| Discount rates set to 0 | Discounted and undiscounted results are the same | TECH-VER, CADTH tool |
| Time horizon shortened | Total life-years, QALYs and costs fall | TECH-VER, CADTH tool |
| Price of one technology raised | Only total costs of strategies that include it change | CADTH tool |
| Difference in efficacy and safety doubled | Roughly twice the incremental effect, or an explained reason why not | TECH-VER |
| State membership summed each cycle | Equals the cohort size, with no negative numbers | TECH-VER |
TECH-VER adds design-specific tests, for example that progression-free survival never crosses overall survival in a partitioned survival model, and asks whether the model passes the earlier tests in every iteration of the probabilistic sensitivity analysis. The CADTH tool expects costs, and likewise QALYs, to be strongly correlated between arms across Monte Carlo replications, since background mortality and similar inputs apply to every technology.
How reviewers run and record the tests
TECH-VER needs a reviewer, preferably independent, and an executable and transparent model. As a prerequisite the reviewer checks the calculations for completeness, meaning no hidden sheets, links to other software, hard-coded values or password protection, and for consistency with the report and sources, then prepares a model-specific list of black-box tests for each calculation stage. Tests run in order of the time they take, so black-box tests come first, white-box testing follows for calculations selected in advance or where a black-box result is unexpected, and replication is kept for problems that white-box testing cannot resolve. Reviewers document the tests conducted and those omitted, with reasons.
The CADTH tool calls the same step assessment of model behaviour. It expects a model that runs deterministically and probabilistically and keeps a clear trace linking every input to the final output. If a test cannot be performed, the tool reads that as a sign the programming may be inappropriately complex and recommends sending the model back to its developer.
NICE PMG36 (2022, updated 2026), section 4.6.4, asks companies to detail the quality assurance methods used in developing the model and to provide the methods and results of model validation, and a log of black-box tests belongs with the quality assurance methods. TECH-VER describes the NICE appraisal of idelalisib for refractory follicular lymphoma, in which the evidence review group found an error in the cohort trace that produced negative numbers of transitions, which a check that every transition probability is at least zero could have detected.
Worked example of an arm-swap test catching a cross-linked cell
All numbers in this example are illustrative. A three-state Markov cohort model with states Well, Sick and Dead compares standard care (arm A) with a new treatment (arm B) over two one-year cycles, without discounting or half-cycle correction. Each year 5% of the Well and 20% of the Sick die in both arms, nobody recovers from Sick, and the annual probability of progression to Sick is 0.20 in arm A and 0.10 in arm B.
where is total QALYs per person, is the cycle, and are the proportions of the cohort in Well and Sick at the end of cycle , is the Well utility (0.80) and is the Sick utility (0.50).
1. Correct results. In arm A, cycle 1 leaves Well 0.75 and Sick 0.20, giving 0.75 × 0.80 + 0.20 × 0.50 = 0.70. Cycle 2 leaves Well 0.75 × 0.75 = 0.5625 and Sick 0.75 × 0.20 + 0.20 × 0.80 = 0.31, giving 0.45 + 0.155 = 0.605, so arm A totals 1.305. In arm B, cycle 1 gives 0.85 × 0.80 + 0.10 × 0.50 = 0.73, and cycle 2 leaves Well 0.7225 and Sick 0.085 + 0.08 = 0.165, giving 0.578 + 0.0825 = 0.6605. Arm B totals 1.3905, a gain of 0.0855 QALYs.
2. The model as received. Suppose arm B's cycle 2 formulae point to arm A's progression cell. Cycle 2 then leaves Well 0.85 × 0.75 = 0.6375 and Sick 0.85 × 0.20 + 0.10 × 0.80 = 0.25, giving 0.51 + 0.125 = 0.635. The model reports 1.305 for arm A and 1.365 for arm B, a gain of 0.06, and the reviewer sees only these outputs.
3. Equal-effectiveness test. Setting arm B's progression probability to 0.20 gives 1.305 in both arms, so the test passes, because the faulty cell already holds 0.20.
4. Swap test. Setting arm A to 0.10 and arm B to 0.20 should make the totals trade places, 1.365 for arm A and 1.305 for arm B. Arm A reports 1.3905. Arm B uses 0.20 in cycle 1, giving 0.70, then arm A's 0.10 in cycle 2, leaving Well 0.75 × 0.85 = 0.6375 and Sick 0.075 + 0.16 = 0.235, giving 0.51 + 0.1175 = 0.6275 and a total of 1.3275. The test fails, as neither total matches. The incremental result, 1.3275 minus 1.3905 or minus 0.063, is close to the expected minus 0.06, so a reviewer comparing only incremental QALYs could miss the fault.
5. Correction and decision. White-box review of arm B's cycle 2 formulae finds the cross-link, and after correction the swap test passes, with 1.3905 for arm A and 1.305 for arm B. With an illustrative incremental cost of GBP 2,000, unchanged by the correction, the ICER falls from 2,000 / 0.06 = GBP 33,333 to 2,000 / 0.0855 = GBP 23,392 per QALY. At an illustrative threshold of GBP 25,000 per QALY, incremental net monetary benefit is 25,000 × 0.06 minus 2,000, or minus GBP 500, before correction and 25,000 × 0.0855 minus 2,000, or GBP 137.50, after it.
With equal inputs it makes no difference which arm's cell a formula reads, so only the swap test could expose the cross-link.
Reading a passed or failed test
A pass shows only that the model behaved as expected. The CADTH tool states that black-box testing alone cannot confirm whether the model is providing correct results, which needs white-box testing, and TECH-VER deliberately gives no verification score because a score could give a false sense of security.
A failure points either to an error in the code or to an unspecified effect of the technology that may be invalid, in the CADTH tool's reading. Some departures are legitimate, and the tool accepts that a swap test may be limited when technologies need different structures, such as surgery against a chronic medication.
Neighbouring checks and other meanings
Black-box testing shares its mechanics with sensitivity analysis, as both change inputs and watch outputs. Sensitivity analysis describes how results depend on uncertain inputs, while a black-box test compares the response with a prior expectation to find faults. Extreme value testing overlaps closely, and AdViSHE item C2 asks whether a model has been run for specific, extreme sets of parameter values to detect coding errors.
White-box testing and replication-based tests, such as double programming, are the later steps in the TECH-VER order, and the model diagnostics and analysis error pages cover wider checks and the errors they look for. In simulation science, Robinson uses black-box validation for an overall check that the whole model represents the real world accurately enough. That check compares the whole model with the real system or with other models, which Sargent treats under operational validity.
Common misreadings
Most misreadings stretch what a black-box test can show.
- Treating a passed suite as proof. Neither TECH-VER nor the CADTH tool treats a pass as proof of correct results.
- Checking only incremental results. TECH-VER sets expected values for each arm at any time, and the worked example shows a fault the increment almost hides.
- Testing only the deterministic base case. TECH-VER asks for the tests to hold in all probabilistic iterations.
- Counting verification as validation. Ghabri and colleagues note that verification bolsters confidence that results match the intended implementation, while the need for validation remains, the subject of model validation and calibration.
Sources
- Büyükkaramikli NC, Rutten-van Mölken MPMH, Severens JL, Al M. TECH-VER: a verification checklist to reduce errors in models and improve their credibility. PharmacoEconomics. 2019;37(11):1391-1408. https://doi.org/10.1007/s40273-019-00844-y
- Coyle D, Haines A, Lee K. The development of a model validation tool to assist in the conduct of economic evaluations. Canadian Journal of Health Technologies. 2024;4(3). https://doi.org/10.51731/cjht.2024.862
- Ghabri S, Stevenson M, Möller J, Caro JJ. Trusting the results of model-based economic analyses: is there a pragmatic validation solution? PharmacoEconomics. 2019;37(1):1-6. https://doi.org/10.1007/s40273-018-0711-9
- National Institute for Health and Care Excellence. NICE technology appraisal and highly specialised technologies guidance: the manual (PMG36). Published 31 January 2022, last updated 13 October 2026. Section 4.6.4. https://www.nice.org.uk/process/pmg36
- Robinson S. Simulation model verification and validation: increasing the users' confidence. In: Proceedings of the 1997 Winter Simulation Conference. 1997:53-59. https://www.informs-sim.org/wsc97papers/0053.PDF
- Sargent RG. Verification and validation of simulation models. In: Proceedings of the 2011 Winter Simulation Conference. 2011:183-198. https://www.informs-sim.org/wsc11papers/016.pdf
- Vemer P, Corro Ramos I, van Voorn GAK, Al MJ, Feenstra TL. AdViSHE: a validation-assessment tool of health-economic models for decision makers and model users. PharmacoEconomics. 2016;34(4):349-361. https://doi.org/10.1007/s40273-015-0327-2
Related Concepts (7)
Frequently Asked Questions (6)
What is Black-Box Testing?
Black-box testing checks a health economic model by changing inputs and comparing outputs with expected results, without inspecting its formulae or code.
Source: Büyükkaramikli et al. 2019
What standard tests are used in black-box testing of a cohort model?
Each test pairs a change in inputs with a result that can be stated before the model is run. The TECH-VER checklist by Büyükkaramikli and colleagues includes setting effectiveness, utility and safety inputs equal across arms, which should give the same life-years and QALYs in every arm, and swapping those inputs between two arms, which should swap the accumulated results. Setting all utilities to 1 should make QALYs equal life-years, and with mortality at 0, undiscounted life-years per person should equal the time horizon. Reviewers build their own model-specific list from these examples, with design checks such as progression-free survival never crossing overall survival in a partitioned survival model.
Source: Büyükkaramikli et al. 2019
How do HTA reviewers carry out and record black-box testing of a submitted model?
The TECH-VER checklist needs a reviewer, preferably independent, and an executable and transparent model. The reviewer first checks the calculations for completeness, meaning no hidden sheets, links to other software, hard-coded values or password protection, and for consistency with the report and sources, then prepares a model-specific list of black-box tests for each calculation stage. Tests run in order of the time they take, so black-box tests come first, white-box testing follows for calculations selected in advance or where a black-box result is unexpected, and replication is kept for problems that white-box testing cannot resolve. Reviewers document the tests conducted and those omitted, with the reasons for each omission.
Source: Büyükkaramikli et al. 2019
How does black-box testing differ from white-box testing and from model validation?
The terms come from software engineering, and the TECH-VER checklist separates white-box testing, done with knowledge of how the code works, from black-box testing, done without that knowledge by running the model with given inputs and judging whether the output meets expectations. Black-box testing is therefore a verification check on whether the model was built as specified. Validation asks whether it is the right model for the decision, which black-box tests cannot answer because they compare the code with its own specification and not with observed data. Büyükkaramikli and colleagues add that validity is conditional on verification, since a wrongly implemented model fails to represent the real world even when its conceptualisation is right.
Source: Büyükkaramikli et al. 2019
What does passing or failing black-box testing show about a health economic model?
A pass shows only that the model behaved as expected for that input change. The CADTH model validation tool by Coyle and colleagues states that black-box testing alone cannot confirm whether a model is providing correct results, which needs white-box testing. In the tool's reading, a failure points either to an error in the code or to an unspecified effect of the technology that may be invalid. Some departures are legitimate, and the tool accepts that a swap test may be limited when technologies need different structures, such as surgery compared with a chronic medication. Where a test cannot be performed at all, the tool recommends sending the model back to its developer.
Source: Coyle et al. 2024
Why do errors found by black-box testing matter in health technology assessment?
Errors in a submitted model can move the cost-effectiveness estimate that an appraisal committee relies on. Ghabri and colleagues describe a NICE appraisal of azacitidine for acute myeloid leukaemia in which the company's ICER of about GBP 21,000 per QALY gained rose to about GBP 63,000 once undisputed errors in model construction were corrected. Black-box testing gives a reviewer an early check for such errors without opening the formulae. Ghabri and colleagues also note that verification only bolsters confidence that results match the intended implementation, while the need for validation remains.
Source: Ghabri et al. 2019
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 11 Nov 2026
Content version: 1.0.0
Canonical Identity
- Persistent URI
- https://healtheconomics.wiki/concept/black-box-testing
- Term code
- HE-EM-MV-093
Stable URI · Machine-readable · Resolvable · CC BY 4.0
