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

Fix - dotnet test on a multi-target projects logs only the last target #1877

Merged
merged 2 commits into from
Dec 28, 2018

Conversation

abhishkk
Copy link
Contributor

Related issue

#1603

Description

Timestamp is appended to trx filename with millisecond precision. Thus for multi-target projects, trx for both targets will be stored.

Example: dotnet test testproject.csproj --logger:"trx;logFileName=E:\results.trx" will save trx file E:\results_2018-12-24_14-01-07-176.trx where 2018-12-24_14-01-07-176 is the timestamp.

Copy link
Contributor

@cltshivash cltshivash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@stefanforsberg
Copy link

Hello! I'm using version "16.0.0-preview-20190203-03" which, if I interpret the roadmap doc correctly, should include this PR.

However, when I execute dotnet test --logger "trx;logFileName=C:\Path\File.trx" against a solution containing multiple test projects the result file is not appending the timestamp mentioned above and thus the result file is overwritten by the next test project. I also tried executing the command against a single csproj file with the same result (trx file without timestamp).

Any idea of what I could be doing wrong?

@JeffLeFevre
Copy link

What if the timestamp is unwanted? I don't see an option to omit it for single-target projects. This breaks our CI workflow.

@masterpoi
Copy link

Thanks for breaking all our ci workflows.

@jnm2
Copy link

jnm2 commented Apr 4, 2019

This change has some problems.

  • VSTest inventing directories that don't exist because the string.Replace is hitting all containing directory names, not just the file name.
  • The filename is unsightly and there's no way to turn this off.
  • Our CI scripts have to guess at the resulting filename based on the directory listing or else direct VSTest to a temp folder and copy TRX files back out with proper filenames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants