KDE PIM/Akonadi/Testing: Difference between revisions

From KDE TechBase
(Added Category:PIM)
(Formatting.)
Line 5: Line 5:
Igor's GSoC project, found in kdepimlibs/akonadi/tests/testrunner.
Igor's GSoC project, found in kdepimlibs/akonadi/tests/testrunner.


Documentation copied from kde-pim ML:
Documentation based on Igor's mail to kde-pim ML:
<pre>
First you need create a configuration file in KStandDirs config resource type(try to use:kde4-config --path config , to find the path in my case the path is /usr/share/kde4/config) , the configuration file is a xml and look like:
First you need create a configuration file in KStandDirs config resource type(try to use:kde4-config --path config , to find the path in my case the path is /usr/share/kde4/config) , the configuration file is a xml and look like:


<config> -- xml root
<pre>
<kdehome>/home/igor/kde/installs/trunk </kdehome> --path to your kde home in my case is /home/igor/kde/installs/trunk
<config>
<confighome> /home/igor/codes/kde/tests/test_akonadi/</confighome> --path to akonadi configuration, in my case /home/igor/codes/kde/tests/test_akonadi/
  <!--  path to your KDE installation prefix -->
<datahome>/home/igor/codes/kde/tests/test_akonadi/data</datahome> --path to akonadi data
  <kdehome>/home/igor/kde/installs/trunk </kdehome>
<resource>akonadi_ical_resource</resource> -- load the
  <!-- path to Akonadi configuration, ie. the stuff that
akonadi ical resource
      usually goes into ~/.config/akonadi/ -->
<resource>akonadi_vcard_resource</resource> --load the akonadi vcard
  <confighome>/home/igor/codes/kde/tests/test_akonadi/</confighome>
resource
  <!-- path to Akonadi data, ie. the stuff that usually
<item location="/path/to/file.vcf" collection="akonadi_vcard_resource_0"/> --load the file.vcf item to akonadi_vcard_resource_0 collection
      goes into ~/.local/share/akonadi/ -->
</config> --finish configuration
  <datahome>/home/igor/codes/kde/tests/test_akonadi/data</datahome>
  <!-- load resources of the specified types -->
  <resource>akonadi_ical_resource</resource>
  <resource>akonadi_vcard_resource</resource>
  <!-- load items from the specified file into the specified
      target collection -->
  <item location="/path/to/file.vcf"
        collection="akonadi_vcard_resource_0"/>
</config>
</pre>


After that you only needs to run the testrunner:
After that you only needs to run the testrunner:


%./akonaditest
'''%./akonaditest'''


and it creates a shellscript file in your current directory called testenvironment.sh and you just need to run it.
and it creates a shell script file in your current directory called '''testenvironment.sh''' and you just need to run it.


%source testenvironment.sh
'''%source testenvironment.sh'''


And right now you have a self contained Akonadi server. :>
And right now you have a self contained Akonadi server.
If you have any kind of problem, send me a mail.
</pre>


== KNUT Test Data Resource ==
== KNUT Test Data Resource ==

Revision as of 18:37, 2 January 2009

Akonadi Test and Benchmark Infrastructure

Akonadi Testrunner

Igor's GSoC project, found in kdepimlibs/akonadi/tests/testrunner.

Documentation based on Igor's mail to kde-pim ML: First you need create a configuration file in KStandDirs config resource type(try to use:kde4-config --path config , to find the path in my case the path is /usr/share/kde4/config) , the configuration file is a xml and look like:

<config>
  <!--  path to your KDE installation prefix -->
  <kdehome>/home/igor/kde/installs/trunk </kdehome>
  <!-- path to Akonadi configuration, ie. the stuff that
       usually goes into ~/.config/akonadi/ -->
  <confighome>/home/igor/codes/kde/tests/test_akonadi/</confighome>
  <!-- path to Akonadi data, ie. the stuff that usually
       goes into ~/.local/share/akonadi/ -->
  <datahome>/home/igor/codes/kde/tests/test_akonadi/data</datahome>
  <!-- load resources of the specified types -->
  <resource>akonadi_ical_resource</resource>
  <resource>akonadi_vcard_resource</resource>
  <!-- load items from the specified file into the specified
       target collection -->
  <item location="/path/to/file.vcf"
        collection="akonadi_vcard_resource_0"/>
</config>

After that you only needs to run the testrunner:

%./akonaditest

and it creates a shell script file in your current directory called testenvironment.sh and you just need to run it.

%source testenvironment.sh

And right now you have a self contained Akonadi server.

KNUT Test Data Resource

In kdepim/akonadi/resources, fully featured resource that operates on a single XML file. File format is decribed in knut.xsd and follows closely the internal structure of Akonadi. New files can be created in eg. Akonadiconsole by creating a resource and specifying a non-existing file.

Akonadi Scriptable Resource

Second part of Igor's GSoC project, currently in playground/pim/akonaditest.

TODO

Akonadi Benchmarker

In kdepimlibs/akonadi/test, part of Robert's thesis.

TODO

Unittests

Akonadi Server

Usable without installation, run with ctest/make test as usual.

kdepimlbs/akonadi

Better coverage than the above, but require special test data from kdesupport/akonadi/server/src/storage to be applied before every run (destroys all existing data, so be careful). Needs porting to the Akonadi Testrunner.

kdepim/akonadi

Are there any? TODO