I've seen the term "fixture" used in a number of different contexts, and I suspect I don't quite understand what is meant by the term, because I see it used to mean things that I didn't think it meant. At a high level, can someone provide a clear, concise definition of the term?
It depends on the context.
For instance, in Fitnesse or other BDD frameworks it is the "glue" (an intermediary software layer) that connects test scripts with the system under test (SUT). E.g. translates test commands to SUT API and responses from SUT API back to the test script.
My observation is this is also a reason why BDD often fails. Non-technical testers and business analysts complain there is no fixture to test new feature of the SUT and developers say it is not their problem to write them.
I think the Wikipedia definition of fixture is pretty clear:
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.
In generic xUnit, a test fixture is all the things that must be in place in order to run a test and expect a particular outcome.
Seems its a way to make sure a system is in a certain state.
I use NUnit which has a bunch of material around the word "Fixture" they have something called TestFixture which is declared at the beginning of your code and is defined as:
"This is the attribute that marks a class that contains tests and, optionally, setup or teardown methods."