harrah/xsbt — Issue #225: Clarify lifecycle of test framework in wiki
Author: geirhe
Created: 2011-10-14 12:07:27+00:00
State: open

https://github.com/harrah/xsbt/wiki/Testing shows how to create setup and teardown code. However, there is no explanation for when these things will be called. I have to confess I struggle to find it out myself from the source code. These are called before starting a test _run_, right? Not before each test class, each test or something else?

In addition, SBT seems to keep parts of its test framework alive between tests? We use spring to handle database connections, and our database connections are not torn down after a test run. Running multiple tests will exhaust the connection pool. The documentation does not contain any information about the process model used when running tests, does it? This would connect nicely with the lifecycle question above.