Glossary Updates12 new terms added to the glossaries · October 2, 2026, 22:44 CEST
AI TechDocKnowledge

Glossary · Automation software engineering and architecture

Test double

Also known as: Test stand-in

German: Test-Dummy

In software testing, a test double is any object or component that replaces a real dependency during a test, such as a dummy, stub, fake, spy or mock, so the code under test can be tested in isolation.

  • Software engineering

In one sentence

A test double replaces a real dependency during a test, such as a stub, fake or mock, so the code under test runs in isolation.

Example

In the unit test of the recipe manager, a fake database in memory replaces the real SQL server.

How it applies

  • Engineering: Test doubles remove slow, unavailable or nondeterministic dependencies such as hardware, networks and databases from unit tests. They are easiest to use when dependencies are injected through interfaces.
  • Verification: Tests with doubles show that the unit works with the double. Integration tests with real components remain necessary.
  • Documentation: Test specifications should state which dependencies were replaced and how, so reviewers can judge what a test demonstrates.

Kinds of test doubles

A dummy only fills parameters. A stub returns fixed answers. A fake has a simplified working implementation. A spy records calls. A Mock object verifies expected calls. The German list term Test-Dummy is used for the general concept here.

By knowledge.aitechdoc.world · Published September 26, 2026 · Last reviewed

Source: AI TechDoc Knowledge editorial definition, based on software testing practice (Meszaros, xUnit Test Patterns)

Definitions follow the cited standards and specifications. Where a source is a copyrighted publication, such as an ISO, IEC or EN standard, the definition is a close paraphrase, not a verbatim quotation, so as not to infringe copyright. We recommend reading the original publication. The sections “How it applies” are editorial commentary by AI TechDoc Knowledge and are not part of any standard.

Seen a mistake? Send us a note!