Actions
Bug #81277
closedImport tests with side effects
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Tests
Target version:
-
Start date:
2017-05-19
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
tests
Complexity:
Is Regression:
Sprint Focus:
Description
Calling test case TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImages\ImportInFilledDatabaseTest::importPagesAndRelatedTtContentWithDifferentImageToExistingData multiple times has negative side effects. The first execution is fine, the second execution fails. I did not analyze further tests in that regard, however would expect that test cases take care of cleaning up artifacts during the tear-down phase.
First execution (all fine)¶
olly@oliver ip9.local ./allTest.sh --filter=importPagesAndRelatedTtContentWithDifferentImageToExistingData PHPUnit 5.7.5 by Sebastian Bergmann and contributors. Starting test 'TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImages\ImportInFilledDatabaseTest::importPagesAndRelatedTtContentWithDifferentImageToExistingData'. . 1 / 1 (100%) Time: 3.43 seconds, Memory: 20.00MB OK (1 test, 24 assertions)
Second execution (fails)¶
olly@oliver ip9.local ./allTest.sh --filter=importPagesAndRelatedTtContentWithDifferentImageToExistingData PHPUnit 5.7.5 by Sebastian Bergmann and contributors. Starting test 'TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImages\ImportInFilledDatabaseTest::importPagesAndRelatedTtContentWithDifferentImageToExistingData'. F 1 / 1 (100%) Time: 2.32 seconds, Memory: 20.00MB There was 1 failure: 1) TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImages\ImportInFilledDatabaseTest::importPagesAndRelatedTtContentWithDifferentImageToExistingData Record "sys_file:4" not found in database Assertion in data-set failed for "sys_file_reference:2": Fields |Assertion|Record uid_local|4 |1 Assertion in data-set failed for "sys_file_metadata:1": Fields |Assertion |Record title |Dummy image |NULL description|This is a dummy image.|NULL alternative|Photo of program code |NULL Record "sys_file_metadata:3" not found in database /Users/olly/Development/typo3/master/vendor/typo3/testing-framework/Classes/Core/Functional/FunctionalTestCase.php:443 /Users/olly/Development/typo3/master/typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php:118 /Users/olly/Development/typo3/master/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithImages/ImportInFilledDatabaseTest.php:60 FAILURES! Tests: 1, Assertions: 14, Failures: 1.
Actions