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

Be able to list all test results in AssemblyCleanup #4763

Open
nir-boger opened this issue Jan 23, 2025 · 6 comments
Open

Be able to list all test results in AssemblyCleanup #4763

nir-boger opened this issue Jan 23, 2025 · 6 comments

Comments

@nir-boger
Copy link

Summary

Background and Motivation

We have an internal system capturing statistics of our test results. We would like to report them during the test execution

Proposed Feature

 [AssemblyCleanup()]
        public static void AssemblyCleanup()
        {
            foreach(var test in TextContext.ExecutedTests)
            {
                  _testReporter.ReportTestResult(test.Name, test.Result, test.Duration);
            }
        }

Alternative Designs

@Evangelink
Copy link
Member

Hi @nir-boger,

It makes sense to me but I am not sure when we would be able to provide this feature.

@nir-boger
Copy link
Author

@Evangelink , can you think on another way I can get this info? Do I have other options?

@nohwnd
Copy link
Member

nohwnd commented Jan 23, 2025

This seems like a logger / reporter job to me. At least for MTP, where having an implicit extension consuming the data is easy. And does not require the user to always specify --logger:myreportinglogger.

@nohwnd
Copy link
Member

nohwnd commented Jan 23, 2025

Which platform are you using so I can dig out an example for you? vstest or testing platform?

@nir-boger
Copy link
Author

vstest

@Evangelink
Copy link
Member

@nir-boger I can only strongly encourage you to move over to Microsoft.Testing.Platform. Here is an example of how you could build an extension to get notified about test updates: https://github.com/microsoft/testfx/tree/main/samples/public/mstest-runner/CustomReportExtension

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

No branches or pull requests

3 participants