Add LongRunningAttribute and discoverer with tests#44
Add LongRunningAttribute and discoverer with tests#44udlose wants to merge 10 commits intobrendanconnolly:masterfrom
LongRunningAttribute and discoverer with tests#44Conversation
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.
|
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.
There was a problem hiding this comment.
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
LongRunningAttributewith optional identifier support (string or long) - Implements
LongRunningDiscovererfor trait discovery functionality - Updates all package dependencies to latest versions across test projects
- Enhances
MockAttributeInfofor 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;
|
@brendanconnolly I made some changes to the workflows to get them working. Please let me know if there are any other problems. |
|
@brendanconnolly is there anything else I can do to help complete this? |
LongRunningAttributeand discoverer with tests