Better code coverage
MODIFY
WalletWasabi.Documentation/CodeCoverage.md
WalletWasabi.Documentation/CodeCoverage.md
# Code coverage (How to)
-Wasabi Wallet is built using dotnet core. Given there is no cross-platform Profiling API like the one available on Windows, we
-use [AltCover](https://github.com/SteveGilham/altcover) package for instrumenting the assemblies and recording the execution
-coverage.
+Wasabi Wallet is built using dotnet core. Currently dotnet XUnit and MSTest templates come with support for coverlet. You can read more about this here: https://docs.microsoft.com/en-us/dotnet/core/testing/unit-testing-code-coverage?tabs=linux and also here https://codeburst.io/code-coverage-in-net-core-projects-c3d6536fd7d7.
-So, first of all we need to install the package in the `WalletWasabi.Tests` project as follow:
+dotnet test --filter "FullyQualifiedName~WalletWasabi.Tests.UnitTests.Crypto" --collect:"XPlat Code Coverage"
-```sh
-dotnet add WalletWasabi.Tests/WalletWasabi.Tests.csproj package AltCover
-```
-
-
-Next, run:
-
-```sh
-dotnet test /p:AltCover=true /p:AltCoverLcovReport=lcov.info
-```
-
-As a result we get a `lcov.info` file containing the covered lines. In order to be able to see what lines
+As a result we get a `coverage.cobertura.info` file containing the covered lines. In order to be able to see what lines
are covered we need to install a `vscode extension` called [Coverage Gutters](https://github.com/ryanluker/vscode-coverage-gutters).
Run vscode and click on "Watch":
![](https://i.imgur.com/W4hXXda.png)
+
+
+## Important
+
+Coverlet cannot instrument the binaries correctly because of the `PathMap` entries in the project files (*.csproj) and for this reason the easiest way to to fix it is by removing the entries.
\ No newline at end of file

MODIFY
WalletWasabi.Tests/WalletWasabi.Tests.csproj
WalletWasabi.Tests/WalletWasabi.Tests.csproj
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="AltCover" Version="6.7.750" />
+ <PackageReference Include="coverlet.collector" Version="1.3.0">
+ <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+ <PrivateAssets>all</PrivateAssets>
+ </PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">

Better code coverage