How about a stryker-mutator plugin? #2688
Replies: 5 comments 8 replies
-
What would this plugin need to do? |
Beta Was this translation helpful? Give feedback.
-
I myself can only speculate about how this problem is solved in other plugins, and there is an overlap in responsibilities, so which of Stryker or AVA should do what is not clear in my head. Pragmatically, when I look up one of the test suites for their mocha runner I see things like:
How I picture it myself, someone needs to
|
Beta Was this translation helpful? Give feedback.
-
Our I don't know how you'd integrate that with realtime code coverage. |
Beta Was this translation helpful? Give feedback.
-
Has anything been done to move this along? |
Beta Was this translation helpful? Give feedback.
-
Hi 🙋♂️. I'm one of the StrykerJS maintainers. I would be happy to help 😄 @geoffreytools put a nice list together. Let me clarify some parts A test runner plugin in StrykerJS needs to implement this interface export interface TestRunner {
init?(): Promise<void>;
dryRun(options: DryRunOptions): Promise<DryRunResult>;
mutantRun(options: MutantRunOptions): Promise<MutantRunResult>;
dispose?(): Promise<void>;
} The main a test runner should be able to do is to run tests whenever it is asked to do so. StrykerJS takes care of mutant generation, coverage bookkeeping etc, parallel worker creation, etc. A test runner doesn't need any of that. Some examples: collect mutant coverage Active the given mutant report killed mutant when a test fails I'm thinking of abstracting some of this work away in a "NodeTestRunner" class. It would mean that you could extend this class and implement even less. For example: setting and retrieving the global variables would be taken care of. We could use this class to implement our mocha, jasmine, and CucumberJS test runners. Would you be interested in this as well? |
Beta Was this translation helpful? Give feedback.
-
I have been using stryker-mutator with AVA recently.
Although it works, it is very slow because Stryker can't do a coverage analysis with AVA and thus it runs every test for each mutant regardless of them being covered by a given test.
This could be improved with an AVA plugin.
They currently support Jasmine, Jest, Karma and Mocha and I guess adding AVA to the list could increase its adoption.
Beta Was this translation helpful? Give feedback.
All reactions