TestEvolution Class Reference

Inheritance diagram for TestEvolution:

Inheritance graph
[legend]
Collaboration diagram for TestEvolution:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 TestEvolution (const string &id)
virtual LocalTestscreateLocalTests (const std::string &name, int sourceParam, ClientTest::Config &co)
virtual int getNumSources ()
virtual void getSourceConfig (int source, Config &config)
virtual ClientTestgetClientB ()
virtual bool isB64Enabled ()
virtual int sync (const int *sources, SyncMode syncMode, const CheckSyncReport &checkReport, long maxMsgSize=0, long maxObjSize=0, bool loSupport=false, const char *encoding=NULL)

Static Public Member Functions

static void getSourceConfig (const RegisterSyncSourceTest *test, Config &config)
static bool compare (ClientTest &client, const char *fileA, const char *fileB)


Detailed Description

This code uses the ClientTest and and information provided by the backends in their RegisterSyncSourceTest instances to test real synchronization with a server.

Configuration is done by environment variables which indicate which part below the root node "client-test" of the the configuration tree to use; beyond that everything needed for synchronization is read from the configuration tree.

The CLIENT_TEST_SERVER also has another meaning: it is used as hint by the synccompare.pl script and causes it to automatically ignore known, acceptable data modifications caused by sending an item to a server and back again. Currently the script recognizes "funambol", "scheduleworld", "synthesis" and "egroupware" as special server names.

Definition at line 204 of file client-test-app.cpp.


Constructor & Destructor Documentation

TestEvolution::TestEvolution ( const string &  id  )  [inline]


Member Function Documentation

static bool TestEvolution::compare ( ClientTest client,
const char *  fileA,
const char *  fileB 
) [inline, static]

utility function for comparing vCard and iCal files with the external synccompare.pl Perl script

Reimplemented from ClientTest.

Definition at line 382 of file client-test-app.cpp.

Referenced by getSourceConfig().

virtual LocalTests* TestEvolution::createLocalTests ( const std::string &  name,
int  sourceParam,
ClientTest::Config co 
) [inline, virtual]

Creates an instance of LocalTests (default implementation) or a class derived from it. LocalTests provides tests which cover the SyncSource interface and can be executed without a SyncML server. It also contains utility functions for working with SyncSources.

A ClientTest implementation can, but doesn't have to extend these tests by instantiating a derived class here.

Reimplemented from ClientTest.

Definition at line 289 of file client-test-app.cpp.

virtual ClientTest* TestEvolution::getClientB (  )  [inline, virtual]

The instance to use as second client. Returning NULL disables all checks which require a second client. The returned pointer must remain valid throughout the life time of the tests.

The second client must be configured to access the same server and have data sources which match the ones from the primary client.

Implements ClientTest.

Definition at line 312 of file client-test-app.cpp.

virtual int TestEvolution::getNumSources (  )  [inline, virtual]

Data sources are enumbered from 0 to n-1 for the purpose of testing. This call returns n.

Implements ClientTest.

Definition at line 293 of file client-test-app.cpp.

static void TestEvolution::getSourceConfig ( const RegisterSyncSourceTest test,
Config config 
) [inline, static]

virtual void TestEvolution::getSourceConfig ( int  source,
Config config 
) [inline, virtual]

Called to fill the given test source config with information about a sync source identified by its index. It's okay to only fill in the available pieces of information and set everything else to zero.

Implements ClientTest.

Definition at line 297 of file client-test-app.cpp.

Referenced by TestEvolution().

virtual bool TestEvolution::isB64Enabled (  )  [inline, virtual]

Returning true enables tests which only work if the server is a Funambol server which supports the "b64" encoding of items on the transport level.

Implements ClientTest.

Definition at line 316 of file client-test-app.cpp.

virtual int TestEvolution::sync ( const int *  activeSources,
SyncMode  syncMode,
const CheckSyncReport checkReport,
long  maxMsgSize = 0,
long  maxObjSize = 0,
bool  loSupport = false,
const char *  encoding = NULL 
) [inline, virtual]

Execute a synchronization with the selected sync sources and the selected synchronization options. The log file in LOG has been set up already for the synchronization run and should not be changed by the client.

Parameters:
activeSources a -1 terminated array of sync source indices
syncMode the synchronization mode to be used
checkReport has to be called after a successful or unsuccessful sync, will dump the report and (optionally) check the result; beware, the later may throw exceptions inside CPPUNIT macros
maxMsgSize >0: enable the maximum message size, else disable it
maxObjSize same as maxMsgSize for maximum object size
loSupport if true, then the sync is expected to enable Large Object support
encoding if non-empty, then let client library transform all items into this format (guaranteed to be not NULL)
Returns:
return code of SyncClient::sync()

Implements ClientTest.

Definition at line 320 of file client-test-app.cpp.

References CheckSyncReport::check(), runtests::client, ClientTest::ClientTest(), and EvolutionSyncClient::prepare().


The documentation for this class was generated from the following file:

Generated on Sat Oct 18 17:17:06 2008 for SyncEvolution and Funambol by  doxygen 1.5.7.1