growstuff icon indicating copy to clipboard operation
growstuff copied to clipboard

Investigate ways to speed up rspec run

Open Br3nda opened this issue 8 years ago • 5 comments

A fast test suite is run more often

Br3nda avatar Jan 21 '18 20:01 Br3nda

+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/features are 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 a rake spec_fast target 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.

pozorvlak avatar Jan 22 '18 10:01 pozorvlak

For travis, we can turn of 'build branches' and rely on only pull requests building maybe.

CloCkWeRX avatar Jan 22 '18 16:01 CloCkWeRX

Sounds like a plan. I think we can configure Travis to only run on pushes to the dev and master branch.

Br3nda avatar Jan 22 '18 21:01 Br3nda

I've seen DB-less tests -- they use a lot of

expect(Garden).to receive(:where).with(args).and_return [garden1, garden2]

Br3nda avatar Jan 22 '18 21:01 Br3nda

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.

stale[bot] avatar Jul 20 '19 22:07 stale[bot]