{"id":31721234,"url":"https://github.com/locktar/xunitv3codecoveragesample","last_synced_at":"2025-10-09T03:45:04.248Z","repository":{"id":316591550,"uuid":"1064010403","full_name":"LockTar/XUnitV3CodeCoverageSample","owner":"LockTar","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-25T12:50:59.000Z","size":157,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-25T14:45:12.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LockTar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-25T12:19:57.000Z","updated_at":"2025-09-25T12:51:02.000Z","dependencies_parsed_at":"2025-09-25T14:45:15.621Z","dependency_job_id":null,"html_url":"https://github.com/LockTar/XUnitV3CodeCoverageSample","commit_stats":null,"previous_names":["locktar/xunitv3codecoveragesample"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/LockTar/XUnitV3CodeCoverageSample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LockTar%2FXUnitV3CodeCoverageSample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LockTar%2FXUnitV3CodeCoverageSample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LockTar%2FXUnitV3CodeCoverageSample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LockTar%2FXUnitV3CodeCoverageSample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LockTar","download_url":"https://codeload.github.com/LockTar/XUnitV3CodeCoverageSample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LockTar%2FXUnitV3CodeCoverageSample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000706,"owners_count":26082911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-09T03:45:03.353Z","updated_at":"2025-10-09T03:45:04.233Z","avatar_url":"https://github.com/LockTar.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xUnit V3 Code Coverage Sample\n\nA sample repository for .NET 8 or later demonstrating code coverage with xUnit v3 and the Microsoft Testing Platform.\n\n## Overview\n\nThis is a sample repository containing test projects built with **xUnit v3**. The test projects are configured to use the new **Microsoft Testing Platform (MTP)** for enhanced testing capabilities.\n\nThe best setup for a test project is to look at `Tests2` project file. See known issues at the bottom of this file for more details why.\n\n## Code Coverage\n\nThe repository is configured to calculate code coverage using the **Microsoft code coverage extension**. For detailed documentation on this extension, see:\n- [Microsoft Testing Platform Extensions - Code Coverage](https://learn.microsoft.com/en-us/dotnet/core/testing/microsoft-testing-platform-extensions-code-coverage#microsoft-code-coverage)\n\n### Visual Studio Integration\n\nCode coverage results can be visualized using the **Fine Code Coverage (FCC)** Visual Studio extension.\n\n### Configuration Notes\n\n⚠️ **Important**: The `.runsettings` file is currently disabled due to compatibility issues with the Fine Code Coverage (FCC) extension.\nThe extension is now creating its own `.runsettings` file automatically when running the tests in Visual Studio with the Test Explorer.\n\n## Documentation\n\nThis sample repository is based on the official xUnit v3 documentation:\n- [xUnit v3 - Code Coverage with MTP](https://xunit.net/docs/getting-started/v3/code-coverage-with-mtp)\n\n## Requirements\n\n- .NET 8 or later\n- Visual Studio with Fine Code Coverage extension (optional, for coverage visualization). The extension is using it's default settings. This means that the setting `RunMsCodeCoverage` is set to `true`.\n\n## Known Issues\n\n- The Fine Code Coverage (FCC) extension is not showing the code coverage results of all the 3 test projects. It is showing only the results of the `Project1` and `Tests` projects. This is because of the configuration in the test project files. Test project `Project1` and `Tests` have the following package references:\n\n  ```xml\n    \u003cPackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"17.14.1\" /\u003e\n    \u003cPackageReference Include=\"Microsoft.Testing.Extensions.CodeCoverage\" Version=\"17.14.2\" /\u003e\n    \u003cPackageReference Include=\"xunit.v3\" Version=\"3.0.1\" /\u003e\n    \u003cPackageReference Include=\"xunit.runner.visualstudio\" Version=\"3.1.4\" /\u003e\n  ```\n  \n  The `Tests2` project is missing the `Microsoft.NET.Test.Sdk` and `xunit.runner.visualstudio` package references because they are not needed with MTP.\n\n  After adding these package references to the `Tests2` project, the FCC extension is showing the code coverage results of all 3 test projects.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocktar%2Fxunitv3codecoveragesample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocktar%2Fxunitv3codecoveragesample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocktar%2Fxunitv3codecoveragesample/lists"}