CNTMODEL test code
History:
3 May 2005 - Special Requirements section updated.

Background:

CntmodelTest.iby can be found at //EPOC/main/generic/app-engines/cntmodel/group

Test executable file locations

WINS location	Hardware location	
\epoc32\release\wins\udeb\
or
\epoc32\release\wins\urel\	c:\ or z:\	

Automatic test executables - should be run before every release
Success: Test program exits cleanly 
Failure: Test program stops with an error message.
List is out of date – refer to the bld.inf file to identify ‘automatic’ unit tests.

Filename	Purpose	
T_BENCH.EXE	Benchmark test for typical database operations	
T_CARDTM.EXE	Card template	
T_CONNEC.EXE	Connectivity requirements	
T_DBASE.EXE	Basic database operations: Create a new database, deletes existing databases, sets the database drive setting, adds, edits text fields and moves fields	
T_DBASE2.EXE	Sorting, searching and matching	
T_ERROR.EXE	OOM tests, file server failure tests	
T_EXPDEL.EXE	Synchronisation tests. Increments/decrements access counts	
T_FERROR.EXE	File error tests	
T_FIELD.EXE	Test fields, field set, id array, labels, attributes, multiple cards, multiple fields, fields id’s and does a store/restore test	
T_FILTEREDVIEW.EXE	Filtered view 	
T_GROUPS.EXE	Group support	
T_GROUPVIEW.EXE	Group view	
T_IMPORT.EXE	vCard import (strictly not a test - useful for debugging)	
T_ITEM.EXE	Adds basic cards, adds text fields to cards, checks field contents, edits text fields and moves fields	
T_MULTS.EXE	Multi-client access test	
T_NOMACH.EXE	Phone number matching	
T_OWNCAR.EXE	Own card support	
T_PROFILE.EXE	Asynchronous sorting testcode	
T_SIZE.EXE	Testcode to monitor file size growth for worst case database operations	
T_TEMPL.EXE	System template	
T_TIME.EXE	Various profiling of read/add/delete contacts and vCard import/export	
T_TTVERS.EXE	Imports, exports and updates via vCard	
T_VERS.EXE	Imports a card and displays the field label, field contents and UID store type	
T_VIEW.EXE	CcontactItemViewDef	
T_VIEW2.EXE	Tests core view architecture code	
Testexecute z:\testdata\scripts\CntModel_Import.script	1.	A VCard with REV property in UTC format is imported to a Contact database using the CntModelConverter.
2.	A VCard with no REV property is imported to a Contact database using the CntModelConverter
3.	Import VCard with REV property set to local
4.	Import VCard with REV property set to local, but no TZ property set.
5.	Import VCard with BDAY property in local date/time format	
Testexecute z:\testdata\scripts\CntModel_Export.script	1.	Export to VCard with REV in UTC format
2.	Export to VCard with BDAY property in local date/time format	

Special Requirements 

1. Building tests

Before building the tests you must build (abld test build) the app-services/CoreAppsTest component. This test component as a server that can perform requested actions, such as copy or delete of files, on behalf of a test harness – where the test harness only has the required security capabilities documented for the component APIs.

2. Tests that need special requirements

Unit tests T_Error and T_Sec_CntDbase – need a writeable drive, (e.g. D or F), to be set up for the emulator, or present on hardware. The test code automatically tries to find the first available drive.

Manual tests T_Dbase and T_Ferror – need a writeable drive D: to be set up for the emulator, or present on hardware.

To set up D or F drive on the emulator:
1.	check if we have got “epoc.ini” in directory epoc32\data. If not, create one.
2.	Create directories for the drives to map to, e.g. \epoc32\winscw\d or \epoc32\winscw\f.
3.	Make sure a line like this is present in the epoc.ini file;
_EPOC_DRIVE_D \epoc32\winscw\d

All T_Icc* tests exercise the interface for the Phonebook Synchroniser, to read the phonebook entries from an ICC (Integrated Circuit Card, e.g. a GSM SIM card or a WCDMA USIM card). The tests need to use the test components:cnttestsync.dll and cntsyncchecker.dll. From Symbian OS 9.0 the DLL search mechanism has changed, and for these tests to run you must remove Telephony component’s Phonebook Synchroniser:at least phbksyncplugin.dll, and possibly also phbksyncsvr.dll & phbksyncsvrexe.exe.
 	
Test rom building

To be able to run all contacts model test programs, we have to type the following on command line at epoc32\rom,

tools\buildrom assabet engbuild \<directory path>\CntmodelTest.iby