Datasheet
4
Chapter 1: Preliminary Concerns
Pass. A pass indicates that everything is working correctly. When represented on a report or
user interface (UI), it is represented as green.
Fail. In the case of a fail, the functionality being tested has changed and as a result no longer
works as expected. When represented on a report, this is represented as red.
xUnit. xUnit refers to the various testing frameworks which were originally ported from sUnit.
Tools such as jUnit, qUnit, and nUnit fall into the xUnit family.
Test Fixture. Test fixtures refer to the state a test must be in before the test can be run. Test fix-
tures prepare any objects that need to be in place before the test is run. Fixtures ensure a known,
repeatable state for the tests to be run in.
Test Driven Development (TDD). Test Driven Development is an Agile Software Development
process where a test for a procedure is created before the code is created.
Behavior Driven Development (BDD). Building on top of the fundamentals of TDD, BDD aims
to take more advantage of the design and documentation aspects of TDD to provide more value
to the customer and business.
Test Double. When we cannot, or choose not, to use a real component in unit tests, the object
that is substituted for the real component is called a test double.
Stub. A test stub is a specific type of test double. A stub is used when you need to replicate an
object and control the output, but without verifying any interactions with the stub object for
correctness. Many types of stubs exist, such as the responder, saboteur, temporary, procedural,
and entity chain, which are discussed in more depth in Chapter 2.
Mock. Mock objects are also a form of test double and work in a similar fashion to stub objects.
Mocks are used to simulate the behavior of a complex object. Any interactions made with the
mock object are verified for correctness, unlike stub objects. Mock objects are covered in depth
in Chapter 2.
Fake. Fake objects are yet another type of test doubles. Fake objects are similar to test stubs, but
replace parts of the functionality with their own implementation to enable testing to be easier
for the method.
Dummy Objects. Dummy objects are used when methods require an object as part of their
method or constructor. However, in this case the object is never used by the code under test. As
such, a common dummy object is null.
Unit Test. A unit test is a method used to verify that a small unit of source code is working
properly. Unit tests should be independent of external resources such as databases and files. A
unit is generally considered a method.
Developer Test. This is another term for a unit test.
Integration Test. This is similar to a unit test; however, instead of being an isolation unit, these
test cross-application and system boundaries.
Functional Test. Functional tests group units of work together to test an external requirement.
Testing disciplines such as graphical user interface testing and performance testing are consid-
ered functional tests.
GUI Test. GUI tests test the graphical user interface. GUI tests are considered functional tests.
Applications are used to simulate users interacting with the system such as entering text into a field
or clicking a button. Verifications are then made based on the response from the UI or system.
96640c01.indd 4 9/25/09 7:18:27 AM