-
Notifications
You must be signed in to change notification settings - Fork 389
Shutdown msbuild driver innovations? #683
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
Comments
Eh...this is my "dream"...I'm working on vstest side to understand well what missing there, for instance fail on threshold, show data on console etc...that environment lack of some support, but ms team seem available to accomodate our needs.
This was also one of my idea...or some new "subcommand"
At the moment a lot of usage are on msbuild...maybe we could remove in 1/2-1 year announcing to community to move to collectors...but we need to be sure to support all needs. |
We could simply stop to release msbuild(flow only important core fix related to coverage alg and increase only fix part of semver 2.8.X) and move coverlet.console to 2.0(with new commands) and keep collectors with current versioning schema. |
I opened an issue on vstest repo microsoft/vstest#2299 for some info. |
I would like to +1 the obsoleting of the msbuild collector. Having 1/2 <-> 1 year time window is plenty of time to have it flagged as Reasons: makes it 'easier' to learn how to consume/use this library. Of course, the vstest collector needs to be feature parity with msbuild collector. Also, while we're speaking of collectors ... I'd also vote for a name change for the vstest collector because it could suggest it's tied to visual studio. Yep, this is a branding/advertising/marketing concern .. not a tech concern. I don't have a suggested name, though :P |
Many thanks for driving this @MarcoRossignoli and @petli. Removing support for msbuild is gonna be a big change especially because it's still the most used flavour. I'm not against going in this direction, but I think this is something that needs to be carefully thought through. Here are some of my thoughts/concerns:
Thoughts? |
I started this issue with
Yes this was my idea for next release, these are the main used/requested feat https://github.com/tonerdo/coverlet/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Adriver-collectors+label%3Afeature-request and yes we need to understand how to support these on vstest plat.
Yes I agree also with this, I'm in contact with vstest team to trying to enter in that space to gain some trust and speed up things(@AbhitejJohn @vagisha-nidhi @singhsarab @nohwnd). We provide cross coverage tool to .NET cross world(collectors are growing https://nugettrends.com/packages?months=24&ids=coverlet.collector&ids=coverlet.msbuild&ids=coverlet.console) and for what I see they're very supportive, thank's guys. We can help to make coverage usage more msbuild friendly(with no runsettings file). https://github.com/pulls?utf8=%E2%9C%93&q=is%3Apr+author%3AMarcoRossignoli+-repo%3AMarcoRossignoli%2Fmarcorossignoli.github.io+repo%3Amicrosoft%2Fvstest+sort%3Aupdated-desc+
My main concern about .NET tool/Msbuild is that are not integrated into vstest plat workflow and I'm scared about this kind of issues https://github.com/tonerdo/coverlet/blob/master/Documentation/KnowIssues.md#1-vstest-stops-process-execution-earlydotnet-test that we cannot control. I'm aligned with https://blog.marcgravell.com/2020/01/net-core-net-5-exodus-of-net-framework.html and support as default usage |
The biggest problem I see with vstest now is that it's difficult to keep track of the output files unless wrapping the usage in a script that sets up a clean output directory (see https://github.com/ncalc/ncalc-async/blob/master/test/NCalcAsync.Tests/run-code-coverage.ps1 e.g.) I see a role for the tool here to run tests on a solution or one or more projects, capturing the reports in a temporary directory and moving them to the final output, with options to merge them, output a summary on the console, check thresholds etc. |
You mean launch a command uses collectors(maybe some new verb) and at the end(I need to understand how the first dotnet process know when all it's end and exits, I think that are all children process) do merge/check thresholds etc... |
Yes, it could take command line flags or an existing runsettings file and then:
Running subprocesses should be straightforward, the main process will be able to get notifications or wait for all children to finish. |
Personally I'm not convinced of "coverlet" command for run all ceremony. I don't like the idea to "hide" Scenario: I've only one test proj
Scenario: I want to run for big sln and check thresholds
runsettings file
Supporting old coverlet commands
This approach could be first "portable" step that doesn't need to know how testing is done and we could avoid new command when vstest will support(maybe never) this behaviour. |
I mostly agree, but there is one issue I see with
The user need to make sure the results directory doesn't contain coverage files from an old run. Maybe this requirement is ok since the tool verb will primarily be used in build steps or scripts or interactively when trying to get coverage testing running in the first place, but it could cause confusion if used repeatedly by interactive users. |
Yes, could happen...btw the issue today is present for official |
Yes, the issue exists today, but is handled by the ability of the msbuild/coverlet.console collectors to merge coverage files for non-parallel test runs. Though a similar situation exists there, if accidentially merging a new test run into the coverage file for an old run. The reason I suggested a The reason I suggested this is that I understood the issue as that getting rid of the one-stop-shop that coverlet.msbuild mostly is would require an equivalent, preferably better, replacement. A |
Clear, @tonerdo (or every other person following this discussion) what do you think? |
Added draft on new verbs #704 please take a look! |
Close because after discussion we decided to now remove msbuild support, but maybe change hits gather strategy using memory mapped file to avoid vstest plat issue and some other trick to allow solution report merge(setup common file with msbuild target and lock file access on merge). |
Started from #678 (comment)
@petli comment
A reflection somewhat from the side here is that a lot of these issues around merging, thresholds etc comes from attempts to do coverage collection and analysis being as a single build step. A more unixy way of looking at it is that coverage gets collected during unit tests and written to files, and a separate tool is then run to analyse the coverage in whichever way the user needs. These tools can be combined with a script to get a single command line or build step to run.
(Incidentially, this is how I use coverlet. A script runs all tests with the vstest collector to get coverage files, and then filter and combine in three different ways with reportgenerator to get slightly different views on the results. Partly this is because the early coverlet didn't support anything else, but also because I much prefer the fine-grained control I get this way.)
A major new version av coverlet could look like this:
I think this would make it easier to use coverlet, and simplifying the code a lot. There would be less need for the more complex switches or command line flag combinations, as less common use cases (like the multi-target analysis in this issue or the Linux/Windows combined coverage) could be handled by scripting the coverlet command line tool.
cc: @tonerdo
EDIT: I've added a documentation draft for new verbs here #704 please take a look!
The text was updated successfully, but these errors were encountered: