Symbian
Symbian OS Library

SYMBIAN OS V9.2

[Index] [Spacer] [Previous] [Next]



Configuring the TestDriverV2


Installing the TestDriver

Complete the following steps to install TestDriverV2 on your system:

  1. Navigate to the folder \epoc32\EngineeringTools\. Look for engtools.exe application.

  2. Click on the wizard icon, this starts the Symbian Engineering Tools installer. Read the instructions thoroughly.

  3. Click Next to proceed with the installation. This opens Choose Components dialog.

    Choosing TestDriver and WinTap.

    Choosing TestDriver and WinTap.

  4. Select Custom Components, check 'TestDriver' and 'WinTap' from the list. By default, all the tools in the list will be installed.

  5. Click Next to move to Choose Install Location dialog.

  6. 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.

  7. Click Next. Select the start up menu folder.

  8. Click Next to move to TestDriver Configuration dialog.

  9. Provide the configuration details such as EPOC drive, root directory for XML structure, repository, results and source code. Select ON to enable the Platsec.

    Configuring the TestDriver.

    Configuring the TestDriver.

  10. Click Next to move to WinTAP Configuration dialog.

    Wintap configuration

    Wintap configuration

  11. Retain the default network connection and IP addresses for Windows and the Emulator.

  12. Select the location to copy the epoc32 folder.

  13. Check 'Install TAP-Win32' and 'Install WinTAP' boxes to install the WinTap on the Device and on the PC.

  14. 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.

[Top]


Configuring the TestDriver

Configuring the TestDriver using the config command involves setting up your environment and defining the following information:

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.

Setting the epoc drive

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:\.

Setting the root path to XML structure

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.

Setting the root path to repository

To set the root path to the repository:

> testdriver config --repos <path>

For example:

> testdriver config --repos d:\repos

Setting the root path to test results

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.

Setting the root path to source code

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.

[Top]


Configuring logging information

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:


Logging levels

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:

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.


Logging handlers

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.

Example for handlers

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.


Output Formatters

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.

[Top]


See also