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

Detect runsettings file automatically for assembly invocation and detect coverlet data collector in runsettings #2429

Closed
wants to merge 3 commits into from

Conversation

ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented May 9, 2020

Fixes #2418
Fixes #2432

Add an auto-detection mechanism that searches for a ".runsettings" in
the test app's directory if no runsettings file was passed in and only
a single test assembly is invoked.

Extend the AlwaysExecute mechanism for ArgumentProcessors so that
processors can run by default without a switch passed in without being a SpecialCommand.

cc @nohwnd

@ViktorHofer ViktorHofer changed the title Detect runsettings file automatically for assembly Detect runsettings file automatically for assembly invocation May 9, 2020
@ViktorHofer
Copy link
Member Author

This needs a slightly different approach as the runsettings is added too late, this should be done before the lazy initialization.

@nohwnd
Copy link
Member

nohwnd commented May 11, 2020

This needs a slightly different approach as the runsettings is added too late, this should be done before the lazy initialization.

Does that mean that this is WIP and you will continue on it, or I should change the approach?

  1. How do we prevent this from automatically taking the settings if the user does not want them to be applied?

@ViktorHofer ViktorHofer marked this pull request as draft May 12, 2020 15:37
@ViktorHofer
Copy link
Member Author

ViktorHofer commented May 12, 2020

Does that mean that this is WIP and you will continue on it, or I should change the approach?

Yes this WIP, just converted the PR to a draft one.

How do we prevent this from automatically taking the settings if the user does not want them to be applied?

My assumption is that if a user puts a .runsettings file into an test app's output directory and names that file exactly .runsettings, then this is intentional to make use of the auto-detection. An alternative solution would be to search for a different name, ie default.runsettings.

Add an auto-detection mechanism that searches for a ".runsettings" in
the test app's directory if no runsettings file was passed in and only
a single test assembly is invoked.

Extend the AlwaysExecute mechanism for ArgumentProcessors so that
processors can run by default without a switch passed in.
@ViktorHofer ViktorHofer marked this pull request as ready for review May 13, 2020 07:50
@ViktorHofer ViktorHofer changed the title Detect runsettings file automatically for assembly invocation Detect runsettings file automatically for assembly invocation and detect coverlet data collector in runsettings May 13, 2020
@ViktorHofer
Copy link
Member Author

cc @MarcoRossignoli for the coverlet discovery change here.

@ViktorHofer ViktorHofer deleted the VSTestDetection branch July 10, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants