Skip to content

Commit 82d1771

Browse files
Copilotthomhurst
andauthored
Fix documentation to use --treenode-filter instead of unsupported --filter syntax (#4020)
* Initial plan * Update docs to use correct --treenode-filter syntax instead of --filter Co-authored-by: thomhurst <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: thomhurst <[email protected]>
1 parent f52bd5f commit 82d1771

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

docs/docs/advanced/performance-best-practices.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,15 +482,20 @@ public class InMemoryDatabaseTests
482482

483483
```bash
484484
# Run fast unit tests first
485-
dotnet test --filter "Category=Unit" --no-build
485+
dotnet test --no-build -- --treenode-filter "/*/*/*/*[Category=Unit]"
486486

487487
# Run slower integration tests separately
488-
dotnet test --filter "Category=Integration" --no-build
488+
dotnet test --no-build -- --treenode-filter "/*/*/*/*[Category=Integration]"
489489

490490
# Run expensive E2E tests last
491-
dotnet test --filter "Category=E2E" --no-build
491+
dotnet test --no-build -- --treenode-filter "/*/*/*/*[Category=E2E]"
492492
```
493493

494+
> **Note**: With .NET 10 SDK or newer, you can use the simpler syntax:
495+
> ```bash
496+
> dotnet test --no-build --treenode-filter "/**[Category=Unit]"
497+
> ```
498+
494499
### Use Test Result Caching
495500
496501
```xml

docs/docs/examples/tunit-ci-pipeline.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ test:integration:
331331
- build
332332
script:
333333
- dotnet test --configuration $BUILD_CONFIGURATION --no-build
334-
--filter "Category=Integration"
334+
-- --treenode-filter "/*/*/*/*[Category=Integration]"
335335
--report-trx --results-directory ./TestResults
336336
artifacts:
337337
when: always
@@ -590,13 +590,18 @@ Run different test categories in separate jobs:
590590
```yaml
591591
# Unit tests (fast)
592592
- name: Unit Tests
593-
run: dotnet test --filter "Category=Unit"
593+
run: dotnet test -- --treenode-filter "/*/*/*/*[Category=Unit]"
594594

595595
# Integration tests (slower)
596596
- name: Integration Tests
597-
run: dotnet test --filter "Category=Integration"
597+
run: dotnet test -- --treenode-filter "/*/*/*/*[Category=Integration]"
598598
```
599599
600+
> **Note**: With .NET 10 SDK or newer, you can use the simpler syntax without the `--` separator:
601+
> ```yaml
602+
> run: dotnet test --treenode-filter "/**[Category=Unit]"
603+
> ```
604+
600605
### Fail Fast in PRs
601606

602607
Use fail-fast mode for quick feedback in pull requests:

0 commit comments

Comments
 (0)