-
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
Add Support for Templating in LogFileName #1876
Comments
@RehanSaeed Adding @cltshivash @PBoraMSFT @singhsarab for thoughts on adding template syntax for logFileName. |
The problem with the solution that was used for #1603 is that when you pass in the LogFileName you have no way of knowing what name the resulting file will be. If instead it had been solved by giving us |
@ryanbrandenburg Currently loggers are not aware of target framework and thus are unable to write the target framework name in file naming. Regarding LogFileName, it is always ensured that file name starts with the name given by the user. |
We had a similar issue and fixed it by relying on shell wildcard expansion (i.e. "projectname.trx*"). |
Any news on the possibility to include ProjectName in the naming of the output files? |
I recently learnt that you can control the loggers through MSBuild properties instead of <ItemGroup>
<VSTestLogger Include="trx%3BLogFileName=TestResults-$(TargetFramework)-$(MSBuildProjectName).trx" />
<VSTestLogger Include="html%3BLogFileName=TestResults-$(TargetFramework)-$(MSBuildProjectName).html" />
</ItemGroup>
<PropertyGroup Condition="$(ContinuousIntegrationBuild) == 'true'">
<VSTestResultsDirectory>$(MSBuildThisFileDirectory)\..</VSTestResultsDirectory>
<VSTestLogger>@(VSTestLogger)</VSTestLogger>
</PropertyGroup> |
So that test results are available at a glance in the GitHub action run page. Also give a proper name to the trx files in order to understand the test results, see microsoft/vstest#1876 (comment)
So that test results are available at a glance in the GitHub action run page. Also give a proper name to the trx files in order to understand the test results, see microsoft/vstest#1876 (comment)
This is a new feature and won't be implemented, we are focusing on adding new features to Testing.Platform instead. https://aka.ms/testingplatform |
Description
The trx file produced from
dotnet test
is highly unique but terrible for humans:I'd like to supply a
LogFileName
using some sort of template syntax:To output:
MyProject-2018-12-23_08_27_05.trx
There are various replacements that could take place in
LogFileName
:Why is this useful
We can now run
dotnet test
on a folder to run all tests. However, I want custom file names, so I end up not being able to use the new feature above.I'd like a template syntax, so I could write:
The text was updated successfully, but these errors were encountered: