Commit 38d3b34
Use xUnit test method name for CLI E2E recording filenames (#17484)
Resolves bug #1 of the two root causes that left CLI E2E recordings
tagged as Unknown in the PR recording-comment.
CliE2ETestHelpers.CreateTestTerminal / CreateDockerTestTerminal /
CreatePodmanDockerTestTerminal (and the shared
Hex1bTestHelpers.CreateTestTerminal) use [CallerMemberName] to pick the
.cast filename. When a public [Fact] is a thin wrapper that delegates
into a private helper — e.g. DashboardRunWithAgentMcpListTracesReturnsNoTraces
=> DashboardRunWithAgentMcpCore in DashboardRunTests, or the *Core
helper in AgentMcpLogsTests — [CallerMemberName] captures the helper.
The .cast file ends up named after the helper, the TRX has no entry
for that name, and the recording-comment workflow's lookup falls
through to Unknown on every PR.
Fix: prefer TestContext.Current?.TestCase?.TestMethodName when running
inside a live xUnit test context, fall back to the [CallerMemberName]
default otherwise. The public API surface is unchanged (no caller
passes testName explicitly), so the recording filenames quietly flip
from 'DashboardRunWithAgentMcpCore' to the public test name with no
test-side edits required.
The companion workflow-side fix for the second root cause (jq splitting
on '.' inside theory parameters before stripping the param suffix) ships
in a follow-up commit on the same PR.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 35d7585 commit 38d3b34
2 files changed
Lines changed: 42 additions & 1 deletion
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
| |||
103 | 110 | | |
104 | 111 | | |
105 | 112 | | |
106 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
107 | 121 | | |
108 | 122 | | |
109 | 123 | | |
| |||
162 | 176 | | |
163 | 177 | | |
164 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
165 | 182 | | |
166 | 183 | | |
167 | 184 | | |
| |||
334 | 351 | | |
335 | 352 | | |
336 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
337 | 357 | | |
338 | 358 | | |
339 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
| |||
128 | 135 | | |
129 | 136 | | |
130 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
131 | 152 | | |
132 | 153 | | |
133 | 154 | | |
| |||
0 commit comments