It's a cross-platform .NET Core solution with several test projects and an ability to easily generate a code coverage report on your local machine as well as inside an Azure DevOps build pipeline.
There is a run_tests_and_generate_coverage_report.cake
script which is located in scripts
folder and which can be used to generate code coverage reports. Cake is a cross-platform build automation system which enables us to write build scripts in C#. Coverlet nuget package and ReportGenerator tool were utilized in the cake script. Also there are run_tests_and_generate_coverage_report.sh
and run_tests_and_generate_coverage_report.ps1
scripts which are used to run the cake script on a corresponding platform.
Use the following steps to generate a code coverage report locally on your machine:
- Open the solution folder.
- Go into
scripts
folder. - [On Windows] Open PowerShell window for this folder and use
.\run_tests_and_generate_coverage_report.ps1
command to execute the script. You may also need to change the user preference for the PowerShell execution policy. It determines which scripts, if any, must be degitally signed before they will run. - [On Mac] Open Terminal window for this folder and use
./run_tests_and_generate_coverage_report.sh
command to execute the script. - Navigate to the parent folder and go into
code_coverage
folder which was created by the script. - Open
index.htm
file and analyze the generated report.