A test fixture is a set of objects, having known values, that provide data for the test cases. A JDBC test fixture provides code that establishes a database connection for the test cases to use.
To create a JUnit JDBC test fixture class:
The class created by the wizard will be opened for editing.
Modify the file as needed. In particular, add code that initializes test fixture objects to the setUp() method, and add code that releases any resources they acquire to the tearDown() method.
Creating a JUnit Test for a Generic Java Project
Creating a JUnit Custom Test Fixture
Creating a JUnit Test Case
Creating a JUnit Test Suite