AUTOMATED HARDWARE TESTING
USING PYTHON
Name
: YUVARAJA RAVI
Reg No : 13PEES1005
course
: M.TECH EMBEDDED
1
NAME
YUVARAJA.R
REGISTER NUMBER
13PEES1005
LANGUAGE
EMBEDDED C & PYTHON
PROJECT INCHARGE
K.Bhaskar B.Tech., M.E.(Ph.D)
ABSTRACT
Design a Embedded Prototype test
hardware interact with Python software
shows presence of defects in UUT.
Python test script can download the test
cases to the target system one by one,
receive test output, compare with
specifications then verify it, and
generate log files. Log files inside test
steps results are stored as PASS/FAIL.
Its a cost effective test system for SS
Electronic hardware manufacturers
3
TESTING
Testing
is an organized process to
verify the behavior, performance,
and reliability of a device
It ensures a device or system to
be as defect-free as possible
Testing is a manufacturing step
to ensure that the manufactured
device is defect free
4
HARDWARE TESTING
A
common test platform (CTP), also called an open
test standard (OTS), is a set of specifications defining
test methods for diverse components of computer and
electronic systems to be marketed as complete
products. The intent of a CTP is to ensure consistency
in hardware and software test procedures from the
conceptual and design phases through manufacture
and distribution.
Computers, computer peripherals and electronic
systems often contain complex devices, circuits,
programs and interfaces. These must all work
together in a variety of applications and conditions. A
CTP can be part of an overall quality assurance
program. A common standard can reduce the cost of
test equipment, optimize the use of available test
equipment, increase production efficiency and
minimize training costs.
EXISTING SYSTEM
Testing
is carried out manually by test
engineers. Consuming a lot of time and
effort huge for spending the time for testing.
NI Lab View designing a ATE .But
measurements are taken by reputed
instruments or NI PXI only
PXI HW and its software is huge amount.
Certified engineer only able to access the
software
Add-on software needed for Test case and
Report generation .
6
PROPOSED SYSTEM
To overcome the existing problem, we construct
Embedded hardware test module to measure the
Resistance test applied to signal traces (short/open)
Voltage /current measure with help of analog pins.
IO pins used to trigger the on/off or control the hw.
Protocols testing are done by the test hardware.
Tested data packets serially communicated to the
Python scritps
Python scripts collect the complied data's then
compare with test case input and generate the test
reports..
7
PROJECT ENTIRE SYSTEM
SERIAL INTERFACE
EMBEDDED TEST HW
DESIGN
Atmega
8-bit AVR controller used for Embedded
Test Hardware system.
Necessity to test the every protocols chips,
Analog and Digital IC.
Current, Voltage and Resistance measurements
using 10bit ADC
I2C >> | TEMP | EEPROM | SENSORS | DEVICES |
UART >> RS232 <<
RS485 >> 75176-IC <<
RS422 >> 75176-IC <<
9
HW DESIGN VOLTAGE ,CURRENT &
RESISTANCE MEASUREMENT
Voltage
measured by using AVR
Controller 10bit ADC
Current measurement taken by
ACS712 Current sensor IC.
Constant current probing to the
voltage net through voltage
divider circuit. Impedance
measured by the ADC.
10
HW DESIGN PROTOCOLS TESTING-I2C
I2C(Inter-Integrated
Circuit, pronounced "I
squared C") is also a synchronous
protocol.I2C uses only 2 wires, one for the
clock (SCL) and one for the data (SDA). That
means that master and slave send data over
the same wire, again controlled by the
master.
11
HW DESIGN PROTOCOLS
TESTING-UART / SERIAL
Serial
communicationis the process of
sending data one bit one by one sequentially,
over a communicationchannel.
UART communication of Full duplex TX and RX
communication through the COM devices.
12
HW DESIGN PROTOCOLS
TESTING RS485
RS-485
allows multiple devices (up to
32) to communicate at half-duplex on a
single pair of wires, plus a ground wire
(more on that later), at distances up to
1200 meters (4000 feet)
RS485 Differential communication
through A <-> B Signal lines.
13
HW DESIGN PROTOCOLS
TESTING RS422
Serial, balanced and differential are the keywords for
the RS422 interface standard. Serial means, that the
information is sent bit by bit on a single transmission
line, just like with RS232. Balanced differential is what
makes RS422 different from RS232
14
SW Design - PYTHON
Python
is a clear and powerful
object-oriented programming
language, comparable to Perl, Tcl
and Java.
Its a FOSS Programming language.
Runs on many different computers
and operating systems: Windows,
MacOS, many brands of Unix, OS/2
Python Code can be grouped into
modules and packages
15
SOFTWARE DESIGN PYTHON
An
open source software used to
Automate the Hardware Testing
UNITTEST
modulesupports test
automation, sharing of setup and
shutdown code for tests, aggregation
of tests into collections, and
independence of the tests from the
reporting framework.
AUTOMATED HARDWARE TESTING
16
UNIT TEST MODULE
CONCEPTS
Test Fixture : It represents the preparation needed to perform
one or more tests, and any associate cleanup actions. This may
involve, for example, creating temporary or proxy databases,
directories, or starting a server process.
Test Case: is the smallest unit of testing. It checks for a
specific response to a particular set of inputs.Unit test provides
a base class,Test Case which may be used to create new test
cases.
Test Suite: Test suiteis a collection of test cases, test suites,
or both. It is used to aggregate tests that should be executed
together.
Test Plan: Test planis a document detailing the objectives,
target market, internal beta team, and processes for a specific
betatestfor a software or hardware product.
Theplantypically contains a detailed understanding of the
eventual workflow.
AUTOMATED HARDWARE TESTING
17
SW Development Flow
AUTOMATED HARDWARE TESTING
18
Requirements & Test Case
Relationship
AUTOMATED HARDWARE TESTING
19
UUT Code Sample
Def ScaledInput(data):
rc = NO_ERR
Function code getting one input argument
scaled_data = data
if data >= DATA_MIN and data <= DATA_MAX:
scaled_data = (data * data_scale) + data_offset
if scaled_data > SCALE_MAX:
scaled_data = SCALE_MAX
rc = ERR_MAXSCALE
elif scaled_data < SCALE_MIN:
scaled_data = SCALE_MIN
rc = ERR_MINSCALE
else:
rc = ERR_OVER
return (rc, scaled_data)
Function Returning two o/p values
AUTOMATED HARDWARE TESTING
20
Function with argument code
table
A unit test is constructed such that all
possible inputs are used to force the
execution to traverse all possible paths.
In the case of ScaledInput(), we can see
that there are three obvious input test
cases. Too low,
Too high,
Within range.
AUTOMATED HARDWARE TESTING
21
Test Case Function Flow
chart
AUTOMATED HARDWARE TESTING
22
Test Step Flow Chart
AUTOMATED HARDWARE TESTING
23
PYTHON SCRIPT
TEST CASE
Each automatic test case
contains assigned Python
script that is executed by
Executor application. Figure
presents general flow chart
for writing automatic scripts for
functional testing.
24
PYTHON TEST RESULT
25
ADVANTAGES
Boards,
components and interface
cable separately tested in modes of
test case.
Manual testing has been reduced
Locating the Hardware(components)
and software bugs using test reports.
Low Cost (Pursuing softwares are
Open source)
Reduced human efforts
26
DISADVANTAGES
Embedded
controllers are single
task at a instant. So measuring
data goes to the pc with delay.
Output data packets compared with
test case help of Python Script. So
report generating time taken more.
27
Automatic
hardware testing using Python is a
ATE technique to increase throughput without a
corresponding increase in cost, by performing
tests on protocols are handling and test without
error. It has been shown quantitatively to
reduce test cost more effectively than low-cost
ATE. Because it reduces all test cost
contributors, and not only capital cost of ATE.
In this paper, we described the AHT using
python strategy adopted for hardware testing
and protocols testing without measuring
instruments .
CONCLUSION
28
FUTURE ENHANCEMENT
In
this project in future we can
add a FPGA or CPLD used to get
the data packets at instant of
time without delay.
Parallel
Testing method
introduces to test the multiple
boards at same instant time.
29
BASE PAPERS
[1] Jambunatha, K .,Design and implement Automated Procedure to
upgrade remote network devices using Python, Advance Computing
Conference (IACC), 2015 IEEE International, Bangalore, June 2015.
[2] Karmore, S.P.; Mabajan, A.R., Universal methodology for
embedded system testing., Computer Science & Education (ICCSE),
2013 8th International Conference on Year: 2013,IEEE Conference
Publications, 26-28 April 2013
[3] Kovacevic, M.; Kovacevic, B.; Pekovic, V.; Stefanovic, D.,
Framework for automatic testing of Set-top boxes.,
Telecommunications Forum Telfor (TELFOR), 22ndYear: 2014
[4] Kim H. Pries, Jon M. Quigley-Testing Complex and Embedded
Systems-CRC Press (2010)
[5] Python Programming Language, URL http://python.org/.
30
THANK YOU
31