feat(testing): migrate test infrastructure to Microsoft Testing Platform#288
Merged
Conversation
- Introduced `opencode.json` for configuring permissions. - Set `git` permission level to require explicit confirmation.
- Switched to `--coverage` and `cobertura` output format for streamlined coverage reporting. - Added `Microsoft.Testing.Extensions.CodeCoverage` dependency across all unit test projects. - Introduced test commands and filtering examples in documentation. - Improved GitHub Actions workflows to upload consistent coverage reports. - Enforced a minimum shutdown timeout of 30 seconds in `LambdaApplicationFactory`.
Signed-off-by: Jonas Ha <61319894+j-d-ha@users.noreply.github.com>
- Introduced task wrappers for common testing workflows. - Updated direct `dotnet` command examples with detailed use cases. - Added test filtering examples for improved usability. - Replaced outdated project references with `MinimalLambda.UnitTests`.
… projects - Fixed inconsistent formatting of `Microsoft.Testing.Extensions.CodeCoverage` references. - Adjusted SDK version in `global.json` from `10.0.102` to `10.0.101`.
- Corrected whitespace formatting for `Microsoft.Testing.Extensions.CodeCoverage` in `Directory.Packages.props`.
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #288 +/- ##
==========================================
+ Coverage 87.49% 87.70% +0.21%
==========================================
Files 131 131
Lines 3246 3253 +7
Branches 318 352 +34
==========================================
+ Hits 2840 2853 +13
+ Misses 302 298 -4
+ Partials 104 102 -2
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



🚀 Pull Request
📋 Summary
This PR migrates the test infrastructure from xUnit's legacy test runner to Microsoft Testing Platform (MTP), the modern native .NET test execution framework. This migration modernizes our testing infrastructure and improves code coverage collection through native .NET tooling.
Key Changes
Microsoft Testing Platform Migration
global.jsonto specify MTP as the test runner ("runner": "Microsoft.Testing.Platform")Microsoft.Testing.Extensions.CodeCoveragepackage to all test projectsPackage Management Modernization
Directory.Packages.propsCI/CD Workflow Updates
main-build.yamlandpr-build.yamlworkflows--collect:"XPlat Code Coverage"to--coverage --coverage-output-format cobertura*.cobertura.xml)Documentation & Configuration
CLAUDE.mdwith examples for:CONTRIBUTING.mdwith correct coverage commandTestTasks.ymlto use MTP-specific filter syntax (--filter-trait)opencode.jsonconfiguration fileTesting Infrastructure Enhancement
LambdaApplicationFactoryto ensure minimum 30-second shutdown timeout for test reliability✅ Checklist
🧪 Related Issues or PRs
Modernizes testing infrastructure and improves coverage reporting capabilities.
💬 Notes for Reviewers
LambdaApplicationFactoryprevents race conditions during test cleanup