Skip to content

Commit 77fc265

Browse files
committed
Add dotnet.config to specify MTP for dotnet test
1 parent 28f379f commit 77fc265

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.github/copilot-instructions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@ In building and testing, never use `dotnet` without extension. Use `dotnet.sh` o
4747

4848
Note that tests for a project can be executed without first building from the root.
4949

50-
(4) To run just certain tests, it's important to include the filter after `--`, for example `dotnet.sh test tests/Aspire.Hosting.Testing.Tests/Aspire.Hosting.Testing.Tests.csproj --no-build --logger "console;verbosity=detailed" -- --filter "TestingBuilderHasAllPropertiesFromRealBuilder"`
50+
(4) To run just certain tests, it's important to include the filter after `--`, for example `dotnet.sh test tests/Aspire.Hosting.Testing.Tests/Aspire.Hosting.Testing.Tests.csproj --no-build --filter "TestingBuilderHasAllPropertiesFromRealBuilder"`
5151

5252
### Important: Excluding Quarantined Tests
5353

5454
When running tests in automated environments (including Copilot agent), **always exclude quarantined tests** to avoid false negatives:
5555

5656
```bash
5757
# Correct - excludes quarantined tests (use this in automation)
58-
dotnet.sh test tests/Project.Tests/Project.Tests.csproj -- --filter-not-trait "quarantined=true"
58+
dotnet.sh test tests/Project.Tests/Project.Tests.csproj --filter-not-trait "quarantined=true"
5959

6060
# For specific test filters, combine with quarantine exclusion
61-
dotnet.sh test tests/Project.Tests/Project.Tests.csproj -- --filter "TestName" --filter-not-trait "quarantined=true"
61+
dotnet.sh test tests/Project.Tests/Project.Tests.csproj --filter "TestName" --filter-not-trait "quarantined=true"
6262
```
6363

6464
Never run all tests without the quarantine filter in automated environments, as this will include flaky tests that are known to fail intermittently.

.github/workflows/run-tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ jobs:
255255
-bl:${{ github.workspace }}/testresults/test.binlog
256256
--no-restore
257257
--no-build
258-
--
259258
--ignore-exit-code 8
260259
--report-trx
261260
--hangdump --hangdump-timeout ${{ inputs.testHangTimeout }}

dotnet.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[dotnet.test.runner]
2+
name = "Microsoft.Testing.Platform"

tests/helix/send-to-helix-buildonhelixtests.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<_TestBlameArguments Include="--crashdump-type Full" />
3636

3737
<!-- Using `dotnet test` for the project directly here -->
38-
<_TestRunCommandArguments Include="dotnet test -- --results-directory $(_HelixLogsPath) --report-trx --report-trx-filename TestResults.trx" />
38+
<_TestRunCommandArguments Include="dotnet test --results-directory $(_HelixLogsPath) --report-trx --report-trx-filename TestResults.trx" />
3939
<_TestRunCommandArguments Include="@(_TestBlameArguments, ' ')" />
4040

4141
<_TestRunCommandArguments Include="--filter-not-trait &quot;quarantined=true&quot;" />

0 commit comments

Comments
 (0)