Unit test terms
Question: Colleagues of mine are calling a class with test methods a fixture, but I
think that is wrong because a "fixture" is a fixed environment for testing.

[NUnit uses the (wrong?) term
"TestFixture"](http://www.nunit.org/index.php?p=testFixture&r=2.5) too.

[Wikipedia](http://en.wikipedia.org/wiki/Test_fixture#Test_fixture_in_xUnit)
says:

> 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.
>
> Frequently fixtures are created by handling setUp() and tearDown() events of
> the unit testing framework. In setUp() one would create the expected state
> for the test, and in tearDown() it would clean up what had been set up.

So I would call setup and teardown fixtures but not the whole class. Is that
correct?

And how to call the class with the test cases? A "test suite" following the
[python docs](http://docs.python.org/library/unittest.html)?


Answer: A **test case** is a **single test** testing a particular thing.

A **test suite** is a **grouping of test cases** into a set of tests that for
some reason "belong together".

A **test fixture** manages (setup/teardown) the **state before and after a
test case** is being executed.

These are concepts and **how these are implemented depends on the test
framework**.

E.g. a test case can be a function or a class; a test suite might be a class
containing test cases as functions or just a container with test cases (this
again can be implemented in various ways); a test fixture might be built-in
into the test framework as e.g. dedicated functions, or it might just be a
fixture class taking care of the state through its construction and
destruction.

**Edit**

One thing I believe is important is to use the terminology of the test
framework and follow the recommended approach of the test framework (if such
exists). A lot of confusion comes through not naming things consistently and
similarly. This is true for everything.

