Skip to content
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

Coverage output file name #378

Closed
andreacassioli opened this issue Apr 9, 2019 · 7 comments
Closed

Coverage output file name #378

andreacassioli opened this issue Apr 9, 2019 · 7 comments
Labels
enhancement General enhancement request feature-request New feature request

Comments

@andreacassioli
Copy link

Is there a way to set the output file name so that it will include the project name and a timestamp, pretty much as standard unit test trx files? I cannot find any mention of this.

@MarcoRossignoli
Copy link
Collaborator

MarcoRossignoli commented Apr 9, 2019

@alexanderkozlenko
Copy link
Contributor

alexanderkozlenko commented Apr 29, 2019

<Target Name="SetCoverletOutputProperty"
        BeforeTargets="GenerateCoverageResult">
  <PropertyGroup>
    <CoverletOutput>$(VSTestResultsDirectory)\$(MSBuildProjectName).CodeCoverage_$([System.DateTime]::UtcNow.ToString("yyyy-MM-dd_HH_mm_ss_fff")).xml</CoverletOutput>
  </PropertyGroup>
</Target>

@MarcoRossignoli MarcoRossignoli added the question This issue is a question label Apr 29, 2019
@tonerdo
Copy link
Collaborator

tonerdo commented May 1, 2019

I like this idea, but I'm afraid it'll break existing build scripts that expect a predictable output file name

@sasivishnu
Copy link
Contributor

By default, we generate output file name as it is now. May be add a new command line option? An option like "--output -uf" means we generate unique file name (CodeCoverage_timestamp).

@MarcoRossignoli
Copy link
Collaborator

MarcoRossignoli commented May 6, 2019

Maybe --output-includetimestamp(with a default) and --output-timestampformat for custom format

... --output "/custom/path/result.json" --output-includetimestamp --output-timestampformat yyyy-MM-dd_HH_mm_ss_fff

To produce
result_2019-05-06_14_42_22_222.json

@MarcoRossignoli MarcoRossignoli added enhancement General enhancement request and removed question This issue is a question labels Jun 14, 2019
@MarcoRossignoli MarcoRossignoli added feature-request New feature request up-for-grabs Good issue for contributors labels Sep 14, 2019
@MarcoRossignoli MarcoRossignoli added discussion Generic discussion on something and removed up-for-grabs Good issue for contributors labels Oct 7, 2019
@MarcoRossignoli
Copy link
Collaborator

@tonerdo @andreacassioli @alexanderkozlenko our great contributor @daveMueller started to work on this, I would like to know if we are in agreement with switches!
I think that in case we're in agreement we should provide those on msbuild and .net tool, I don't know if we can apply to collectors, to investigate.

@MarcoRossignoli MarcoRossignoli removed the discussion Generic discussion on something label Nov 6, 2021
@MarcoRossignoli
Copy link
Collaborator

Moved to discussion #1254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General enhancement request feature-request New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants