

Nevertheless, many dotCover users find this ability useful in different cases. The issue is fixed in 2019.2, so, technically, the workaround is no longer needed. Initially, the feature was added as a workaround for this issue. Some time ago, dotCover added the ability to run coverage analysis directly via the dotnet driver: NET Core unit tests coverage with dotnet dotCover test In this example, we’re getting coverage of unit tests, but you can also use dotCover.sh for covering applications.TempDir:"./myDir" and -tempDir="./myDir" For example, the following is interchangeable on Windows (but not on macOS and Linux): You can use this syntax on Windows as well. You’ve probably noticed that we’re using Unix-style syntax for command-line arguments.Actually, you can replace it with -TargetArguments="test" but that is much longer. - test at the end is an argument passed to dotnet.-output=myRep.html -reportType=HTML tells dotCover to generate a coverage report in the HTML format.Alternatively, you can specify the full path to the project after test. In this example, we run the command from the project folder.When we want to get coverage of tests in some project, all we need to do is open the solution folder and run:ĭotCover.sh dotnet -output=myRep.html -reportType=HTML - test It runs dotnet under coverage analysis (as if you specified the path to dotnet in -TargetExecutable). We added a new command that runs the dotnet driver: cover-dotnet or a shorter version – dotnet. NET Core unit tests coverageįor sure, the most demanded feature for the console tool was. We’re ready to start coverage analysis! Getting. Note that the tool on Windows is dotCover.exe, while on Unix systems, it is dotCover.sh. When downloading the tool, make sure to select the target operating system:Īnother option is to get the console runner as a NuGet package:Īfter you download and unpack the console runner, it makes sense to add the tool’s location to system PATH (so that you can run it from everywhere). In addition, we’ll recall how you can use dotnet dotcover test. NET Core and Mono and we’ll do this on Mac. Let’s try these brand-new features in action: we’ll profile some unit tests targeting. The dotnet dotCover test workaround is no longer needed, but you can still use it if you find this way of running coverage analysis more convenient. The console runner can perform coverage analysis in Mono projects and gets a new command for analyzing.The dotCover console runner is available not only on Windows, but on macOS and Linux as well.

The result is some good news about the tool, including one important fix specially for. In the 2019.2 release, the dotCover team was mainly focused on the console runner tool.
