25
Érika R. C de Almeida 1 , Eliane Martins 1 1 Institute of Computing – State University of Campinas (UNICAMP) Testing model transformations which derive executable test cases from abstract ones

Ladc presentation

Embed Size (px)

Citation preview

Page 1: Ladc presentation

Érika R. C de Almeida1, Eliane Martins1

1Institute of Computing – State University of Campinas (UNICAMP)

Testing model transformations which

derive executable test cases from

abstract ones

Page 2: Ladc presentation

Topics

LADC 20112

Introduction

Model-driven testing (MDT)

Model transformations

Model transformation testing

Conclusion and future work

Page 3: Ladc presentation

Topics

LADC 20113

Introduction

Model-driven testing (MDT)

Model transformations

Model transformation testing

Conclusion and future work

Page 4: Ladc presentation

Introduction

LADC 20114

Software project managers and developers

face a challenge…

Doing so within an ever-shrinking schedule and

with minimal resources

It is necessary to test…

Quickly and thoroughly as possible

Page 5: Ladc presentation

Introduction

LADC 20115

Software project managers and developers

face a challenge…

Doing so within an ever-shrinking schedule and

with minimal resources

It is necessary to test…

Quickly and thoroughly as possible

Automated Testing

Page 6: Ladc presentation

Introduction

LADC 20116

Software project managers and developers

face a challenge…

Doing so within an ever-shrinking schedule and

with minimal resources

It is necessary to test…

Quickly and thoroughly as possible

Automated Testing Initial Cost

Page 7: Ladc presentation

Introduction

LADC 20117

Proposal…

MOST-WEB

Model Based Testing (MBT)

Abstract Test Case Generation

+ Model Driven Testing (MBT)

Executable Test Case Generation

Page 8: Ladc presentation

LADC 20118

Model Based Testing (MBT)

Abstract Test Case Generation

+ Model Driven Testing (MBT)

Executable Test Case Generation

Model Transformation

Page 9: Ladc presentation

Introduction

LADC 20119

Proposal…

MOST-WEBModel Based Testing (MBT)

Abstract Test Case Generation

Model Driven Testing (MBT)

Executable Test Case Generation+

Model Transformation

•Writing complex model transformations is error-prone

•A single faulty transformation can make a whole model-driven

testing process vulnerable

Page 10: Ladc presentation

Introduction

LADC 201110

Model transformation testing

Page 11: Ladc presentation

Introduction

LADC 201111

Model transformation testing

Approach from Fleurey et al.

An adaptation from category-partition testing

Independent of any specific model transformation

language

Associated tool

Metamodel Coverage Checker (MMCC)

Page 12: Ladc presentation

Topics

LADC 201112

Introduction

Model-driven testing (MDT)

Model transformations

Model transformation testing

Conclusion and future work

Page 13: Ladc presentation

LADC 201113

Platform Independent Test

Model (PIT)

Platform Specific Test

Model (PST)

Test Code

Model transformation

Model transformation

Page 14: Ladc presentation

LADC 201114

Platform Independent Test

Model (PIT)

Platform Specific Test

Model (PST)

Test Code

Model transformation

Model transformation

Sequence of Method

Calls (SMC)

xUnit

ATL

MOFScript

Page 15: Ladc presentation

Model transformation testing

LADC 201115

Fleurey’s approach

Model fragments

generation

Test models

coverage

Model

transformation

application

+ +

Page 16: Ladc presentation

LADC 201116

Model fragments

generation

Test models

coverage

Model

transformation

application

+ +

Input:

•Input metamodel of the transformation

Process:

•Generate model fragments

•Properties’ ranges

Page 17: Ladc presentation

LADC 201117

Model fragments

generation

Test models

coverage

Model

transformation

application

+ +

Input:

•Model fragments

•Test models (instances of the input metamodel)

Process:

•Scores test models coverage

Page 18: Ladc presentation

LADC 201118

Model fragments

generation

Test models

coverage

Model

transformation

application

+ +

Input:

•Test models (instances of the input metamodel)

Process:

•Apply model transformation

•Check if the expected output is correct

•Manual oracle

Page 19: Ladc presentation

Model transformation testing

LADC 201119

MMCC application…

Test requirement SMC xUnit

All Partitions 23 33

All Ranges 43 73

Model fragments

generation

Test models

coverage

Model

transformation

application

+ +

Page 20: Ladc presentation

Model transformation testing

LADC 201120

Now we are preparing the test models to

score their coverage on the respective

metamodel

After that we will be able to apply the

model transformation and assert if its

output is correct

Page 21: Ladc presentation

Topics

LADC 201121

Introduction

Model-driven testing (MDT)

Model transformations

Model transformation testing

Conclusion and future work

Page 22: Ladc presentation

Conclusion and future work

LADC 201122

Our goal is…Deriving executable test cases from abstract ones

We are using model-driven testing to achieve itModel transformations

Model transformation testing using Fleurey’sapproachCategory-partition testing

Page 23: Ladc presentation

Conclusion and future work

LADC 201123

The testing process is composed of 3 stages

First stage: OK

Preparing artifacts for second stage

After that, execute the third one

Page 24: Ladc presentation

Acknowledgment

LADC 201124

The authors would like to thank…

RobustWeb project and CAPES for supporting

this study

Institute of Computing (UNICAMP) for

supporting this conference participation

Page 25: Ladc presentation

Questions

LADC 201125

[email protected]