This section describes how to create a TEF Block class to an existing
project.
In most cases, a TEF Block class is used to test classes in the current
project. The current project is also called the hosting project. Besides the
TEF Block class, other files such as .ini
and .script
files are generated as well. These files are saved separately in a
test
folder.
-
In the project perspective of Carbide, right click the project to
test, go to Index > Rebuild. Make sure there is no
error after rebuild. This step ensures the Class Creation Wizard can find all
of the classes in this project to test.
-
Click File > New > New
Symbian OS C++ Class to launch the Class Creation Wizard.
-
Select the project where the TEF Block classes will be created and
click Next.
-
Select TEF Block Test Class to create a TEF Block
class and click Next.
-
Select the source project to test. By default, From Hosting
Project is selected.
Enter the Target Name at the bottom, for example
Testmsgdebugger. The target name is used for the names of the
files to be created for example Testmsgdebugger.driver
.
If From Hosting Project is selected, the current
project will be tested.
If From Header Files in \epoc32\include is selected,
you can click the Add button to add header files of other
projects. In this case, the current project is not the project to test, but
only hosts the TEF Block.
-
Click Next to select the classes or methods to test.
Click Next.
If From Hosting Project was selected in the previous step, all of
the classes in the hosting project are listed here.
-
If necessary, change the directories for the files generated by the
wizard and click Next. By default, the generated files are saved
under the test folder.
-
Set the project properties in the Other Settings dialog box. Click
Finish.
The UID, Author name and Copyright fields can be set as follows:
Note: For detailed information on every field, please
refer to Carbide Help > Carbide C++ User Guide > Create Projects.
-
A set of files for TEF Block are generated as follows:
Generated files for TEF Block are saved under the default
test
directory. Other files and directories of the existing
project remain unchanged.
Note: The name of the wrapper class and the name and
contents of the controller and server files can be customised. For information
about customising the name and contents, refer to
SVS Test Suites Preference.