Questions tagged [testem]

testem is a test runner for Javascript unit testing.

Testem is a test runner, that support many test libraries.

Features

Here a summary of the main feature :

  • Test-framework agnostic. Support for
  • Run tests in all major browsers as well as Node and PhantomJS
  • Two distinct use-cases:
    • Test-Driven-Development( TDD ) — designed to streamline the TDD workflow
    • Continuous Integration( CI ) — designed to work well with popular CI servers like Jenkins or Teamcity
  • Cross-platform support
    • OS X
    • Windows
    • Linux
  • Preprocessor support

Official site :https://github.com/testem/testem

46 questions
3
votes
1 answer

tests fail or hang randomly on travis with PhantomJS

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…
eguneys
  • 6,028
  • 7
  • 31
  • 63
3
votes
1 answer

Ember.js - CircleCI - BrowserStack

I try to connect together our cicleCI with browserstack and run our integration_test and unit tests not only with PhantomJS but on real Firefox and Internet Explorer as well, using Browserstack service. I try to configure browserstack-cli. I can run…
Zoltan
  • 4,936
  • 1
  • 35
  • 40
3
votes
1 answer

Slow static file serving with Node on Ubuntu

We're using Testem to serve a bunch of HTML files (templates). Under the covers Testem uses the "res.sendfile" method of Express to send the static file back to the client. On Mac machines this is very fast - 1-2 ms per file according to the Chrome…
Kevin Dente
  • 25,430
  • 7
  • 43
  • 47
3
votes
1 answer

Testing elements with jQuery-Chai

I have a couple of functions that use jQuery. And I'm having trouble making sense of the proper way to test them with jQuery-Chai in Mocha+Chai. I see the list of assertions in the jQuery-Chai plugin. However, I don't understand where we get the…
Adam
  • 4,054
  • 4
  • 25
  • 28
2
votes
1 answer

How to use webpack and testem for unit tests

I am very new to webpack. I need to use webpack because I would like to use a custom library with my Jasmine testspecs and need to run babel so I can use import and export In the past, I used testem to run my specs in the browser. I am trying to…
HelloWorld
  • 10,529
  • 10
  • 31
  • 50
2
votes
0 answers

How can I use phantomjs API methods within my Ember CLI acceptance tests?

Ember's Acceptance Test Helpers provide a nice abstraction layer for writing pure acceptance tests based on user actions, but isn't always enough. In Ruby/Rails testing with Capybara the underlying test driver (selenium-webdriver, phantomjs, etc),…
nruth
  • 1,068
  • 7
  • 22
2
votes
1 answer

POST call from phantomJS doesn't hit server running from grunt

Here is my setup. I have a grunt task that does 2 things: 1) start a http server listening on some port 2) triggers another grunt task The grunt task triggered above is a testem task that runs tests on test-index.html page in PhantomJS. The…
Kushagra Gour
  • 4,568
  • 2
  • 22
  • 26
2
votes
1 answer

How can I set up mocha tests to run Ember initializers so injected objects are defined?

My Ember app injects an "i18n" object into the container via an initializer, which is later looked up with "this.container.lookup('i18n:main')" in a controller 'preferredLanguage' computed property. A mocha unit test which tests the controller…
bobvan
  • 251
  • 3
  • 9
2
votes
2 answers

How can I fix tests in Ember testem with errors such as 'could not load', 'failed', 'could not find module' or 'died'?

I managed to get a couple of EAK/grunt based Ember apps upgraded to 1.11 with HTMLBars, and then got them migrated to Ember CLI/Brocolli. The unit tests were setup for karma test runner so I'm looking at how to get those running in the CLI projects…
bobvan
  • 251
  • 3
  • 9
2
votes
1 answer

Ember CLI tests on Sauce Labs

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…
jrjohnson
  • 2,401
  • 17
  • 23
2
votes
2 answers

exec 'node app' hangs inside gulp task

This gulp task hangs on exec('node config/app') line. first exec works fine but the second just hangs. gulp.task('test', function(cb) { var exec = require('child_process').exec; exec('echo 3', function(err, stdout) { …
eguneys
  • 6,028
  • 7
  • 31
  • 63
1
vote
1 answer

Ember test launch in CI/dev environment

I have this in my testem.js launch_in_ci: ['Chromium'], launch_in_dev: ['Chrome'], Is there any way to run ember test and specify CI/dev environment? I know I can use this solution but this looks like not the right way since I have configuration…
griZZZly8
  • 694
  • 9
  • 24
1
vote
1 answer

Firefox browser disconnect issue when running tests via testem

I am trying to run my ember tests in parallel using ember exam. However when I run the tests I am frequently getting browser disconnect issue, with following log: [16:41:10][Step 6/6] not ok 561 Firefox - error [16:41:10][Step 6/6] …
Deewendra Shrestha
  • 2,313
  • 1
  • 23
  • 53
1
vote
0 answers

Getting the spec file name into TAP file

we use testem to run our javascript unit tests. As output I get a TAP file, that looks similar like this ok 1 PhantomJS 2.1 - ABC Directive should contain a template --- Log: | { type: 'log', text: '\'WARNING: Tried to load…
Emerson Cod
  • 1,990
  • 3
  • 21
  • 39
1
vote
0 answers

Ember addon tests hang on "Waiting for runners" for Chrome and Firefox

Even I've mentioned Chrome in testem.json as the following, nothing happens: { "framework": "qunit", "test_page": "tests/index.html?hidepassed", "disable_watching": true, "launch_in_ci": [ "PhantomJS" ], "launch_in_dev": [ …
ykaragol
  • 6,139
  • 3
  • 29
  • 56