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

Pass coverlet codebase in runsettings for inproc data collector initialization #2288

Merged
merged 11 commits into from
Jan 30, 2020

Conversation

MarcoRossignoli
Copy link
Contributor

@MarcoRossignoli MarcoRossignoli commented Jan 4, 2020

closes #2275

cc: @vagisha-nidhi @AbhitejJohn @singhsarab

If after merge you can deploy a preview package I can try to test with our new integration tests https://github.com/tonerdo/coverlet/blob/master/test/coverlet.integration.tests/Collectors.cs

I know we cannot test runner but only host, btw I'll run with my local patched sdk for the acceptance test.

@MarcoRossignoli
Copy link
Contributor Author

Checking failure.

@MarcoRossignoli MarcoRossignoli changed the title Pass coverlet codebase in runsettings for inproc data collector initialization [WIP]Pass coverlet codebase in runsettings for inproc data collector initialization Jan 4, 2020
@MarcoRossignoli MarcoRossignoli changed the title [WIP]Pass coverlet codebase in runsettings for inproc data collector initialization Pass coverlet codebase in runsettings for inproc data collector initialization Jan 4, 2020
@MarcoRossignoli
Copy link
Contributor Author

Ready to review.

@singhsarab singhsarab requested a review from nohwnd January 6, 2020 07:38
@MarcoRossignoli
Copy link
Contributor Author

Did some manual tests

TpTrace Verbose: 0 : 12180, 1, 2020/01/16, 14:32:46.229, 589700868956, vstest.console.dll, CoverletDataCollector in-process codeBase path 'C:\Users\Marco\.nuget\packages\coverlet.collector\1.2.0\build\netstandard1.0\coverlet.collector.dll'
...
<RunSettings>
  <RunConfiguration>
    <ResultsDirectory>C:\git\coverletissue\vstestdebug\XUnitTestProject1\TestResults</ResultsDirectory>
    <TargetPlatform>X64</TargetPlatform>
    <TargetFrameworkVersion>.NETCoreApp,Version=v3.1</TargetFrameworkVersion>
    <TestAdaptersPaths>C:\Users\Marco\.nuget\packages\coverlet.collector\1.2.0\build\netstandard1.0\</TestAdaptersPaths>
    <DesignMode>False</DesignMode>
    <CollectSourceInformation>False</CollectSourceInformation>
  </RunConfiguration>
  <DataCollectionRunSettings>
    <DataCollectors>
      <DataCollector friendlyName="XPlat Code Coverage" enabled="True" />
    </DataCollectors>
  </DataCollectionRunSettings>
  <InProcDataCollectionRunSettings>
    <InProcDataCollectors>
      <InProcDataCollector assemblyQualifiedName="Coverlet.Collector.DataCollection.CoverletInProcDataCollector, coverlet.collector, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" friendlyName="XPlat Code Coverage" enabled="True" codebase="C:\Users\Marco\.nuget\packages\coverlet.collector\1.2.0\build\netstandard1.0\coverlet.collector.dll" />
    </InProcDataCollectors>
  </InProcDataCollectionRunSettings>
  <LoggerRunSettings>
    <Loggers>
      <Logger friendlyName="Console" uri="logger://microsoft/TestPlatform/ConsoleLogger/v1" assemblyQualifiedName="Microsoft.VisualStudio.TestPlatform.CommandLine.Internal.ConsoleLogger, vstest.console, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" codeBase="C:\git\coverletissue\dotnet\dotnet-sdk-3.1.100-win-x64\sdk\3.1.100\vstest.console.dll" enabled="True" />
    </Loggers>
  </LoggerRunSettings>
</RunSettings>

@MarcoRossignoli MarcoRossignoli changed the title Pass coverlet codebase in runsettings for inproc data collector initialization [WIP]Pass coverlet codebase in runsettings for inproc data collector initialization Jan 16, 2020
@MarcoRossignoli
Copy link
Contributor Author

MarcoRossignoli commented Jan 16, 2020

Checking failures, on my local some smoke/acceptance fails also on master(for some reason I don't understand yet) so I use CI to find real one.

@MarcoRossignoli MarcoRossignoli changed the title [WIP]Pass coverlet codebase in runsettings for inproc data collector initialization Pass coverlet codebase in runsettings for inproc data collector initialization Jan 16, 2020
@MarcoRossignoli
Copy link
Contributor Author

MarcoRossignoli commented Jan 16, 2020

@AbhitejJohn @nohwnd can you review?

I moved to init and also switched two priority because RunSettings override all settings and so TestAdapter path must be processed after this one(or collectors won't load), I think that this bug was introduced with #709 in this line https://github.com/microsoft/vstest/pull/709/files#diff-3cc34ab249a20d053e3f7d27a48e965eR89

After this merge could be great a new preview release so I can add some integration test on coverlet side to be sure that collector will be loaded.

@MarcoRossignoli
Copy link
Contributor Author

Any news?

@AbhitejJohn
Copy link
Contributor

@MarcoRossignoli : Sorry I couldn't get to this earlier. This looks good to me.
@nohwnd, I'm hoping you could take this through with any additional validation if you need to :)

@nohwnd nohwnd merged commit 064dcc1 into microsoft:master Jan 30, 2020
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

Successfully merging this pull request may close these issues.

Pass coverlet codebase in runsettings for inproc data collector initialization
3 participants