
development may be applied at the unit test or customer test level, depending on 
which tests we have chosen to automate. 
test fi xture (disambiguation) 
In generic xUnit: All the things we need to have in place to run a test and expect 
a particular outcome. The test fi xture comprises the pre-conditions of the test; 
that is, it is the “before” picture of the SUT and its context. See also: test fi xture 
(in xUnit) and test context.
In NUnit and VbUnit: The Testcase Class. See also: test fi xture (in NUnit).
In Fit: The adapter that interprets the Fit table and invokes methods on the 
system under test (SUT), thereby implementing a Data-Driven Test.
See also: fi xture (Fit).
test fi xture (in NUnit) 
In NUnit (and in VbUnit and most .NET implementations of xUnit): The Test-
case Class on which the Test Methods are implemented. We add the attribute 
[TestFixture] to the class that hosts the Test Methods.
Some members of the xUnit family assume that an instance of the Testcase 
Class “is a” test context; NUnit is a good example. This interpretation assumes 
we are using the Testcase Class per Fixture approach to organizing the tests. 
When we choose to use a different way of organizing the tests, such as Testcase 
Class per Class or Testcase Class per Feature, this merging of the concepts of 
test context and Testcase Class can be confusing. This book uses “test fi xture”
to mean “the pre-conditions of the test” (also known as the test context) and 
Testcase Class to mean “the class that contains the Test Methods and any code 
needed to set up the test context.”
test fi xture (in xUnit) 
In xUnit: All the things we need to have in place to run a test and expect a par-
ticular outcome (i.e., the test context). Some variants of xUnit keep the concept 
of the test context separate from the Testcase Class that creates it; JUnit and its 
direct ports fall into this camp. Setting up the test fi xture is the fi rst phase of the 
Four-Phase Test. For meanings of the term “test fi xture” in other contexts, see 
test fi xture (disambiguation).
Glossary
814
Also known as:
Testcase Class
Also known as:
test context