-
Notifications
You must be signed in to change notification settings - Fork 326
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
dotnet test does not respect LogFileName -- adds date #1951
Comments
@livarcocc as of today this is by design. We do this to create unique files. Consider the option as more of a logFilePrefix rather than logFileName. And changing the param name is contract breaking change so we won't be able to rename it. |
But it did not behave this way in In .NET Core 2.2 / Test Execution Command Line Tool Version 15.9.0 I get this behaviour? This change broke my build scripts because the trx file was not found anymore. |
You are right on the behavior changing from 15.9.0 to 16.0.0. Let me double check the exact reason we made this change and get back to you. |
@hpbieker this was done when dotnet test support at solution level was added i believe. The scenario was that when you ran it at a solution level multiple csprojs are present and multiple trx files are generated. To ensure these don't override each other this change was made. I'm sorry this broke your build scripts. But I don't see a way to go back to honoring the exact file name without adding a post fix since it will break the multi csproj scenario. You can look for trx files with a regex that checks for the name you have as the prefix. (This is what we do in the AzureDevops pipelines, to publish the trx-es). I hope the explanation was satisfactory? |
BTW: this happens even when running tests against a single .csproj file. We have the same problem where it broke our CI pipes. |
@brittonbeckham can you please create a new issue and provide the entire set of logs and screenshots (where applicable) for this? |
Cf. microsoft/vstest#1951 A timestamp is appended to the filename, so build broke. Also fixed the _testCore, to allow promotion of exit codes
@ShreyasRmsft This change broke our pipelines too. Is it normal that a patch version (.NET Core SDK 2.1.602) brings a breaking change like that? Workaround: change your build script or use SDK version 2.1.505. Note that we used the microsoft/dotnet:2.1-sdk docker image available on Docker Hub. Since that image point to 2.1.602 instead of 2.1.505 it broke our pipelines. |
This also broke all of our build pipelines too. Nothing exotic is happening in this section of our pipelines - it's merely pulling the |
Same here, broke our build pipelines too. |
@ShreyasRmsft This change broke our pipelines too. What's going on? |
I think MS wants us to open another issue for this, but seems like it shouldn't have been closed. A patch like this to a container image shouldn't have been a breaking change without, at minimum, a minor version number change. We found a work around for the meantime, but this is definitely frustrating. On the flip side, I am happy and excited about where all this .NET Core stuff is going and have been using it heavily. Having used .NET since v1, i can say I have never been more excited to code in .NET Core. Cheers to the entire team! |
@brittonbeckham @Marusyk @Kemyke Apologies for the break here and do acknowledge that we should have called this out broadly and with an equivalent version update. The cause of the change was to address the scenario of multi targeted test project where the log file provided was being overwritten and ending up with data loss. We will revisit the change and see if we could retain the earlier behavior and at the same time address the issue with multi target test projects. |
Adding reference to #1978 , we plan to publish an RFC on how trx file name would be generated, will update once that is out. |
+1, broke our build chain too. I'm surprised such a change was implemented without any backwards compatibility. Was it not more sensible to implement a "UniqueLogFileName" parameter for those people with the multi-target issue to use, and to leave the behaviour of "LogFileName" untouched/unbroken? |
+1, broke our build chain too. |
This broke our build scripts that execute inside of Jenkins. The test result collector at the end of our build pipeline stages can no longer find the files. We have many, many dozens of these build scripts, all run inside Docker images. Fixing this is a huge issue for us, and a reason not to adopt the newer .NET Core versions. We also have many multi-test solutions in place. Our pattern is to run each test project separately and collect the result files at the end of the stage. Your "multi test" solution is for a problem that many developers have already worked around. The better solution would have been to allow developers the options to change the suffix if we had needed to, rather than forcing it on us and breaking our builds without warning. Your solution to a problem that didn't exist is bad. |
Broke our scripts as well. I totally agree with @andyturner and @crhairr. It should be backwards compatible and simply provide the possibility to add prefixes/postfixes if needed. |
* Multi-targeting for .NET Core 3.0 * Updated build-image * Use glogging feature of trx2junit in CI * Fixed CI due to trx-logger filename Cf. microsoft/vstest#1951 * TFM for samples set to netcoreapp3.0
+1 broke my build too |
+1 It broke our builds too, it would be better with possibility for prefixes/postfixes. Also the description in dotnet test -h is now misleading: |
+1 Our scripts are broken now, too. I fixed it like so:
|
+1 |
…92) * Switch bounds checking to environment variable (and enable by default) * Fix Appveyor microsoft/vstest#1951
+1 broke our build too. Microsofts cowboy builder at it again... Any updates on this? |
Using the trx regex like |
Squashed commit of the following: commit 9332f66 Merge: e327d13 9664ec0 Author: skwas <skwas@skwas.net> Date: Fri Oct 25 19:41:55 2019 +0200 Merge branch 'master' into develop commit e327d13 Author: skwas <skwas@skwas.net> Date: Fri Oct 25 19:34:45 2019 +0200 Build with VS2019 image commit ded1ddc Author: skwas <skwas@skwas.net> Date: Fri Oct 25 19:29:58 2019 +0200 Insert final newline commit 99714e3 Author: skwas <skwas@skwas.net> Date: Fri Oct 25 19:14:50 2019 +0200 Move localizable text to RESX commit 4daec94 Author: skwas <skwas@skwas.net> Date: Fri Oct 25 18:57:10 2019 +0200 Reorder target frameworks and rerun custom tool. This workaround ensures GetTypeInfo() is emitted. dotnet/project-system#1519 commit 5ee8134 Author: skwas <skwas@skwas.net> Date: Fri Oct 25 18:52:23 2019 +0200 Move localizable text to RESX commit 050ece6 Author: skwas <skwas@skwas.net> Date: Fri Oct 25 18:44:09 2019 +0200 Update Changelog commit 6cd686b Author: skwas <skwas@skwas.net> Date: Wed Oct 16 05:58:49 2019 +0200 Use .snupkg and SourceLink commit 2bae078 Author: skwas <skwas@skwas.net> Date: Wed Oct 16 05:57:30 2019 +0200 Add settings for props and targets files commit 9664ec0 Merge: e6bee51 aa01d3f Author: skwasjer <skwas@skwas.net> Date: Wed Oct 16 03:30:58 2019 +0200 Merge pull request #10 from skwasjer/develop Add test coverage commit aa01d3f Author: skwas <skwas@skwas.net> Date: Wed Oct 16 01:36:20 2019 +0200 Fix upload script not finding test reports commit 204017d Author: skwas <skwas@skwas.net> Date: Wed Oct 16 01:18:16 2019 +0200 Fix: upload test report per target framework microsoft/vstest#1603 commit 1b25c1a Author: skwas <skwas@skwas.net> Date: Sat Aug 10 00:56:30 2019 +0200 Fix whitespace commit 3c2bc0d Author: skwas <skwas@skwas.net> Date: Sat Aug 10 00:56:13 2019 +0200 Add test case that asserts correct verification of case (in)sensitive IBAN's commit 9f71aca Author: skwas <skwas@skwas.net> Date: Wed Oct 16 00:46:34 2019 +0200 fix: internal IBAN value can never be null. Add some extra coverage for equality checks. commit 884119e Author: skwas <skwas@skwas.net> Date: Wed Oct 16 00:20:28 2019 +0200 Add coverage commit 51e99ba Author: skwas <skwas@skwas.net> Date: Wed Oct 16 00:10:30 2019 +0200 Partial revert, the custom upload of test reports was needed because NUnit reports are not supported by AppVeyor. This partially reverts commit 099472f. commit 3d6ab4b Author: skwas <skwas@skwas.net> Date: Wed Oct 16 00:03:29 2019 +0200 Add coverage for extensions commit 3243a77 Author: skwas <skwas@skwas.net> Date: Tue Oct 15 23:32:00 2019 +0200 Moved extension specific to get country code to validator since it's poluting string class with this extension method. commit e6bee51 Merge: 046132a a3bf4fb Author: skwasjer <skwas@skwas.net> Date: Tue Oct 15 23:21:44 2019 +0200 Merge pull request #9 from skwasjer/develop CI/Coverage improvements commit a3bf4fb Merge: 92a4e88 046132a Author: skwasjer <skwas@skwas.net> Date: Tue Oct 15 23:18:16 2019 +0200 Merge branch 'master' into develop commit 92a4e88 Author: skwas <skwas@skwas.net> Date: Tue Oct 15 23:00:10 2019 +0200 fix: fail build when test fails during coverage fix: exclude generated/excluded code commit 099472f Author: skwas <skwas@skwas.net> Date: Tue Oct 15 22:49:17 2019 +0200 Move DebugType=full to cmdline arg, so we can compile Release with portable PDB (to support SourceLink) commit 8189ae1 Author: skwas <skwas@skwas.net> Date: Tue Oct 15 20:48:24 2019 +0200 Bump test dependencies commit 046132a Merge: 6e07f35 9ba8014 Author: skwasjer <skwas@skwas.net> Date: Thu Jul 25 03:38:07 2019 +0200 Merge pull request #5 from skwasjer/develop v3.1.1 - Maintenance release commit 9ba8014 Author: skwas <skwas@skwas.net> Date: Thu Jul 25 01:21:15 2019 +0200 Fix unit test reports not found microsoft/vstest#1951 commit 20ed577 Author: skwas <skwas@skwas.net> Date: Thu Jul 25 01:13:15 2019 +0200 fix: use correct build hook commit b9914c4 Author: skwas <skwas@skwas.net> Date: Thu Jul 25 01:04:16 2019 +0200 fix: test-results.xml files not found due to invalid arg commit dc89c1f Author: skwas <skwas@skwas.net> Date: Thu Jul 25 00:53:45 2019 +0200 fix build failure commit 323af41 Author: skwas <skwas@skwas.net> Date: Thu Jul 25 00:49:20 2019 +0200 fix: custom codecov script does not generate and upload unit test results to AppVeyor commit 5dec462 Author: skwas <skwas@skwas.net> Date: Wed Jul 24 23:57:40 2019 +0200 Update Changelog.md commit 8593bae Author: skwas <skwas@skwas.net> Date: Wed Jul 24 23:51:36 2019 +0200 Revert breaking change, expose dictionary via internal interface. Breaking change will be postponed until v4. commit 5364406 Author: skwas <skwas@skwas.net> Date: Wed Jul 24 23:34:07 2019 +0200 Ensure supported countries cannot be modified directly. commit b5b5147 Author: skwas <skwas@skwas.net> Date: Wed Jul 24 23:23:54 2019 +0200 Made internal (so it won't get used yet) until decided what to do with it. commit e6ea2b9 Author: skwas <skwas@skwas.net> Date: Wed Jul 24 23:15:15 2019 +0200 Enable cache for choco packages, and add full debug symbols for coverage commit f33dd15 Author: skwas <skwas@skwas.net> Date: Wed Jul 24 23:05:04 2019 +0200 Enable codecov commit f619f6e Merge: 970850e 6e07f35 Author: skwas <skwas@skwas.net> Date: Wed Jul 24 22:47:54 2019 +0200 Merge branch 'master' into develop commit 970850e Author: skwas <skwas@skwas.net> Date: Thu May 23 22:36:02 2019 +0200 Field is not supported. commit ddc095e Author: skwas <skwas@skwas.net> Date: Thu May 23 20:33:54 2019 +0200 Move getting country code from string to internal extension. commit 4d52172 Author: skwas <skwas@skwas.net> Date: Thu May 23 20:17:21 2019 +0200 Update Changelog.md commit 397a50f Author: skwas <skwas@skwas.net> Date: Thu May 23 20:16:12 2019 +0200 (breaking) Expose supported countries through new interface. (breaking) Change type of SupportedCountries to dictionary commit 7f532af Author: skwas <skwas@skwas.net> Date: Sun May 12 03:40:47 2019 +0200 Allow access to some properties via debugger commit 4f8e24b Author: skwas <skwas@skwas.net> Date: Sat May 11 02:33:34 2019 +0200 [skip ci] Build/test shields only report for master branch commit ae03d21 Author: skwas <skwas@skwas.net> Date: Sat May 11 02:24:55 2019 +0200 Always use latest version of IbanNet for example app # Conflicts - resolved using changes to be integrated: # Changelog.md # appveyor.yml # ci/upload-testresults.ps1 # codecov.yml # src/IbanNet.DataAnnotations/IbanNet.DataAnnotations.csproj # src/IbanNet.FluentValidation/IbanNet.FluentValidation.csproj # src/IbanNet/IbanNet.csproj # src/IbanNet/IbanValidator.cs # test/IbanNet.Tests/IbanValidatorTests.cs
Now My tests also are breaking with Microsoft.Net.Test.SDK V16.3.0 for same reason |
From @hpbieker on March 11, 2019 9:59
Steps to reproduce
dotnet test --logger 'trx;LogFileName=somename.trx'
Expected behavior
A file named
somename.trx
should be created. In .NET Core 2.2 / Test Execution Command Line Tool Version 15.9.0 I get this behaviour.Actual behavior
A file named
somename_2019-03-11_10-38-36-764.trx
was created.Environment data
Copied from original issue: dotnet/cli#10962
The text was updated successfully, but these errors were encountered: