business integration technologies © 2006 ibm corporation zurich research laboratory - bit ...

15
Business Integration Technologies http://bpia.zurich.ibm.com Zurich Research Laboratory - BIT http://bpia.zurich.ib m.com © 2006 IBM Corporation Validation of Model Transformations - First Experiences using a White Box Approach Jochen Küster 1 , Mohamed Abd-El-Razik 2 1 IBM Research, 2 IBM Cairo Technology Development Center

Upload: emil-logan

Post on 02-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Business Integration Technologies http://bpia.zurich.ibm.com

Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

© 2006 IBM Corporation

Validation of Model Transformations

- First Experiences using a White Box Approach

Jochen Küster1, Mohamed Abd-El-Razik2

1IBM Research, 2IBM Cairo Technology Development Center

Validation of Model Transformations

© 2006 IBM Corporation2 Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

Outline of the talk

Model Transformations for Business Process Models

Testing Techniques for Model Transformations

Conclusions

Validation of Model Transformations

© 2006 IBM Corporation3 Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

ITSolution

Business Process Model

BusinessRequirements

BusinessRequirements

Business ModelBusiness Model

TechnologyBPEL, WSDL, J2EE, WebSphere

TechnologyBPEL, WSDL, J2EE, WebSphere

Model refinement

Model transformation

business process monitoring,

change of strategy

Business-driven development comprises:

Modeling of business processes

Transformation and refinement of business process models

Mapping of processes to Service-oriented Architecture

Background: Business-Driven Development

Validation of Model Transformations

© 2006 IBM Corporation4 Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

Model Transformations on Business Process Models

Cycle Removal Transformation

Transformations for Abstraction and Refinement

Transformations into a Normal Form (Control Action To Pinset)

Control Action To Pinset transformation

Validation of Model Transformations

© 2006 IBM Corporation5 Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

Conceptual Rules for Transformation Design

A

B1

Bn

AB1

Bn

.. ..

Conceptual rules capture the main concepts of the transformation

Conceptual rules are refined into concrete rules by:

– Replacing abstract node types with concrete ones

– Replacing abstract edges with possible instantiations

– Replacing abstract pin sets with possible instantiations

large meta model and elaborate OCL constraints

model transformation is implemented in Java using a transformation framework

AAbstract node type:

Abstract pinset:

Abstract edge:

Validation of Model Transformations

© 2006 IBM Corporation6 Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

Outline of the talk

Model Transformations for Business Process Models

Testing Techniques for Model Transformations

Conclusions

Validation of Model Transformations

© 2006 IBM Corporation7 Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

Motivation for Testing Model Transformations

Statement: “Model Transformations are software too.”

need to be properly tested in order to ensure their quality

have specific characteristics that require special test case generation approaches

Testing challenges:

Generation of test cases from model transformation specifications

Generation of test oracles for determining expected result of test

Validation of Model Transformations

© 2006 IBM Corporation8 Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

Fault Model for Model Transformations

Fault Model: what errors are we looking for?

Meta model coverage: Some input models are not transformed because conceptual rule has not been refined completely

Syntactically incorrect models: Output model is not syntactically correct (e.g. OCL constraint violated)

Semantically incorrect models: Output model is not semantically correct (e.g. Fork has been replaced by an implicit decision)

Confluence errors: Transformation produces different outputs on the same (or equivalent) input model

Correctness of transformation semantics: Transformation does not preserve a desired property

Validation of Model Transformations

© 2006 IBM Corporation9 Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

Meta model coverage testing (1)

Goal: Ensure meta model coverage of a conceptual rule

Approach: Convert conceptual rule into a template

Make selected abstract elements concrete

Parameterize remaining abstract elements by meta classes

Conceptual rule:A

B1

Bn

AB1

Bn

.. ..

Y

ZXTemplate(X,Y,Z):

X={StartNode, Fork, Join, Decision, Merge, Task, Subprocess, LoopNode, Broadcast, AcceptSignal}

Y={FinalNode, Fork, Join, Decision, Merge, Task, Subprocess, LoopNode, Broadcast, AcceptSignal, Map}

Z={FinalNode, Fork, Join, Decision, Merge, Task, Subprocess, LoopNode, Broadcast, AcceptSignal, Map}

Abstract pins and pin sets

Concrete elements

Validation of Model Transformations

© 2006 IBM Corporation10 Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

Meta model coverage testing (2)

Benefits:

can be used for ensuring meta model coverage of implemented rules

can be used for finding selected syntactic and semantic errors

Drawbacks:

properties that are not restricted to one rule cannot be validated

Test Cases:

Template can be used to generate test cases automatically

Test cases can be used for automated testing

Validation of Model Transformations

© 2006 IBM Corporation11 Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

Constraint-based testing

Goal: Ensure that the model transformation does not violate constraints (e.g. OCL constraints)

Approach:

Identify model elements changed by the transformation (automatable)

Identify constraints that may be violated (automatable)

Construct a test case for each constraint (manually)

Constraint: A Loopnode has one regular output pin set

Test case:

Validation of Model Transformations

© 2006 IBM Corporation12 Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

Rule Pair Testing (1)

Goal: Find confluence errors by testing

Background:

confluence requires that application of rules on the same model always yields the same result

rules can be analysed and verified whether they are confluent or not (see J. Küster, Definition and Validation of Model Transformations, SOSYM 5(3), September 2006)

absence of complete specification of rules: Testing for confluence using suitable test cases

Validation of Model Transformations

© 2006 IBM Corporation13 Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

Rule Pair Testing (2)

Approach:

test cases obtained by constructing models by overlapping the left sides of two rules

throw away incorrect models

AB1

Bn

.. A2

C1

Cn

..Rule r3Rule r1

Possible test case obtained by overlapping:

A2 = Fork, B1 = Decision

Validation of Model Transformations

© 2006 IBM Corporation14 Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

Conclusions and Future Work

Model transformations need appropriate testing techniques in order to ensure their quality

Testing techniques need to take into account fault model and implementation environment

Meta model coverage, constraint-based and rule pairs for test cases proposed

Future work:

Automatic generation of test cases for constraints

Tool support

Validation of Model Transformations

© 2006 IBM Corporation15 Zurich Research Laboratory - BIT http://bpia.zurich.ibm.com

Business Integration Technologies @ Zurich Research

The Business Integration Technologies group is part of a world-wide research initiative on Model-Driven Business Transformation.

BIT focuses on technologies for business-driven development.

Integrate

TransformManage

Monitor

Model Process modeling methodologies

Reference model customization

Process model quality assurance

Flow-driven and state-driven modeling

Process Model Refinement

Top-down and Bottom-up transformations

- Analysis to Design model transformations

- Capturing of IT requirements & architectural mismatches