- Guide
- Playground
- GitHub
-
Ecosystem
Help
Resource Lists
Documentation
- Introduction
- Installation
- Usage
- Command Line Options
- Mutators
- Custom Mutators
- Profiles
- Using with CI
- Mutation Badge, cloud HTML report
- How-to Guides
- Caveats
- Debugging Issues
- Infection Playground
- GitHub Sponsors ♥️
- Supported Test Frameworks
Miscellaneous
- Compare with competitors
Posts
- What's new in Infection 0.26.0
- What's new in Infection 0.25.0
- What's new in Infection 0.24.0
- What's new in Infection 0.23.0
- What's new in Infection 0.21.0
Mutation Badge, cloud HTML report
We use the Stryker Dashboard to store mutation score for badges and host HTML reports in the cloud. Stryker is a mutation testing framework for Javascript that shares its service for other mutations frameworks.
How to set it up
Take these steps to enable the mutation score badge / cloud HTML report on your repository:
Make sure you have enabled a continuous integration service for your project.
We use
ondram/ci-detector
to detect continuous-integration services.Feel free to request an additional integration there if the list of currently supported continuous-integration servers does not contain a service you require.
Go to https://dashboard.stryker-mutator.io and sign in with your GitHub account.
Enable a repository for which you want to create a mutation badge / cloud HTML report. Stryker Dashboard will generate a key for you automatically.
Provide the API key for your project as a secret environment variable - either
INFECTION_DASHBOARD_API_KEY
orSTRYKER_DASHBOARD_API_KEY
can be used.Configure the
stryker
logger in yourinfection.json5
file:for badge
{
"logs": {
"stryker": {
"badge": "/^release-.*$/"
}
}
}or for HTML report to host it on Stryker Dashboard
{
"logs": {
"stryker": {
"report": "/^release-.*$/"
}
}
}You can use either
badge
orreport
, but not both.Using HTML report automatically enables badge on Stryker Dashboard.
If you provide a value that is not a regular expression starting and ending with
/
, a direct match will be performed:{
"logs": {
"stryker": {
"badge": "main"
}
}
}Force a build by running:
$ git push origin master
HTML report will be available at URL: https://badge.stryker-mutator.io/github.com/{username}/{repository_name}/{branch}
.
For example https://dashboard.stryker-mutator.io/reports/github.com/infection/infection/master
To get the Badge image, go to Stryker Dashboard and copy the link there. Don’t forget to add it to your readme file.
That’s it! Hope you like it.