Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Reference Guide
Version 0.1
Harman / Becker Automotive Systems Test Automation Reference Guide
Abstract: This document specifies the system architecture for the Harman Mid Platform test
framework Environment. This will provide an automated support for framework design,
configuration, test execution and results analysis.
This document contains confidential information intended solely for Harman / Becker Automotive
Systems
Table of Contents
1. Introduction.......................................................................................................1
1.1 Purpose....................................................................................................................1
1.2 Scope........................................................................................................................1
1.3 Intended Audience....................................................................................................1
1.4 Revision History........................................................................................................1
3. Overview..........................................................................................................4
3.1 Generic Components................................................................................................4
3.2 Basic Model of Operation – Script-driven Test Execution.........................................4
5. Test Methodology..............................................................................................7
1. Introduction
1.1 Purpose
Automation of test activities has become a must for the organizations that want to
reduce product cycle times in order to match ever -shortening Internet times in a market.
Automated testing techniques leverage tools to dramatically reduce the amount of time
required in executing test cases. Also, the tools ensure that the tests are maintainable
and usable even when the products are undergoing rapid changes in order to meet
changing market requirements and technology.
This test automation framework helps us to run functional, system and regression
testing. It implements test automation practices along with a user -friendly tool
developed in Python, GTK for Linux platforms.
1.2 Scope
This document is the reference guide for designing the actual test framework for Media,
Bluetooth and Software download features. Testing team can use this to automate using
scripts. This document will be the reference for developing test framework GUI
(frontend) also.
All rights reserved. No part of this document may be reproduced, stored in a retrieval
system or transmitted in any for or by any means without the prior written permission of
the publisher
Harman / Becker Automotive Systems Test Automation Reference Guide
1. Maximize the use of easily attainable open source (Ex: Python, GTK) or Harman-owned
technology.
2. Implement HMI-independent interfaces between components.
3. Facilitate efficient code porting through deliberate design.
4. Minimize the required test “footprint” on constrained devices.
5. Specify an extendable architecture.
6. Identify mandatory services for each component.
Harman / Becker Automotive Systems Test Automation Reference Guide
3. Overview
3.1 Generic Components
The generic test framework consists of the following components:
• Scripts for automation
• Frontend GUI
• Script execution engine
• Client layer
• Service layer
• Logger
Based on the test plan, a set of scripts are developed. These scripts are loaded onto the
console. For each individual test case, framework executes the script so as to invoke
commands performing the following functions:
The application is made possible by the use of Python, GTK and the flexible script-driven
execution environment within the framework. In support of all of these applications, this
environment provides the following generic services:
Bluetooth Services:
This test framework provides services that allow to automate possible Bluetooth
use cases with the Bluetooth platform service against Bluetooth enabled devices (Mobile
phone, PDA, etc.). We could able to connect, dial and automate A2DP and AVRCP
profiles.
Media Services:
This test framework provides services that allow to automate playback, stop,
pause, resume, navigation of tracks etc with the Media platform service against auxiliary
devices (USB stick, iPod, SD card etc.)
5. Test Methodology
All the test cases/ scripts will be there in the test repository which is a part of the test framework.
We just have to select the test cases to run. These test cases will run one by one and generate
the results. The Independent design and test processes ensure unbiased, repeatable results.
The diagram, as shown below, shows the connectivity between different elements of an
automated test environment. Test Scripts running can connect to a Target using TCP/IP
Protocol.
Configuration of target and test equipments, test actions, assertion statements, comparison of
results, etc. as required by a test case are scripted using a standard scripting language like
Python. The framework provides a template for scripting test cases and defining test
configuration files. Common functions are available for scripting message outputs to test logs,
action, assertion and comparison statements in a test case. Currently the framework supports
Python test scripts.
Test scripts can be grouped together at various levels for testing either a functional block or a
subsystem or the target as a whole. The entire testware (test scripts, test configuration files,
drivers, stubs, test plans, setup diagrams, libraries, etc.) is accessible and maintainable from
GUI. User can select test cases and execute them. Test execution results are logged in files
and test reports are generated. Test logs and reports are well formatted and linked to each
other. Summary of test case execution and result is stored from which one can create statistical
test reports for analysis and decision - making.
The above diagram gives the idea of the components in the framework design. Test
framework solution consists of
• Test scripts containing the test cases and scenario logic to be executed
• Test Framework Interface which exposes control path to the user interface
• Test Configuration module to help select tests to be executed
• Script execution engine to run the selected test scripts.
• Logger module to log the test results and test execution logs
• Client layer which provides the interface for service layer.
• D-Bus interface (Bindings) which provide the D-Bus service interface for
platform services
• Logger backend to store the logs. Backend can be a simple file or an
elaborate SQL database (in the future)
• UI facilitates user to run test.
Harman / Becker Automotive Systems Test Automation Reference Guide
When this test tool is invoked, GUI and Test Server processes are started. GUI client makes a
TCP connection to the platform for sending requests and receiving status/logs. The GUI and the
test server processes are active as long as the tool is running. However, the test server invokes
the test engine process only when the test server needs to execute a test batch. After the test
batch execution is over, the test engine exits.
Solution entails developments only on the Linux host, no modifications are necessary on the
target. This architecture is a script driven automation system. We will be passing the arguments
for the APIs via scripts (XML). We can select the test cases with the help of GUI. These scripts
get processed in the script execution engine, which will invoke respective services (Bluetooth/
Media etc) and run. The test result will be logged in the logger.
Harman / Becker Automotive Systems Test Automation Reference Guide
8. Types of Testing
Following are the types of testing we can automate using this framework.
• Functional Testing
• Stress testing
• Regression Testing
• Performance Testing
• Interface Testing
Harman / Becker Automotive Systems Test Automation Reference Guide
9.2 Reporting
Once a test session has been completed we can then generate a test report that
contains the desired executions, verdicts and logs for each one. For each test case
execution it will generate the logs and finally after the execution of that particular test
case it generates the execution result whether pass/ fail/ inconclusive.
Harman / Becker Automotive Systems Test Automation Reference Guide