Closed VladislavAntonyuk closed 5 years ago
Hi there,
You can support multiple coverlet formats by providing them like this:
var coveletSettings = new CoverletSettings {
CollectCoverage = true,
CoverletOutputFormat = CoverletOutputFormat.opencover | CoverletOutputFormat.covertura,
CoverletOutputDirectory = Directory(@".\coverage-results\"),
CoverletOutputName = $"results-{DateTime.UtcNow:dd-MM-yyyy-HH-mm-ss-FFF}"
};
Or by using the method on the settings class like this:
var coveletSettings = new CoverletSettings {
CollectCoverage = true,
CoverletOutputFormat = CoverletOutputFormat.opencover,
CoverletOutputDirectory = Directory(@".\coverage-results\"),
CoverletOutputName = $"results-{DateTime.UtcNow:dd-MM-yyyy-HH-mm-ss-FFF}"
}.WithFormat(CoverletOutputFormat.covertura);
I'll use this issue as a note to improve the documentation in the readme. Thanks
Great!, thnak you, I will close the issue after you add documentation
This does not work for us. How about providing a placeholder (like %format%
) in the CoverletOutputName
that is automatically replaced with the defined format.
So we could use:
CoverletOutputName = $"{projectName}-%format%.xml"
to generate xxx-opencover.xml
and xxx-cobertura.xml
and we would not need to rely on timestamps anymore.
Add support to setup
List<CoverletOutputFormat>