-
Notifications
You must be signed in to change notification settings - Fork 259
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
Interactive display for terminals #3292
Conversation
src/Platform/Microsoft.Testing.Platform/OutputDevice/OutputFormatter.cs
Outdated
Show resolved
Hide resolved
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.
I need more time but sending my first comments
src/Adapter/MSTestAdapter.PlatformServices/Services/ThreadSafeStringWriter.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Amaury Levé <[email protected]>
_consoleWithProgress = consoleWithProgress; | ||
} | ||
|
||
public void TestExecutionStarted(DateTimeOffset testStartTime, int workerCount) |
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.
It's called from only one place with 1
for worker, do we need the parameter? What does it represent?
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.
This will be used by dotnet test when we have multiple projects running via this same logger, when there is the new protocol between dotnet test and test .exe
.
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.
Is it responsibility of the caller or this class to know how many state object should handle the progress?
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.
The caller tells us what is the level of parallelism, so we can know how many projects will run at the same time at max, and make UI choices based on that. e.g. we could write: "Starting run in parallel on 10 workers".
Actually managing the states is the responsibility of this console with progress.
src/Platform/Microsoft.Testing.Platform/UI/ConsoleLoggerOutputDevice.cs
Outdated
Show resolved
Hide resolved
test/UnitTests/Microsoft.Testing.Platform.UnitTests/Microsoft.Testing.Platform.UnitTests.csproj
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/Microsoft.Testing.Platform.csproj
Outdated
Show resolved
Hide resolved
Co-authored-by: Amaury Levé <[email protected]>
src/Platform/Microsoft.Testing.Platform/OutputDevice/Console/TestProgressState.cs
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/OutputDevice/Console/TestProgressState.cs
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/TestHostControllers/ITestHostControllerInfo.cs
Outdated
Show resolved
Hide resolved
...tionTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceAssert.cs
Outdated
Show resolved
Hide resolved
test/Utilities/Microsoft.Testing.TestInfrastructure/CommandLine.cs
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/OutputDevice/Console/TestProgressFrame.cs
Show resolved
Hide resolved
public List<string> Attachments { get; } = new(); | ||
|
||
public List<IProgressMessage> Messages { get; } = new(); |
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.
Could we expose as "readonly"/"immutable" to avoid having anything that can mutate this?
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.
It can be done, but it feels like too much ceremony for this simple internal object that just holds the state and is not passed outside of the logger.
src/Platform/Microsoft.Testing.Platform/OutputDevice/Console/ConsoleLogger.cs
Show resolved
Hide resolved
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.
We still need to get rid of all the logger wording
…e.cs Co-authored-by: Amaury Levé <[email protected]>
…tegrationTests/Helpers/AcceptanceAssert.cs Co-authored-by: Amaury Levé <[email protected]>
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.
Merging as-is. We will do a follow-up for the last few nits
Adds output device that writes tests to ansi or non-ansi terminal, with or without progress indicator.
Features:
A "progress" bar that shows counts of passed, failed and skipped tests. In ANSI mode the progress is updated live on the bottom of the screen, in non-ansi mode the progress is output repeatedly every 3 seconds.
Colored stack traces, with links to files, and (optional) relative paths:
Test run summary:
artifacts report:
Optionally showing passed tests:
Optionally showing link to assembly the test is coming from:
Optional per assembly summary:
Split: