Skip to content

feat: plugin architecture for custom test attributes and third-party integration #4903

@thomhurst

Description

@thomhurst

Description

The 58 interfaces in TUnit.Core/Interfaces/ provide extension points, but there's no extensible attribute system for third-party tool integration. Users can't easily create custom test metadata attributes that integrate into the core pipeline.

Why

  • Tool vendors can't add native test attributes
  • No standard way for team-specific test metadata
  • Every custom attribute requires modifying TUnit core

Proposed Approach

  • Create ICustomTestAttribute interface with standardized lifecycle
  • Implement plugin discovery via MEF/reflection with caching
  • Add --plugin-path command-line option
  • Create validation rules for custom attributes (analyzer support)
  • Document plugin contract guarantees and version compatibility

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededv2Deferred to v2 release

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions