Skip to content
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

TestContext.Progress not visible in test output #661

Closed
cocowalla opened this issue Sep 25, 2019 · 3 comments
Closed

TestContext.Progress not visible in test output #661

cocowalla opened this issue Sep 25, 2019 · 3 comments

Comments

@cocowalla
Copy link

I'm trying to use TestContext.Progress.WriteLine("my message") in tests (using Xamarin.UITest, if it matters), but TestContext.Progress output doesn't appear when running tests in Visual Studio or Rider.

In Visual Studio, I tried running tests using both the ReSharper test runner and Visual Studio's built-in one, but got the same result - no output in the test output window.

If I run tests from the command line (dotnet test), then TestContext.Progress appears as it is generated, as expected.

Note that TestContext.Out and TestContext.Error work in all cases as expected.

csproj snippet:

<TargetFramework>netcoreapp2.1</TargetFramework>
...
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Xamarin.UITest" Version="3.0.3" />
@OsirisTerje
Copy link
Member

OsirisTerje commented Sep 30, 2019

If you look in the Output window , don't you see this:
image

Also please look at this issue: #621

@cocowalla
Copy link
Author

Ach, you're right, it is displayed there in VS. Annoyingly, I'm sure I've made this mistake before!

It really isn't displayed in Rider though - it seems there's some secret-squirrel way to enable it, but you need to start Rider in "internal mode" to make the setting available.

@OsirisTerje
Copy link
Member

Thanks for the comment on Rider. I'll see if we can reach out to them about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants