|
|
|
|
Complete the following steps to install TestDriverV2 on your system:
Navigate to the folder \epoc32\EngineeringTools\. Look
for engtools.exe application.
Click on the wizard icon, this starts the Symbian Engineering Tools installer. Read the instructions thoroughly.
Click Next to proceed with the installation. This opens Choose Components dialog.
Select Custom Components, check 'TestDriver' and 'WinTap' from the list. By default, all the tools in the list will be installed.
Click Next to move to Choose Install Location dialog.
Click Next, this will install the Symbian Engineering Tools in
c:\apps\engtools. Browse to a different location to install in a
folder of your choice.
Click Next. Select the start up menu folder.
Click Next to move to TestDriver Configuration dialog.
Provide the configuration details such as EPOC drive, root directory for XML structure, repository, results and source code. Select ON to enable the Platsec.
Click Next to move to WinTAP Configuration dialog.
Retain the default network connection and IP addresses for Windows and the Emulator.
Select the location to copy the epoc32 folder.
Check 'Install TAP-Win32' and 'Install WinTAP' boxes to install the WinTap on the Device and on the PC.
Click Install.
The above steps install the TestDriver and the WinTap. WinTap is installed to get the network access to the emulator. TestManager is the graphical interface to the TestDriver to install this, select TestManager in step 4 along with TestDriver and WinTap.
Configuring the TestDriver using the config command
involves setting up your environment and defining the following information:
The EPOC drive, that is the drive where the EPOC32 tree has been installed.
The XML root, that is the root path to your XML tree that defines your test hierarchy.
The repository location, that is the root path where all binaries and related test files are stored.
The result location, that is the root path where the test logs are stored.
The source root location,that is the root path where the source code is stored.
You can view or modify these settings using appropriate option of
config command.
To display the current configurations use the command:
> testdriver config
Following settings are made to configure the TestDriver using
config command.
To set the EPOC drive, use the command:
> testdriver config -e <path to EPOC drive>
For example, testdriver config -e h:\ sets the EPOC drive
to h:\.
To set the root path to your XML structure, use the command:
> testdriver config -x <path to XML root>
For example, testdriver config -x
h:\development\personal\CompVisitor\XML sets the root path to the XML
structure.
To set the root path to the repository:
> testdriver config --repos <path>
For example:
> testdriver config --repos d:\repos
To set the root path to the test results, use the following command:
> testdriver config -c <path to result location>
This is used to set the root path for the test results and test logs.
To set the root path to the source code, use the following command:
> testdriver config --source <path to source>
TestDriver allows you to set more than one option using the
config command. For example, all the above settings can be done in
a single command line:
testdriver config -e h:\ --repos d:\repos -c d:\results --source p:\group\testsrc -x
h:\dev\personal\CompVisitor\XML
Once you have configured the above settings correctly, you can start using the TestDriver. For more options, see config.
TestDriver uses the logging.properties file to configure
the logging information where you can set the default values for logging
levels, handlers and formatters for a log message.
An example for thelogging.properties file would be:
# Specify the handlers to create in the root logger
# (all loggers are children of the root logger)
# Create two handlers
handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
# Set the default logging level for the root logger
.level = ALL
# Set the default logging level for new ConsoleHandler instances
java.util.logging.ConsoleHandler.level = INFO
# Set the default logging level for new FileHandler instances
java.util.logging.FileHandler.level = ALL
# Set the default formatter for new ConsoleHandler instances
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
# Set the default logging level for the logger named com.symbian
com.symbian.level = ALL
Configuring the logging information involves setting up the following
in the logging.properties file:
A logging level can be used to control the logging output. A log
message can be differentiated by it's level that can be configured by editing
the line containing .LEVEL = INFO in the
logging.properties file.
The supported logging levels in descending order are:
SEVERE (highest value)
WARNING
INFO
FINE
FINER
FINEST (lowest value)
Enabling logging at a given level also enables logging at all higher
levels. For example, when you set .LEVEL = INFO for a message,
logging at SEVERE and WARNING levels is also enabled.
Handlers allow you to output logs to different locations such as a console, a file, a stream, memory or a TCP socket on a remote host. Multiple handlers are used to output to each of these locations (for example, print all log messages to a file or to the console). Handlers include standard Java Handlers, including FileHandler, ConsoleHandler, MemoryHandler, StreamHandler and SocketHandler. However, Symbian also provides two custom handlers EmailHandler and NetSendHandler that allow you to output logging messages to an email address and NetSend location respectively.
You can configure the log message to a handler using the
logging.properties file:
handlername.handlerproperties = propertiesvalue
For example:
java.util.logging.FileHandler.pattern = TestDriver%g_%u.log
This sets up the FileHandler to use the pattern
TestDriver&g_%u.log while naming the log files.
In the following example:
com.symbian.et.utils.log.EmailHandler
com.symbian.et.utils.log.NetSendHandler
The EmailHandler allows you to email the log messages to
an email client and the NetSendHandlerallows you to net-send the
log messages.
Example of the possible properties configurations for these handlers are as follows:
com.symbian.et.utils.log.NetSendHandler.numbererrors = 10
This sets the maximum number of errors that can occur before sending an email.
com.symbian.et.utils.log.NetSendHandler.sendlevel = WARNING
This sets the meaning of the error.
com.symbian.et.utils.log.NetSendHandler.ip = 102.125.0.2
This sets the IP address to send the net-send message.
com.symbian.et.utils.log.EmailHandler.numbererrors = 5
This sets the maximum number of errors that can occur before sending an email.
com.symbian.et.utils.log.EmailHandler.sendlevel = WARNING
This sets the meaning of the error.
com.symbian.et.utils.log.EmailHandler.fromaddress = a.b@c.com
The address from where the log messages have to be sent.
com.symbian.et.utils.log.EmailHandler.toaddress = a.b@c.com
The address to send the log messages.
com.symbian.et.utils.log.EmailHandler.server = a.smtp@b.com
The SMTP server to send the log messages.
Log messages can be sent to locations stated in the
Logging Handlers section, as either
simple text or as XML. Output formatters allow you to organise your output.
Java includes the standard formatters, SimpleFormatter and
XMLFormatter. Additionally, Symbian provides
com.symbian.et.utils.log.SimpleFormatter, a simpler formatter to
format your output.
More information on configuring the properties file to set the logging levels, handlers and formatters can be found in Configuring the logging properties and Logging messages.