Comments (4)
So this is not currently supported out of the box, but I could see this being a cool feature to add. Basically allow segmentation by filter, maybe a comma separated list of filters like:
$ ember exam --segments "acceptance, !acceptance"
Then the individual splits/parallel can occur on each segment. Does that seem reasonable to you?
To help you get around this currently, you can do something like you suggested and running two different tasks or you can actually set up your own parallel runs by doing something like the following in your Testem config:
{
"test_page": [
"/tests/index.html?filter=acceptance",
"/tests/index.html?filter=!acceptance"
],
"parallel": 2
}
And then just run ember exam
or ember test
. This is more or less what the --parallel
flag does under the hood, just without the filter
params.
Filtering is a lot more powerful than people realize now that you can do negation filtering (as seen above) and regex filtering (e.g., ?filter=/unit|integration/i
). See the QUnit docs for more details.
from ember-exam.
Thanks Trent. You're right, I didn't realise the power of the filter; that'll definitely work for me for now.
What you suggest makes a great deal of sense. However, I do wonder if there is such an effective workaround if it is worth expanding the functionality. I'm always loathe to add more unless there is a very compelling reason.
Maybe just an update to the readme to cover this scenario, as I imagine it is fairly common?
from ember-exam.
My goal with this addon is to enable developers to avoid having to fiddle with configurations, so I think there is a good use case here. Especially if you wanted to do something to the effect of testing specific areas of your code base or maybe runs tests with certain features on/off. I also don't think it'll be difficult to add.
I would probably revamp the above to take in arbitrary query params so you could achieve something like:
$ ember exam --segments "enableOptionalFeatures=true, disableOptionalFeatures=false"
from ember-exam.
Closing this. Didn't wind up adding a new feature, but now that we read in the actual Testem config, consumers can define multiple test_page
values and they'll still work with all of Ember Exam's features.
Also, added a brief mention of this to the readme.
from ember-exam.
Related Issues (20)
- Passing the `--load-balance` flag changes partitions HOT 3
- Halts when waiting for a browser to exit after TestLoader Failure HOT 1
- Cut a new release HOT 1
- Embroider Support HOT 1
- How can I determine the max num in `parallel=<num>` based on my CPU limitations? HOT 2
- What version of ember cli is required to run with load balancing? HOT 2
- Ember serve not running full tests
- Usage documentation and options are extremely confusing HOT 4
- 'ember exam --server' doesn't work with ember-cli 3.19.0 to 3.20.0 update HOT 5
- Magic Number of Parallel HOT 2
- The link to the documentation website is broken HOT 2
- Does not work properly with [email protected]
- Could not find module `qunit` imported from `(require)` HOT 4
- usage of the --path option (and other valid ember test options) needs clarification
- Update documentation about load balancing prerequisites HOT 1
- App won't build with ember-exam 6.1.0 and ember-mocha HOT 4
- Reported test count is different when running exam than when running test HOT 1
- Ember Auto Import v2 issue with test-support HOT 1
- Dependency Dashboard
- environment test not set when configuring polly without --environment=test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-exam.