Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u...

30
V0.1 | 2019-07-02 Agile Testing, Dornbach, 3. Juli 2019 Test-Automatisierung und System Simulation als Schlüsseltechnologien in der agilen Software Entwicklung

Transcript of Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u...

Page 1: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

V0.1 | 2019-07-02

Agile Testing, Dornbach, 3. Juli 2019

Test-Automatisierung und System Simulation als Schlüsseltechnologien in der agilen Software Entwicklung

Page 2: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

2

u Wer wir sind

Motivation

Simulation

Test-Automatisierung

Konklusion

Live Demo

Agenda

Page 3: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

3

Vector auf einen Blick

Wer wir sind

Mitarbeiter:> 2.500

Vectorianer

Niederlassungen:26 Standorte in

12 Ländern

Umsatz:654 Mio. €

in 2018Vereinigungen:

Mitarbeit in 15 Gremien

Kunden:> 7.500 Firmen in 72 Ländern

Verbundene Unternehmen:GiN | CSM | BASELABS

u Vector Stiftung

u 60% des Kapitals

u Dauerhafte Sicherung der Unabhängigkeit der Vector Gruppe

u Unterstützung von Forschung, Bildung karitative Einrichtungen

Page 4: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

4

Geschäftsfelder und Produktbeispiele

Wer wir sind

Entwicklung verteilter Systeme

PREEvision

Testing

CANoe, CANalyzer, vTESTstudio, VT System, VectorCAST

Steuergeräte-Kalibrierung

CANape, VX1000, vCDM, vADASdeveloper, ASAP2 Tool-Set

Embedded Software und Systeme

MICROSAR, CANbedded, VC ECU, Kundenprojekte

Beratung

Consulting Services, Engineering Services

Diagnose

CANdelaStudio, Indigo, vFlash, CANoe.DiVa

Messtechnik

vMeasure exp, vSignalyzer, vMDM, Logger, Analogmesstechnik

Page 5: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

5

Vector Testing Solution – Test Tools for all Test Phases

Wer wir sind

System Validation

System Integration

Test

SoftwareIntegration

Test

Software Unit Test

SoftwareImplementation

So

ftw

are

Syste

m

White-Box testing on host / on target

Lin

k t

o R

equirem

ents

VectorCAST

CANoe, vTESTstudio vVIRTUALtarget

VectorCAST

CANoe, vTESTstudioVT SystemVectorCAST

SW integration testing + code coverage

on host / on target

System validation+ code coverage

on ECUChange-Based Testing

Page 6: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

6

Wer wir sind

u Motivation

Simulation

Test-Automatisierung

Konklusion

Live Demo

Agenda

Page 7: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

7

Agile Softwareentwicklung

Motivation

Manifest für Agile Softwareentwicklung

Wir erschließen bessere Wege, Software zu entwickeln,

indem wir es selbst tun und anderen dabei helfen.

Durch diese Tätigkeit haben wir diese Werte zu schätzen gelernt:

Individuen und Interaktionen mehr als Prozesse und Werkzeuge

Funktionierende Software mehr als umfassende Dokumentation

Zusammenarbeit mit dem Kunden mehr als Vertragsverhandlung

Reagieren auf Veränderung mehr als das Befolgen eines Plans

Das heißt, obwohl wir die Werte auf der rechten Seite wichtig finden,

schätzen wir die Werte auf der linken Seite höher ein.

Page 8: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

8

Agile SW Entwicklung: Scrum

Motivation

Zeit

Produkt Backlog

Sprint Backlog

P

L

A

N

U

N

G

D

E

S

I

G

N

C

O

D

I

N

G

T

E

S

T

D

E

M

O

R

E

V

I

E

W

Sprint Backlog

P

L

A

N

U

N

G

D

E

S

I

G

N

C

O

D

I

N

G

T

E

S

T

D

E

M

O

R

E

V

I

E

W

Sprint Backlog

P

L

A

N

U

N

G

D

E

S

I

G

N

C

O

D

I

N

G

T

E

S

T

D

E

M

O

R

E

V

I

E

W

Page 9: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

9

Test Driven Development - Ablauf

Motivation

Alle Tests PASS &

Gutes Design

1 oder mehr Tests FAIL

Alle Tests PASS &

Schlechtes Design

Neuer Testfall

Testfall ausführenPASS

FAIL

PASS

Alle Testfälle

ausführen

Code Änderung

FAIL

FAIL

Alle Testfälle ausführen

Re-Design Step 1-n

PASS

PASS

Page 10: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

10

Alle Testfälle ausführen?

Motivation

Robustness Testing

Code Coverage Based Testing

Requirements Based Testing

Static Analysis

Unit TestingIntegration

TestingSystem Testing

u Testen in Varianten = Multiplikator:

u Compile Defines (z.B. bedingte Kompilierung)

u Compiler Optionen (z.B. Optimierungen auf Laufzeit oder Größe)

u Include Pfade (z.B. Parametrisierung globaler Variablen/Konstanten)

u Ziel Plattformen (z.B. verschiedene Boards)

Page 11: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

11

Fehlerbeseitigungs-Kosten

Motivation

*** James Martin, An Information Systems Manifesto, Prentice-Hall, Inc., Englewood Cliffs, New Jersey

Phase of the S/W Dev Relative cost to fix a bug*

Design 1x

Implementation 7x

Testing 15x

Maintenance 100x

Testing Phase ~Cost/Bug**

Unit Test $5

Full Build $50

Integration Test $500

System Test $5000

Relative cost to fix a bug***

* DevOps: Shift left with continuous testing by using automation and virtualization (IBM; Dibbe Edwards)

** How Google Tests SW (James A. Whittaker, Jason Arbon, and Jeff Carollo)

Page 12: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

12

u Simulation/Emulation

u Testautomation

Lösungsansätze:

Motivation

Page 13: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

13

Wer wir sind

Motivation

u Simulation

Test-Automatisierung

Konklusion

Live Demo

Agenda

Page 14: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

14

u Testen möglich ohne Hardware (HW)-Verfügbarkeit

u Simulation auch dann sinnvoll wenn HW verfügbar ist

u HW hat limitierte Anzahl von Flashzyklen

u Evtl. limitierte Anzahl von Boards

u Ausführung von Testfällen auf echter HW langsamer> Flashzeiten

> Performance

> Z.B.: Zuverlässigkeits-Beweis autonomes Fahren: 18 Mrd. Testkilometer (RAND Corp., 2016)

> => 50 Jahre non-stop Fahren mit 100 Fahrzeugen

> Ca. 10x in Echtzeit-Simulation

> Ca. 1000x computing cores => 2 Tage

u Während der Testfall-Entwicklung Simulation sehr empfehlenswert

u Simulation kann den Test auf der echten HW nicht ersetzen

u HW Verhalten kann vom Simulator abweichen

u Simulator kann fehlerhaft sein

u Teilweise erforderlich wegen Safety

u Simulator Test auf HW wiederholen

u Z.B. einmal/Tag(Woche) oder sobald HW verfügbar

u Testverlagerung von Simulator auf HW muss simpel sein

u Test Automation empfohlen

Vorteile der Simulation

Simulation

Page 15: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

15

u Viele Entwicklungsumgebungen stellen einen Simulator zur Verfügung

u IAR Embedded Workbench

u Keil µVision

u Renesas

u Tasking

u TI Code Composer Studio

u Wind River VxWorks

u ...

u Freie Simulatoren (mit Vorsicht zu genießen...)

u Lauterbach (trace32)

u QEMU (Quick Emulator)

u ...

u Erwerbbare Simulatoren

u Simics (Wind River)

u vVirtualTarget

u CANoe

u TESIS Simulationssoftware (DYNA, veDYNA, enDYNA)

u ...

Beispiele für Simulatoren

Simulation

Page 16: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

16

Key Components for Virtual Testing of ADAS and Automated Driving

Simulation

Traffic

u vehicles, bicycles, pedestrians, animals

u deterministic tasks orstochastic traffic

u interaction with other roadusers and reaction on events

Environment Sensors

u object lists, target lists orphysics-based sensor data

u camera, radar, lidar, ultrasonic

u vehicle dynamics for realisticsensor movements

Vehicle under Test (VuT)

u realistic vehicle dynamics

u actuation of engine torque, brakes, steering, etc.

u vehicle states sensors

u driving tasks for driver

Road & Environment

u road with lane markings

u traffic signs and signals

u terrain, buildings, vegetation

u lighting, fog, precipitation

Page 17: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

17

Wer wir sind

Motivation

Simulation

u Test-Automatisierung

Konklusion

Live Demo

Agenda

Page 18: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

18

u Testen ist automatisierbar in Bezug auf

u Testfall Erstellung

u Test-Framework Erstellung

u Testfall Ausführung

u Test-Automation ist wärmstens empfohlen, z.B. weil...

u Jeder Iterationsschritt erneutes Testen bedeutet

> Regressions Test

> Kontinuierliche Integration (CI)

> Agile Entwicklung (Scrum/TDD)

u Die Akzeptanz des Testens beim Mitarbeiter steigt

> Stupides wiederholen des gleichen Test-Sets ist unzumutbar

u Durch Automation sichergestellt ist, dass die Tests auch ausgeführt werden

> ...was leider nicht selbstverständlich ist....

u Das Aufsetzen einen einmaligen Aufwand bedeutet

> Im Gegensatz zum wiederholten Aufwand bei manuellen Test-Schritten

u Skalierbar und optimierbar

> Parallelisieren und Änderungs-basiertes Ausführen

u Was sinnvoll automatisierbar ist sollte auch automatisiert werden

u Spart Zeit und Geld, erhöht SW Qualität, erhöht Mitarbeiter-Zufriedenheit

Allgemein

Test-Automatisierung

Page 19: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

19

Kontinuierliches Testen

Test-Automatisierung

Robustness Testing

Code Coverage Based Testing

Requirements Based Testing

Static Analysis

Unit TestingIntegration

TestingSystem Testing

Change Based Testing

Parallel Testing

IterationschrittRegressiontest, Continuous Integration, Scrum Sprint, TDD

Page 20: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

20

Änderungs-basiertes Testen

Test-Automatisierung

Source

Code

Unit, Integration, System Tests

Betroffene TestfälleQuellcode-Änderung

Page 21: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

21

Agiler Workflow mit Änderungs-basiertem Testen: EntwicklerIn

Test-Automatisierung

SCM

Code | TestPullSW

Developer

Coding• Code-Änderung (Neues Feature, Bugfix)

Test• Änderungs-basiertes Ausführen aller betroffenen Testfälle

Fix

• Fehler beseitigen

• Testfälle anpassen

• Neue Testfälle erstellen (evtl. coverage 100%)

Code | TestPush

Page 22: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

22

u Fokus auf Neu-Entwicklung

u Funktionierende Test-Infrastruktur erforderlich

u Benutzerfreundlich

u Debug-fähig

u Funktionale Tests hilfreich

u Test-Ergebnisse so schnell wie möglich

u Simulation

u Änderungs-basiertes Testen

u Testen in nur einer Variante

Anforderungs-Profil SW EntwicklerIn

Test-Automatisierung

SWDeveloper

Page 23: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

23

Agiler Workflow mit Änderungs-basiertem Testen: Build-Server

Test-Automatisierung

SCM

Code | TestPull

Run• (Änderungs-basiertes) Ausführen aller (betroffenen) Testfälle

Check

• Überprüfen der Testergebnisse

• Überprüfen zusätzlicher Bench-Marks (Z.B. Coverage, Zyklomatische Komplexitäten)

Report

• Erstellen von Reports

• Ergebnis-Abhängige Benachrichtigung

ReportsPush

ContinuousIntegration

Server

Page 24: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

24

u Fokus auf Vollständigkeit der Ausführung

u Simulation und echte Hardware

u Vollständige Test-Ausführung aller Tests

u Testen in allen Varianten

u Evtl. vollständige Testausführung nur am Wochenende. Sonst Änderungs-basiert

u Funktionierende Test-Infrastruktur erforderlich

u Script-bar

u Skalierbar

u Evtl. Parallelisieren der Test-Ausführung

u Lückenloses Reporting für Legal

Anforderungs-Profil Build/Continuous Integration Server

Test-Automatisierung

ContinuousIntegration

Server

Page 25: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

25

u Fokus auf Test-Infrastruktur und Vollständigkeit der Testfälle

u Regelmäßiger Austausch mit EntwicklerInnen und Management

u Überprüfen der Testfälle auf formale Vollständigkeit

u Requirements Coverage

u Code Coverage

u Grenzwerte

u Überprüfen zusätzlicher Benchmarks

u Zykmlomatische Komplexität

u Kommentar-Dichte

u …

u Evtl. Vervollständigen der Testfälle

u Bei strikter Trennung zwischen Tester und Entwickler evtl. separates Test-Projekt

Anforderungs-Profil TesterIn

Test-Automatisierung

Page 26: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

26

Wer wir sind

Motivation

Simulation

Test-Automatisierung

u Konklusion

Live Demo

Agenda

Page 27: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

27

u Spart Zeit und Geld

u Erhöht SW Qualität

u Macht Mitarbeiter zufriedener

u Einmalige Kosten üblicherweise schnell amortisiert

Simulieren und Automatisieren

Konklusion

Page 28: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

28

Wer wir sind

Motivation

Simulation

Test-Automatisierung

Konklusion

u Live Demo

Agenda

Page 29: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

29

Live and in Colour

Live Demo

Page 30: Test-Automatisierung und System Simulation als ......Road & Environment u road with lane markings u traffic signs and signals u terrain, buildings, vegetation u lighting, fog , precipitation

30 © 2015. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. V0.1 | 2019-07-02

Author:Ingo NicklesVector Germany

Mehr Informationen!Besuchen Sie unsere Website für:> News> Produkte> Demo-Software> Support> Seminare und Workshops> Kontaktadressen

www.vector.com