devlooped / dotnet-trx

Pretty-print test results from trx files
MIT License
33 stars 1 forks source link

Sort test results by name, improve duration calculation #12

Closed kzu closed 2 months ago

kzu commented 2 months ago

By sorting tests by name we make it easier to find visually those that belong logically together.

While doing this change, we switch to adding the duration of each individual test counted test run, which is more precise than adding the overal test results file duration which can include a full run from a previous trx (i.e. a later one run partially only failed tests, for example).

devlooped-bot commented 2 months ago

:point_right: Run 8 tests in ~ 3 seconds 5 passed 2 failed 1 skipped

:test_tube: Details
:x: Demo.Tests.Fails_With_Complex_StackTrace > ```csharp > at Demo.Tests.Unexpected() in /_/src/Demo/Tests.cs:line 43 > at Demo.Tests.Run() in /_/src/Demo/Tests.cs:line 41 > at Demo.Tests.b__6_0() in /_/src/Demo/Tests.cs:line 36 > at Demo.Tests.Fails_With_Complex_StackTrace() in /_/src/Demo/Tests.cs:line 38 > ```
:x: Demo.Tests.Fails_With_Output > ```csharp > at Demo.Tests.Fails_With_Output() in /_/src/Demo/Tests.cs:line 30 > ``` > > It was going so well... > > Yet you never know > > Which is why you sprinkle all these WriteLines :eyes:
:white_check_mark: Demo.Tests.Parameterized(culture: "de") :white_check_mark: Demo.Tests.Parameterized(culture: "en") :white_check_mark: Demo.Tests.Parameterized(culture: "es") :white_check_mark: Demo.Tests.Parameterized(culture: "fr") :grey_question: Demo.Tests.Skipped_Test_Does_Not_Run => Shouldn't run for now :)
:white_check_mark: Demo.Tests.Test_With_Output > > Hello, world from xunit ITestOutputHelper!

from dotnet-trx with :purple_heart:

devlooped-bot commented 2 months ago

:point_right: Run 8 tests in ~ 3 seconds      :white_check_mark: 5 passed      :x: 2 failed      :grey_question: 1 skipped

:test_tube: Details
:x: Demo.Tests.Fails_With_Complex_StackTrace > ```csharp > at Demo.Tests.Unexpected() in /_/src/Demo/Tests.cs:line 43 > at Demo.Tests.Run() in /_/src/Demo/Tests.cs:line 41 > at Demo.Tests.b__6_0() in /_/src/Demo/Tests.cs:line 36 > at Demo.Tests.Fails_With_Complex_StackTrace() in /_/src/Demo/Tests.cs:line 38 > ```
:x: Demo.Tests.Fails_With_Output > ```csharp > at Demo.Tests.Fails_With_Output() in /_/src/Demo/Tests.cs:line 30 > ``` > > It was going so well... > > Yet you never know > > Which is why you sprinkle all these WriteLines :eyes:
:white_check_mark: Demo.Tests.Parameterized(culture: "de") :white_check_mark: Demo.Tests.Parameterized(culture: "en") :white_check_mark: Demo.Tests.Parameterized(culture: "es") :white_check_mark: Demo.Tests.Parameterized(culture: "fr") :grey_question: Demo.Tests.Skipped_Test_Does_Not_Run => Shouldn't run for now :)
:white_check_mark: Demo.Tests.Test_With_Output > > Hello, world from xunit ITestOutputHelper!

from dotnet-trx with :purple_heart: