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

Todo changes for coverlet inproc datacollector #2020

Merged
merged 2 commits into from
Jun 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/vstest.console/Processors/CollectArgumentProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,17 +229,15 @@ internal static class CoverletConstants
/// </summary>
public const string CoverletDataCollectorFriendlyName = "XPlat Code Coverage";

/// TODO : Finalize Name
/// <summary>
/// Coverlet inproc data collector assembly qualified name
/// </summary>
public const string CoverletDataCollectorAssemblyQualifiedName = "Microsoft.TestPlatform.Extensions.CoverletCoverageDataCollector.CoverletCoverageDataCollector, Microsoft.TestPlatform.Extensions.CoverletCoverageDataCollector, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string CoverletDataCollectorAssemblyQualifiedName = "Coverlet.Collector.DataCollection.CoverletInProcDataCollector, coverlet.collector, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";

/// TODO : Finalize codebase
/// <summary>
/// Coverlet inproc data collector codebase
/// </summary>
public const string CoverletDataCollectorCodebase = "coverletinprocdatacollector.dll";
public const string CoverletDataCollectorCodebase = "coverlet.collector.dll";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the name of the out proc one ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is only one dll coverlet.collector. The inproc datacollector is inside this in a separate folder.
Link: https://github.com/tonerdo/coverlet/tree/master/src/coverlet.collector

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The publicKeyToken can be removed if null

Copy link
Contributor

@MarcoRossignoli MarcoRossignoli Sep 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guys if I clone repo and do some update on public key...is there a guide that explain how to run my local "dotnet test" driver?
If so I could test on my local if there are issue with collector load and do a PR directly to this repo.
Related PR coverlet-coverage/coverlet#566

}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public void InitializeXPlatCodeCoverageShouldNotChangeExistingXPlatDataCollector
this.settingsProvider.SetActiveRunSettings(runsettings);
this.executor.Initialize("XPlat Code Coverage");

Assert.AreEqual("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<RunSettings>\r\n <DataCollectionRunSettings>\r\n <DataCollectors>\r\n <DataCollector friendlyName=\"MyDataCollector\" enabled=\"True\" />\r\n <DataCollector friendlyName=\"MyDataCollector1\" enabled=\"True\" />\r\n <DataCollector friendlyName=\"MyDataCollector2\" enabled=\"True\" />\r\n <DataCollector friendlyName=\"XPlat Code Coverage\" enabled=\"True\" />\r\n </DataCollectors>\r\n </DataCollectionRunSettings>\r\n <InProcDataCollectionRunSettings>\r\n <InProcDataCollectors>\r\n <InProcDataCollector assemblyQualifiedName=\"Microsoft.TestPlatform.Extensions.CoverletCoverageDataCollector.CoverletCoverageDataCollector, Microsoft.TestPlatform.Extensions.CoverletCoverageDataCollector, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\" friendlyName=\"XPlat Code Coverage\" enabled=\"True\" codebase=\"coverletinprocdatacollector.dll\" />\r\n </InProcDataCollectors>\r\n </InProcDataCollectionRunSettings>\r\n</RunSettings>", this.settingsProvider.ActiveRunSettings.SettingsXml);
Assert.AreEqual($"<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<RunSettings>\r\n <DataCollectionRunSettings>\r\n <DataCollectors>\r\n <DataCollector friendlyName=\"MyDataCollector\" enabled=\"True\" />\r\n <DataCollector friendlyName=\"MyDataCollector1\" enabled=\"True\" />\r\n <DataCollector friendlyName=\"MyDataCollector2\" enabled=\"True\" />\r\n <DataCollector friendlyName=\"XPlat Code Coverage\" enabled=\"True\" />\r\n </DataCollectors>\r\n </DataCollectionRunSettings>\r\n <InProcDataCollectionRunSettings>\r\n <InProcDataCollectors>\r\n <InProcDataCollector assemblyQualifiedName=\"{CoverletConstants.CoverletDataCollectorAssemblyQualifiedName}\" friendlyName=\"XPlat Code Coverage\" enabled=\"True\" codebase=\"{CoverletConstants.CoverletDataCollectorCodebase}\" />\r\n </InProcDataCollectors>\r\n </InProcDataCollectionRunSettings>\r\n</RunSettings>", this.settingsProvider.ActiveRunSettings.SettingsXml);
}

[TestMethod]
Expand Down