|
1 | | -# NetEvolve.Extensions |
2 | | - |
3 | | -Compatibility library for solutions using multiple .NET test frameworks. |
4 | | -The following test frameworks are supported |
5 | | -- [MSTest](https://www.nuget.org/packages/NetEvolve.Extensions.MSTest) |
6 | | -- [NUnit](https://www.nuget.org/packages/NetEvolve.Extensions.NUnit) |
7 | | -- [TUnit](https://www.nuget.org/packages/NetEvolve.Extensions.TUnit) |
8 | | -- [XUnit](https://www.nuget.org/packages/NetEvolve.Extensions.XUnit) |
9 | | -- [XUnit.V3](https://www.nuget.org/packages/NetEvolve.Extensions.XUnit.V3) |
| 1 | +# NetEvolve.Extensions.Test |
| 2 | + |
| 3 | +[](LICENSE) |
| 4 | +[](https://dotnet.microsoft.com/) |
| 5 | +[](https://github.com/dailydevops/extensions.test/actions) |
| 6 | + |
| 7 | +A comprehensive compatibility library providing **standardized test categorization attributes** across multiple .NET test frameworks. This library enables teams to maintain consistent test organization, filtering, and execution management regardless of their chosen testing framework. |
| 8 | + |
| 9 | +## 🎯 Overview |
| 10 | + |
| 11 | +**NetEvolve.Extensions.Test** bridges the gap between different .NET testing frameworks by providing a unified set of test categorization attributes. Whether you're using MSTest, NUnit, TUnit, or XUnit, you can apply the same categorization strategy across your entire solution. |
| 12 | + |
| 13 | +### Key Benefits |
| 14 | + |
| 15 | +- ✅ **Framework Agnostic**: Use the same attributes across MSTest, NUnit, TUnit, XUnit, and XUnit v3 |
| 16 | +- ✅ **Consistent Filtering**: Execute tests uniformly with `dotnet test --filter TestCategory=IntegrationTest` |
| 17 | +- ✅ **Standardized Organization**: Organize tests by type (Unit, Integration, Performance, etc.) |
| 18 | +- ✅ **Work Item Tracking**: Link tests to bugs, features, user stories, and epics |
| 19 | +- ✅ **Deployment Testing**: Separate pre-deployment and post-deployment validation |
| 20 | +- ✅ **.NET 10 Support**: Built for modern .NET with full C# 13 compatibility |
| 21 | + |
| 22 | +## 📦 Supported Test Frameworks |
| 23 | + |
| 24 | +| Framework | Package | NuGet | |
| 25 | +|-----------|---------|-------| |
| 26 | +| **MSTest** | [NetEvolve.Extensions.MSTest](src/NetEvolve.Extensions.MSTest/) | [](https://www.nuget.org/packages/NetEvolve.Extensions.MSTest) | |
| 27 | +| **NUnit** | [NetEvolve.Extensions.NUnit](src/NetEvolve.Extensions.NUnit/) | [](https://www.nuget.org/packages/NetEvolve.Extensions.NUnit) | |
| 28 | +| **TUnit** | [NetEvolve.Extensions.TUnit](src/NetEvolve.Extensions.TUnit/) | [](https://www.nuget.org/packages/NetEvolve.Extensions.TUnit) | |
| 29 | +| **XUnit** | [NetEvolve.Extensions.XUnit](src/NetEvolve.Extensions.XUnit/) | [](https://www.nuget.org/packages/NetEvolve.Extensions.XUnit) | |
| 30 | +| **XUnit v3** | [NetEvolve.Extensions.XUnit.V3](src/NetEvolve.Extensions.XUnit.V3/) | [](https://www.nuget.org/packages/NetEvolve.Extensions.XUnit.V3) | |
| 31 | + |
| 32 | +## 🚀 Quick Start |
| 33 | + |
| 34 | +### Installation |
| 35 | + |
| 36 | +Choose the package matching your test framework: |
| 37 | + |
| 38 | +```bash |
| 39 | +# MSTest |
| 40 | +dotnet add package NetEvolve.Extensions.MSTest |
| 41 | + |
| 42 | +# NUnit |
| 43 | +dotnet add package NetEvolve.Extensions.NUnit |
| 44 | + |
| 45 | +# TUnit |
| 46 | +dotnet add package NetEvolve.Extensions.TUnit |
| 47 | + |
| 48 | +# XUnit |
| 49 | +dotnet add package NetEvolve.Extensions.XUnit |
| 50 | + |
| 51 | +# XUnit v3 |
| 52 | +dotnet add package NetEvolve.Extensions.XUnit.V3 |
| 53 | +``` |
| 54 | + |
| 55 | +### Basic Usage |
| 56 | + |
| 57 | +```csharp |
| 58 | +using NetEvolve.Extensions.MSTest; // Or NUnit, TUnit, XUnit, etc. |
| 59 | +
|
| 60 | +[TestClass] |
| 61 | +[IntegrationTest] // Categorize all tests in this class |
| 62 | +public class DatabaseTests |
| 63 | +{ |
| 64 | + [TestMethod] |
| 65 | + [Bug] // Mark as bug fix test |
| 66 | + public void Should_Handle_Concurrent_Updates() |
| 67 | + { |
| 68 | + // Your test implementation |
| 69 | + } |
| 70 | +} |
| 71 | +``` |
| 72 | + |
| 73 | +### Filter Tests |
| 74 | + |
| 75 | +```bash |
| 76 | +# Run only integration tests |
| 77 | +dotnet test --filter TestCategory=IntegrationTest |
| 78 | + |
| 79 | +# Run unit and acceptance tests |
| 80 | +dotnet test --filter "TestCategory=UnitTest|TestCategory=AcceptanceTest" |
| 81 | + |
| 82 | +# Exclude performance tests |
| 83 | +dotnet test --filter "TestCategory!=PerformanceTest" |
| 84 | +``` |
| 85 | + |
| 86 | +## 📚 Available Attributes |
| 87 | + |
| 88 | +### Test Categories |
| 89 | +- `UnitTestAttribute` - Isolated component tests |
| 90 | +- `IntegrationTestAttribute` - Component interaction tests |
| 91 | +- `AcceptanceTestAttribute` - User story validation |
| 92 | +- `PerformanceTestAttribute` - Performance and load testing |
| 93 | +- `EndToEndTestAttribute` - Complete workflow tests |
| 94 | +- `FunctionalTestAttribute` - Feature behavior tests |
| 95 | +- `ArchitectureTestAttribute` - Design constraint validation |
| 96 | +- `CodedUITestAttribute` - UI automation tests (MSTest) |
| 97 | + |
| 98 | +### Work Item Tracking |
| 99 | +- `BugAttribute` - Bug fix validation |
| 100 | +- `IssueAttribute` - Issue tracking |
| 101 | +- `FeatureAttribute` - Feature implementation |
| 102 | +- `EpicAttribute` - Epic-level requirements |
| 103 | +- `UserStoryAttribute` - User story completion |
| 104 | +- `WorkItemAttribute` - Generic work item association |
| 105 | + |
| 106 | +### Deployment Testing |
| 107 | +- `PreDeploymentTestAttribute` - Pre-deployment validation |
| 108 | +- `PostDeploymentTestAttribute` - Post-deployment verification |
| 109 | + |
| 110 | +## 🛠️ Requirements |
| 111 | + |
| 112 | +- **.NET 10** or later |
| 113 | +- Compatible with **.NET Standard 2.0** projects (.NET Framework 4.6.1+, .NET Core 2.0+) |
| 114 | +- **C# 13** support |
| 115 | + |
| 116 | +## 📖 Documentation |
| 117 | + |
| 118 | +Each package includes comprehensive documentation: |
| 119 | + |
| 120 | +- [MSTest Documentation](src/NetEvolve.Extensions.MSTest/README.md) |
| 121 | +- [NUnit Documentation](src/NetEvolve.Extensions.NUnit/README.md) |
| 122 | +- [TUnit Documentation](src/NetEvolve.Extensions.TUnit/README.md) |
| 123 | +- [XUnit Documentation](src/NetEvolve.Extensions.XUnit/README.md) |
| 124 | +- [XUnit v3 Documentation](src/NetEvolve.Extensions.XUnit.V3/README.md) |
| 125 | + |
| 126 | +## 🤝 Contributing |
| 127 | + |
| 128 | +Contributions are welcome! Please feel free to: |
| 129 | + |
| 130 | +- Report issues or bugs |
| 131 | +- Suggest new features or improvements |
| 132 | +- Submit pull requests |
| 133 | + |
| 134 | +Visit our [GitHub repository](https://github.com/dailydevops/extensions.test) to get started. |
| 135 | + |
| 136 | +## 📄 License |
| 137 | + |
| 138 | +This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details. |
| 139 | + |
| 140 | +--- |
| 141 | + |
| 142 | +**Made with ❤️ by the NetEvolve Team** |
0 commit comments