Skip to content
  • Christian Kuhn's avatar
    [BUGFIX] Dependencies between unit tests · 7d067bb2
    Christian Kuhn authored
    Our unit tests have an annoying history of dependencies between
    each other: There are tests that rely on global state changes from
    other tests. Those are hard and time consuming to track down and
    lead to erratic test results if not fixed.
    
    The patch resolves the hopefully last occurences of those cross
    dependencies, all of these issues were recently introduced:
    
    * A bug in extbase DebuggerUtility lets a test in core DebugUtilityTest fail
    * SchemaColumnDefinitionListenerTest is changed to cope with a possible
      global change by a different test that we can not prevent otherwise
    * felogin FrontendLoginControllerTest properly handles registered
      global objects to prevent side effects on TemplateServiceTest
    
    To prevent such issues in the future, the new require-dev dependency
    "phpunit-randomizer" is added. It allows running tests in random order
    to reveal cross dependencies:
    
    ./bin/phpunit-randomizer -c typo3/sysext/core/Build/UnitTests.xml --order rand
    
    Each run echos out a specific seed that can be used to replay this specific
    order of tests:
    
    ./bin/phpunit-randomizer -c typo3/sysext/core/Build/UnitTests.xml --order rand:1234
    
    The randomizer will be added to the pre-merge tests with a couple of
    runs to find those cross dependencies more quickly.
    
    Change-Id: Id08eda19df98f1a8adf25259f852928020acd810
    Resolves: #78499
    Releases: master
    Reviewed-on: https://review.typo3.org/50435
    
    
    Tested-by: default avatarTYPO3com <no-reply@typo3.com>
    Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
    Reviewed-by: default avatarDaniel Lorenz <daniel.lorenz@extco.de>
    Tested-by: default avatarDaniel Lorenz <daniel.lorenz@extco.de>
    Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
    Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
    7d067bb2
Analyzing file…