Last Updated: February 25, 2016
·
751
· arthurnn

Get traces info while minitest running

tl;dr: Press Ctrl+T to print the stacktrace, when you see an error while running tests.

A common issue that I usually complain about minitest runner is that while I am running multiple tests, if I see something like, this, I have no clue what is breaking, and no stacktraces.
............E............................EE...................................E......EE......E...E.............EEEEE.EE..E...EE.E.EEE........E..E..........EE...E.......E....EEEEEE.E.EEEEEEEE..EEE..E.EEEE...E...E...EE...........E.E...E.......E.....E...........EEEEEE...EEE......E..EEEE...E.....E.E.EEE.EEEEEEEEEEEEE..........................EE.......E.E....E..EEEEEF.E.EE.E.EE.EE.EE....E.E..E.E.EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.EE.......EEEEEEEE.E..EEEEE.E.EEE.....EE.EEE...EEEEE...E.EEE.......E............EEEEEEE...................EEEE.E...........EEE.EE.....EEEE..EEEE..E.........E....E.EE.EEE....EEEEEEEEEEEEE....................E.......E..............E.........EE.........E.....EEE................................................E..........

Today I learned that you can send a SIGINFO to the minitest process and it will print the error stacktraces on the console. If you are using MacOS, you can press Ctrl+T that will send the signal for you.