-
Notifications
You must be signed in to change notification settings - Fork 561
[tests] Show full test names in html failure reports. #25094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,6 +11,7 @@ | |||||
| using Microsoft.DotNet.XHarness.iOS.Shared.Hardware; | ||||||
| using Microsoft.DotNet.XHarness.iOS.Shared.Logging; | ||||||
| using Microsoft.DotNet.XHarness.iOS.Shared.Utilities; | ||||||
| using Xamarin.Utils; | ||||||
| using Xharness.Jenkins.TestTasks; | ||||||
|
|
||||||
| #nullable enable | ||||||
|
|
@@ -427,7 +428,9 @@ public void Write (IList<ITestTask> allTasks, StreamWriter writer) | |||||
| var query = logs. | ||||||
| OfType<IFileBackedLog> (). | ||||||
| OrderBy (v => v.Description). | ||||||
| ThenBy (v => v.FullPath); | ||||||
| ThenBy (v => v.FullPath). | ||||||
| ToList (); | ||||||
| var hasStructuredTestResults = query.Any (v => (v.Description == LogType.NUnitResult.ToString () || v.Description == LogType.XmlLog.ToString () || v.Description == LogType.TrxLog.ToString ()) && File.Exists (v.FullPath) && new FileInfo (v.FullPath).Length > 0); | ||||||
|
||||||
| var hasStructuredTestResults = query.Any (v => (v.Description == LogType.NUnitResult.ToString () || v.Description == LogType.XmlLog.ToString () || v.Description == LogType.TrxLog.ToString ()) && File.Exists (v.FullPath) && new FileInfo (v.FullPath).Length > 0); | |
| var hasStructuredTestResults = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
outcomeis missing in the NUnit XML and there are no failed tests, the method setsoutcometo "Passed" (line 115-116) but leavesallTestsSucceededasfalse. This makesallTestsSucceededinconsistent with the computed outcome and can mislead callers that rely on the flag. SetallTestsSucceeded = (rv.Count == 0)when defaulting the outcome, or otherwise derive it fromrvwhenoutcomeis null/empty.