\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}
\part{How to write a SyncML test case}
The SyncML package contains a testing script to replay prerecorded test sessions. This allows the developers to check if changes break things for one particular phone. So it would be great to have test cases for as many phones as possible.

Each test case should be for one database (like calendar or addressbook, but not both). The exception is for phones that handle tasks and calendar in one database like the P900 does. Here you should create test entries for tasks and calendar at the same time to see if it works properly.

Here's how to create a test case:

\begin{itemize}
\item Preparations in Horde:
\begin{itemize}
\item create a user "syncmltest" with password "syncmltest" in horde. If the user's already there first delete and then recreate to get a fresh start.


\item create at least one test entry in the app you want to test (kronolith|nag|mnemo|turba). The entry should be named like "server\#\#" (e.g. server1) and the description should contain an umlaut for charset testing. If you're creating a test case for the calendar, you should create at least two: one with an all day event and one with a normal (like 2hour) event. Generally the entries should make use of as many features (alarms, due dates, ...) as possible.


\end{itemize}

\item Preparations in the Client (PDA/Outlook/whatever)
\begin{itemize}
\item Create at least one test entry named "client\#\#". The database must only contain this single entry (so you might need to do a backup of your phone first). Other than that the same information as for the test entries in horde above apply (umlauts, all day events).


\end{itemize}

\item Clean /tmp/sync: \texttt{rm/tmp/sync/}


\item Clean Horde SyncML Data. Login as user syncmltest and go to \texttt{http:[yourinstall](yourinstall)/horde/services/portal/syncml.php}. Use the button "Delete all SyncML Data" to delete all data for the syncmltest user.


\item Do a first sync run


\item In Horde: rename all the "client..." entries to "client...s" ("s" to identify a client entry edited in the server). Create a new simple entry like "server99"


\item In the client: rename all the "server..." entries to "server...c". Create a new simple entry named "client99"


\item Do second sync run


\item Do a third sync run. This should do nothing


\item In the client, delete server99


\item in the server, delete client99


\item do a fourth sync run


\item do a fifth sync run. This should do nothing.


\item The test itself is now finished. Create an archive of all the stuff in /tmp/sync and mail it to karsten --at-- horde.org to verify the testcase and afterwards add it to cvs.


\end{itemize}
For developers:

\begin{itemize}
\item If the phone uses wbxml this must be converted to xml first: \texttt{for a in *.wbxml; do wbxml2xml -m 0 -o `basename \$a .wbxml`.xml \$a; done }
\begin{itemize}
\item Or for better readability: \texttt{for a in *.wbxml; do wbxml2xml -m 0 -o - \$a | tidy -xml -indent > `basename \$a .wbxml`.xml; done}


\end{itemize}

\item References to the installation that created the test case should be removed: data like <a href="http://horeinstall.com/horde/rpc.php">http://horeinstall.com/horde/rpc.php</a> should be renamed to <a href="http://example.com/rpc.php">http://example.com/rpc.php</a>


\item All *.xml go into a directory under framework/syncml/tests with name testcase\_<a href="https://wiki.horde.org/descriptionoftestcase">descriptionoftestcase</a>


\item In framework/syncml/tests do a \texttt{./testsync.php --dir=testcase\_[descriptionoftestcase](descriptionoftestcase)} to run the test.


\end{itemize}
\end{document}
