Code Monkey home page Code Monkey logo

Comments (4)

trentmwillis avatar trentmwillis commented on August 16, 2024

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.

JonForest avatar JonForest commented on August 16, 2024

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.

trentmwillis avatar trentmwillis commented on August 16, 2024

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.

trentmwillis avatar trentmwillis commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.