Oct 21st, 2009, 12:51 PM
@BeforeClass @AfterClass in the Spring TestingFramework?
I would like to open a database connection once before my test suite runs, and once at the end of the run.
The problem is that the database connection is configured via spring, so
private Connection connection;
public void static openConnection()
doesn't compile; if I use @Before then it runs before every test method. How can I do it using a TestExecutionListener, which does not have an after-class hook?
Thanks so much in advance.
Tags for this Thread