E2E Testing for Akonadi Resources
We currently don't have any real tests for Akonadi Resources (there are some unittests in some, but we are missing the larger tests that would verify whether we can actually connect to and interact with various remote backends).
We should create a test framework (most likely in Python) to set up Akonadi, setup and configure a resource and then try to do some operations from the client side and verify that things have been stored properly on the remote backend, as well as performing operations on the remote backend (using its native API) and checking whether the changes get synced correctly.
To explain it on a specific example - a test for the Google Calendar resource should:
- configure the resource
- create an event locally and check that everything is synced to Google Calendar (through its native API)
- move a time of an event locally and check that it's synced correctly
- create an event with timezones and check timezones get propagated correctly
- create a recurring event and and check that it's propagated correctly
- disassociate a single event from the recurrence and move it to a different time and check that's propagated correctly
- etc. etc.
- then basically to the same kind of changes on the Google Calendar side (using the native API) and check that everything syncs correctly into Akonadi.
The idea is that this testsuite should cover all resources and for those that aren't vendor-specific (e.g. IMAP, DAV, etc.) we should deploy locally (using Docker) several different implementations of the remote service (e.g. Dovecot and Cyrus for IMAP, at least NextCloud for DAV) etc. The test framework should also take create of setting this up.
Generally the test suite should run nightly in the Gitlab CI, but it should be possible (and easy!) to run it locally, e.g. against locally-compiled Akonadi, so as much of the setup and instrumentation should be automated.
Definition of done:
- Have a Python-based test framework for creating automated tests to test Akonadi<->remote service sync
- Uses akonadiclient to interact with Akonadi from Python (so that we don't have to create Python bindings)
- Uses native Python libraries to communicate with the remote backend (Google, Outlook365, DAV backends, IMAP servers)
- At least basic test coverage for all resources
- Complete coverage for the high-profile resources (IMAP, DAV, Google Groupware)
- Runs nightly in the CI against current master of Akonadi/kdepim-runtime etc.
- Can be easily ran locally on developer's systems