Problem
GetTestResults falls back to the first descendant <message> anywhere under a non-passing test case when no <failure><message> exists.
Evidence
Editor/MCPServerMethods.TestResults.cs:36-42 skips only Passed/Skipped results.
- For other statuses, it uses
testCase.Element("failure")?.Element("message")?.Value ?? testCase.Descendants("message").FirstOrDefault()?.Value.
- The fallback is not scoped to failure/error/reason nodes.
Impact
Inconclusive, Error, or other non-passing NUnit XML shapes can surface an unrelated nested message as the failure reason, misleading callers diagnosing test failures.
Suggested fix
Scope fallback message extraction to known result containers such as failure, reason, or output, and preserve the result status when no reason exists instead of grabbing any descendant message.
Source report
Imported from audit report item: Editor/MCPServerMethods.TestResults.cs:41.
Problem
GetTestResultsfalls back to the first descendant<message>anywhere under a non-passing test case when no<failure><message>exists.Evidence
Editor/MCPServerMethods.TestResults.cs:36-42skips only Passed/Skipped results.testCase.Element("failure")?.Element("message")?.Value ?? testCase.Descendants("message").FirstOrDefault()?.Value.Impact
Inconclusive, Error, or other non-passing NUnit XML shapes can surface an unrelated nested message as the failure reason, misleading callers diagnosing test failures.
Suggested fix
Scope fallback message extraction to known result containers such as
failure,reason, oroutput, and preserve the result status when no reason exists instead of grabbing any descendant message.Source report
Imported from audit report item:
Editor/MCPServerMethods.TestResults.cs:41.