Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Microsoft.Testing.Platform.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"src\\Platform\\Microsoft.Testing.Extensions.HangDump\\Microsoft.Testing.Extensions.HangDump.csproj",
"src\\Platform\\Microsoft.Testing.Extensions.HotReload\\Microsoft.Testing.Extensions.HotReload.csproj",
"src\\Platform\\Microsoft.Testing.Extensions.HtmlReport\\Microsoft.Testing.Extensions.HtmlReport.csproj",
"src\\Platform\\Microsoft.Testing.Extensions.JUnitReport\\Microsoft.Testing.Extensions.JUnitReport.csproj",
"src\\Platform\\Microsoft.Testing.Extensions.Logging\\Microsoft.Testing.Extensions.Logging.csproj",
"src\\Platform\\Microsoft.Testing.Extensions.MSBuild\\Microsoft.Testing.Extensions.MSBuild.csproj",
"src\\Platform\\Microsoft.Testing.Extensions.OpenTelemetry\\Microsoft.Testing.Extensions.OpenTelemetry.csproj",
Expand Down
1 change: 1 addition & 0 deletions NonWindowsTests.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"src\\Platform\\Microsoft.Testing.Extensions.HangDump\\Microsoft.Testing.Extensions.HangDump.csproj",
"src\\Platform\\Microsoft.Testing.Extensions.HotReload\\Microsoft.Testing.Extensions.HotReload.csproj",
"src\\Platform\\Microsoft.Testing.Extensions.HtmlReport\\Microsoft.Testing.Extensions.HtmlReport.csproj",
"src\\Platform\\Microsoft.Testing.Extensions.JUnitReport\\Microsoft.Testing.Extensions.JUnitReport.csproj",
"src\\Platform\\Microsoft.Testing.Extensions.Logging\\Microsoft.Testing.Extensions.Logging.csproj",
"src\\Platform\\Microsoft.Testing.Extensions.MSBuild\\Microsoft.Testing.Extensions.MSBuild.csproj",
"src\\Platform\\Microsoft.Testing.Extensions.Retry\\Microsoft.Testing.Extensions.Retry.csproj",
Expand Down
1 change: 1 addition & 0 deletions TestFx.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<Project Path="src/Platform/Microsoft.Testing.Extensions.HangDump/Microsoft.Testing.Extensions.HangDump.csproj" />
<Project Path="src/Platform/Microsoft.Testing.Extensions.HotReload/Microsoft.Testing.Extensions.HotReload.csproj" />
<Project Path="src/Platform/Microsoft.Testing.Extensions.HtmlReport/Microsoft.Testing.Extensions.HtmlReport.csproj" />
<Project Path="src/Platform/Microsoft.Testing.Extensions.JUnitReport/Microsoft.Testing.Extensions.JUnitReport.csproj" />
<Project Path="src/Platform/Microsoft.Testing.Extensions.Logging/Microsoft.Testing.Extensions.Logging.csproj" />
<Project Path="src/Platform/Microsoft.Testing.Extensions.MSBuild/Microsoft.Testing.Extensions.MSBuild.csproj" />
<Project Path="src/Platform/Microsoft.Testing.Extensions.OpenTelemetry/Microsoft.Testing.Extensions.OpenTelemetry.csproj" />
Expand Down
281 changes: 281 additions & 0 deletions docs/RFCs/016-JUnit-Report.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
P:System.DateTime.Now; Use 'IClock' instead
P:System.DateTime.UtcNow; Use 'IClock' instead
M:System.Threading.Tasks.Task.Run(System.Action); Use 'ITask' instead
M:System.Threading.Tasks.Task.WhenAll(System.Threading.Tasks.Task[]); Use 'ITask' instead
M:System.Threading.Tasks.Task.WhenAll(System.Collections.Generic.IEnumerable{System.Threading.Tasks.Task}); Use 'ITask' instead
M:System.String.IsNullOrEmpty(System.String); Use 'RoslynString.IsNullOrEmpty' instead
M:System.String.IsNullOrWhiteSpace(System.String); Use 'RoslynString.IsNullOrWhiteSpace' instead
M:System.Diagnostics.Debug.Assert(System.Boolean); Use 'RoslynDebug.Assert' instead
M:System.Diagnostics.Debug.Assert(System.Boolean,System.String); Use 'RoslynDebug.Assert' instead
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Microsoft.Testing.Extensions.JUnitReport;

// Minimal capped-size projection of a TestNodeUpdateMessage. The consumer projects
// each message into this DTO immediately so that we don't retain entire test nodes
// (and their potentially huge stdout/stderr/stack trace strings) in memory for the
// whole session. All variable-length text fields are already truncated at this point
// so the engine doesn't need to truncate again.
internal sealed class CapturedTestResult
{
// Truncated UID (kept as the public-facing identity in the report).
public required string Uid { get; init; }

// Raw, untruncated UID. Used internally to look up parents in the parent-chain
// dictionary so that truncation of a long UID does not break the chain lookup.
public required string RawUid { get; init; }
Comment thread
Evangelink marked this conversation as resolved.
Resolved

// Raw, untruncated parent UID for the same reason.
public string? ParentRawUid { get; init; }
Comment thread
Evangelink marked this conversation as resolved.
Resolved

public required string DisplayName { get; init; }

public required string Outcome { get; init; }

public required TimeSpan Duration { get; init; }

public DateTimeOffset? StartTime { get; init; }

public DateTimeOffset? EndTime { get; init; }

public string? ClassName { get; init; }

public string? MethodName { get; init; }

public string? ErrorMessage { get; init; }

public string? ExceptionType { get; init; }

public string? StackTrace { get; init; }

public string? StandardOutput { get; init; }

public string? StandardError { get; init; }

public IReadOnlyList<KeyValuePair<string, string>>? Traits { get; init; }
}
Loading
Loading