Code inspection: NUnit.AutoFixture. Missing Test or TestFixture attribute.
This inspection reports AutoData or InlineAutoData usage when the method is missing [Test] and the containing class is also missing [TestFixture]. In that situation, NUnit will not treat the method as a runnable test.
Adding the missing NUnit attribute makes the test discoverable and executable.
Example
using AutoFixture.NUnit3;
public sealed class AutoTest
{
[InlineAutoData]
public void Test1(int x)
{
}
}
using AutoFixture.NUnit3;
using NUnit.Framework;
public sealed class AutoTest
{
[Test]
[InlineAutoData]
public void Test1(int x)
{
}
}
Another available quick-fix adds [TestFixture] to the containing class instead.
31 March 2026