Unit Test Runner does not show console output Follow
Hello,
Rider does not output any logs in the Unit Test window. When I run the tests using the CLI it does output logs. I run rider on an M1 Mac.
Output in Rider (empty):
While running it in the CLI confirms there is actually output:
dotnet test --filter "FullyQualifiedName~CreateDispatch_ShouldCreateDispatch_ForMinimumFieldsSupplied"
<text removed for privacy reasons>
Starting test execution, please wait...warn: Microsoft.EntityFrameworkCore.Model.Validation[10400]Sensitive data logging is enabled. Log entries and exception messages may include sensitive application data; this mode should only be enabled during development.info: Microsoft.EntityFrameworkCore.Infrastructure[10403]Entity Framework Core 6.0.7 initialized 'WriteDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL:6.0.5+9d79af6e2586d5d28da253ac075706a5575a1743' with options: SensitiveDataLoggingEnabled DetailedErrorsEnabledinfo: Microsoft.EntityFrameworkCore.Database.Command[20101]Executed DbCommand (38ms) [Parameters=[], CommandType='Text', CommandTimeout='30']SELECT EXISTS (SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace WHERE c.relname='__EFMigrationsHistory');info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Am I missing a setting to show the logs?
Please sign in to leave a comment.
Hello Jorikvdwerf,
Could you please clarify the way the test output is produced? A sample code snippet would be perfect =)
I am having the same problem. When I run an NUnit test one by one, right-clicking it and select `Run Unit Test` or `Debug Unit Test`, I see the output from `Console.WriteLine("testing")`, when clicking on the individual test that have run. But when I run all tests on a class, I see no output in the console.
This makes it very hard to debug the test itself using plain std-out prints to the console (Console.WriteLine()).
I tried with TestContext.Out.WriteLine() as well, but it game no output as well.
When I run all the tests in a class from a command prompt with with the `dotnet test` command, I do see all my output. So I am just missing them inside Rider.
Shall it reproduce in some dummy solution, will be happy if you could share it. Thank you!