Repository navigation
chore: migrate test projects to microsoft.testing.platform - #930
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Coverage variation | ✅ 0.00% coverage variation |
| Diff coverage | ✅ ∅ diff coverage |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (36f525e) 1020600 22935 2.25% Head commit (1659c1a) 1018621 (-1979) 22857 (-78) 2.24% (0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#930) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Unit Test Results 5 files 5 suites 11s ⏱️ Results for commit 1659c1a. ♻️ This comment has been updated with latest results. |
d158a3b to
f85a30a
Compare
054a79f to
542afff
Compare
Enable the NUnit MTP runner for the test projects through a new tests/Directory.Build.props and opt dotnet test into native MTP mode in global.json. Replace Microsoft.NET.Test.Sdk and coverlet.collector with Microsoft.Testing.Extensions.CodeCoverage and Microsoft.Testing.Extensions.TrxReport, and update the workflow and psake dotnet test invocations to the MTP switches.
f85a30a to
1659c1a
Compare
|



Summary
Moves the test projects from VSTest to Microsoft.Testing.Platform (MTP). Stacked on #929.
tests/Directory.Build.propsenables NUnit's MTP runner (EnableNUnitRunner,OutputType Exe) for every test project except NHapi.Benchmarks. Thesrcprojects are unaffected.global.json: adds"test": { "runner": "Microsoft.Testing.Platform" }, sodotnet testruns in MTP mode on the .NET 10 SDK.OpenSourcemaintenance-fee exemption moves intotests/Directory.Build.props, so any test project using Verify is covered.build/default.ps1: only thedotnet testinvocations change. ci: fix code scanning alerts in workflows #929's permissions and artifact hardening are untouched.Command changes
dotnet test X.csprojdotnet test --project X.csproj--logger "trx;LogFilePrefix=TestResults"--report-trx--collect:"XPlat Code Coverage"--coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml --results-directory-layout per-module--filter TestFixture=X--filter "FullyQualifiedName~X"SourceGeneration no longer collects coverage. All its tests are
[Explicit], so it would only produce an empty report.Testing
Local
net10.0:[Explicit]TestParseORL_O34cases, which VSTest omitted from the count.TestResults/*.trx, and coverage lands inTestResults/<project>/<tfm>_x64/coverage.cobertura.xml. Both match the existing workflow globs.Needs CI to confirm
net462tests on Windows under MTP