You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(defer-enumeration): report placeholder as a container with an aggregate result
The IDE run of a deferred test's placeholder node showed "Inconclusive: Test has
not run" because the placeholder produced no result when its children were the
real results. Reporting it always-Passed (the original behaviour) is wrong too —
it would show green even when a child fails.
Now the placeholder is reported as a container: InProgress when expansion starts,
then a final result after the children run that aggregates them — passed only if
every case passes, failed if any case fails, skipped if all were skipped. This
resolves the IDE node without masking child failures. The placeholder therefore
adds one entry to flat result counts (TRX/console) per deferred test; engine
tests and docs updated to reflect this.
Copy file name to clipboardExpand all lines: docs/docs/writing-tests/defer-enumeration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ With the flag set:
26
26
`DeferEnumeration` is available on any data source attribute (`[MethodDataSource]`, `[ClassDataSource]`, custom `DataSourceGenerator` attributes, etc.). If **any** data source on a test sets it, the entire test's case expansion is deferred. It has no effect on `[Arguments]` (a single inline row, so there is nothing to defer).
27
27
28
28
:::info
29
-
The placeholder is a **container**, not a test: it is not reported as its own result, so it does not count toward your test totals, and the individual cases (nested under it) carry the real pass/fail results. If the data source itself throws while enumerating, the error surfaces as a failed result at run time (just as a non-deferred data source error would) instead of failing discovery for the whole assembly.
29
+
The placeholder is reported as a **container**: the individual cases (nested under it) carry the real pass/fail results, and the placeholder's own result aggregates them — it passes only if every case passes, and fails if any case fails. Because it is reported, it adds one extra entry to flat result counts (TRX/console) per deferred test. If the data source itself throws while enumerating, the error surfaces as a failed result at run time (just as a non-deferred data source error would) instead of failing discovery for the whole assembly.
0 commit comments