Download syncml-david buchmann
Transcript
3.3. HOW TO RUN THE SIMPLE TEST 27 Figure 12: Exception hierarchy used in the answer, otherwise an internal failure is reported. Some of the sync engine exceptions can be used to give precise internal failure codes (i.e. store failure). 3.3 How to run the simple test The CD contains the complete sync4j code. A simple test synchronization can be run using the test client sync4j.tests.protocol.handler.ClientHandlerTest and the server running inside any servlet container. For convenience, a ready to run Apache Tomcat is on the CD to. It is important to copy the SyncML/Apache Tomcat 4.0/ directory as well as the whole SyncML/sync4j/ directory to a writable disk, as server and client need to write files. 3.3.1 Server The server is started with the batch file startup.bat on Windows, startup.sh under Unix/Linux14 . The scripts are located in Tomcat’s bin directory. The resulting files are stored in webapps/syncml/WEB-INF/stores/ . To view the messages exchanged in this session, take a look at the log files in the subdirectory logs of the stores folder. 3.3.2 Client When the server is running, the client can be run using testClient.bat respectively testClient.sh in the src/tests/ directory. The store files are in the same directory. The other batch files call JUnit test cases running without the server. 14 If the shell script is not executable after copying from CD, use chmod u+x startup.sh.