Skip to content

Add LongRunningAttribute and discoverer with tests#44

Open
udlose wants to merge 10 commits intobrendanconnolly:masterfrom
udlose:master
Open

Add LongRunningAttribute and discoverer with tests#44
udlose wants to merge 10 commits intobrendanconnolly:masterfrom
udlose:master

Conversation

udlose added 9 commits April 6, 2025 15:57
Implemented a new `LongRunningAttribute` for categorizing tests as long-running, supporting optional string or long identifiers. Added `LongRunningDiscoverer` to retrieve traits for tests marked with this attribute. Included unit tests to validate the discoverer's functionality regarding trait addition based on identifier presence.
Updated `Xunit.Categories.sln` to change the Visual Studio version from 16 to 17. Added a new "Solution Items" project section with references to `.gitignore`, `LICENSE`, and `README.md` files.
- Updated `xunit.core` to version `2.9.3` in `Xunit.Categories.csproj`.
- Upgraded `coverlet.collector` to `6.0.4` and added `<PrivateAssets>` and `<IncludeAssets>` in `Xunit.Categories.Generator.Test.csproj`.
- Updated `Microsoft.NET.Test.Sdk`, `xunit`, and `xunit.runner.visualstudio` to `17.13.0`, `2.9.3`, and `3.0.2`, respectively, in both `Xunit.Categories.Generator.Test.csproj` and `Xunit.Categories.Test.csproj`, with additional properties for `xunit.runner.visualstudio`.
Updated `MockAttributeInfo` to inherit from
`LongLivedMarshalByRefObject`, enabling instances to be
marshaled across application domain boundaries while
still implementing the `IAttributeInfo` interface.
- Bump version from 3.0.1 to 3.0.2 in project file.
- Update release notes to include LongRunning category,
  NuGet dependency updates, and enhancements to
  MockAttributeInfo for cross-domain use.
- Retain previous release notes for context.
…https://github.com/github/gitignore/blob/main/VisualStudio.gitignore

Enhanced .gitignore to include entries for Visual Studio generated files, build artifacts, and temporary files. Added sections for Visual Studio Trace Files, Code Coverage Tools, and specific project types like Service Fabric and Azure Stream Analytics. Included ignores for Python Tools for Visual Studio, CodeRush settings, and local history for Visual Studio and VS Code. Modified existing entries for clarity and improved exclusion patterns.
@udlose
Copy link
Copy Markdown
Author

udlose commented Apr 29, 2025

Hi @brendanconnolly. I'm not sure why this is failing. Looks like it may be something with your GH Action.,

…ad Node 16 dependencies which has now been deprecated on GitHub)

Upgraded `actions/checkout` and `actions/setup-dotnet`
from version 3 to version 4 in `build-generate-test.yaml`
and `publish-nuget.yaml` to utilize improvements and new
features in the latest releases.
Copilot AI review requested due to automatic review settings August 2, 2025 20:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new LongRunningAttribute and corresponding trait discoverer to the Xunit.Categories library, along with comprehensive test coverage and dependency updates. The changes support categorizing long-running tests with optional identifiers for better test organization and filtering.

Key changes:

  • Introduces LongRunningAttribute with optional identifier support (string or long)
  • Implements LongRunningDiscoverer for trait discovery functionality
  • Updates all package dependencies to latest versions across test projects
  • Enhances MockAttributeInfo for cross-domain compatibility

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Xunit.Categories/LongRunningAttribute.cs New attribute class supporting optional identifiers
src/Xunit.Categories/LongRunningTestDiscoverer.cs Trait discoverer implementation for LongRunning category
test/Xunit.Categories.Test/LongRunningTraitTest.cs Comprehensive test coverage for new functionality
test/Xunit.Categories.Test/MockAttributeInfo.cs Enhanced for cross-domain use with LongLivedMarshalByRefObject
src/Xunit.Categories/Xunit.Categories.csproj Version bump to 3.0.2 and dependency updates
test/Xunit.Categories.Test/Xunit.Categories.Test.csproj Package dependency version updates
Comments suppressed due to low confidence (1)

src/Xunit.Categories/LongRunningTestDiscoverer.cs:1

  • The file name 'LongRunningTestDiscoverer.cs' does not match the class name 'LongRunningDiscoverer'. The file should be renamed to 'LongRunningDiscoverer.cs' for consistency.
using System.Collections.Generic;

@udlose
Copy link
Copy Markdown
Author

udlose commented Aug 3, 2025

@brendanconnolly I made some changes to the workflows to get them working. Please let me know if there are any other problems.

@udlose
Copy link
Copy Markdown
Author

udlose commented Mar 19, 2026

@brendanconnolly is there anything else I can do to help complete this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants