Bug #78499

Dependencies between unit tests

Added by Christian Kuhn about 2 years ago. Updated 2 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-10-29
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Related issues

Related to TYPO3 Core - Bug #78511: DebuggerUtility changes global blacklist Closed 2016-10-31

Associated revisions

Revision 7d067bb2 (diff)
Added by Christian Kuhn about 2 years ago

[BUGFIX] Dependencies between unit tests

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: TYPO3com <>
Reviewed-by: Markus Klein <>
Reviewed-by: Daniel Lorenz <>
Tested-by: Daniel Lorenz <>
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>

Revision 0a83dfb6 (diff)
Added by Christian Kuhn about 2 years ago

[BUGFIX] DebuggerUtility changes global blacklist

This is a partial backport of master issue #78499 fixing an issue
in extbase DebuggerUtility to properly reset two static class
variables after use.

Change-Id: I50dba402f1232f86ead88ffbd506043b4673e5d1
Resolves: #78511
Related: #78499
Related: #72407
Releases: 7.6
Reviewed-on: https://review.typo3.org/50451
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>
Tested-by: TYPO3com <>
Reviewed-by: Wouter Wolters <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Gerrit Code Review about 2 years ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50435

#2 Updated by Gerrit Code Review about 2 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50435

#3 Updated by Gerrit Code Review about 2 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50435

#4 Updated by Christian Kuhn about 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#5 Updated by Benni Mack 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF