growstuff
growstuff copied to clipboard
Investigate ways to speed up rspec run
A fast test suite is run more often
+1. Some thoughts:
- Smart test-runners: I looked into various gems for preloading tests or only running relevant tests soon after the project started, but the number of stale-cache problems I ran into made me give up; however, the tooling's probably improved since then.
-
Profile our tests: obviously. I think we'll find that the tests in
spec/featuresare much slower than others - at least, they always seem to hold the top 3 spots reported by rspec. Then I guess we'd want to rewrite slow tests to be lower-level. Or maybe we could have arake spec_fasttarget to only run the fast tests? - DB-less tests: is this feasible in Rails? It's common advice for speeding up tests in other ecosystems.
For travis, we can turn of 'build branches' and rely on only pull requests building maybe.
Sounds like a plan. I think we can configure Travis to only run on pushes to the dev and master branch.
I've seen DB-less tests -- they use a lot of
expect(Garden).to receive(:where).with(args).and_return [garden1, garden2]
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.