Fixed state(s) for software under test, also known as text context
In software testing, a test fixture is a fixed state of the software under test used as a baseline for running tests; also known as the test context. It may also refer to the actions performed in order to bring the system into such a state.
It is often used in unit-testing and integration-testing.
Examples of fixtures:
- Loading a database with a specific, known set of data
- Erasing a hard disk and installing a known clean operating system installation
- Copying a specific known set of files
- Preparation of input data and set-up/creation of fake or mock objects
- Software used to systematically run reproducible tests on a piece of software under test is known as a test; part of its job is to set up suitable test fixtures.