Review Request: Add unit tests for account and contact resources in t-i-d

Dario Freddi drf54321 at gmail.com
Tue Apr 6 00:53:05 CEST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3496/
-----------------------------------------------------------

Review request for telepathy and George Goldberg.


Summary
-------

This patch adds a base unit test, providing usual facilities to build unit tests for tp-kde (at the current stage), and 2 quite full-fledged unit tests to test out both the account resource and the contact resource(s). These unit tests will succeed only if my previous patch to t-i-d is applied.

To build the unit tests, you need to install tp-qt4 from my private branch ( http://git.collabora.co.uk/?p=user/drf/telepathy-qt4.git;a=summary ), branch cmake-install-tests. This will install the needed bits to make the whole thing compile.

A notable change: I added a static library to t-i-d to avoid compiling the same code a lot of time.

This patch, as it is, it's not yet ready for inclusion, but it's here so that you can see my work on unit tests and give out feedback. We will need a joined discussion with tp-qt4 guys to see where everything under tp-kde-tests belongs.

P.S.: Please note that these tests are very complex underneath - they rely on a custom spawned dbus daemon, a fake account manager, and a virtuoso sandbox. Hence, they take at least 5-6 seconds each to run (the contact test actually might take more than 15 seconds as it tests out a lot of stuff). For this reason, they are not meant to be launched as a standalone executable - you are definitely asking for trouble if you do, as your telepathy might not be sandboxed. Instead, you have to run these tests issuing "make test", which will launch the whole CTest suite as it is meant to be run.


Diffs
-----

  /trunk/playground/network/telepathy-integration-daemon/CMakeLists.txt 1111532 
  /trunk/playground/network/telepathy-integration-daemon/cmake/modules/FindTelepathyQt4TestLib.cmake PRE-CREATION 
  /trunk/playground/network/telepathy-integration-daemon/telepathyaccount.cpp 1111532 
  /trunk/playground/network/telepathy-integration-daemon/tests/CMakeLists.txt PRE-CREATION 
  /trunk/playground/network/telepathy-integration-daemon/tests/account-test.h PRE-CREATION 
  /trunk/playground/network/telepathy-integration-daemon/tests/account-test.cpp PRE-CREATION 
  /trunk/playground/network/telepathy-integration-daemon/tests/contact-test.h PRE-CREATION 
  /trunk/playground/network/telepathy-integration-daemon/tests/contact-test.cpp PRE-CREATION 
  /trunk/playground/network/telepathy-integration-daemon/tests/telepathy-base-test.h PRE-CREATION 
  /trunk/playground/network/telepathy-integration-daemon/tests/telepathy-base-test.cpp PRE-CREATION 

Diff: http://reviewboard.kde.org/r/3496/diff


Testing
-------

They compile, and all tests pass, if all of the conditions explained in "Description" are met. Isn't this question awkward related to the subject, by the way?


Thanks,

Dario



More information about the KDE-Telepathy mailing list