Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrent suites execution #1499

Closed
emdin opened this issue Jan 14, 2015 · 7 comments
Closed

Concurrent suites execution #1499

emdin opened this issue Jan 14, 2015 · 7 comments

Comments

@emdin
Copy link

emdin commented Jan 14, 2015

Hello,

do you have a concurrent suites execution on the project's roadmap? It can be really beneficial for headless browsers like Zombie.js, which can be spawned and executed in parallel. At the moment Mocha runs suites one by one, so there is no gain from having multiple headless browser instances.

@scott2449
Copy link

I would like this ability in theory as well but after thinking on it a bit it would require a bunch of complexity to keep meaningful reporting output. You can use something like gulp-spawn-mocha to run a bunch of separate files in parallel but then you wind up with separate reports (and only if you use a file based reporter, real time reporters give the same mess)

Did you have any ideas for addressing that @emdin ?

@emdin
Copy link
Author

emdin commented Feb 10, 2015

@scott2449 hmm I think I miss something. What I had in mind is suites run concurrently ("thread" per suite) and there will be the same final report (5 passed/2 failed). So we'll have he same reports but with undefined order. Since suites identified by their names it shouldn't be a big problem.

@scott2449
Copy link

@edmin I was saying that I agreed with you but that it doesn't work at the moment. There are currently some concurrency issues with mocha. When tests are run async (which you can do with programatic execution) some data, like file names, gets all screwed up. Also most reporters are currently real time, like spec, and just interleave all the results.

@emdin
Copy link
Author

emdin commented Feb 10, 2015

All right, now I understand. I somehow made it work with node.js using domains, but it is not production ready of course.
But do you think this feature will be useful for Mocha users or may be my use case (Zombie.js tests) is too specific?

@boneskull
Copy link
Contributor

This issue has been raised many times, implemented, then removed, because it was too complex and didn't end up buying people much time.

@danielstjules
Copy link
Contributor

I just started using this with acceptance tests: https://github.com/danielstjules/mocha.parallel

@ORESoftware
Copy link

@emdin if you are still working on that let me know, I found domains as being the only way to solve the problem of handling errors thrown from async tests in any given suite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants