Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

37
Raspberry Pi im Embedded Testing - „tool“ oder „toy“? Michel Lawaty - Test Automation Engineer Native Instruments GmbH, Berlin Embedded Testing 2015 - 4. November 2015

Transcript of Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Page 1: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Michel Lawaty - Test Automation Engineer Native Instruments GmbH, Berlin

Embedded Testing 2015 - 4. November 2015

Page 2: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Komplete

Page 3: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

• Warum Mensch-Maschinen-Schnittstelle (HMI) in Test integrieren?

• Wie HMI in den Test integrieren?

• Kann der Raspberry Pi dabei helfen?

Page 4: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Testpyramide

Component Test

Integration Test

System Test

Page 5: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

System Test

DUTx f(x)

POC=Point of ControlPOO=Point of Observation

Black Box

POC POO

DUT=Device under Test

f(x) == erwartetes Ergebnis ?

Page 6: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Use Case

USB

Point of Control

Test Host

POO’s (Points of Observation)

Audio Ausgabe

LEDs leuchtenApplikation reagiert

Abdeckung durch System Test

Page 7: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

TestpyramideBL

ACKB

OX

WH

ITEB

OX

Component Test

Integration Test

System Test

Page 8: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Regressionstest• Ist die Qualität gleich geblieben?

• Ausführung nach jeder Änderung

• Manuelle Strategie: gesteuert nach Risiko

• Einfacher durch Automation

Regression Tests

Page 9: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Warum Systemtest automatisieren?

• Genauigkeit z.B. AD-Wandler statt Auge

• Reproduzierbarkeit&Wiederholbarkeit

• Für große Datenmengen

• viele SchnittstellenDUT

Höhere Test Coverage und Test Depth

Page 10: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Warum Systemtest automatisieren?

• Agile Entwicklungsprozesse

• Iterativ & Inkrementell

• „Philosophie“ : Agile Manifesto

• Regular Deliveries & Working Software

Page 11: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Agile Entwicklung

• Bsp. „Scrum“

• „User Stories“ dokumentieren Requirements

• User Story ähnlich zum Use Case

Page 12: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Agile Testing

• Use Case spielt sich am HMI ab

• Systemtest notwendig

• Systemtest = Test am HMI!

Häufigere Ausführung Systemtests

Page 13: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Kontinuierliche Integration• Continuous Integration (CI) ist ein „Muss" im

Agile Development

• Ständige SW-Integration & Testausführung

• Möglichst automatisch

System Test Manuell ?

Page 14: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Systemtest manuell?• Testausführung manuell verursacht hohe Kosten

• Manuelle Ausführung ist fehleranfällig

• Manuell gut für Explorative Tests

System Test Manuell ?

Page 15: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Case Study

Test Aufwand• ca. 17 bestehende Hardware-Produkte

• neue Produkte

• ca. 11 Desktop-Betriebssysteme

• Treiber, Updates

• „Traktor“ hat ca. 300 POC / POO

Page 16: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Testfallexplosion

Page 17: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Test Automatisierung - Wie?

Prüfstand wird benötigt

Page 18: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Data Acquisition and Control Hardware

• Elektrische Aufnahme / Ausgabe von Signalen

• Digital I/O, Analog I/O

• Steuerung über USB / Ethernet

DAQC

Page 19: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

DAQC Hardware (COTS)

• Commercial-off-the-shelf (COTS)

• verschiedene Anbieter

• feste Anzahl Kanäle und Messarten

• USB / Ethernet

DAQC

Quelle: LabJack.com

Page 20: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

DAQC Hardware (modular)

• Modular

• Praktisch alle Anwendungen

• Kanalanzahl erweiterbar

• Teilw. eigene SW-Suites

Relativ hohe Investition

DAQC

Quelle: http://germany.ni.com/

Page 21: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Case Study

Benötigte DAQC

• ca. 75 Digital Out

• ca. 40 variable Widerstände

• Inkrementalgeber

• Relais

• …

>10000€ für DAQC Hardware

Page 22: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Eigene DAQC-Hardware mit dem Raspberry Pi

• Einplatinen-Computer

• Ethernet

• Erweiterbar

• I2C-Bus / SPIQuelle: Wikipedia. User „Multicherry“

Page 23: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Prüfstand mit Raspberry

DAQC DUTSignal Adaption

Page 24: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Device Under Test• Zu prüfendes Gerät

• Mensch-Maschinen-Schnittstelle (HMI): Sensoren / Aktoren

• Protokoll-Schnittstellen: USB, MIDI

• Periphere Schnittstellen

DUT

Page 25: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Signaladaption

• Signale zum / vom DUT

• Signalkonditionierung

• zusätzliche Funktionen

• Verbindungstechnik

Signal adaption DUT

Page 26: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Beispiel Button

Mechanisch

Elektrisch

• Button ist Taster

• Elektrischer Teil wird emuliert

Page 27: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Beispiel Button• Adaptierung direkt auf der DUT (PCB)

• Adaptierung über Stecker (während Entwicklung)

Page 28: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Shields• Erweiterungsplatinen (Shields)

• viele Anwendungen abgedeckt

• Digital I/O, Analog I/O

• Servomotoren, Kameras, Sensoren

• Anbindung an digitale Schaltungslogik (FPGA)

GPIO Expander für die Buttons

Quelle: https://www.abelectronics.co.uk

Page 29: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Beispiel Digital Potis

• Abdeckung jeder Anwendung durch ICs

• I2C-Bus / SPI verfügbar

• Mehrere ICs des gleichen Typ

„Maßgeschneidert“ durch eigene Entwicklung

Page 30: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Steuerung

• WebIOPi (http://webiopi.trouch.com/)

• „Internet of Things“ Framework

• Erlaubt Steuerung Shields & Chips

• Apache-Lizenz, Eric Ptak, 2012

Page 31: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Steuerung

• Webserver

• Web Interface

• REST API: HTTP POST, GET

• z.B.: http://webiopi/devices/gpio1/3/value/1

Gute Anbindung an Test Framework

Page 32: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Architektur

DUT

Shields

other Chips

webIOPi

Raspberry

Test Framework

Test Host Signaladaption

Ethernet

Page 33: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Fazit

• Konnektivität zum Test Framework

• Alle „schwierige“ Elektronik ausgelagert

• schneller Testbed Prototype

Page 34: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Fazit

• Keine Echtzeit

• Latenz im ms Bereich (nicht deterministisch)

• Kanalanzahl limitiert

• Mechanik optimierbar

• mehr HW/SW-Entwicklung notwendig

Page 35: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

DUT

Signaladaption

webIOPi

Raspberry

Chips

Fazit• DAQC „maßgeschneidert“

Volle Kontrolle

Page 36: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Fazit

• Einfache Vervielfältigung & Verwendung

• Kosten: Testbed bleibt intakt (Wartungsphase)

• tool or toy?

„tool!“

Page 37: Raspberry Pi im Embedded Testing - „tool“ oder „toy“?

Fragen ?

Kontakt

[email protected]

embeddedtesting2015.signaladaption.de

de.linkedin.com/in/michellawaty

xing.com/profile/Michel_Lawaty