Stryker: "demo configurations"

Created on 2 Sep 2018  路  15Comments  路  Source: stryker-mutator/stryker

We could make some demos with different setups of stryker, like stryker with karma, stryker with jest, typescript, react, angular apps, etc. It would be easier for people i suppose. Or add it in stryker-cli to provide some default configs.

All 15 comments

I can take care of it in this week and add "templates" folder to stryker repo. What do you think @nicojs ?

@kmdrGroch could you also look at #1049?

@nicojs, @simondel I will try to take a look and try to make some PR for it. I have to make new branch in my repo though since you have not checked my previous PR yet 馃槧

Sorry 馃槬 ! I will do this tomorrow. Spare time is ... sparse

What about structure of the files? I have been thinking about it and it looks like this:

  • remove / move files from docs
  • add templates folder and add there samples in folders like stryker-typescript-template, stryker-angular-template, stryker-karma-template, etc. We could also add it to npm so each template can be downloaded (if you know what i mean).
  • add to docs folder some readme with FAQ, info about templates
  • FAQ -> add info about config, about browsers (there were 3-4 issues about it), about inconsistency (use pararell depending on your ram and browser).

remove / move files from docs

I didn't know it still existed. Yes, remove please :). It is already copied to stryker-mutator/stryker-handbook#6.

add templates folder and add there samples in folders like stryker-typescript-template, stryker-angular-template, stryker-karma-template, etc. We could also add it to npm so each template can be downloaded (if you know what i mean).

The problem with that is that it would need to be kept in-sync with the stryker-handbook guides. That's why i thought af an elaborate scheme where we download the templates directly from github during stryker init. It would be a bit complicated to do:

  1. Do an HTTP GET for the correct file.
  2. Find, cut and paste the config in the stryker.conf.js.

there is also the problem with compatibility. The config found on the latest version of the stryker-handbook might not be supported by current stryker version.

@simondel what would be your suggestion here?

add to docs folder some readme with FAQ, info about templates

I would rather point everyone to the stryker-handbook for the readable guides.

A bit of background on the stryker-handbook. We wanted to use our https://github.com/stryker-mutator/stryker/wiki for it, but github wiki's have too many limitations:

  • No support for grouping files in directories
  • It does not support review system (based on PR's for example).

That's why we started the handbook as it's own GH repo. The idea is to have comprehensible guides that people can easily edit using the edit button (and create a PR for us to review). In other words: all technical guides, FAQ, help should be housed in the stryker-handbook.

TypeScript does the same thing with typescript-handbook

Configs would be based on these from integration test - it would contain - package.json with ready scripts, packages; stryker.conf.js with config; and other important configs, like karma.conf.js; tsconfig.json, etc. (depending on project).

I will wait with FAQ then, and we will see later what we can do with it.

Hmm I'm not sure about karma.conf.js and tsconfig.json files. They are probably already in your project. For example: using karma init or ng new. Same goes for react projects, etc.

There will also already be a package.json, so I would suggest do npm install --save-dev .... of all stryker dependencies. This is what stryker init already does now.

This issue is morphing into a duplicate of #1049, isn't it?

What would a template be?

@nicojs, it doesn't install all required dependencies though. When I was installing karma + jasmine it was missing a few of them. So it should be solved. @simondel, it would be like a demo so people can see example of config.

@kmdrGroch so it would be an application with source files, tests, package.json, test runner config, Stryker config etc. Right?

Yes @simondel, more or less, yeah

We're closing this issue for now because we'll add presets in the future and we also have the handbook.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nosideeffects picture nosideeffects  路  32Comments

Chowarmaan picture Chowarmaan  路  18Comments

j-truax picture j-truax  路  20Comments

Zorin95670 picture Zorin95670  路  18Comments

nicojs picture nicojs  路  33Comments