Symbian3/PDK/Source/GUID-6C1CE0B7-4DA5-5F33-BCA5-6E74B645DA31.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 11:56:28 +0100
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
permissions -rw-r--r--
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-6C1CE0B7-4DA5-5F33-BCA5-6E74B645DA31"><title>Graphics Screen Driver Test Suite </title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This topic describes the Screen Driver Graphics test suite and explains how to set up the test environment. </p> <section><title>Test approach</title> <p>The purpose of the test suite is to test specific functionality of the display, such as the display mode and display orientation. The tests are automated and do not require user intervention. </p> </section> <section><title>Automated test cases</title> <p>The following is the basic test structure: </p> <ul><li id="GUID-0B6D2BF3-DAF1-515A-AEAC-05F76066F9E0"><p> <codeph> NewScreenDeviceL() </codeph>  </p> </li> <li id="GUID-6F11ED78-9B77-5CEF-A58F-7C2704B1B042"><p> <codeph> InitScreen() </codeph>  </p> </li> <li id="GUID-325CFEC3-6D23-5289-93B5-42FA2C94D4C6"><p> <codeph> SetDisplayMode()</codeph>  </p> </li> <li id="GUID-894486B9-9256-570F-943D-7BC704EC36E3"><p> <codeph> SetAutoUpdate()</codeph>  </p> </li> <li id="GUID-B309F906-D388-5AB0-863E-76F0C2538B4E"><p> <codeph>OrientationsAvailable()</codeph>  </p> </li> <li id="GUID-62F4F67D-0068-5664-A675-65BEB80F7DAA"><p> <codeph>SetOrientation()</codeph>  </p> </li> <li id="GUID-7E0DEA61-2D54-5A93-800A-C861AFC87A9C"><p> <codeph>
                WriteLine()</codeph> /<codeph>WriteRGB()</codeph> /<codeph>WriteRGBAlphaLine()</codeph> /<codeph>ReadLine()</codeph> </p> </li> <li id="GUID-26F46193-1C71-5CA6-AC0F-692254428892"><p>Destructor </p> </li> </ul> <p> <b>Display Modes used</b>: <codeph>EColor16MA</codeph>, <codeph>EColor64K</codeph> and <codeph>EColor16MU</codeph> (in different hardware devices, using different display modes). </p> <p> <b>Orientation Modes used</b>: <codeph>EOrientationNormal</codeph>  </p> <p> <b>Draw Modes used</b>: <codeph>EDrawModePEN</codeph>, <codeph>EDrawModeNOTPEN</codeph>, <codeph>EDrawModeAND</codeph>, <codeph>EDrawModeOR</codeph>, <codeph>EDrawModeNOTSCREEN</codeph> and <codeph>EDrawModeXOR</codeph>. </p> </section> <section><title>Coverage</title> <p>Screen Driver test cases cover basic functionality for graphics display. </p> <p>The following APIs are covered in the header file resolution: </p> <table id="GUID-C7169FA5-7296-52EB-84C0-D7568E7FF0BD"><tgroup cols="3"><colspec colname="col0"/><colspec colname="col1"/><colspec colname="col2"/><thead><row><entry>Header name </entry> <entry>API name </entry> <entry>Description</entry> </row> </thead> <tbody><row><entry><p> <codeph>gdi.h</codeph>  </p> </entry> <entry><p> <codeph>CGraphicsContex</codeph> t </p> </entry> <entry><p>Draw mode </p> </entry> </row> <row><entry><p> <codeph>displaymode.h</codeph>  </p> </entry> <entry><p> <codeph>TDisplayMode</codeph>  </p> </entry> <entry><p>Display mode </p> </entry> </row> <row><entry><p> <codeph>bitdraw.h</codeph>  </p> </entry> <entry><p> <codeph>CFbsDrawDevice</codeph>  </p> </entry> <entry><p>Display and orientation mode </p> </entry> </row> </tbody> </tgroup> </table> </section> <section id="GUID-F57ABCAD-2AA5-5F28-BCCF-FAFF580D058B"><title>Test suite details</title> <p><b>Test script source tree location </b> </p> <p>Descriptions of the test cases in this test suite can be found in the following location: </p> <p> <filepath>...\graphics\graphicsapitest\screendriverhaitest\screendriver\scripts\graphics-screendriver-cfbsdrawdevice-automated.script</filepath> </p> <p><b>Test script build location </b> </p> <p>When the tests are built, the scripts are built in the following location: </p> <p> <filepath>...\epoc32\data\z\graphics\graphics-screendriver-cfbsdrawdevice-automated.script</filepath> </p> <p><b>Test script hardware path location </b> </p> <p>Descriptions of the test cases in this test suite can be found in the following location: </p> <p> <filepath>z:/graphics/graphics-screendriver-cfbsdrawdevice-automated.script</filepath> </p> <p><b>Test data source tree location </b> </p> <p>Descriptions for the test data files are located in the following locations: </p> <ul><li id="GUID-E66292BE-3BFA-5711-A71C-2F60CE4C9DAC"><p> <filepath>...\graphics\graphicsapitest\screendriverhaitest\screendriver\testdata\graphics-screendriver-cfbsdrawdevice-automated.ini</filepath> </p> </li> <li id="GUID-04F5FBD8-D69C-5342-A822-A4D2A3E9EFF1"><p> <filepath>...\graphics\graphicsapitest\screendriverhaitest\screendriver\testdata\t_screendriver_environment.ini</filepath> </p> </li> </ul> <p><b>Test data build location </b> </p> <p>When the tests are built, the scripts are built in the following location: </p> <ul><li id="GUID-86F4253D-E053-5C65-BD86-C68B59D294D0"><p> <filepath>...\epoc32\data\z\graphics\graphics-screendriver-cfbsdrawdevice-automated.ini</filepath> </p> </li> <li id="GUID-F70A956A-FA6A-5112-8A95-53D29CCE04F9"><p> <filepath>...\epoc32\data\z\graphics\t_screendriver_environment.ini</filepath> </p> </li> </ul> <p><b>Test data hardware path location </b> </p> <p>Descriptions of the data files for this suite can be found in the following location: </p> <ul><li id="GUID-8338C058-016F-51E2-898B-300DEC5140E3"><p> <filepath>z:/graphics/graphics-screendriver-cfbsdrawdevice-automated.ini
                </filepath>  </p> </li> <li id="GUID-72AB8360-DB64-5CE3-9CA3-D920235DC34D"><p> <filepath>z:/graphics/t_screendriver_environment.ini</filepath>  </p> </li> </ul> </section> <section><title>Device-specific configuration</title> <p>For information about the pre-build setup, see <xref href="GUID-824CE245-C692-5B8C-8C21-18F7CB8E7B11.dita#GUID-824CE245-C692-5B8C-8C21-18F7CB8E7B11/GUID-2C5964D4-ABB4-516F-A17F-FFF30BA6F9E1">Test environment</xref>. </p> <p><b>Device data </b> </p> <p>The <filepath>t_screendriver.ini</filepath> file is empty, Screen Driver does not require device data. </p> <p><b>Excluding tests </b> </p> <p>Not all the tests run on all devices. In order to run the device-specific tests you need to exclude certain tests. These are listed in the file <filepath>t_screendriver.tcs</filepath>. This file is used as an input to TEF and it can contain: </p> <ul><li id="GUID-E443B290-6067-5A47-B08B-9DF711F941B4"><p>a list of test cases to be excluded </p> </li> <li id="GUID-A4562014-8D09-5A74-A65A-C1E8190C94B4"><p>a list of test cases in a range to be excluded. </p> </li> </ul> <p>For more details, refer to <b>Symbian Verification Suite » TestExecute Framework</b>. </p> <p><b>Source tree location </b> </p> <p>The following is the source tree location for the <filepath>t_screendriver.ini</filepath> and <filepath>t_screendriver.tcs</filepath> files: </p> <ul><li id="GUID-D46558CE-3985-5570-92BA-381C4605C943"><p> <filepath>...\graphics\graphicsapitest\screendriverhaitest\screendriver\testdata\&lt;device&gt;\t_screendriver.ini</filepath> </p> </li> <li id="GUID-28B2888A-DDB9-5EBA-BB15-77847C346D66"><p> <filepath>...\graphics\graphicsapitest\screendriverhaitest\screendriver\testdata\&lt;device&gt;\t_screendriver.tcs</filepath> </p> </li> </ul> <p><b>Build path location </b> </p> <p> <filepath>...\epoc32\data\z\graphics\t_screendriver.ini</filepath>  </p> <p> <filepath>...\epoc32\data\z\graphics\t_screendriver.tcs</filepath>  </p> <p><b>Hardware path location </b> </p> <p>The following is the hardware location for the <filepath>t_screendriver.ini</filepath> and <filepath>t_screendriver.tcs</filepath> files: </p> <ul><li id="GUID-12543074-30F4-5F0C-8397-EB8D7B7C6FEB"><p> <filepath>...\epoc32\data\z\graphics\t_screendriver.ini</filepath>  </p> </li> <li id="GUID-549DB680-AFB1-5B1F-BBEC-873C5C65DA1B"><p> <filepath>...\epoc32\data\z\graphics\t_screendriver.tcs</filepath>  </p> </li> </ul> </section> <section><title>Test environment and execution</title> <p><b>General test environment </b> </p> <p>The test execution is controlled from the test PC and tests can be run on target environments, such as a hardware reference board. </p> <p>A typical regression test environment consists of: </p> <ul><li id="GUID-CA5111B3-3B24-5619-94B9-688995976969"><p>A PC with the Symbian platform source code, binaries and test source code. In addition, specific test execution tools and configuration scripts are required to run the test and prepare the test environment on the PC. These should all be readily available in the build. </p> </li> <li id="GUID-CE1C3388-A274-53DD-9560-20C9D808A557"><p>For hardware testing, a prototype phone or reference board (such as H4HRP) must be connected to the PC through a serial cable for debug purpose. The base ROM image is built on the PC and transferred to the hardware by flashing the device or using an MMC card. </p> </li> </ul> <p><b>Remote side test environment setup </b> </p> <p>There is no remote side test environment and the tests are not dependant on any external equipment. </p> <p><b>Building </b> </p> <p>For details, refer to <xref href="GUID-824CE245-C692-5B8C-8C21-18F7CB8E7B11.dita#GUID-824CE245-C692-5B8C-8C21-18F7CB8E7B11/GUID-6D3C3986-814D-58F3-A702-99923486271C">Building and execution</xref>. </p> <p><b>Test execution </b> </p> <ul><li id="GUID-E36AA22E-FB05-5272-AD27-7AD894BE7B04"><p> <b>Manual test execution on hardware</b>  </p> <p>After the image is successfully loaded to the device, it prompts at the system drive that is <codeph>C</codeph>. There are several alternative methods that can launch the tests. </p> <p> <b>Launching with the batch file</b>  </p> <p>The batch file <filepath>t_screendriver.bat </filepath> executes <filepath>graphics-screendriver-cfbsdrawdevice-automated.script</filepath>. </p> <p>After switching to the following path, run the tests through: </p> <p> <filepath>z:\graphics&gt; t_screendriver.bat</filepath>  </p> <p> <b>Running script directly</b>  </p> <p>On the system drive, launch TEF passing the connection script and the TCS file as command parameters. </p> <p> <codeph>C:\&gt; testexecute z:\base\usb\
                base-bsp-usb-validation-automated.script -tcx z:\base\usb\t_usb.tcs</codeph>  </p> </li> <li id="GUID-6C69871B-316E-5DF3-B5CE-811D2E7D2217"><p> <b>Automated test execution on hardware (using TestDriver)</b>  </p> <p>Run the following command to build the code for TestDriver: </p> <p><userinput>testdriver build</userinput> </p> <p>To specifically build automated test only, use the switch <b>–s </b>  </p> <p> <codeph>&gt;testdriver run –p [platform] –b [build]–s [&lt;specific
                test suite path&gt;]</codeph>  </p> <p>where the <codeph>&lt;specific test suite path&gt;</codeph> can be <codeph>screendriverhai</codeph> or <codeph>screendriverhai.screendriver</codeph>. </p> <p> <b> Note</b>: For details on how to run test using TestDriver, refer to <xref href="GUID-824CE245-C692-5B8C-8C21-18F7CB8E7B11.dita#GUID-824CE245-C692-5B8C-8C21-18F7CB8E7B11/GUID-8A8AA7ED-3942-556F-9527-043AEDDF381B">Steps to build and execute tests using TestDriver</xref>. </p> </li> </ul> </section> <section><title>Test results</title> <p><b>Test results log file location </b> </p> <p>When tests have finished executing on the hardware board, results can be found in <filepath>c:\logs\testexecute</filepath> on the device. You can copy these files into the MMC or other media and then observe the test results in the HTML files. If using TestDriver to execute, results can be found in <filepath>%EPOCROOT%\testdriver\results</filepath> on the PC. </p> <p>Each test case in the script contains just one test step, which passes or fails. Each test step performs a number of actions on the API. The log displays the percentage of test cases that have passed successfully. The script should have a 100% pass rate. </p> <p><b>How to interpret test results </b> </p> <p>Each test suite produces its own HTML log file containing the results of the test run. When examining the log file, check the results at the bottom of the log first. This gives a summary of the number of tests in the suite that have passed, failed or panicked. In the body of the log, passing tests are highlighted in green, failing tests in red, while tests which cause a panic are shown in blue. </p> </section> <section><title>Assumptions</title> <p>This test suite is based on the following assumptions: </p> <ul><li id="GUID-427A230E-D516-5D3A-B207-892C5337494C"><p>All the tests are validated on variant handset devices. </p> </li> <li id="GUID-5CDD65D1-8E23-56A2-B004-585D0D16D67D"><p>All tests are executed on Symbian Test Execute Framework. </p> </li> <li id="GUID-798C5D34-C810-5FED-A3CE-D77E9C9A42D8"><p>All tests are executed on an S60 PP image. </p> </li> </ul> </section> </conbody><related-links><link href="GUID-824CE245-C692-5B8C-8C21-18F7CB8E7B11.dita"><linktext>Graphics HAI Test Overview</linktext> </link> </related-links></concept>