Skip to content

Commit

Permalink
Fix dotnet-trx parsing of tests with custom display names
Browse files Browse the repository at this point in the history
  • Loading branch information
dorny committed Apr 20, 2021
1 parent 0c4e165 commit 6662b93
Show file tree
Hide file tree
Showing 8 changed files with 417 additions and 277 deletions.
18 changes: 14 additions & 4 deletions __tests__/__outputs__/dotnet-trx.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
![Tests failed](https://img.shields.io/badge/tests-3%20passed%2C%203%20failed%2C%201%20skipped-critical)
![Tests failed](https://img.shields.io/badge/tests-5%20passed%2C%205%20failed%2C%201%20skipped-critical)
## ❌ <a id="user-content-r0" href="#r0">fixtures/dotnet-trx.trx</a>
**7** tests were completed in **1s** with **3** passed, **3** failed and **1** skipped.
**11** tests were completed in **1s** with **5** passed, **5** failed and **1** skipped.
|Test suite|Passed|Failed|Skipped|Time|
|:---|---:|---:|---:|---:|
|[DotnetTests.XUnitTests.CalculatorTests](#r0s0)|3✔️|3|1✖️|110ms|
|[DotnetTests.XUnitTests.CalculatorTests](#r0s0)|5✔️|5|1✖️|118ms|
### ❌ <a id="user-content-r0s0" href="#r0s0">DotnetTests.XUnitTests.CalculatorTests</a>
```
✔️ Custom Name
❌ Exception_In_TargetTest
System.DivideByZeroException : Attempted to divide by zero.
❌ Exception_In_Test
Expand All @@ -14,8 +15,17 @@
Assert.Equal() Failure
Expected: 3
Actual: 2
✔️ Is_Even_Number(i: 2)
❌ Is_Even_Number(i: 3)
Assert.True() Failure
Expected: True
Actual: False
✔️ Passing_Test
✔️ Passing_Test_With_Name
✔️ Should be even number(i: 2)
❌ Should be even number(i: 3)
Assert.True() Failure
Expected: True
Actual: False
✖️ Skipped_Test
✔️ Timeout_Test
```
124 changes: 62 additions & 62 deletions __tests__/__outputs__/fluent-validation-test-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@
✔️ When_the_validators_fail_then_the_errors_Should_be_accessible_via_the_errors_property
✔️ When_the_validators_fail_then_validatorrunner_should_return_false
✔️ When_the_Validators_pass_then_the_validatorRunner_should_return_true
✔️ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_Validate
✔️ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_Validate
✔️ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_ValidateAsync
✔️ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_ValidateAsync
✔️ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_Validate(preValidationResult: )
✔️ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_Validate(preValidationResult: AnotherInt Test Message)
✔️ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_ValidateAsync(preValidationResult: )
✔️ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_ValidateAsync(preValidationResult: AnotherInt Test Message)
✔️ WhenPreValidationReturnsTrue_ValidatorsGetHit_Validate
✔️ WhenPreValidationReturnsTrue_ValidatorsGetHit_ValidateAsync
✔️ WithErrorCode_should_override_error_code
Expand Down Expand Up @@ -312,42 +312,42 @@
```
### ✔️ <a id="user-content-r0s15" href="#r0s15">FluentValidation.Tests.EmailValidatorTests</a>
```
✔️ Fails_email_validation_aspnetcore_compatible
✔️ Fails_email_validation_aspnetcore_compatible
✔️ Fails_email_validation_aspnetcore_compatible
✔️ Fails_email_validation_aspnetcore_compatible
✔️ Fails_email_validation_aspnetcore_compatible
✔️ Fails_email_validation_aspnetcore_compatible
✔️ Fails_email_validation_aspnetcore_compatible
✔️ Fails_email_validation_aspnetcore_compatible
✔️ Invalid_email_addressex_regex
✔️ Invalid_email_addressex_regex
✔️ Invalid_email_addressex_regex
✔️ Invalid_email_addressex_regex
✔️ Valid_email_addresses_aspnetcore_compatible
✔️ Valid_email_addresses_aspnetcore_compatible
✔️ Valid_email_addresses_aspnetcore_compatible
✔️ Valid_email_addresses_aspnetcore_compatible
✔️ Valid_email_addresses_aspnetcore_compatible
✔️ Valid_email_addresses_aspnetcore_compatible
✔️ Valid_email_addresses_aspnetcore_compatible
✔️ Valid_email_addresses_aspnetcore_compatible
✔️ Valid_email_addresses_aspnetcore_compatible
✔️ Valid_email_addresses_aspnetcore_compatible
✔️ Valid_email_addresses_aspnetcore_compatible
✔️ Valid_email_addresses_regex
✔️ Valid_email_addresses_regex
✔️ Valid_email_addresses_regex
✔️ Valid_email_addresses_regex
✔️ Valid_email_addresses_regex
✔️ Valid_email_addresses_regex
✔️ Valid_email_addresses_regex
✔️ Valid_email_addresses_regex
✔️ Valid_email_addresses_regex
✔️ Valid_email_addresses_regex
✔️ Valid_email_addresses_regex
✔️ Valid_email_addresses_regex
✔️ Valid_email_addresses_regex
✔️ Fails_email_validation_aspnetcore_compatible(email: " \r \t \n")
✔️ Fails_email_validation_aspnetcore_compatible(email: "")
✔️ Fails_email_validation_aspnetcore_compatible(email: "@someDomain.com")
✔️ Fails_email_validation_aspnetcore_compatible(email: "@[email protected]")
✔️ Fails_email_validation_aspnetcore_compatible(email: "0")
✔️ Fails_email_validation_aspnetcore_compatible(email: "someName")
✔️ Fails_email_validation_aspnetcore_compatible(email: "someName@")
✔️ Fails_email_validation_aspnetcore_compatible(email: "someName@[email protected]")
✔️ Invalid_email_addressex_regex(email: "")
✔️ Invalid_email_addressex_regex(email: "[email protected]")
✔️ Invalid_email_addressex_regex(email: "testperso")
✔️ Invalid_email_addressex_regex(email: "thisisaverylongstringcodeplex.com")
✔️ Valid_email_addresses_aspnetcore_compatible(email: " @someDomain.com")
✔️ Valid_email_addresses_aspnetcore_compatible(email: "!#$%&'*+-/=?^_`|[email protected]")
✔️ Valid_email_addresses_aspnetcore_compatible(email: "\"firstName.lastName\"@someDomain.com")
✔️ Valid_email_addresses_aspnetcore_compatible(email: "[email protected]")
✔️ Valid_email_addresses_aspnetcore_compatible(email: "[email protected]")
✔️ Valid_email_addresses_aspnetcore_compatible(email: "[email protected]")
✔️ Valid_email_addresses_aspnetcore_compatible(email: "someName@some_domain.com")
✔️ Valid_email_addresses_aspnetcore_compatible(email: "someName@some~domain.com")
✔️ Valid_email_addresses_aspnetcore_compatible(email: "[email protected]")
✔️ Valid_email_addresses_aspnetcore_compatible(email: "someName@someDomain￯.com")
✔️ Valid_email_addresses_aspnetcore_compatible(email: null)
✔️ Valid_email_addresses_regex(email: "[email protected]")
✔️ Valid_email_addresses_regex(email: "!def!xyz%[email protected]")
✔️ Valid_email_addresses_regex(email: "\"Abc@def\"@example.com")
✔️ Valid_email_addresses_regex(email: "\"Abc\\@def\"@example.com")
✔️ Valid_email_addresses_regex(email: "\"Fred Bloggs\"@example.com")
✔️ Valid_email_addresses_regex(email: "\"Joe\\Blow\"@example.com")
✔️ Valid_email_addresses_regex(email: "[email protected]")
✔️ Valid_email_addresses_regex(email: "customer/[email protected]")
✔️ Valid_email_addresses_regex(email: "[email protected]")
✔️ Valid_email_addresses_regex(email: "[email protected]")
✔️ Valid_email_addresses_regex(email: "[email protected]")
✔️ Valid_email_addresses_regex(email: "[email protected]")
✔️ Valid_email_addresses_regex(email: null)
```
### ✔️ <a id="user-content-r0s16" href="#r0s16">FluentValidation.Tests.EmptyTester</a>
```
Expand Down Expand Up @@ -549,14 +549,14 @@
✔️ Falls_back_to_english_when_culture_not_registered
✔️ Falls_back_to_english_when_translation_missing
✔️ Falls_back_to_parent_culture
✔️ Gets_translation_for_bosnian_latin_culture
✔️ Gets_translation_for_bosnian_latin_culture
✔️ Gets_translation_for_bosnian_latin_culture
✔️ Gets_translation_for_bosnian_latin_culture(cultureName: "bs-Latn-BA")
✔️ Gets_translation_for_bosnian_latin_culture(cultureName: "bs-Latn")
✔️ Gets_translation_for_bosnian_latin_culture(cultureName: "bs")
✔️ Gets_translation_for_croatian_culture
✔️ Gets_translation_for_culture
✔️ Gets_translation_for_serbian_culture
✔️ Gets_translation_for_serbian_culture
✔️ Gets_translation_for_serbian_culture
✔️ Gets_translation_for_serbian_culture(cultureName: "sr-Latn-RS")
✔️ Gets_translation_for_serbian_culture(cultureName: "sr-Latn")
✔️ Gets_translation_for_serbian_culture(cultureName: "sr")
✔️ Gets_translation_for_specific_culture
✔️ Uses_error_code_as_localization_key
```
Expand Down Expand Up @@ -1007,16 +1007,16 @@
✔️ ShouldHaveValidationError_preconstructed_object_does_not_throw_for_unwritable_property
✔️ ShouldHaveValidationError_should_not_throw_when_there_are_errors_with_preconstructed_object
✔️ ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors
✔️ ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors__WhenAsyn_is_used
✔️ ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors__WhenAsyn_is_used
✔️ ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: "")
✔️ ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: null)
✔️ ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors_ruleforeach
✔️ ShouldHaveValidationError_Should_support_nested_properties
✔️ ShouldHaveValidationError_Should_throw_when_there_are_no_validation_errors
✔️ ShouldHaveValidationError_should_throw_when_there_are_no_validation_errors_with_preconstructed_object
✔️ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used
✔️ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used
✔️ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used
✔️ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used
✔️ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 17, cardNumber: "")
✔️ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 17, cardNumber: "cardNumber")
✔️ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 17, cardNumber: null)
✔️ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 42, cardNumber: "cardNumber")
✔️ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors_ruleforeach
✔️ ShouldHaveValidationError_with_an_unmatched_rule_and_a_single_error_should_throw_an_exception
✔️ ShouldHaveValidationError_with_an_unmatched_rule_and_multiple_errors_should_throw_an_exception
Expand All @@ -1035,23 +1035,23 @@
✔️ ShouldNotHaveValidationError_Should_support_nested_properties
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_errors
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_errors_with_preconstructed_object
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_validation_errors__WhenAsyn_is_used
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_validation_errors__WhenAsyn_is_used
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 17, cardNumber: "")
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 17, cardNumber: "cardNumber")
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 17, cardNumber: null)
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: "cardNumber")
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: "")
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: null)
✔️ ShouldNotHaveValidationError_should_throw_when_there_are_validation_errors_ruleforeach
✔️ Tests_nested_property
✔️ Tests_nested_property_reverse
✔️ Tests_nested_property_using_obsolete_method
✔️ TestValidate_runs_async
✔️ TestValidate_runs_async_throws
✔️ Unexpected_error_code_check
✔️ Unexpected_message_check
✔️ Unexpected_message_check
✔️ Unexpected_message_check
✔️ Unexpected_message_check
✔️ Unexpected_message_check(withoutErrMsg: "bar", errMessages: ["bar"])
✔️ Unexpected_message_check(withoutErrMsg: "bar", errMessages: ["foo", "bar"])
✔️ Unexpected_message_check(withoutErrMsg: "bar", errMessages: ["foo"])
✔️ Unexpected_message_check(withoutErrMsg: "bar", errMessages: [])
✔️ Unexpected_severity_check
✔️ Unexpected_state_check
```
Loading

0 comments on commit 6662b93

Please sign in to comment.