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

add Stryker Mutator #70

Merged
merged 6 commits into from
Jun 30, 2020
Merged

add Stryker Mutator #70

merged 6 commits into from
Jun 30, 2020

Conversation

brodybits
Copy link
Member

@brodybits brodybits commented Jun 29, 2020

updated:

https://stryker-mutator.io/ - better than traditional code coverage (I think), as discussed in #60

shows the following summary at this point:

---------------|---------|----------|-----------|------------|----------|---------|
File           | % score | # killed | # timeout | # survived | # no cov | # error |
---------------|---------|----------|-----------|------------|----------|---------|
All files      |   59.53 |     1008 |       179 |        807 |        0 |       0 |
 dom-parser.js |   73.04 |      141 |         8 |         55 |        0 |       0 |
 dom.js        |   65.10 |      521 |        87 |        326 |        0 |       0 |
 entities.js   |    5.28 |        5 |         8 |        233 |        0 |       0 |
 sax.js        |   68.36 |      341 |        76 |        193 |        0 |       0 |
---------------|---------|----------|-----------|------------|----------|---------|

Seems to be OK in lib/dom-parser.js, pretty bad in lib/entities.js.

FUTURE TODO item:

  • I would also like to integrate this with the Stryker dashboard, where it should be possible to scan a copy of the code for surviving mutants missing test coverage.

/cc @karfau

merging

I think these changes should be merged as a single squash commit upon final review.

.gitignore Outdated
@@ -1,2 +1,5 @@
/node_modules
/.proof.out

# stryker temp files
.stryker-tmp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case you don't plan to commit the generated report you need to also ignore /reports. (At least this is a folder that was generated when I ran it earlier.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just pushed some of the changes you had originally made for PR #51, which would probably overlap #73 now.

Co-authored-by: Christopher J. Brody <chris.brody+brodybits@gmail.com>
Co-authored-by: Christian Bewernitz <coder@karfau.de>
@brodybits
Copy link
Member Author

Here is the badge from a fork I made, which links to the online report:

Mutation testing badge

@karfau
Copy link
Member

karfau commented Jun 30, 2020

I'm very happy that the score is actually higher then when I first attempted it.
It means the way I converted the tests in the second go is more robust.

@brodybits brodybits merged commit cad05a1 into master Jun 30, 2020
@brodybits brodybits deleted the brodybits-add-stryker-mutator branch June 30, 2020 21:08
@brodybits
Copy link
Member Author

I'm very happy that the score is actually higher then when I first attempted it.

That sure is nice progress, thanks!

FYI I did take the liberty to add newline to end of stryker.conf.json, which I think is standard editing practice and always done by vim.

@karfau
Copy link
Member

karfau commented Jul 1, 2020

Sure, I'm not sure why it wasn't there.
I never touched the file, so I guess this i the way that stryker generated it on init.

This was referenced Mar 13, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants