GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - fhnaseer/codecoveragefork

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

405 Commits
405 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
samples
samples
 
 
src
src
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
SUPPORT.md
SUPPORT.md
 
 

Repository files navigation

Microsoft code coverage tools

Microsoft code coverage functionality is closed source. This repository contains documentation and samples. You can also use it to report any issues related to Microsoft.CodeCoverage NuGet package, dotnet-coverage NuGet package or Visual Studio code coverage functionality.

Contents

  • Get started
  • Documentation
  • Samples
  • Contributing
  • Trademarks

Get started

To collect code coverage for .NET test project you can simply execute:

dotnet new mstest -o mstests
cd mstests
dotnet test --collect "Code Coverage;Format=cobertura"

You should see output:

Show expected output
Determining projects to restore...
  All projects are up-to-date for restore.
  mstests -> D:\mstests\bin\Debug\net8.0\mstests.dll
Test run for D:\mstests\bin\Debug\net8.0\mstests.dll (.NETCoreApp,Version=v8.0)
Microsoft (R) Test Execution Command Line Tool Version 17.8.0 (x64)
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.

Passed!  - Failed:     0, Passed:     1, Skipped:     0, Total:     1, Duration: 16 ms - mstests.dll (net8.0)

Attachments:
  D:\mstests\TestResults\caf685fa-04ce-4858-9feb-ae472f1a71e1\dd166e58-6e19-4741-931a-816d025fcb32.cobertura.xml

For any .NET application you can collect code coverage in this way:

dotnet new console -o sample1
cd sample1
dotnet tool install -g dotnet-coverage
dotnet-coverage collect "dotnet run"

You should see output:

Show expected output
dotnet-coverage v18.8.0 [win-x64 - .NET 8.0.23]

SessionId: f2255bb7-259f-4c01-8360-bf7be4f8c5f8
Hello, World!
Code coverage results: output.coverage.

For existing projects to get latest features and best performance please keep up to date below references:

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.7.0" />
<PackageReference Include="Microsoft.CodeCoverage" Version="18.7.0" />

If your solution doesn't contain any C++ code it is recommended to disable native code coverage by adding into configuration below flags:

<EnableStaticNativeInstrumentation>False</EnableStaticNativeInstrumentation>
<EnableDynamicNativeInstrumentation>False</EnableDynamicNativeInstrumentation>

Check other configuration options here.

Documentation

  • Documentation for dotnet-coverage tool is available here.
  • Documentation for Microsoft.CodeCoverage is available here
  • Static and dynamic instrumentation
  • Supported OS versions
  • Configuration
  • Performance data

Samples

  • Unit tests, E2E, console applications, merging, exclusions, static instrumentation
  • MSTest Runner, Native AOT
  • Visual Studio

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit Contributor License Agreements.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

About

No description, website, or topics provided.

Resources

Readme
License

Code of conduct

Code of conduct

Security policy

Security policy
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.