chiefmyron / phpunit-test-workbench

An extension to integrate PHPUnit with the native Test Explorer functionality within VS Code. Zero configuration required for common environment setups.
https://marketplace.visualstudio.com/items?itemName=chiefmyron.phpunit-test-workbench
MIT License
5 stars 2 forks source link

Some test failures not correctly detected by results parser #40

Closed chiefmyron closed 1 year ago

chiefmyron commented 1 year ago

A unit test failed with the following output:

##teamcity[testFailed name='testInvalidPasswordNumbers' message='Failed asserting that two objects are equal.' details=' C:\\Development\\PHP\\Tranquillity\\tranquillity\\vendor\\symfony\\validator\\Test\\ConstraintValidatorTestCase.php:433|n C:\\Development\\PHP\\Tranquillity\\tranquillity\\tests\\Tranquillity\\Infrastructure\\Validation\\Constraint\\PasswordMeetsPolicyValidatorTest.php:52|n ' duration='23' type='comparisonFailure' actual='Symfony\\Component\\Validator\\ConstraintViolation Object (|n |'message|' => |'Password must contain at leas...mbers.|'|n |'messageTemplate|' => |'Password must contain at leas...mbers.|'|n |'parameters|' => Array (|n |'{{ minNumberChars }}|' => |'2|'|n )|n |'plural|' => null|n |'root|' => |'root|'|n |'propertyPath|' => |'property.path|'|n |'invalidValue|' => |'InvalidValue|'|n |'constraint|' => Symfony\\Component\\Validator\\Constraints\\NotNull Object (...)|n |'code|' => |'3adee7ed-86e0-4b13-bb75-827ef625a024|'|n |'cause|' => null|n)' expected='Symfony\\Component\\Validator\\ConstraintViolation Object (|n |'message|' => |'Password must contain at leas...mbers.|'|n |'messageTemplate|' => |'Password must contain at leas...mbers.|'|n |'parameters|' => Array (|n |'{{ minLowercaseChars }}|' => |'2|'|n )|n |'plural|' => null|n |'root|' => |'root|'|n |'propertyPath|' => |'property.path|'|n |'invalidValue|' => |'InvalidValue|'|n |'constraint|' => Symfony\\Component\\Validator\\Constraints\\NotNull Object (...)|n |'code|' => |'3adee7ed-86e0-4b13-bb75-827ef625a024|'|n |'cause|' => null|n)' flowId='18052']

However, the regex for detecting failed tests did not account for type and actual attributes in the log message.