A fixture in this article

The term fixture varies based on context, programing language or framework.

A known state against which a test is running

One of the most time-consuming parts of writing tests is writing the code to set the world up in a known state and then return it to its original state when the test is complete. This known state is called the fixture of the test.

PHP-Unit documentation A test fixture (also known as a test context) is the set of preconditions or state needed to run a test. The developer should set up a known good state before the tests, and return to the original state after the tests.

Wikipedia (xUnit)

A file containing sample data

Fixtures is a fancy word for sample data. Fixtures allow you to populate your testing database with predefined data before your tests run. Fixtures are database independent and written in YAML. There is one file per model. RubyOnRails.org

A process that sets up a required state.

A software test fixture sets up the system for the testing process by providing it with all the necessary code to initialize it, thereby satisfying whatever preconditions there may be. An example could be loading up a database with known parameters from a customer site before running your test.

Wikipedia

In this article, a fixture is the last definition, a code that sets up a known state needed to run a test.

A sample system

Let's define an imaginary service that provides an HTTP resource /articles. The data of this resource is stored in a MongoDB database. This service is implemented using Express. Our Express App would have the following structure.