One of the goals I have for the thredUP dev team is to become more and more test-driven. From bugs to clear feature planning I think basically everyone is on board with this need but we have a big problem. Our app takes forever to start (~20s) and the suite is bloated. Well, I found a temporary fix for the startup problem on Friday and implemented it today!
Using a combination of spork and guard, our developers can now start up the "test running server" with "guard start". And then run any specs or cuke features as usual!
The setup was very easy and the best resource for this was Christian Bradley's post on the Carbon Five blog.
We'll see over the next sprint if this makes things a little more developer friendly and results in better test coverage and cleaner test suites throughout the sprint.
While this is a huge win for small sets of tests it really doesn't impact the full suite runs and also doesn't fix the underlying bloat of the app startup. So there's more work to do. Potential topics coming up on the testsuite hitlist for future posts:
- Continuous Integration Server - Goldberg
- Slimming down seed data to speed up tests
- Using test performance as a benchmark to improve app performance
- Using parallel_test to run the full suite in a distributed way