Skip to content

Fix #2635: ShowStartMarkers shows expanded data-driven test names#2728

Closed
nohwnd wants to merge 1 commit into
mainfrom
fix/2635-showstartmarkers
Closed

Fix #2635: ShowStartMarkers shows expanded data-driven test names#2728
nohwnd wants to merge 1 commit into
mainfrom
fix/2635-showstartmarkers

Conversation

@nohwnd

@nohwnd nohwnd commented Jun 17, 2026

Copy link
Copy Markdown
Member

Fixes #2635

When Debug.ShowStartMarkers is enabled, data-driven test names like Iteration <_> were showing the raw template instead of the expanded name (Iteration 1).

The start marker output was in the EachTestSetupStart plugin step, which fires before the <> template expansion runs. Moved it to a setup scriptblock that executes right after name expansion in the runtime, so markers now show the fully expanded test name.

Added a test that verifies data-driven -ForEach names are expanded in start markers.

Moved the start marker output from the EachTestSetupStart plugin step
(which fires before name expansion) to a setup scriptblock that runs
right after the template expansion in the runtime. This ensures
data-driven test names like 'Iteration <_>' display as 'Iteration 1'
instead of the raw template.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nohwnd nohwnd marked this pull request as draft June 17, 2026 14:12
@nohwnd

nohwnd commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

Closing - this pushes Write-PesterHostMessage into the runtime (Invoke-TestItem), and output should stay in the plugin layer. The marker prints from EachTestSetupStart, before the name is expanded; doing it right needs a plugin hook that runs after expansion, not a print from the runtime. Not the fix I want.

@nohwnd nohwnd closed this Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ShowStartMarkers is missing data driven replacements

1 participant