Ask HN: What do you while the automated tests are running?
I work on a Rails app with a fair amount of test coverage with Cucumber. It takes around 30 to 40 minutes to run the entire test suite. While the tests are running, I usually check my email, HN news, Stackoverflow and Reddit. They don't seem like the best use of my time. Can you share some things you do that's productive?
13 comments
[ 3.4 ms ] story [ 40.5 ms ] threadOf course, my Ansible runs are shorter because I try not to do the full run every time.
Edit damn! Someone already posted the xkcd.
Another thing is reading the docs of the libraries you use - reading around a subject is an under used and highly valuable activity.
I try to write code so that stuff that needs to be tested is not tied to AR. Why should your logic need to wait for AR to fetch records and fire a callback when the part that is likely to break (that isn't covered by AR's test suite) is your logic, not the data fetching or callback infrastructure.
My unit tests take 1-50ms to run (the majority of them closer to 1ms) and I can run a decent suite of them in a few seconds.
We automated that in order to run every night. We need a 100% pass rate before we push to production.
If you just do something you run those specific tests. If something else breaks due to that, it will be caught ( hopefully ) by the nightly tests.
Imagine having to run the test suite 2 - 3 times a day. Your day would be wasted !