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

TestLogger/DataCollector can't be used to log Test Case Start #4950

Open
davidmatson opened this issue Mar 27, 2024 · 2 comments
Open

TestLogger/DataCollector can't be used to log Test Case Start #4950

davidmatson opened this issue Mar 27, 2024 · 2 comments

Comments

@davidmatson
Copy link

Description

I'm trying to use VSTest extensibility to integrate with another logging system that needs to report as soon as a test case starts. ITestLogger allows me to log on TestCaseEnd, but it doesn't provide any indication when a test case starts. This functionality is important especially for long-running test cases.

I tried using DataCollector and InProcessDataCollection, but neither of those help either - neither receive other messages as a test is running, unlike ITestLogger. Even using all in combination, I still can't get all the events as they happen - InProcessDataCollection doesn't have a way to log messages out; DataCollector can only log warnings or errors, but even these aren't sent to the ITestLogger right away - the platform appears to buffer any logged messages after the first one, so sending a "test case start" message from a DataCollector to an ITestLogger also does not work.

This scenario might be possible by replacing vstest.console.exe entirely with my own code, but that's far more code than I'd like to own just to be notified of and log TestStart events.

This is a feature request to add a TestStart event to TestLoggerEvents.

@nohwnd
Copy link
Member

nohwnd commented Mar 28, 2024

Hello, are you using some specific testing framework? Or this is a for a "service" and needs to take all testing frameworks into account?

@davidmatson
Copy link
Author

This is a for a service and needs to take all testing frameworks into account.

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