I love how simple Minitest is, however i’d like it if the test run results was a little bit more concise. A bunch of fails already clutters up the screen by showing unecessary data, needing you to decipher what really happend. It isn’t hard or bad, but it adds up.
In short I wrote my own reporter that enables more concise output of a test run:
- It omits printing detailed results of skipped test unless verbose is set to true. This is because 80% of the time you’re not dealing with skipped tests.
- Tests results are sorted by class name, allowing you to easily glance and detect wheter your changes affected the test without looking trough the list of tests randomly ordered. You can disable this by runnning verbose.
- Just one line per failed test. Which means more room for seeing failed tests, before your screen fills up 😆
- Failed test shows the
rails test <file>command to run the test again
- Failed tests show the sourcecode where the assertion happened to give context since the ‘False to be truthy’ error doesnt say a lot.
- Paths are relative from the root of the project. Allowing you to still ‘command-click’ in your terminal to open the file but reduces clutter and cognitive load.
Anyway, it’s on my github so go ahead and have fun failing 🙈
Hey you 👋 Want FREE resources to become the best developer and get a competitive edge? Subscribe!
Would you like to stay up to date on ? Subscribe here! I'll only use your email to keep u up to date on new technology and software development tips. It wont be shared. Feel free to unsubscribe anytime!