Skip to content

Undocumented attributes #1161

@OsirisTerje

Description

@OsirisTerje

I did a check on the source code and the docs repo on attributes, and got this list of attributes that have not been documented:

NUnit Attributes Missing Documentation

Generated: 2026-03-28

This document lists NUnit attributes that exist in the source code but do not have dedicated documentation pages in the docs repo (docs/articles/nunit/writing-tests/attributes/).

Summary

The docs repo has 48 documented attributes. Most core attributes are well documented, but these newer NUnit 4.x attributes need documentation pages.

Attributes Needing Documentation

Attribute Priority Source File Notes
NetPlatformAttribute HIGH Attributes/NetPlatformAttribute.cs Modern replacement for PlatformAttribute, uses .NET-style platform names
NoTestsAttribute MEDIUM Attributes/NoTestsAttribute.cs Controls status of parameterized tests with no child tests
UnhandledExceptionHandlingAttribute MEDIUM Attributes/UnhandledExceptionHandlingAttribute.cs Controls handling of exceptions on background threads
TestCaseAttribute<T> (generics) MEDIUM Attributes/TestCaseAttribute.cs:370-434 Generic versions need documenting in testcase.md
TestAssemblyDirectoryResolveAttribute LOW Attributes/TestAssemblyDirectoryResolveAttribute.cs Specialized for mixed-mode assembly resolution

Checklist

High Priority

Medium Priority

  • NoTestsAttribute - Create notests.md

    • Indicates the default status of a parameterized test method or fixture with no executable child tests
    • Example: [NoTests(TestStatus.Skipped)]
  • UnhandledExceptionHandlingAttribute - Create unhandledexceptionhandling.md

    • Controls handling of unhandled exceptions in tests
    • Modes: Error (default), Ignore
    • Important for tests that spawn threads or have async operations
  • TestCaseAttribute<T> - Update testcase.md

    • Document generic syntax: [TestCase<int, string>(42, "answer")]
    • Covers variants with 1-5 type parameters

Low Priority

  • TestAssemblyDirectoryResolveAttribute - Create testassemblydirectoryresolve.md
    • Marks assembly as needing special assembly resolution
    • Used for mixed-mode assembly scenarios

Already Documented (in extending-nunit section)

These attributes are documented but not in the main attributes folder:

  • ExecutionHookAttribute - extending-nunit/Execution-Hooks.md
  • TestActionAttribute - extending-nunit/Action-Attributes.md

Deprecated (adequately documented)

  • DatapointsAttribute - Mentioned as obsolete in datapointsource.md

Generated by claude.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions