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

Run multiple intern.run() with API #919

Open
AmirTugi opened this issue Jun 6, 2018 · 6 comments
Open

Run multiple intern.run() with API #919

AmirTugi opened this issue Jun 6, 2018 · 6 comments
Labels
effort-medium This may take a couple of days enhancement A new or improved feature priority-medium This should get done, but it's not a high priority

Comments

@AmirTugi
Copy link

AmirTugi commented Jun 6, 2018

The Problem

When trying to run intern more than one or even the same intern more than once, using intern.run(), after re-configuring it, it will shout that it cannot run more than once + due to intern using global scope - cannot run more than 1 in parallel.

This behaviour is restricting the user from running and handling intern as he wishes (in our case, make a grid of intern runners who run parallelly)

Possible solution

When removing the restriction, and maybe make a cleanup (also using other, more isolated scopes for resources) of resources after the intern.run() we could run multiple interns parallelly, and we'll have more freedom and flexability with intern's api

Steps to reproduce (for bugs)

Just try to run the same suites twice, either parallelly, or in series.

Environment

Intern version: 4.2.0

@jason0x43
Copy link
Member

The current plan for running Intern in parallel is to use multiple node processes. Intern would start up a separate node process to run tests, much like it starts a browser to run tests now. This will allow for the same logic to manage tests in Node and browsers, and will provide isolation between parallel Node sessions.

@AlonMiz
Copy link

AlonMiz commented Jun 7, 2018

A related issue is that you cannot run parallel functional tests at all.
Unless they are configured on different browsers - which means I can't run 2 tests in parallel on chrome v66 for example.

@jason0x43
Copy link
Member

Yeah, we have #546 for sharding across multiple instances of a single environment and #803 for running Node as a standard environment. Between the two of those we should end up with a pretty nice parallelization platform.

@jason0x43 jason0x43 added the enhancement A new or improved feature label Jun 26, 2018
@AlonMiz
Copy link

AlonMiz commented Jul 31, 2018

@jason0x43 any news? :/
currently, our solution is to spawn multiple child node processes, get the stdout and stderr, and parse the output to figure out fail and success suites and tests.
this is really hard and prone to errors, and really ugly.

@jason0x43
Copy link
Member

It's high in the queue, but I haven't had time to get to it yet.

In the meantime you might consider writing a custom reporter that will output test results in a structured format, like JSON. That will make result aggregation simpler.

@jacobroufa
Copy link
Contributor

Bumping this one up as I've recently run into a similar issue. I am using the same technique as @AlonMiz to usable effect, though it is kludgy as suggested.

@jason0x43 jason0x43 added effort-medium This may take a couple of days priority-medium This should get done, but it's not a high priority labels Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort-medium This may take a couple of days enhancement A new or improved feature priority-medium This should get done, but it's not a high priority
Projects
None yet
Development

No branches or pull requests

4 participants