data collectors are an extensibility point for the test platform. What is the CLI experience for the data collection support?
vstest.console /collect:coverage;filename=foo.coverage
vstest.console /collect:events;filename=bar.log
I am not sure whether integrating opencover as a data collector make sense. I see that it is currently has a command line tool with rich set of arguments.
Also what will be the way to pick the data collector? like logger.
@pvlakshm @codito @harshjain2 @mayankbansal018 @Faizan2304
Also what will be the way to pick the data collector? like logger.
Earlier we had a discussion on this and there was an consensus on having a new tag "ExtensionsPaths" in RunSettings, similar to "TestAdaptersPaths" where we can put all the extensions, be it logger or a data collector.
What is the CLI experience for the data collection support?
IMHO, we should not support any first class argument for data collectors, as each data collector can have their own set of parameters that can be declared in runsettings.
For code coverage, there can be an exception to support first class argument since we can use default parameters in case user hasn't provided explicit parameters in runsettings. That's how /EnableCodeCoverage was supported in TPV1.
Some open questions we need to decide on.
Choices:
*.datacollectors.dll available in nuget dependency of a test project are marked as data collector extensions./extensions:<path> command line argument*.datacollectors.dll are picked from user provided path. They are loaded for the entire run.runsettings.TestRunRequest.Choices:
/collect:<friendly name> in command line arguments. Here IDE/Editors need an extensibility in TestRunRequest.A data collector can be configured with runsettings or with CLI arguments passed in with -- codecoverage.filename=foo.log
vstest.console will launch the host and communicate with json (similar to testhost extensibility).Acquisition – Choice 3
Enable/disable of data collectors – Choice 1
Configuring a data collector – as called out above
Authoring own datacollector – as called out above
CodeCoverage – support /EnableCodeCoverage as a special commandline switch (similar to TPV1)
we need a better way to enable extensions (data collectors, loggers) through first class CLI switch without using runsettings.
The spec is here - https://github.com/Microsoft/vstest-docs/blob/master/docs/analyze.md
Any update on this? we need test coverage to work in .net core application, stranded a bit.
@aKabirKhan Code coverage for .net core is available on VS 2017 15.3 Preview 1 (download). Instructions to try out are at https://github.com/Microsoft/vstest-docs/blob/master/docs/analyze.md#working-with-code-coverage. Please try it out, let us know if you have any feedback.
Closing this issue since data collector support is available in test platform now. Some work is pending for code coverage support, it is tracked in https://github.com/Microsoft/vstest/issues/579
Thank you @codito. I will give it a go.
What could be an issue if analyze report has <skipped_module reason="no_symbols" />
Why symbols can be ignored?
I checked, symbols exist.
Portable PDBs not yet supported until 15.4 according to https://developercommunity.visualstudio.com/comments/84459/view.html
Most helpful comment
we need a better way to enable extensions (data collectors, loggers) through first class CLI switch without using runsettings.