3

I run my tests with testem and PhantomJS, they all pass on my local machine, but when i run them on travis, they fail randomly, or hang, It's not like some specific tests fail, some pass, randomsome fail, I have no idea what's going on. My project is available on github https://github.com/eguneys/marbles-site

Edit:

I've optimized it a little, it fixed the hang issue, now the problem is it fails the first integration test. I added an App.reset() before the first integration test. And it passes now. I had trouble with App.reset() before,

Erik Bryn suggested that you can use App.reset() in the setup method rather than teardown so you can see the application's last state. But that causes tests to fail, i can't solve the mystery of App.reset() and fear the tests will fail anytime now. Yet they pass at the moment.

eguneys
  • 6,028
  • 7
  • 31
  • 63
  • Which of your tests fail? Your integration tests or your unit tests? – yorbro Aug 29 '14 at 09:26
  • @yorbro hm, it's random really, sometimes unit tests fail, sometimes integration tests hangs, i use ember-test-helpers with qunit. here's a [log](https://travis-ci.org/eguneys/marbles-site/builds/33861034) – eguneys Aug 29 '14 at 09:32
  • Since the tests do pass I'm thinking it's related to either PhantomJS or Gulp? Unfortunately, I do not enough about them to be able to help you... – yorbro Aug 29 '14 at 10:06

1 Answers1

-1

Go to your package.json file and change scripts.test like this:

"test": "testem ci --launch node,PhantomJS"

I'm not sure what's the reason of your tests failing, but If it's with the integration, this should help.

Iman Mohamadi
  • 6,552
  • 3
  • 34
  • 33