Viewing Cucumber Logs

I have spent so many workarounds trying to make up for the fact I couldn’t see proper logs while running cucumber tests. Five million ‘save_and_open_page’s, trying to ‘puts’ ridiculous things, switching between branches to try and pinpoint when things broke, switching databases and comparing performance to development.

Then I got a bit more sophisticated and started to try and use –backtrace (only good if a Cucumber error, no good for errors in your app). Even looking in the test.log file wasn’t always useful.

But for some reason, the following logs are better/more detailed than what is just in test.log. I’m not sure why…The magic line, that I never want to forget:

tail -f log/test.log

(or cucumber.log, if your log file is called that and not test.log)
Leave a reply