There is a base memory usage for tests of ~55 MB
. Multiple tests run in one test-run will reuse this data.
So getting a single test run down to Memory leak: ~55 MB
is as good as it gets.
For reporting tool see:
https://github.com/TYPO3/testing-framework/issues/561
Before¶
$ ./Build/Scripts/runTests.sh -s functional -p 8.2 -d mariadb typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/SecurityTest.php
# TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\SecurityTest
.............................................. 46 / 46 (100%)
Memory leak: 153.53 MB
Time: 00:08.623, Memory: 169.00 MB
OK (46 tests, 92 assertions)
After¶
# TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\SecurityTest
.............................................. 46 / 46 (100%)
Memory leak: 55.74 MB
Time: 00:09.414, Memory: 99.00 MB
OK (46 tests, 92 assertions)
Before¶
$ ./Build/Scripts/runTests.sh -s functional -p 8.2 -d mariadb typo3/sysext/frontend/Tests/Functional/ContentObject/FilesContentObjectTest.php
# TYPO3\CMS\Frontend\Tests\Functional\ContentObject\FilesContentObjectTest
!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!. 58 / 58 (100%)
Memory leak: 154.66 MB
Time: 00:15.984, Memory: 169.00 MB
OK (58 tests, 58 assertions)
After¶
# TYPO3\CMS\Frontend\Tests\Functional\ContentObject\FilesContentObjectTest
.......................................................... 58 / 58 (100%)
Memory leak: 54.64 MB
Time: 00:16.977, Memory: 97.00 MB
OK (58 tests, 58 assertions)
Before¶
$ ./Build/Scripts/runTests.sh -s functional -p 8.2 -d mariadb typo3/sysext/core/Tests/Functional/Imaging/IconFactoryTest.php
# TYPO3\CMS\Core\Tests\Functional\Imaging\IconFactoryTest
................................................. 49 / 49 (100%)
Memory leak: 126.33 MB
Time: 00:02.819, Memory: 141.00 MB
OK (49 tests, 57 assertions)
After¶
# TYPO3\CMS\Core\Tests\Functional\Imaging\IconFactoryTest
................................................. 49 / 49 (100%)
Memory leak: 55.75 MB
Time: 00:03.139, Memory: 101.00 MB
OK (49 tests, 57 assertions)
Before¶
$ ./Build/Scripts/runTests.sh -s functional -p 8.2 -d mariadb
# TYPO3\CMS\Backend\Tests\Functional\Controller\MfaConfigurationControllerTest
!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!!. 22 / 22 (100%)
Memory leak: 102.21 MB
Time: 00:03.727, Memory: 117.00 MB
OK (22 tests, 68 assertions)
After¶
# TYPO3\CMS\Backend\Tests\Functional\Controller\MfaConfigurationControllerTest
...................... 22 / 22 (100%)
Memory leak: 56.75 MB
Time: 00:03.549, Memory: 99.00 MB
OK (22 tests, 68 assertions)
Before¶
$ ./Build/Scripts/runTests.sh -s functional -p 8.2 -d mariadb typo3/sysext/impexp/Tests/Functional/ExportTest.php
# TYPO3\CMS\Impexp\Tests\Functional\ExportTest
!!.!!.!!.!!.!!.!!.!!.!!.!!.!!.!!.!!.!!.!!. 14 / 14 (100%)
Memory leak: 86.28 MB
Time: 00:05.008, Memory: 103.00 MB
OK (14 tests, 25 assertions)
After¶
# TYPO3\CMS\Impexp\Tests\Functional\ExportTest
!.!.!.!.!.!.!.!.!.!.!.!.!.!. 14 / 14 (100%)
Memory leak: 58.77 MB
Time: 00:04.508, Memory: 103.00 MB
OK (14 tests, 25 assertions)