-
Notifications
You must be signed in to change notification settings - Fork 251
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
feat(report): support upload of full report to dashboard #1783
Conversation
Support having the full HTML report send to the stryker dashboard (https://dashboard.stryker-mutator.io). * Add `dashboard` options: * baseUrl * project * version * module * fullReport (true/false) * Updated ci providers (travis and circle ci are supported) See design: stryker-mutator/stryker-handbook#27
@simondel I think this is now ready for review. Would you mind taking a look? |
@dependabot rebase |
Well.. head to try 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicojs Could you look at my comments?
packages/core/README.md
Outdated
@@ -106,6 +106,7 @@ You can *ignore* files by adding an exclamation mark (`!`) at the start of an ex | |||
* [timeoutFactor](#timeoutFactor) | |||
* [timeoutMS](#timeoutMS) | |||
* [transpilers](#transpilers) | |||
* [dashboard.*](#dashboard) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add this in the correct order?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Same goes for the description)
packages/core/src/StrykerCli.ts
Outdated
import { Config } from '@stryker-mutator/api/config'; | ||
import { Logger } from '@stryker-mutator/api/logging'; | ||
|
||
function deepOption<T extends string, R>(object: { [K in T]?: R }, key: T, valueInterpreter = (value: R) => value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add comments to explain what this does? Also, I can't find a reference as to a custom valueInterpreter
argument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
packages/core/src/StrykerCli.ts
Outdated
import { Config } from '@stryker-mutator/api/config'; | ||
import { Logger } from '@stryker-mutator/api/logging'; | ||
|
||
function deepOption<T extends string, R>(object: { [K in T]?: R }, key: T, valueInterpreter = (value: R) => value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this function not part of your class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's not using this
. Moreover, I especially don't want to make a mistake and use this
, since it will be redirected to be something else (the Commander instance or something)
private toReport(result: mutationTestReportSchema.MutationTestResult): Report { | ||
if (this.options.dashboard.reportType === ReportType.Full) { | ||
return { | ||
result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you have to set the mutationScore if you also set the result?
|
Yeah, you're right! I don't know why I was thinking it was something else. Thanks for the help 😅 @simondel I've resolved/remarked on all issues. Please take a look again. Also implemented the latest design according to stryker-mutator/stryker-handbook#27 |
BTW: I've set the default report type to |
Support having the full HTML report send to the stryker dashboard (https://dashboard.stryker-mutator.io).
See design: stryker-mutator/stryker-handbook#27 and https://github.com/stryker-mutator/stryker-handbook/blob/master/dashboard.md
Changes:
dashboard
options:baseUrl
,project
,version
,module
reportType
('mutationScore'
/'full'
).StrykerCli
: made it testable and written tests for it.Fixes #1791