[Kde-pim] [GSOC] AkonadiClient Progress

Bhaskar Kandiyal bkandiyal at gmail.com
Mon Jun 16 19:46:12 BST 2014


On Monday 16 June 2014 01:04 PM, Daniel Vrátil wrote:
> 
> Hi,
> 
> we already have an infrastructure for running tests that need to talk to the 
> Akonadi Server (we call them "isolated tests") in kdepimlibs. Look for example  
> to kdepimlibs/akonadi/tests/itemcreatetest.cpp and at corresponding entry in 
> CMakeLists.txt. You can also learn there some tricks how to correctly test 
> Akonadi jobs (like ItemFetchJob) and their results.
> 
> The way this works is that when you run "ctest -R itemcreatetest" (you can't 
> execute isolated tests directly), the akonaditest utility 
> (kdepimlibs/akonadi/tests/testrunner) is started, which in turn starts an 
> isolated Akonadi server. Isolated means that it works with data in /tmp that 
> are copied there from kdepimlibs/akonadi/tests/unittestenv, instead of running 
> against your production data. Then it starts the Akonadi Knut resource 
> (kdepimlibs/akonadi/test/testresource), which populates Akonadi with some test 
> collections and items (see 
> kdepimlibs/akonadi/tests/unittestenv/kdehome/testdata.xml) that you can query 
> then from your test. Finally, it starts your unittest, and after it finishes, 
> the utility will stop the Akonadi server again and clean up what's left after 
> it in /tmp. 
> 

Awesome! Just what I was looking for and many thanks for the
explanation, much appreciated :)

I'll start reading the tests in kdepimlibs to get more familiar with
them. Thanks again!

Cheers,
Bhaskar Kandiyal
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list