Open dorgan opened 10 years ago
Yes I would also like this feature. Though I think the title of this issue should start with the word "Running" instead of "Ruining".
Any advice on how to set this up? Perhaps there's a way to do this by passing PhantomJS parameters in?
@dorgan,
did you mean run multiple urls simultaneously, or several tests simultaneously within the same url ? Case 1 could be done within the task, but it needs some deep refactoring in my mind. Case 2 is to configure in your qunit bootstrap, there s some option about this, i let you dig the qunit documentation for exact reference.
I don't know about @dorgan, but I meant Case 1. For case 2, I'll look at the qunit documentation but I'm surprised it has a solution since I thought that javascript is single threaded and all the tests are running on one page.
On Tue, Mar 11, 2014 at 2:30 AM, Clément notifications@github.com wrote:
@dorgan https://github.com/dorgan,
did you mean run multiple urls simultaneously, or several tests simultaneously within the same url ? Case 1 could be done within the task, but it needs some deep refactoring in my mind. Case 2 is to configure in your qunit bootstrap, there s some option about this, i let you dig the qunit documentation for exact reference.
Reply to this email directly or view it on GitHubhttps://github.com/gruntjs/grunt-contrib-qunit/issues/53#issuecomment-37276840 .
I meant Case 1 (Multiple URLs)
@dorgan, ok, definitely it will break key things in the task the phantomjs iteration => it spawns one process for each url, needs to start one process for all urls and fetch them all in one time. Phantomjs can definitely execute many urls simultaneously within the same process. the bridge => may need to be improved to provide more information in order to replace the result in the correct place of the tree result the reporter => should be rethink to be able to receive and display results from various urls consecutively
Let see what the maintainers will say about this, but big job.
Eventually, did you evaluate mocha as an alternative, i know they have some qunit style support, but i can t guarantee it will work, i never tried myself. http://visionmedia.github.io/mocha/#qunit-interface
Also you would still need to find a task that run your tests in parallel.
But, if it reveals successful, it could avoid you a PR. Also mocha provides much more reporters out of box than qunit.
Can t help you much more as i don t face such problems myself.
@tieTYT, it is definitely a single threaded language.
Seems like this would be a good start. https://github.com/iammerrick/grunt-parallel
If you have over 100 tests some of which take a couple of seconds to run because of call backs it would speed things up to be able to run tests in a multi threaded environment.