Extract testing framework for TYPO3
Since the .gitattributes export change, a lot of base test classes for writing own tests are missing in distribution builds. To get a sustainable future-proof solution, the TYPO3 core testing framework will be extracted to an own component.
Updated by Susanne Moog almost 4 years ago
This is the first step of the testing framework extraction…
The complete concept is as follows:
After the .gitattributes change, a lot of CI setups were broken as base test classes were suddenly missing. Our immediate solution then was to re-add some of those files by moving them to the classes folder. That did not solve the whole problem however as we had no idea what people “in the wild” were using as base for the tests, the fixtures (especially for the functional tests) were missing entirely and all in all we wanted to have a concept for providing a reliable test base for the future where we could say “this is what we want you to use as base”, so we’d get a fully supported, maintainable package.
After talking to a few people (product team, helmut, some others over time) we came up with the concept of an own package which could be installed via composer as require-dev only - being able to selectively decide which classes and fixtures are part of our testing package as well as supporting CI environments in the best possible way we could think of.
Steps to make it happen¶
- move all testing framework related stuff into an own folder (which represents the new package),
- Move core classes and fixtures
- Move other extension base classes and fixtures
- then separate that package from the core (for example via subtree split) and make it installable on its own.
Updated by Adrien Crivelli over 3 years ago
Following this change, how is an extension supposed to test against latest LTS 7.6 and latest sprint release 8.6 ?
I fail to see any viable migration path in the changelog or in this issue, since inheriting from two different classes is clearly impossible in an extension's test case. It also seems impossible to use the testing component by itself to test a TYPO3 7, since its composer.json file declares a dependencies on
Is there anything planned to ease the support of both LTS, 7 and 8, in the future ? or are extension authors on their own and should somehow duplicate testing code ?
Updated by Adrien Crivelli almost 2 years ago
To answer my own question, the official docs says (emphasis mine):
This documentation assumes an extension is tested with only one major core version. It does not support extension testing with multiple target core versions. Extensions that support multiple core versions at the same time in the same branch are not scope of this document. The core team encourages extension developers to have dedicated core branches per core version. This has various advantages, it is for instance easy to create deprecation free extensions this way.