- Running a single test takes enough time to disrupt the flow
- Setting up test data for them has been painful
Out of these the second has been the major concern. We've got some ideas for speeding up the running of the tests, but haven't started using them throughout the team (like using grails interactive mode).
For test data the team has decided to go with a static database. I have some concerns with this approach because I'm used to building up the test data and I've had issues with sharing test data leading to pollution between the tests.
An advantage we have with our application is that a majority of the data stored in it is generated during normal processing. So, in theory, once we've got a set of data we can work with it in isolation.
A disadvantage, is that it takes a bit before we've generated all of the data for the full set. So we can't quickly generate our data. The real issue here is when we update our data model. In general we've been willing to wait the days that it might take for all accounts to be updated. Running tests against a static database means that we'd need to be able to generate the test data for it or wait for the released code to process it and copy it over to the static system.
Though maybe we could cut a path in between the static and live by limiting how much data we pull in and only working on the subset. This means we'd generate the data each time before running tests against it and expect to reset it for the next time or at least refresh it.
I'm still leery of not exploring edge cases, but maybe that's not the place for functional tests. Should we just let them thread through things to make sure everything is communicating, but rely on integration and unit tests to explore all of the variations and make sure they are covered? Seems plausible - though I think I should do more reading on BDD and the various disciplines around that.