Skip to content

Conversation

radical
Copy link
Member

@radical radical commented Oct 30, 2024

Microsoft Reviewers: Open in CodeFlow

@DamianEdwards
Copy link
Member

@radical should we update the xunit runner settings to enable live output too?

@radical
Copy link
Member Author

radical commented Oct 30, 2024

@radical should we update the xunit runner settings to enable live output too?

Is this sufficient to show the output in VS? If so, this sounds like a great idea.

Add `ShowLiveOutput=true` for playground, endtoend, and workload tests.
@DamianEdwards
Copy link
Member

Is this sufficient to show the output in VS? If so, this sounds like a great idea.

Unfortunately I don't think it works in VS @bradwilson

@bradwilson
Copy link

Unfortunately I don't think it works in VS @bradwilson

It does work. The output goes to the Tests tab of the Output window.

live.output.mp4

@bradwilson
Copy link

Also, if you want to see live output with dotnet test, you need to pass --logger "console;verbosity=normal":

live.output.dotnet.mp4

@@ -35,7 +35,7 @@
<_TestBlameArguments Include="--blame-crash-dump-type full" />

<!-- Using `dotnet test` for the project directly here -->
<_TestRunCommandArguments Include="dotnet test -s .runsettings --results-directory $(_HelixLogsPath)" />
<_TestRunCommandArguments Include="dotnet test -s .runsettings --results-directory $(_HelixLogsPath) -v:n" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this when the .runsettings also has:

      <Logger friendlyName="console">
        <Configuration>
          <Verbosity>normal</Verbosity>
        </Configuration>
      </Logger>

?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing -v:n to dotnet test changes the verbosity of the MSBuild operations that dotnet test does, which is different than the verbosity of the console logger.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need -v:n so the msbuild logger shows the live output.

@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<xunit>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually working for you? My understanding was that these are case sensitive (because thanks XML), and these should be xUnit (with the capital U). https://xunit.net/docs/runsettings

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thank you. I will fix that.

@radical radical merged commit 8da37a2 into dotnet:main Oct 31, 2024
9 checks passed
@radical radical deleted the playground-ci-output branch October 31, 2024 23:04
@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2024
@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label Mar 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants