automated hardware testing using python

31
AUTOMATED HARDWARE TESTING AUTOMATED HARDWARE TESTING USING PYTHON USING PYTHON 1 Name : YUVARAJA RAVI Reg No : 13PEES1005 course : M.TECH EMBEDDED

Upload: yuvaraja-ravi

Post on 21-Jan-2017

1.986 views

Category:

Engineering


23 download

TRANSCRIPT

Page 1: Automated hardware testing using python

AUTOMATED HARDWARE TESTINGAUTOMATED HARDWARE TESTINGUSING PYTHONUSING PYTHON

1

Name : YUVARAJA RAVI

Reg No : 13PEES1005

course : M.TECH EMBEDDED

Page 2: Automated hardware testing using python

2

NAME : YUVARAJA.R

REGISTER NUMBER : 13PEES1005

LANGUAGE : EMBEDDED C & PYTHON

PROJECT INCHARGE : K.Bhaskar B.Tech., M.E.(Ph.D)

Page 3: Automated hardware testing using python

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

It’s a cost effective test system for SS Electronic hardware manufacturers

3

Page 4: Automated hardware testing using python

TESTINGTESTINGTesting 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

Page 5: Automated hardware testing using python

HARDWARE TESTINGHARDWARE 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.

5

Page 6: Automated hardware testing using python

EXISTING SYSTEMEXISTING SYSTEMTesting 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

softwareAdd-on software needed for Test case and

Report generation .

6

Page 7: Automated hardware testing using python

PROPOSED SYSTEMPROPOSED 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

Page 8: Automated hardware testing using python

PROJECT – ENTIRE SYSTEMPROJECT – ENTIRE SYSTEM

8

SERIAL INTERFACE

Page 9: Automated hardware testing using python

EMBEDDED TEST HW EMBEDDED TEST HW DESIGN 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

Page 10: Automated hardware testing using python

HW DESIGN – VOLTAGE ,CURRENT & HW DESIGN – VOLTAGE ,CURRENT & RESISTANCE MEASUREMENTRESISTANCE MEASUREMENTVoltage 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

Page 11: Automated hardware testing using python

HW DESIGN – PROTOCOLS TESTING-I2CHW 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

Page 12: Automated hardware testing using python

HW DESIGN – PROTOCOLS HW DESIGN – PROTOCOLS TESTING-UART / SERIALTESTING-UART / SERIAL

 Serial communication is the process of sending data one bit one by one sequentially, over a communication channel.

UART communication of Full duplex TX and RX communication through the COM devices.

12

Page 13: Automated hardware testing using python

HW DESIGN – PROTOCOLS HW DESIGN – PROTOCOLS TESTING – RS485TESTING – RS485RS-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

Page 14: Automated hardware testing using python

HW DESIGN – PROTOCOLS HW DESIGN – PROTOCOLS TESTING – RS422TESTING – 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

Page 15: Automated hardware testing using python

SW Design - PYTHON SW Design - PYTHON Python is a clear and powerful

object-oriented programming language, comparable to Perl, Tcl and Java.

It’s 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

Page 16: Automated hardware testing using python

SOFTWARE DESIGN - SOFTWARE DESIGN - PYTHONPYTHON

An open source software used to Automate the Hardware Testing

UNITTEST module supports 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

Page 17: Automated hardware testing using python

UNIT TEST MODULE UNIT TEST MODULE CONCEPTSCONCEPTS 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 suite is a collection of test cases, test suites, or both. It is used to aggregate tests that should be executed together.

Test Plan: Test plan is a document detailing the objectives, target market, internal beta team, and processes for a specific beta test for a software or hardware product. The plan typically contains a detailed understanding of the eventual workflow.

AUTOMATED HARDWARE TESTING 17

Page 18: Automated hardware testing using python

SW –Development FlowSW –Development Flow

AUTOMATED HARDWARE TESTING 18

Page 19: Automated hardware testing using python

Requirements & Test Case Requirements & Test Case RelationshipRelationship

AUTOMATED HARDWARE TESTING 19

Page 20: Automated hardware testing using python

UUT Code SampleUUT Code SampleDef ScaledInput(data):

rc = NO_ERRscaled_data = dataif data >= DATA_MIN and data <= DATA_MAX:

scaled_data = (data * data_scale) + data_offsetif scaled_data > SCALE_MAX:

scaled_data = SCALE_MAXrc = ERR_MAXSCALE

elif scaled_data < SCALE_MIN:scaled_data = SCALE_MINrc = ERR_MINSCALE

else:rc = ERR_OVER

return (rc, scaled_data)

AUTOMATED HARDWARE TESTING 20

Function code getting one input argument

Function Returning two o/p values

Page 21: Automated hardware testing using python

Function with argument code Function with argument code tabletable

AUTOMATED HARDWARE TESTING 21

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.

Page 22: Automated hardware testing using python

Test Case Function Flow Test Case Function Flow chartchart

AUTOMATED HARDWARE TESTING 22

Page 23: Automated hardware testing using python

Test Step Flow ChartTest Step Flow Chart

AUTOMATED HARDWARE TESTING 23

Page 24: Automated hardware testing using python

PYTHON SCRIPT PYTHON SCRIPT TEST CASETEST CASE

Each automatic test case contains assigned Python script that is executed by Executor application. Figurepresents general flow chart for writing automatic scripts for functional testing.

24

Page 25: Automated hardware testing using python

PYTHON TEST RESULTPYTHON TEST RESULT

25

Page 26: Automated hardware testing using python

ADVANTAGESADVANTAGESBoards, 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 software’s are

Open source)Reduced human efforts

26

Page 27: Automated hardware testing using python

DISADVANTAGESDISADVANTAGES

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

Page 28: Automated hardware testing using python

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

28

Page 29: Automated hardware testing using python

FUTURE ENHANCEMENTFUTURE 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

Page 30: Automated hardware testing using python

BASE PAPERSBASE 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

Page 31: Automated hardware testing using python

THANK YOUTHANK YOU

31