[Kde-pim] [GSOC] AkonadiClient Progress

Daniel Vrátil dvratil at redhat.com
Mon Jun 16 08:35:55 BST 2014


On Monday 16 of June 2014 09:34:37 Daniel Vrátil wrote:
> On Monday 16 of June 2014 00:27:44 Bhaskar Kandiyal wrote:
> > Hi :)
> > 
> > Just a quick mail to let everyone know about the progress of the
> > AkonadiClient GSoC Project.
> > 
> > As of now I have finished implementing the basic filesystem as well as
> > data commands as documented at [1].
> > 
> > The only thing left is writing unit tests for which I am currently going
> > through this excellent wiki page [2] which has tutorials on writing unit
> > tests using QtTestLib framework.
> > 
> > Having a separate (temporary?) collection and items for running test
> > cases would be beneficial so as to not make changes to actual user data.
> > Since only resources are allowed to create top-level collections afaik,
> > is there a way to create a temporary collection, run test cases on it
> > and then delete it once done?
> 
> 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 

Sorry, that's kdepimlibs/akonadi/tests/itemappendtest.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.
> 
> 
> Keep up the good work!
> Dan
> 
> > PS: I initially wanted to send two patches, one for all filesystem
> > commands and another for all data commands once I finished all of them
> > but now it looks like it will be a pain to review multiple commands in
> > the same patch, so I will send a review request for each command
> > separately, apologies for the delay :)
> > 
> > [1] -
> > https://docs.google.com/document/d/16MrsQKx7YjfzgPb41r2j8_lSQhZqq2UsEXXpcK
> > yh 26s/edit
> > 
> > [2] - http://techbase.kde.org/Development/Tutorials/Unittests
> > _______________________________________________
> > 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/

-- 
Daniel Vrátil | dvratil at redhat.com | dvratil on #kde-devel, #kontact, #akonadi
KDE Desktop Team
Associate Software Engineer, Red Hat

GPG Key: 0xC59D614F6F4AE348
Fingerprint: 4EC1 86E3 C54E 0B39 5FDD B5FB C59D 614F 6F4A E348
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20140616/8712f92d/attachment.sig>
-------------- next part --------------
_______________________________________________
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