百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
X

xunit.analyzers

> 测试质量
开源

用于 xUnit.net 的 Roslyn 分析器 (请在 https://GitHub.com/xunit/xunit 中开启问题)

200 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用于 xUnit.net 的 Roslyn 分析器 (请在 https://GitHub.com/xunit/xunit 中开启问题)

About This Project

This project contains source code analysis and cleanup rules for xUnit.net. Analysis and fixes are only supported with C#.

Requirements: xUnit.net v2 or v3. Supported in Visual Studio 2022 and 2026 (as well as via command line builds with Roslyn 4.12+). Other environments (such as JetBrains Rider) may be able to use these analyzers as well; support and issue resolution will be provided by those third parties and not by xUnit.net itself.

Documentation: a list of supported rules is available at https://xunit.net/xunit.analyzers/rules/

Bugs and issues: please visit the core xUnit.net project issue tracker.

Building: see BUILDING.md.

Note: Our minimum supported versions of Visual Studio 2022 and 2026 align with the "Baseline" column of the "Support for Older Versions" table of Visual Studio Product Lifecycle and Servicing, as these are the minimum versions supported by Microsoft. If you are experiencing issues with an older version of Visual Studio, please upgrade and verify the issue still exists before opening issues.

How to install

  • xUnit.net v3: the analyzer package is referenced by the main xunit.v3 NuGet package out of the box. If you choose to reference xunit.v3.core instead, you can reference xunit.analyzers explicitly.

  • xUnit.net v2 2.3.0 and higher: the analyzer package is referenced by the main xunit NuGet package out of the box. If you choose to reference xunit.core instead, you can reference xunit.analyzers explicitly.

  • xUnit.net v2 2.2.0 and earlier: you have to install the xunit.analyzers NuGet package explicitly.

How to uninstall

  • If you are using xUnit.net v3 and do not wish to use the analyzers package, replace the package reference to xunit.v3 with the corresponding versions of xunit.v3.core and xunit.v3.assert.

  • If you are using xUnit.net v2 2.3.0 or higher and do not wish to use the analyzers package, replace the package reference to xunit with the corresponding versions of xunit.core and xunit.assert.

  • If you are using xUnit.net v2 v2.2.0 or earlier: remove the reference to the xunit.analyzers NuGet package.

Analysis and Code Fix in Action

About xUnit.net

xUnit.net is a free, open source, community-focused unit testing tool for C#, F#, and Visual Basic.

xUnit.net works with the .NET SDK command line tools, Visual Studio, Visual Studio Code, JetBrains Rider, NCrunch, and any development environment compatible with Microsoft Testing Platform (xUnit.net v3) or VSTest (all versions of xUnit.net).

xUnit.net is part of the .NET Foundation and operates under their code of conduct. It is licensed under Apache 2 (an OSI approved license). The project is governed by a Project Lead.

For project documentation, please visit the xUnit.net project home.

  • New to xUnit.net? Get started with the .NET SDK.
  • Need some help building the source? See BUILDING.md.
  • Want to contribute to the project? See CONTRIBUTING.md.
  • Want to contribute to the assertion library? See the suggested contribution workflow in the assertion library project, as it is slightly more complex due to code being spread across two GitHub repositories.

Latest Builds

Latest stable Latest CI (how to use) Build status
xunit.v3
xunit
xunit.analyzers
xunit.runner.visualstudio

For complete CI package lists, please visit the feedz.io package search. A free login is required.

Sponsors

Help support this project by becoming a sponsor through GitHub Sponsors.

Issues· 3 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#roslyn-analyzerunit-testingxunit

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类测试质量
定价开源

> 相关工具

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.