Papers/Unit Testing

What is a fixture?

tomato13 2008. 8. 2. 16:09

http://www.bluej.org/tutorial/testing-tutorial.pdf

 

A test fixture is a prepared set of objects used as a starting point for tests.

 

.........

We could start every individual test by creating the necessary objects and putting them into an appropriate state for doing our test. But as tests get more sophisticated, this can become tedious, and we can use a better mechanism to avoid this overhead.

 

We can create a state on the object bench (a set of objects, each in a certain state) which we want to use as a starting point for all tests in a specific test class. This starting set of objects is called fixture.

........