In the context of the modernization of our integration tests by updating some legacy tests to Docker, I’m in the process of moving the integration tests of the commments, now supporting CKEditor, from xwiki-platform-distribution-flavor-test-ui
to xwiki-platform-flamingo-skin-test-docker
.
But more generally, the proposal below places itself in the context of enforcing an efficient and strong testing strategy for XWiki.
Doing the migration to docker integration tests is essential and brings a lot of benefits, but I identified one drawback that I find important to discuss. The docker tests are now executed without CKEditor.
This means that many UI issues purely related to CKEditor will not be automatically tested.
I think that’s a big miss for our automated test suites, because while we test XWiki on one side, and CKEditor in another side, we are no longer going to test their integration, which was the case until now.
Some examples of problems encountered specifically with CKEditor that cannot be detected with other editors, and that can be more easily catch with automated integration tests:
- some shortcuts where not working due to the integration
- cursor focus “stolen” by the CKEditor inputs
- unwanted “This page is asking you to confirm that you want to leave - data you have entered may not be saved.” messages displayed by the browser
Hence, I’d like to open a discussion on which strategies we can deploy to offer integration tests of XWiki with CKEditor.
Proposal 1
Let each test module choose to have a dependency to CKEditor if they need it.
Pros:
- Fine tuning of the integration test
Cons:
- More dependencies means longer builds
Proposal 2
Introducing a new option, in addition to the existing browser
or database
and others, allowing to choose externally which editor should be loaded.
Pros:
- More tuned integration tests
Cons:
- A new kind of testing variability to implement
- Even longer execution time on the CI
- Is it really a variation point? CKEditor is the only editor in XS currently.
Proposal 3
Keeping xwiki-platform-distribution-flavor-test-ui
but migrating it to docker to keep having some tests running on a fully build distribution.
Pros:
- Full integration testing for XWiki Standard with all features
Cons:
- Need to chose which test to run on minimal distribution / full distribution, with the risk of duplicated tests
WDYT?