Function Testing for Model Based Development · 2018-06-07 · PPT Presentation _____ _____ _____...

24
1 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the event of applications for industrial property rights. Function Testing for Model Based Development

Transcript of Function Testing for Model Based Development · 2018-06-07 · PPT Presentation _____ _____ _____...

1 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

Function Testing for Model Based Development

2 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

ETAS GmbH, Stuttgart (Germany)

Product Manager Test Software

ETAS RT2

ETAS LABCAR-AUTOMATION

Education and Professional Experience

MSc Information Engineering (UAS Cologne)

MBA (GSS Heilbronn)

Software and System Developer Bosch Engineering GmbH

Project Coordinator Powertrain Customer Projects Bosch Engineering GmbH

Thomas Lenzen

Function Testing for Model Based Development

Referent information

http://www.linkedin.com/pub/thomas-lenzen/4b/5b8/b62

3 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

Agenda/Content

1 Function based development and testing

2 Needs and Challenges for Function Developers

3 Development Workflow

4 What is RT2 ? Main Use cases

5 Key Features and Benefits

Function Testing for Model Based Development

Agenda

4 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

− Model based/driven software development

− Model based testing

Functional problems are described in functional models

Function Testing for Model Based Development

What are we talking about?

ASCET

(Automated) Code Generation

(Automated) Test Case Generation

(Automated) Test

5 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

− Software defects originate from all

stages of the development process

− (Model-based) function

development

− Software code generation

− Software build and integration

− Hardware development

− …

− Errors are often found far too late

− High pressure and risk at the end

of the engineering cycle

….. resulting in high cost of fixing

errors

Barry Boehm, Software Engineering Economics

Function Testing for Model Based Development

The Need

6 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

Function Testing for Model Based Development

When do I need to start testing ? Is Frontloading new ?

Function Model Testing

Dyno Testing

Hardware-in the-Loop

Testing

Software Testing

7 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

Function Testing for Model Based Development

Need : How to test Models ?

Assembly Code

C Code

Test Code in Assembly

C Test Script

Control Model

Test Model!

8 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

Function Testing for Model Based Development

Traditional Testing Workflow

Test Case Design and Execution Test Analysis and Assessment Test Reporting

SuT

In1

In2

In3

In4

Out1

Out2

Out3

Out4

simout

untitled.mat

SuT

In1

In2

In3

In4

Out1

Out2

Out3

Out4

Signal 1

Group 1

1

simout

untitled.mat

SuT

In1

In2

In3

In4

Out1

Out2

Out3

Out4

1

0

SuT

In1

In2

In3

In4

Out1

Out2

Out3

Out4

SCRIPT

INP

UTS

OU

TPU

TS

SuT

In1

In2

In3

In4

Out1

Out2

Out3

Out4

SCRIPT

INP

UTS

OU

TPU

TS

Variant 2

Variant 1

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

TEST DATA

_____________ _____________ _____________ _____________ _____________ m-script assessment

_____________ _____________ _____________ _____________ _____________ m-script preliminary analysis

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

XLS Tables

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

- - - - - -

_____________ PPT Presentation

_____________ ________ _____________ DOC Report

Export

_____________ _____________ _____________ _____________ _____________ m-script assessment

_____________ _____________ ___Variant 1__ _____________ _____________ m-script preliminary analysis

_____________ _____________ _____________ _____________ _____________ m-script assessment

_____________ _____________ ___Variant 2__ _____________ _____________ m-script preliminary analysis

SuT

In1

In2

In3

In4

Out1

Out2

Out3

Out4

SuT

In1

In2

In3

In4

Out1

Out2

Out3

Out4

9 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

Function Testing for Model Based Development

Traditional Testing Workflow – Summary of Limitations

- SuT variant management: - model to model - model to hand-coded C

- Test case variant management: - lots of files - difficult to review variation

- Programming skills may be required depending on platform

Test Case Design and Execution

- Management of test artifacts - Analysis and assessment script

management - Platform specific scripts:

- poor reuse from the model platform to C platform testing

Test Analysis and Assessment

- Inconsistent reporting across platforms

- Requirements traceability is not inherently included

Test Reporting

10 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

Test Case Design and Execution

SuT

MDL

SuT

Hand-coded

C

SuT

ASCET

SuT

Virtual

ECU

SuT

In1

In2

In3

In4

Out1

Out2

Out3

Out4

Function Testing for Model Based Development

New Testing Workflow

MA

NU

AL

AN

ALY

SIS

OU

TPU

T A

SSES

SMEN

T

PAR

AM

ETER

IZAT

ION

SuT

In1

In2

In3

In4

Out1

Out2

Out3

Out4

MODEL-BASED TESTCASE

INP

UTS

OU

TPU

TS

Testcase Design Testcase Management Test Artifact Reuse

11 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

- Intuitive representation of complexity

- Efficient management of variants - platform - test state - test procedure

Test Case Design and Execution

SuT

MDL

SuT

Hand-coded

C

SuT

ASCET

SuT

Virtual

ECU

Function Testing for Model Based Development

New Testing Workflow

- Immediate recognition of test execution success and assessment pass/fail

- “Assesslet” GUI: - quick common assessment functions

- Assessment language for complex analysis

Test Analysis and Assessment

- Automatic report generation - Organized test execution

information, platform details and assessment results

- Automatic plotting of “assesslet” operations

Test Reporting

12 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

ETAS RT2 is a product with a new approach to design, execute and manage tests

across development platforms for:

− Functional models (Simulink or ASCET)

− Software-in-the-loop platforms (e.g. C-code .exe, ISOLAR-EVE)

− Consistency check between model and code: automated comparison of test

results between model and software

Function Testing for Model Based Development

ETAS RT2: Find and Fix Errors Early

Functional Model MiL Platforms

Code/Execution SiL Platforms

RT2 Tests

=

13 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

Simulink® Model

Test Case Model Design 1

Test Assessment 3

2

Test Report 4

Function Testing for Model Based Development

RT2 Testing Process

Test Execution

Test Assessment Content

Interface

Parameters

14 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

Test Modeling

Test Execution

Test Assessment

Test Reporting

Function Testing for Model Based Development

RT2 Testing Process

2

3

4

Test Modeling

1

15 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

1. Start Vehicle

2. Accelerate until 50 km/h

3. Emergency brake with steering wheel

to the left

4. Repeat steps 2 and 3 a total of 10

times

5. Stop the car

6. Engine off

Test case scenarios often consist of sequences of logical phases.

State machine with textual annotations are descriptive and easy to understand

Start Vehicle

Accelerate

Emergency brake with steering wheel to the left

Stop the car

Engine off

until 50km/h

repeat if less than 10 trials

Function Testing for Model Based Development

Test Modeling: Test Case Sequence 1

16 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

− Time partitioned tests: definition through a

hierarchical state machine

− Test step list: definition of a step sequence

supported by a graphical editor

− Direct definition: definition with graphical signal

editor, by measurment data import or as written

formula. MIN_LIGHT_OFF

+ 20 * sin(t/10)

+ 7.5 * random ()

Function Testing for Model Based Development

Test Modeling: Test State Definitions 1

17 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

Test Modeling

Test Execution

Test Assessment

Test Reporting

Function Testing for Model Based Development

RT2 Testing Process

1

2

3

4

18 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

−Test cases stimulate the test object by continuously affecting

system quantities (inputs)

−Test cases can react to system behavior by observing system

quantities (outputs)

Test object in

pu

ts

ou

tpu

ts

Test case

Function Testing for Model Based Development

Test Execution 2

Test Object = Simulink, ASCET, C-code etc.

19 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

Test Modeling

Test Execution

Test Assessment

Test Reporting

Function Testing for Model Based Development

RT2 Testing Process

1

2

3

4

20 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

− Assessments conducted after test data is collected

− When specific state is active: Analyses focused on a time interval when a

specific state is active

3

Function Testing for Model Based Development

Test Assessment – Time Interval Analysis

Alternatives

Absolute Time

[t >= 50s]

time interval

specified by

absolute time

Time Patterns

[v_vehicle(t)

>= 100 kph]

time intervals

with speed

100

[foo(t) == 1]

[foo(t) == 2]

time intervals

with foo=1

followed by

foo=2

Temporal

Regular

Expressions

Python-based

21 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

Test Modeling

Test Execution

Test Assessment

Test Reporting

Function Testing for Model Based Development

RT2 Testing Process

1

2

3

4

22 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

Requirements Management

− Import/Synchronization of requirements

− Import/Export/Synchronization of test cases

− Import/Export/Synchronization of links

− Impact analysis when requirement changes

− DOORS ® Integration

Customizable Report

Function Testing for Model Based Development

Test Summary and Requirements Tracking 4

23 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

− Intuitive test case creation - Enables users to quickly develop test cases with a short

learning curve

− Test variant management - Enables users to explore functional behavior in multi-

faceted test cases, in large test campaigns

− Powerful assessment capabilities - Allows users to make decisions from test results

without additional tools

− Traceability between requirements and models - Improves quality and ensures that

deliverables meet the needs and expectations of stakeholders

− Test reuse across development phases (MiL/SiL)

Comprehensive tools suite for test design, automation,

assessment and documentation for Simulink® models

Function Testing for Model Based Development

Key Benefits of RT2

24 Public| ETAS GmbH | 2014-03-05 | © ETAS GmbH 2014. All rights reserved, also regarding any disposal, exploitation, reproduction,

editing, distribution, as well as in the event of applications for industrial property rights.

Vielen Dank

Thank you

Merci

有難うございました

감사합니다. 谢谢

More Information: http://www.etas.com/en/products/rt2.php