diff --git a/.github/workflows/build-status.yml b/.github/workflows/build-status.yml
index de9d38b3b..292e6bf34 100644
--- a/.github/workflows/build-status.yml
+++ b/.github/workflows/build-status.yml
@@ -39,11 +39,11 @@ jobs:
- name: Run tests for all target frameworks (Windows)
if: matrix.os == 'windows-latest'
run: |
- dotnet test tests\NHapi.Base.NUnit\NHapi.Base.NUnit.csproj --results-directory TestResults -c Release -f net462 --no-restore --no-build
- dotnet test tests\NHapi.Base.NUnit\NHapi.Base.NUnit.csproj --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
- dotnet test tests\NHapi.NUnit.SourceGeneration\NHapi.NUnit.SourceGeneration.csproj --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
- dotnet test tests\NHapi.NUnit\NHapi.NUnit.csproj --results-directory TestResults -c Release -f net462 --no-restore --no-build
- dotnet test tests\NHapi.NUnit\NHapi.NUnit.csproj --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
+ dotnet test --project tests\NHapi.Base.NUnit\NHapi.Base.NUnit.csproj --results-directory TestResults -c Release -f net462 --no-restore --no-build
+ dotnet test --project tests\NHapi.Base.NUnit\NHapi.Base.NUnit.csproj --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
+ dotnet test --project tests\NHapi.NUnit.SourceGeneration\NHapi.NUnit.SourceGeneration.csproj --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
+ dotnet test --project tests\NHapi.NUnit\NHapi.NUnit.csproj --results-directory TestResults -c Release -f net462 --no-restore --no-build
+ dotnet test --project tests\NHapi.NUnit\NHapi.NUnit.csproj --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
- name: Run Benchmatks (Windows)
if: matrix.os == 'windows-latest'
@@ -53,9 +53,9 @@ jobs:
- name: Run tests for all target frameworks (Non-Windows)
if: matrix.os != 'windows-latest'
run: |
- dotnet test tests/NHapi.Base.NUnit/NHapi.Base.NUnit.csproj --collect:"XPlat Code Coverage" --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
- dotnet test tests/NHapi.NUnit.SourceGeneration/NHapi.NUnit.SourceGeneration.csproj --collect:"XPlat Code Coverage" --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
- dotnet test tests/NHapi.NUnit/NHapi.NUnit.csproj --collect:"XPlat Code Coverage" --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
+ dotnet test --project tests/NHapi.Base.NUnit/NHapi.Base.NUnit.csproj --results-directory TestResults --results-directory-layout per-module --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml -c Release -f net10.0 --no-restore --no-build
+ dotnet test --project tests/NHapi.NUnit.SourceGeneration/NHapi.NUnit.SourceGeneration.csproj --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
+ dotnet test --project tests/NHapi.NUnit/NHapi.NUnit.csproj --results-directory TestResults --results-directory-layout per-module --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml -c Release -f net10.0 --no-restore --no-build
- name: Upload Benchmark Results
if: always() && matrix.os == 'windows-latest'
diff --git a/.github/workflows/receive-pr.yml b/.github/workflows/receive-pr.yml
index 21a387af9..e1dc20f95 100644
--- a/.github/workflows/receive-pr.yml
+++ b/.github/workflows/receive-pr.yml
@@ -37,11 +37,11 @@ jobs:
- name: Run tests for all target frameworks (Windows)
if: matrix.os == 'windows-latest'
run: |
- dotnet test tests\NHapi.Base.NUnit\NHapi.Base.NUnit.csproj --logger "trx;LogFilePrefix=TestResults" --results-directory TestResults -c Release -f net462 --no-restore --no-build
- dotnet test tests\NHapi.Base.NUnit\NHapi.Base.NUnit.csproj --logger "trx;LogFilePrefix=TestResults" --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
- dotnet test tests\NHapi.NUnit.SourceGeneration\NHapi.NUnit.SourceGeneration.csproj --logger "trx;LogFilePrefix=TestResults" --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
- dotnet test tests\NHapi.NUnit\NHapi.NUnit.csproj --logger "trx;LogFilePrefix=TestResults" --results-directory TestResults -c Release -f net462 --no-restore --no-build
- dotnet test tests\NHapi.NUnit\NHapi.NUnit.csproj --logger "trx;LogFilePrefix=TestResults" --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
+ dotnet test --project tests\NHapi.Base.NUnit\NHapi.Base.NUnit.csproj --report-trx --results-directory TestResults -c Release -f net462 --no-restore --no-build
+ dotnet test --project tests\NHapi.Base.NUnit\NHapi.Base.NUnit.csproj --report-trx --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
+ dotnet test --project tests\NHapi.NUnit.SourceGeneration\NHapi.NUnit.SourceGeneration.csproj --report-trx --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
+ dotnet test --project tests\NHapi.NUnit\NHapi.NUnit.csproj --report-trx --results-directory TestResults -c Release -f net462 --no-restore --no-build
+ dotnet test --project tests\NHapi.NUnit\NHapi.NUnit.csproj --report-trx --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
- name: Run Benchmatks (Windows)
if: matrix.os == 'windows-latest'
@@ -51,9 +51,9 @@ jobs:
- name: Run tests for all target frameworks (Non-Windows)
if: matrix.os != 'windows-latest'
run: |
- dotnet test tests/NHapi.Base.NUnit/NHapi.Base.NUnit.csproj --collect:"XPlat Code Coverage" --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
- dotnet test tests/NHapi.NUnit.SourceGeneration/NHapi.NUnit.SourceGeneration.csproj --collect:"XPlat Code Coverage" --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
- dotnet test tests/NHapi.NUnit/NHapi.NUnit.csproj --collect:"XPlat Code Coverage" --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
+ dotnet test --project tests/NHapi.Base.NUnit/NHapi.Base.NUnit.csproj --results-directory TestResults --results-directory-layout per-module --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml -c Release -f net10.0 --no-restore --no-build
+ dotnet test --project tests/NHapi.NUnit.SourceGeneration/NHapi.NUnit.SourceGeneration.csproj --results-directory TestResults -c Release -f net10.0 --no-restore --no-build
+ dotnet test --project tests/NHapi.NUnit/NHapi.NUnit.csproj --results-directory TestResults --results-directory-layout per-module --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml -c Release -f net10.0 --no-restore --no-build
- name: Upload Unit Test Results
if: always() && matrix.os == 'windows-latest'
diff --git a/build/default.ps1 b/build/default.ps1
index b5feb7fce..b1caa5d02 100644
--- a/build/default.ps1
+++ b/build/default.ps1
@@ -65,11 +65,11 @@ task Test {
# TODO: Move to using dotnet test to execute the unit tests
# the below works however the output format needs to be tweeked.
- exec { dotnet test ..\tests\NHapi.Base.NUnit\NHapi.Base.NUnit.csproj --results-directory TestResults -c Release -f net462 --no-restore --no-build }
- exec { dotnet test ..\tests\NHapi.NUnit\NHapi.NUnit.csproj --results-directory TestResults -c Release -f net462 --no-restore --no-build }
- exec { dotnet test ..\tests\NHapi.NUnit.SourceGeneration\NHapi.NUnit.SourceGeneration.csproj --results-directory TestResults -c Release -f net10.0 --no-restore --no-build }
- exec { dotnet test ..\tests\NHapi.NUnit\NHapi.NUnit.csproj --results-directory TestResults -c Release -f net10.0 --no-restore --no-build }
- exec { dotnet test ..\tests\NHapi.Base.NUnit\NHapi.Base.NUnit.csproj --results-directory TestResults -c Release -f net10.0 --no-restore --no-build }
+ exec { dotnet test --project ..\tests\NHapi.Base.NUnit\NHapi.Base.NUnit.csproj --results-directory TestResults -c Release -f net462 --no-restore --no-build }
+ exec { dotnet test --project ..\tests\NHapi.NUnit\NHapi.NUnit.csproj --results-directory TestResults -c Release -f net462 --no-restore --no-build }
+ exec { dotnet test --project ..\tests\NHapi.NUnit.SourceGeneration\NHapi.NUnit.SourceGeneration.csproj --results-directory TestResults -c Release -f net10.0 --no-restore --no-build }
+ exec { dotnet test --project ..\tests\NHapi.NUnit\NHapi.NUnit.csproj --results-directory TestResults -c Release -f net10.0 --no-restore --no-build }
+ exec { dotnet test --project ..\tests\NHapi.Base.NUnit\NHapi.Base.NUnit.csproj --results-directory TestResults -c Release -f net10.0 --no-restore --no-build }
}
Task Package -depends Build {
diff --git a/global.json b/global.json
index 2f59669d9..ca34b5d26 100644
--- a/global.json
+++ b/global.json
@@ -3,5 +3,8 @@
"version": "10.0.404",
"rollForward": "latestFeature"
},
- "projects": []
+ "projects": [],
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
}
\ No newline at end of file
diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props
new file mode 100644
index 000000000..797ce1eb3
--- /dev/null
+++ b/tests/Directory.Build.props
@@ -0,0 +1,13 @@
+
+
+
+ Exe
+ true
+
+
+
+
+ OpenSource
+ 2027-10
+
+
diff --git a/tests/NHapi.Base.NUnit/NHapi.Base.NUnit.csproj b/tests/NHapi.Base.NUnit/NHapi.Base.NUnit.csproj
index 2176b0fe8..068ecc65c 100644
--- a/tests/NHapi.Base.NUnit/NHapi.Base.NUnit.csproj
+++ b/tests/NHapi.Base.NUnit/NHapi.Base.NUnit.csproj
@@ -18,13 +18,10 @@
-
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/tests/NHapi.NUnit.SourceGeneration/NHapi.NUnit.SourceGeneration.csproj b/tests/NHapi.NUnit.SourceGeneration/NHapi.NUnit.SourceGeneration.csproj
index e87cb5aad..f227ea6d7 100644
--- a/tests/NHapi.NUnit.SourceGeneration/NHapi.NUnit.SourceGeneration.csproj
+++ b/tests/NHapi.NUnit.SourceGeneration/NHapi.NUnit.SourceGeneration.csproj
@@ -3,9 +3,6 @@
net10.0
false
-
- OpenSource
- 2027-10
@@ -20,11 +17,8 @@
-
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/tests/NHapi.NUnit/NHapi.NUnit.csproj b/tests/NHapi.NUnit/NHapi.NUnit.csproj
index a352c2e39..8c272a075 100644
--- a/tests/NHapi.NUnit/NHapi.NUnit.csproj
+++ b/tests/NHapi.NUnit/NHapi.NUnit.csproj
@@ -30,11 +30,8 @@
-
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive