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

Interest in support for Intern #430

Closed
janmulders opened this issue Oct 23, 2017 · 10 comments
Closed

Interest in support for Intern #430

janmulders opened this issue Oct 23, 2017 · 10 comments
Labels
🚀 Feature request New feature request ☠ stale Marked as stale by the stale bot, will be removed after a certain time.

Comments

@janmulders
Copy link

Hi,

I am interested in using Stryker with Intern (https://theintern.io/), the JavaScript testing framework and runner created by Sitepen.
I have neither time nor expertise to do this myself - just recently learned about the existence of Stryker.
But if more people are interested... express your interest here!

Jan Mulders

@nicojs
Copy link
Member

nicojs commented Oct 23, 2017

@janmulders thanks for reporting this feature request. I've started a conversation on their gitter chat. When i know more i'll add it to this issue.

@simondel
Copy link
Member

Related issue: theintern/intern#823

@nicojs
Copy link
Member

nicojs commented Dec 23, 2018

We've just released Stryker 0.34 with the command test runner. We now support any test command (although without many performance features). Could this help you @janmulders ?

@simondel
Copy link
Member

As mentioned, we have the command test runner. We're open to supporting intern properly in the future if someone wants to help (and if the demand is there).

@nicojs
Copy link
Member

nicojs commented Feb 13, 2019

@mthmulders, feel free to create a PR for this :)

Plugin API is documented here: https://github.com/stryker-mutator/stryker-handbook/blob/master/stryker/api/plugins.md#plugins

@mthmulders
Copy link
Contributor

Thanks for the invitation. Work is currently stalled (other priorities) but I had basic integration (i.e., running a passing test) working already. See mthmulders/stryker-intern-runner for those interested.

@simondel simondel reopened this Apr 24, 2020
@simondel
Copy link
Member

Reopened this issue due to interest from the community.

If I were to add support, I would start by getting intern up and running programmatically using my regular tests. Their docs could help with this:
https://theintern.io/docs.html#Intern/4/docs/docs%2Fhow_to.md/use-intern-programmatically

While building this support, take a close look at how you'd configure intern and how others may use intern. A good thing to override would be Interns leaveRemoteOpen property to ensure that Intern actually quits. Another nice thing is bail to ensure that you stop as quickly as possible. Overriding reporters can also be a good idea to prevent creating thousands of code coverage reports if you've got that set up :P

After you've got Intern running programmatically, you could start integrating it with Stryker by building a TestRunner plugin: https://github.com/stryker-mutator/stryker-handbook/blob/master/stryker/api/plugins.md#plugins

@mthmulders
Copy link
Contributor

mthmulders commented Apr 28, 2020

The default for leaveRemoteOpen is actually false, it would mean that if your tests run in a browser, that browser will quit after the test has run. I guess that is what you want - so I don't think we need to override that.
The bail option is indeed a good one, I've added that to my implementation.

A note on the status of my work. It currently does the following:

  1. Detects when Intern has ran a test
  2. Detects when Intern has ran a test that failed
  3. Detects when Intern has ran a test that timed out
  4. Detects when Intern has skipped a test

But I guess it's far from complete yet.
As @simondel suggested, adding coverage support would be a great way to make it run faster, and there's probably a few other things that need to be ironed out.
With that said, I'm more than happy with any contributions ;-) and I'd be happy to help where I can.

@nicojs
Copy link
Member

nicojs commented Apr 29, 2020

The default for leaveRemoteOpen is actually false, it would mean that if your tests run in a browser, that browser will quit after the test has run. I guess that is what you want - so I don't think we need to override that.

Doesn't that mean that it closes the browser after a test run for a single mutant, needing to spawn a new browser for the next run? This is quite slow. Maybe we can make this configurable?

As @simondel suggested, adding coverage support would be a great way to make it run faster, and there's probably a few other things that need to be ironed out.

The current code coverage support will change after #1514 is implemented. However, both versions will be similar to the TestRunner's perspective. In both scenario's coverage is collected in a global object that needs to be reported back to Stryker's main process.

@stale
Copy link

stale bot commented Apr 29, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the ☠ stale Marked as stale by the stale bot, will be removed after a certain time. label Apr 29, 2021
@stale stale bot closed this as completed May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 Feature request New feature request ☠ stale Marked as stale by the stale bot, will be removed after a certain time.
Projects
None yet
Development

No branches or pull requests

4 participants