Apogee Home

First synchronization tests


1. The test client

1.1. Client architecture

As a Funambol client has to implement a Synchronization source similar to the one the connector, most of the connector code has been duplicated and adapted to create the client. As the connector, the client need a JCR handler to get a reference to the repository. A local handler handler is contained in the org.nuxeo.sync.jcr.extensions project in order to access a client repository.

Figure 1. 

1.2. Building the client

In order to run the client, you have to use Eclipse. However the ant file will soon have a run target to execute the client test. To import the project in eclipse follow these steps:

  1. Select File > Import menu

  2. Choose Existing projects into workspace

  3. Browse to the directory containing the Client sources

  4. Select the org.nuxeo.sync.jcr.client project and click on Finish

Before to launch the client, you will have to build and deliver the LocalHandler using the build ant target of the build/build.xml file. Don't forget to rerun this target after each change in the LocalHandler: otherwise nothing will change during your test. In order for the build to work, the org.nuxeo.sync.jcr.extensions project has be in the same directory than org.nuxeo.sync.jcr.client.

The current client is used for synchronization testing and creates its own repository, but its code and architecture can be reused for any other client and moreover for Apogée.

2. The tests tools

This section will briefly present the different test tools used to check if connector is working. The org.nuxeo.sync.jcr.tests project contains the unit tests for the connector and some useful ant targets.

2.1. The test project

In order to run the JUnit tests, you can use the Eclipse JUnit launcher or the ant build file. The tests target needs a variable to be set as ant argument:

  1. -Dfunambol.home=/path/to/funambol/bundle

This target generates an HTML report (output/junit-noframes.html) and thus you have to add the junit.jar and xalan.jar files in the ant classpath or copy them into the ant library directory.

2.2. The test repository creation

This project even provides an ant target to create a new test repository for the JCR server. This target is named repository and needs the following ant argument set in order to know where to create the repository:

  1. -Djcrserver.home=/path/to/the/jcrserver/home

This works for the Tomcat server and will certainly be changed in order to be reusable for other servers.

This site is powered by CPS, which includes CPSSkins. CPS and its design are Copyright © 2002-2006 Nuxeo SAS. CPSSkins is Copyright © 2003-2006 Jean-Marc Orliaguet.
vPOWEREDBYCPS2.png
valid_xhtml.png
valid_css.png