2

How can I get ember-cli tests running on Sauce Labs? Testem has an example configuration, but I don't know how to translate that into the ember-cli compiled tests since the testem.json gets packed into the build when tests run.

I tried doing an ember build --env=test and then putting "test_page": "dist/tests/index.html" in my testem.js and just running testem ci --port=8080 as it is in the example, but that gives me 0 tests run.

jrjohnson
  • 2,401
  • 17
  • 23
  • I managed to run the tests on Sauce Labs, but sauce labs giving me some proxy error, can you run on SL at all? And did you do `npm install saucie -g`. – user3995789 Nov 06 '14 at 19:34
  • Yes, I installed sauceie globally. With some work I'm now able to connect, but not point to my tests, it always loads my document root instead of my tests. I opened an issue with testem which might help: https://github.com/airportyh/testem/issues/422 – jrjohnson Nov 06 '14 at 21:00

1 Answers1

1

I believe I have this mostly solved (some issues remain with individual browsers). For posterity you can view my solution here*:

The things that seem to be necessary:

  1. Use NVM to manage node on OSX, things only started to work when I stopped having to sudo random junk.

  2. Don't use localhost, I used localtest here for the hostname, but you can use anything - sauce and localhost don't get along very well.

  3. The command is ember test --port=8080 --host=localtest

  4. I put my sauce stuff in a different testem config file so I can still run ember test on my dev machine.

Hopefully having a starting place saves someone else from doing all of the wrong things I did originally.

*You probably don't need all of that, as we're currently using ember-cli api stubs to mock our API during development so we need to run a separate instance of ember serve.

CraigTeegarden
  • 8,173
  • 8
  • 38
  • 43
jrjohnson
  • 2,401
  • 17
  • 23