jonnybarnes's avatar

Debugging a Laravel Dusk Travis test failure

I have a particular test that passes locally, but fails on travis-ci. I have so far added a --filter to the dusk command so only one test is getting run on travis now.

I set the phantomjs log level to debug and I can see that when my test presses submit, the post request gets a response of 500 Internal Server Error.

So I then tried adding some Log statements to the relavent controller method but no log is getting created on the travis machine. At least adding an entry to my travis.yml script section of ls -l storage/logs shows no logs.

So I have no idea how to work out why the test passes locally, but fails on travis.

Anyone any ideas how to get some more info about why the test is failing?

0 likes
1 reply
kubaszymanowski's avatar

How about setting up Sentry error reporting? This way you'll get an email with the error contents. Two things to remember

  1. Test the configuration locally to make sure the Sentry service receives the error report
  2. Fill the Sentry auth data in the CI testing environment.

Please or to participate in this conversation.