This package provides test attributes that alternate NUnit's [Test] and [TestCaseSource] attribute to add the "TestName" property that allows you to show more readable test names on display.
$ dotnet add package Toolbelt.NUnit.TestNameThis package provides test attributes that alternate NUnit's [Test] and [TestCaseSource] attribute to add TestName property.
Before:

After:

dotnet add package Toolbelt.NUnit.TestName
global using ... statements in the Usings.cs C# source code file in the NUnit test project./* 📜 "Usings.cs" */
global using NUnit.Framework;
// 👇 Add these tow lines.
global using Test = Toolbelt.NUnit.TestName.TestAttribute;
global using TestCaseSource = Toolbelt.NUnit.TestName.TestCaseSourceAttribute;
error CS1614: 'Test' is ambiguous between 'TestAttribute' and 'TestAttribute'. Either use '@Test' or explicitly include the 'Attribute' suffix.error CS1614: 'TestCaseSource' is ambiguous between 'TestCaseSourceAttribute' and 'TestCaseSourceAttribute'. Either use '@TestCaseSource' or explicitly include the 'Attribute' suffix.[Test] to [@Test] and replace existing [TestCaseSource] to [@TestCaseSource]. And later, please use [@Test] instead of [Test], and use [@TestCaseSource] instead of [TestCaseSource]. In short, please make those test attribute names start with @.[@Test] // 👈 Use [@Test] instead of [Test]
public void MyTestMethod() {
...
[@TestCaseSource("...")] // 👈 Use [@TestCaseSource] instead of [TestCaseSource]
public void MyTestCasesMethod(...) {
...
TestName attribute in [@Test] and [@TestCaseSource] attributes to show more readable test names in a display such as Visual Studio Test Explorer or the dotnet test command.// 👇 You can use the "TestName" property.
[@Test(TestName = "...")]
public void MyTestMethod() {
...
// 👇 You can use the "TestName" property.
[@TestCaseSource("...", TestName = "...")]
public void MyTestCasesMethod(...) {
...
TestCase attribute?Because the TestCase attribute in NUnit already has the TestName property.
Honestly, I don't know why NUnit doesn't provide the TestName property on the Test and TestCaseSource attributes.