public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent) { var mutationReport = JsonReport.Build(_options, reportComponent); var reportUri = _dashboardClient.PublishReport(mutationReport, _options.ProjectVersion).Result; if (reportUri != null) { if (_options.ReportTypeToOpen == Options.Inputs.ReportType.Dashboard) { _processWrapper.Open(reportUri); } else { _consoleWriter.Write(Output.Cyan("Hint: by passing \"--open-report:dashboard or -o:dashboard\" the report will open automatically once Stryker is done.")); } _logger.LogDebug("Your stryker report has been uploaded to: \n {0} \nYou can open it in your browser of choice.", reportUri); _consoleWriter.Write(Output.Green($"Your stryker report has been uploaded to: \n {reportUri} \nYou can open it in your browser of choice.")); } else { _logger.LogError("Uploading to stryker dashboard failed..."); } _consoleWriter.WriteLine(); _consoleWriter.WriteLine(); }
private async Task UploadBaseline(JsonReport mutationReport) { var branchName = _gitInfoProvider.GetCurrentBranchName(); var baselineLocation = $"dashboard-compare/{branchName}"; var reportUrl = await _dashboardClient.PublishReport(mutationReport.ToJson(), baselineLocation); if (reportUrl != null) { _logger.LogDebug($"\nYour baseline stryker report has been uploaded to: \n {reportUrl} \nYou can open it in your browser of choice."); } else { _logger.LogError("Uploading to stryker dashboard failed..."); } }
public void OnAllMutantsTested(IReadOnlyInputComponent reportComponent) { var mutationReport = JsonReport.Build(_options, reportComponent); var reportUrl = _dashboardClient.PublishReport(mutationReport.ToJson(), _options.ProjectVersion).Result; if (reportUrl != null) { _logger.LogDebug("Your stryker report has been uploaded to: \n {0} \nYou can open it in your browser of choice.", reportUrl); _chalk.Green($"Your stryker report has been uploaded to: \n {reportUrl} \nYou can open it in your browser of choice."); } else { _logger.LogError("Uploading to stryker dashboard failed..."); } Console.WriteLine(Environment.NewLine); }
public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent) { var mutationReport = JsonReport.Build(_options, reportComponent); var reportUri = _dashboardClient.PublishReport(mutationReport, _options.ProjectVersion).Result; if (reportUri != null) { if (_options.ReportTypeToOpen == Options.Inputs.ReportType.Dashboard) { _processWrapper.Open(reportUri); } else { _console.Write("[Cyan]Hint: by passing \"--open-report:dashboard or -o:dashboard\" the report will open automatically once Stryker is done.[/]"); } _console.WriteLine(); _console.MarkupLine("[Green]Your report has been uploaded at:[/]"); if (_console.Profile.Capabilities.Links) { // We must print the report path as the link text because on some terminals links might be supported but not actually clickable: https://github.com/spectreconsole/spectre.console/issues/764 _console.MarkupLine($"[Green][link={reportUri}]{reportUri}[/][/]"); } else { _console.MarkupLine($"[Green]{reportUri}[/]"); } _console.MarkupLine("[Green]You can open it in your browser of choice.[/]"); } else { _logger.LogError("Uploading to stryker dashboard failed..."); } _console.WriteLine(); _console.WriteLine(); }
public async Task Save(JsonReport report, string version) { await _client.PublishReport(report.ToJson(), version); }