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

Any interest in a file logger? #10698

Closed
jeffkl opened this issue Dec 13, 2024 · 1 comment
Closed

Any interest in a file logger? #10698

jeffkl opened this issue Dec 13, 2024 · 1 comment

Comments

@jeffkl
Copy link

jeffkl commented Dec 13, 2024

The console output can be very verbose for large repositories so I generally turn it to quiet so that Azure DevOps or GitHub Actions UI isn't flooded with thousands of lines of output. Every once in a while though, our tests encounter problems and I can see the output of stuff like long running test detection in xunit or the blame collector.

I thought it would be good to have a logger that writes all of the detailed output to a file and then if the test run fails, upload that in the hosted build environment for investigation. Here's my prototype:

https://github.com/jeffkl/vstest-loggers/tree/main/src/File.TestLogger

Would this be something anyone else would want and maybe build directly into the VS test platform?

@nohwnd
Copy link
Member

nohwnd commented Dec 16, 2024

This is pretty much what we do in the new testing.platform. VStest is not adding any new features, but the logger extension point is still available, so you can ship you logger in a nuget, and you don't need any new cooperation from vstest to do that. See the TrxLogger for how to implement:

https://github.com/microsoft/vstest/blob/main/src/Microsoft.TestPlatform.Extensions.TrxLogger/TrxLogger.cs#L35

@nohwnd nohwnd closed this as completed Dec 16, 2024
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

No branches or pull requests

2 participants