Fix trx in case of exit code != 0#3887
Merged
Merged
Conversation
Evangelink
previously approved these changes
Sep 30, 2024
Evangelink
approved these changes
Sep 30, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces changes to the
TrxReportGeneratorand related classes to include the process exit code in the TRX report generation. The most important changes include adding a new dependency forITestApplicationProcessExitCode, updating theTrxReportEngineto handle the exit code, and modifying the result summary to reflect the exit code.Changes to
TrxReportGeneratorand Dependencies:src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxDataConsumer.cs: AddedITestApplicationProcessExitCodeas a dependency and updated the constructor andOnTestSessionFinishingAsyncmethod to use it. [1] [2] [3] [4]Changes to
TrxReportEngine:src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxReportEngine.cs: Added_exitCodefield and updated the constructor and methods to handle the exit code, including modifying theGenerateReportAsyncandAddResultSummaryAsyncmethods to use the exit code. [1] [2] [3] [4] [5] [6]Changes to
TrxProcessLifetimeHandler:src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxProcessLifetimeHandler.cs: Updated methods to include the exit code when publishing messages. [1] [2]Additional Changes:
src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxReportExtensions.cs: Updated to includeITestApplicationProcessExitCodein the service provider.src/Platform/Microsoft.Testing.Platform/Hosts/ConsoleTestHost.cs: Changed to use synchronousGetProcessExitCodemethod.src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.cs: Added and set upTestApplicationResultProxyto manage the exit code service. [1] [2]Localization Updates:
fixes #3768