Stryker dashboard
The Stryker dashboard is a dashboard for mutation testing: https://dashboard.stryker-mutator.io. It is free to use and open source. It has the following features:
🥇 Supply a mutation score badge to pimp your readme
🤑 Free to use for open source
📊 Hosts your mutation testing report in the cloud
🌎 Supports all mutation testing frameworks*
* That support the mutation testing report schema.
Enable the dashboard for your project
Enabling the dashboard for your project is as simple as navigating to https://dashboard.stryker-mutator.io, logging in with your GitHub account and enabling it for your repository.
Send your first report
Send your first report directly from Stryker, or manually via a curl request.
Send a report directly from Stryker
Current status:
Stryker | Stryker.NET | Stryker4s | |
---|---|---|---|
Full report | ✅ | ✅ | ✅ |
Mutation score report | ✅ | ✅ | ✅ |
dashboard.* settings | ✅ | ✅ | ✅ |
Please visit Stryker.NET specific docs for Stryker.NET.
Enabling the dashboard reporter works the same across all implementations of Stryker.
- Enabling the dashboard reporter is done by adding
"dashboard"
to the"reporters"
configuration. - Configure the reporter:
- Configuring the "project" is done via the
dashboard.project
configuration key (default: retrieved from the environment) - Configuring the "module is done via the
dashboard.module
configuration key. - Configuring the "version" is done via the
dashboard.version
configuration key. (default: retrieved from environment) - Configuring the "baseUrl" is done via the
dashboard.baseUrl
configuration key. It defaults to "https://dashboard.stryker-mutator.io". - Configuring the "reportType" is done via the
dashboard.reportType
configuration key.
- Configuring the "project" is done via the
- Configuring the API key by setting the "STRYKER_DASHBOARD_API_KEY" variable.
Retrieved from environment
The project
and version
settings can also be retrieved from your build servers environment. This is not supported for all CI providers or Stryker implementations. See the table below for the current support.
Stryker | Stryker.NET1 | Stryker4s | |
---|---|---|---|
Travis | ✅ | ✅ | ✅ |
CircleCI | ✅ | ✅ | ✅ |
Azure dev/ops | ❌ | ✅ | ❌ |
GitlabCI | ❌ | ✅ | ❌ |
Github actions | ✅ | ✅ | ✅ |
Send a report via curl
You can send a report with an HTTP PUT request, like so:
curl -X PUT \
$BASE_URL$/api/reports/$PROJECT$/$VERSION$ \
-H 'Content-Type: application/json' \
-H 'Host: dashboard.stryker-mutator.io' \
-H 'X-Api-Key: $API_KEY$' \
-d @mutation-testing-report.json
Multiple results per VERSION
are also supported using this url: $BASE_URL$/api/reports/$PROJECT$/$VERSION$?module=$MODULE_NAME$
The variables here are:
BASE_URL
:https://dashboard.stryker-mutator.io
for production,https://stryker-dashboard-acceptance.azurewebsites.net/
for acceptancePROJECT
: The name registered with the dashboard. It is in the form ofgitProvider/organization/repository
. At the moment the dashboard backend only supportsgithub.com
as a git provider, but we will also supportgitlab.com
/bitbucket.org
, etc. in the future. It can have an indefinite number of levels. Slashes (/
) in this name are not escaped. For examplegithub.com/stryker-mutator/stryker-net
.VERSION
: the version of the report. This should be filled with the branch name, git tag or git sha (although no validation is done). You can override a report of a specific version, like docker tags. Slashes in the version should not be encoded. For example, it's valid to use "feat/logging".API_KEY
: The API key that you retrieved by enabling the report on the dashboard.stryker-mutator.io website.mutation-testing-report.json
file: A valid report according to the mutation testing report schema, or a mutation score only report in the form of{ "mutationScore": 42 }
(this way, you will have a mutation score badge, but no other information is stored).MODULE
: Optional. If you want to store multiple reports for a version, you can use this value to separate them logically, for example, in a mono-repo setup where each package (or project or module) delivers a report.
Footnotes
-
The
project
andversion
are automatically retrieved if your project is using SourceLink. ↩