NUnit.Analyzers 3.10.0-beta1

This is a prerelease version of NUnit.Analyzers.
There is a newer version of this package available.
See the version list below for details.
dotnet add package NUnit.Analyzers --version 3.10.0-beta1                
NuGet\Install-Package NUnit.Analyzers -Version 3.10.0-beta1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NUnit.Analyzers" Version="3.10.0-beta1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NUnit.Analyzers --version 3.10.0-beta1                
#r "nuget: NUnit.Analyzers, 3.10.0-beta1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NUnit.Analyzers as a Cake Addin
#addin nuget:?package=NUnit.Analyzers&version=3.10.0-beta1&prerelease

// Install NUnit.Analyzers as a Cake Tool
#tool nuget:?package=NUnit.Analyzers&version=3.10.0-beta1&prerelease                

NUnit Analyzers

Build status GitHub Actions build status NuGet Version and Downloads count MyGet Feed

This is a suite of analyzers that target the NUnit testing framework. Right now, the code is separate from the NUnit framework, so if you want to try out the analyzers you'll need to download the analyzers separately as a nuget package. In the future the analyzers may be added as part of the NUnit framework package but that hasn't been done yet.

Download

The latest stable release of the NUnit Analyzers is available on NuGet or can be downloaded from GitHub. Note that for Visual Studio 2017 one must use versions below 3.0. Version 3.0 and upwards require Visual Studio 2019, these versions also enables supression of compiler errors such as errors arising from nullable reference types.

Prerelease nuget packages can be found on MyGet. Please try out the package and report bugs and feature requests.

Analyzers

The full list of analyzers can be found in the documentation.

Below we give two examples of analyzers. One will look for methods with the [TestCase] attribute and makes sure the argument values are correct for the types of the method parameters along with the ExpectedResult value if it is provided.

<img src="https://user-images.githubusercontent.com/1007631/44311794-269a7200-a3ee-11e8-86a0-1d290b355ac5.gif" alt="testcase analyzers" width="750"/>

The other analyzer looks for classic model assertions (e.g. Assert.AreEqual(), Assert.IsTrue(), etc.). This analyzer contains a fixer that can translate the classic model assertions into constraint model assertions (Assert.That()).

<img src="https://user-images.githubusercontent.com/1007631/44311791-213d2780-a3ee-11e8-90b8-6d144c0e3dbd.gif" alt="classic model assertions analyzers" width="1000"/>

Which version works with Unity Test Framework

If your Unity project is made by Unity under 2021.2, then use NUnit.Analyzers v2.x.

If your Unity project is made by Unity 2021.2 or later, then use NUnit.Analyzers v3.3 (v3.4 or later of the analyzers does not work with Unity).

You should use an analyzer built with the same version of Microsoft.CodeAnalysis.CSharp as the one embedded in the Unity Editor.

License

NUnit analyzers are Open Source software and released under the MIT license, which allow the use of the analyzers in free and commercial applications and libraries without restrictions.

Contributing

There are several ways to contribute to this project. One can try things out, report bugs, propose improvements and new functionality, work on issues (especially the issues marked with the labels help wanted and Good First Issue), and in general join in the conversations. See Contributing for more information.

This project has adopted the Code of Conduct from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4. See the Code of Conduct for more information.

Contributors

NUnit.Analyzers was created by Jason Bock. A complete list of contributors can be found on the GitHub contributors page.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (10)

Showing the top 5 NuGet packages that depend on NUnit.Analyzers:

Package Downloads
Coffee.NetCore

Package Description

Seeq.Link.SDK.TestFramework

Framework for performing standard tests of Seeq C# connnectors

CommonApiTestLib

This library provides you a faster and more reliable way to create your api testing framework using Restsharp

Net4x.CoreLibrary.TypedBackgroundWorker.Test

Package Description

YuzuDelivery.Umbraco.Import.Integration.Tests

Package Description

GitHub repositories (205)

Showing the top 5 popular GitHub repositories that depend on NUnit.Analyzers:

Repository Stars
BeyondDimension/SteamTools
🛠「Watt Toolkit」是一个开源跨平台的多功能 Steam 工具箱。
jasontaylordev/CleanArchitecture
Clean Architecture Solution Template for ASP.NET Core
QuestPDF/QuestPDF
QuestPDF is a modern open-source .NET library for PDF document generation. Offering comprehensive layout engine powered by concise and discoverable C# Fluent API. Easily generate PDF reports, invoices, exports, etc.
MahApps/MahApps.Metro
A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
MassTransit/MassTransit
Distributed Application Framework for .NET
Version Downloads Last updated
4.5.0 33,320 12/22/2024
4.4.0 917,875 11/13/2024
4.3.0 3,244,460 8/9/2024
4.2.0 3,425,344 4/24/2024
4.1.0 1,779,506 3/16/2024
4.0.1 1,589,593 2/1/2024
4.0.0 212,135 1/27/2024
3.10.0 3,568,235 11/27/2023
3.10.0-beta1 6,264 11/17/2023
3.9.0 3,681,854 10/27/2023
3.8.0 876,693 9/25/2023
3.7.0 212,896 9/16/2023
3.6.1 11,636,011 3/10/2023
3.6.0 385,195 2/21/2023
3.5.0 4,079,088 10/23/2022
3.3.0 15,921,196 1/8/2022
3.2.0 216,017 8/28/2021
3.1.0 191,977 4/4/2021
3.0.0 99,945 1/18/2021
2.10.0 3,675 11/27/2023
2.10.0-beta1 199 11/17/2023
2.9.0 1,185 10/27/2023
2.8.0 1,313 9/25/2023
2.7.0 1,300 9/16/2023
2.6.1 3,919 3/10/2023
2.6.0 1,623 2/21/2023
2.5.0 1,958 10/23/2022
2.3.0 1,776 1/8/2022
2.2.0 1,736 8/28/2021
2.1.0 2,388 4/4/2021
2.0.0 2,006 1/18/2021
0.6.0 66,830 11/24/2020
0.5.0 16,327 9/30/2020
0.4.0 18,458 7/25/2020
0.3.0 31,522 5/20/2020
0.2.0 35,343 4/16/2020