Making unit tests first-class again across PIM repos

Friedrich W. H. Kossebau kossebau at kde.org
Mon Aug 9 17:05:01 BST 2021


Hi,

TL;DR  Who would like to join an effort over the next weeks to get all unit 
tests across all PIM repos to pass again, as well as get CI running Akonadi-
based tests again?

Motivation:

While looking into how to give KOrganizer some features I would like from it 
(like the recently mentioned computable mass events, but also other things 
like browsing events by location map, column-organized event display e.g. per 
location or room for things in a gathering or conference, having statistic 
displays like a week hours heatmap or per location/organizer/xyz frequency) I 
found that unit tests in nultiple PIM repos are not all passing for some time.
Which makes things less nice when relying on those to catch regressions by own 
changes, even more when being a newbie on the code as I am.
Also as user of PIM products one would feel better when trusting ones 
partially important data to this software if test coverage is all green/blue 
;)
And then there is also the long-term value in preparing the Qt6 port, where 
having a set of reliable unit tests should serve as side rails on the road to 
the future.

Initial success:

So last week I started to look into fixing some of the failing tests, and 
found a set of low-hanging fruits there (first one to look can be also an 
advantage :P ) which were simple enough for me to fix, so some first MRs 
already made their way in due to the timely review by Laurent, Volker, David & 
others, thanks for that, and the number of repos to cover has already been 
reduced now (did not track, 2 or 3). Currently poking maincommon tests.
But I do not think I can also manage to cover all the left ones on my own due 
to limited resources (also in knowledge).

Planning needed:

To avoid having multiple people attacking the same failing unit tests, it 
would be good to coordinate things. 
First idea would be to use the PIM Phab Workboard and have a new column 
"Failing Unit Tests" and add a task per test, see
https://phabricator.kde.org/project/view/34/
Makes sense and would not be overkill, or? Idea would be also to use the tasks 
to accumulate knowledge when needed for the harder to crack failing tests, 
where no related expert is around any longer.

Latest when it comes to getting Akonadi-based tests running again on (for now) 
the Jenkins-based KDE CI this needs input/assistance/work from Akonadi-
experienced people. While I will be happily trying my best, I am learning here 
while doing when it comes to the combined game of separate started processes, 
Jenkins, Akonadi  and whatever else is adding theirs. So myself I would 
schedule that for later only once I gained more clue about all the PIM code by 
fixing all the non-Akonadi-related tests.

Open questions:

How could it happen that the unit tests regressed, often for years?
How to prevent that happening again?

So, who would be interested/willing to join this effort for the coming weeks? 
Myself I have some time reserved for this in the evenings over August and 
begin of September.

Cheers
Friedrich




More information about the kde-pim mailing list