execution of utp test cases using fuml...niels hoppe exe 2018 in copenhagen, denmark october 14th,...

29
Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

Upload: others

Post on 26-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

Niels Hoppe

EXE 2018 in Copenhagen, Denmark

October 14th, 2018

EXECUTION OF UTP TEST CASES USING FUML

Page 2: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

2

Niels Hoppe

Student in working group of Marc-Florian Wendland, SQC

[email protected]

Co-author

© Fraunhofer FOKUS

INTRODUCTION

Page 3: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

3

Agenda

© Fraunhofer FOKUS

1. Introduction and motivation

2. Executable UTP test models

3. Mapping and transformation

4. Execution in Moka

5. Conclusion

INTRODUCTION

Page 4: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

4

Influencing standards

INTRODUCTION TO UTP

Conceptual standards Technical standards

ISO 29119

ETSI MBT

ISTQB syllabi

ETSI TTCN-3

UML

UTP 1.X

ISO/IEC 61508 ISO 26262Do-178C EN 50129 …

Support for domain-specific standards

2.0

Page 5: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

5

Test Data Values

Conceptual overview of UTP

© Fraunhofer FOKUS

INTRODUCTION TO UTP

Test Context

Test Case

Arbitration Specification

Test Set

Test Design Directive

Test Objective

Test Actions

Test Component

Test Item

UTP 2

Test Configuration

Test Requirement

Test Execution Schedule

Test Log Structure

Test Definition LayerTest Generation Layer Test Execution Layer

Test Data Specification

Test Management / Test Planning (dynamic test process)

Test Design Technique

Test Design Input

Test Type Test Level

Test Log

Page 6: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

6

Classic Software Engineering

© Fraunhofer FOKUS

MOTIVATION

Requirements

Test SystemSystem

Page 7: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

7

Model-Driven Software Engineering

© Fraunhofer FOKUS

MOTIVATION

Requirements

Test model

Test SystemSystem

System modelUML, SysML, etc. UML Testing Profile

TTCN-3, JUnit,

Robot, etc.

Page 8: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

8

Model-Based Shift Left Testing

© Fraunhofer FOKUS

MOTIVATION

Requirements

Test model

Test SystemSystem

System model

UML, SysML,

fUML, etc.

Executable

specification

UML Testing

Profile

Execution

semantics based

on fUML and

PSCS

Page 9: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

9

Contributions of this paper

© Fraunhofer FOKUS

1. Requirements and constraints for executable UTP test models

2. Examples for executable UTP test model and adaptation model

3. Mapping and QVTo transformation

4. Execution environment based on Eclipse and Moka

MOTIVATION

Page 10: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

10

Structure overview

© Fraunhofer FOKUS

Test context

Test set 1

Test configuration

Test case 1.1

Test case 1.2

Test set 2

EXECUTABLE UTP TEST MODELS

Page 11: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

11

Test configuration

© Fraunhofer FOKUS

EXECUTABLE UTP TEST MODELS

Page 12: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

12

Test configuration and test cases

© Fraunhofer FOKUS

EXECUTABLE UTP TEST MODELS

Page 13: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

13

Test case behavior

© Fraunhofer FOKUS

EXECUTABLE UTP TEST MODELS

Page 14: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

14

Transformation

© Fraunhofer FOKUS

• Transformation from platform-independent test model to platform-specific test model

• Platform is fUML and PSCS

• Mapping rules for:

• Test sets

• Test cases

• Test components and actions

MAPPING AND TRANSFORMATION

Page 15: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

15

Test sets

© Fraunhofer FOKUS

• (Structure)

• Behaviors:

1. Setup

2. Teardown

3. Main

4. Factory

MAPPING AND TRANSFORMATION

Page 16: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

16

Test cases

© Fraunhofer FOKUS

• Structure

1. Resolution of Generalization

2. Property coordinator: Component to coordinate test components

3. Owned Connector: Synchronization Bus

• Behaviors:

1. Setup

2. Teardown

3. Main

4. Factory

5. <<Create>> Constructor

MAPPING AND TRANSFORMATION

Page 17: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

17

Test cases

© Fraunhofer FOKUS

MAPPING AND TRANSFORMATION

Page 18: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

18

Test cases

© Fraunhofer FOKUS

MAPPING AND TRANSFORMATION

Page 19: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

19

Test cases

© Fraunhofer FOKUS

MAPPING AND TRANSFORMATION

Page 20: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

20

Test cases

© Fraunhofer FOKUS

MAPPING AND TRANSFORMATION

Page 21: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

21

Test cases

© Fraunhofer FOKUS

MAPPING AND TRANSFORMATION

Page 22: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

22

Test case coordinator

© Fraunhofer FOKUS

• Structure

1. Property testCase: Reference to

containing test case

• Behavior

1. Main

• Synchronization of test components

through StartSignal and

CompletionSignal

• Distribute test case log to test

components

MAPPING AND TRANSFORMATION

Page 23: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

23

Test components

© Fraunhofer FOKUS

• (Structure)

• Behaviors:

1. Main, implements test actions

• CreateStimulus

• ExpectResponse

• Logging

• Synchronization via

GeneralOrderings

MAPPING AND TRANSFORMATION

Page 24: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

24

Test components

© Fraunhofer FOKUS

• (Structure)

• Behaviors:

1. Main, implements test actions

• CreateStimulus

• ExpectResponse

• Logging

• Synchronization via

GeneralOrderings

MAPPING AND TRANSFORMATION

Page 25: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

25

Test components

© Fraunhofer FOKUS

• (Structure)

• Behaviors

1. Main, implements test actions

• CreateStimulus

• ExpectResponse

• Logging

• Synchronization via

GeneralOrderings

MAPPING AND TRANSFORMATION

Page 26: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

26

Extension and customization of Moka

© Fraunhofer FOKUS

• Implementation of OpaqueBehaviors in Java:

• Initialization and finalization of test logs

• Creation of test log entries

• Construction strategy for N-ary Connectors

EXECUTION IN MOKA

Page 27: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

27

Logs generated during execution

© Fraunhofer FOKUS

EXECUTION IN MOKA

Page 28: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

28

Achievements

© Fraunhofer FOKUS

First definition of executable

subset of UTP

Mapping and transformation

Execution and logging

First steps towards precise execution

semantics for UML Testing Profile

CONCLUSION AND FUTURE WORK

Next steps

• Integration with analysis and

arbitration of logs

• Support for operations,

complex actions, etc.

• Proof of concept for real-world adapter

• Improve efficiency of implementation

Page 29: EXECUTION OF UTP TEST CASES USING FUML...Niels Hoppe EXE 2018 in Copenhagen, Denmark October 14th, 2018 EXECUTION OF UTP TEST CASES USING FUML

29© Fraunhofer FOKUS

THE END