ember-cli / ember-exam

Run your tests with randomization, splitting, and parallelization for beautiful tests.
MIT License
286 stars 62 forks source link

Usage documentation and options are extremely confusing #587

Open EvgenyOrekhov opened 4 years ago

EvgenyOrekhov commented 4 years ago

I want to run my tests in parallel, but I just can't figure out which options I should use.

I tried:

step2yeung commented 4 years ago

Hey @EvgenyOrekhov

One quick question, did you setup this in test-helper.js:

// test-helper.js
// this is important to setup load-balancing. if you are importing from qunit start, it just basically use the default qunit logic and executes the full test suite in two browsers
import start from 'ember-exam/test-support/start';

// Options passed to `start` will be passed-through to ember-qunit or ember-mocha
start();

I think the above isn't documented well, so we should have an FAQ on when this scenario happens what folks should do. But I agree, theres some work in the docs to make it less verbose.

EvgenyOrekhov commented 4 years ago

@step2yeung Yes, I saw that when I was reading the docs and did it first thing right after npm install.

I finally was able to set up parallel execution by setting parallel: -1 in testem.js (found this in one of the issues here). The command that finally worked was ember exam --load-balance --parallel=2.

step2yeung commented 4 years ago

Great! Glad you solved it! Will leave this issue open to document this, I realized what you pointed out isn't in the documentation either.

Thanks for pointing this out @EvgenyOrekhov !!

LucMorrissette commented 6 months ago

@EvgenyOrekhov Thank you! I can't believe it's been 4 years and this still isn't documented as far as I can tell. This got everything working as expected for me.