Towards Model-Driven Unit Testing Gregor Engels Baris Güldali Marc Lohmann 02. October 2006 3rd Workshop on Model design and Validation.

Slides:



Advertisements
Similar presentations
Visual Model-based Software Development EUD-Net Workshop, Pisa, Italy September 23 rd, 2002 University of Paderborn Gregor Engels, Stefan Sauer University.
Advertisements

5. December 2003 (Folie 1) Protocol Consistency Checking of UML Statecharts Barış Güldalı ADvenTmatik 2003 Definitionen Automated Consistency.
Multi-Paradigm Models as Source for Automatic Test Construction Victor Kuliamin ISP RAS, Moscow.
Formal Specification of Topological Relations Erika Asnina, Janis Osis and Asnate Jansone Riga Technical University The 10th International Baltic Conference.
Unit Testing CSSE 376, Software Quality Assurance Rose-Hulman Institute of Technology March 27, 2007.
How Can Simple Model Test Complex System Model Based Testing of Large-Scale Software Victor Kuliamin ISP RAS, Moscow.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
1 SWE Introduction to Software Engineering Lecture 15 – System Modeling Using UML.
Fall 2007CS 2251 Software Engineering Intro. Fall 2007CS 2252 Topics Software challenge Life-cycle models Design Issues Documentation Abstraction.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
1 Advanced Material The following slides contain advanced material and are optional.
Chapter 1 Software Engineering. Homework ► Read Section 2.2 (pages 79-98) ► Answer questions: ► 7, 8, 11, 12, & 13 on page 134. ► Answer on paper, hand.
Chair of Software Engineering Automatic Verification of Computer Programs.
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Dr. Pedro Mejia Alvarez Software Testing Slide 1 Software Testing: Building Test Cases.
Lecture 6 Software Testing and jUnit CS140 Dick Steflik.
Designing and Performing Geographic Analysis Processes with GISCASE Cirano Iochpe, Guillermo N. Hess, Cláudio Ruschel, Alécio P. D. Binotto, Luciana V.
SE-280 Dr. Mark L. Hornick Design Review Issues. SE-280 Dr. Mark L. Hornick 2 Many expensive defects are a result of design problems Software applications.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Operation, Algorithm, and Data Structure Specification, and Design Finalization.
Verification and Test Automation of UML Projects Nikita Voinov, Vsevolod Kotlyarov (Saint-Petersburg State Polytechnic University) The Third Spring Young.
An analysis of exam results in the Object-Oriented Programming course at „Politehnica” University of Timisoara Ioan Jurca.
Software Verification Academician V.P.Ivannikov, Director of ISPRAS Moscow, November 2008.
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
Contract based programming Using pre- and post-conditions, and object invariants Contract based programming1.
Program documentation Using the Doxygen tool Program documentation1.
111 Protocols CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 8) Meyer, B., Applying design by contract,
Low-Level Detailed Design SAD (Soft Arch Design) Mid-level Detailed Design Low-Level Detailed Design Design Finalization Design Document.
CSC264 Modelling and Computation 10. Modelling State Steve Riddle, John Fitzgerald, Maciej Koutny Computing Science Semester /06.
University of Paderborn Software Engineering Group Prof. Dr. Wilhelm Schäfer Towards Verified Model Transformations Holger Giese 1, Sabine Glesner 2, Johannes.
Code Contracts Parameterized Unit Tests Tao Xie. Example Unit Test Case = ? Outputs Expected Outputs Program + Test inputs Test Oracles 2 void addTest()
A Static Approach to Consistency Verification of UML Models Andrea Baruzzo Department of Computer Science University of Udine MoDeV.
October 2004J. B. Wordsworth J4ISDSPE1 Information Systems Development Specification.
Documentation Dr. Andrew Wallace PhD BEng(hons) EurIng
DEVS Based Modeling and Simulation of the CORBA POA F. Bernardi, E. de Gentili, Pr. J.F. Santucci {bernardi, gentili, University.
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
Semantics In Text: Chapter 3.
Lab 5 CPIT 250 System Analysis and Design.
Using Cycle-Accurate Contract Specifications for Testing Hardware Models Alexander Kamkin Institute for System Programming of RAS
TK2023 Object-Oriented Software Engineering CHAPTER 12 Introduction to Responsibility-Driven Design.
Quality Criteria Meeting in Paderborn Chair of Business and Human Resource Education II Prof. Dr. Marc Beutner EU-StORE: QUALITY CRITERIA MEETING in Paderborn,
Software Engineering 2004 Jyrki Nummenmaa 1 BACKGROUND There is no way to generally test programs exhaustively (that is, going through all execution.
Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.
1 ECCF Training 2.0 Guidance for the Platform Independent Model (PIM) ECCF Training Working Group January 2011.
Verificare şi Validarea Sistemelor Soft Tem ă Laborator 1 ESC/Java2 Extended Static Checker for Java Dat ă primire laborator: Lab 1 Dat ă predare laborator:
Copyright 2004 Scott/Jones Publishing Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 6 Functions.
Chapter 1 Software Engineering Principles. Problem analysis Requirements elicitation Software specification High- and low-level design Implementation.
1 Contractual Consistency Between BON Static and Dynamic Diagrams Ali Taleghani July 30, 2004.
Whole Test Suite Generation. Abstract Not all bugs lead to program crashes, and not always is there a formal specification to check the correctness of.
Objects, If, Routines. Creating Objects an object is a fundamental software element that has a state and a set of behaviors. Ex: bank account or student.
SOFTWARE TESTING AND QUALITY ASSURANCE. Software Testing.
Testing It is much better to have a plan when testing your programs than it is to just randomly try values in a haphazard fashion. Testing Strategies:
Copyright © Siemens AG All rights reserved. Corporate Technology A Test Scenario Description Language Bridging the gap between model-based testing.
Programming what is C++
– YES – Youth Engagement in Society ( NO02-KA )
TQS - Teste e Qualidade de Software (Software Testing and Quality) Test Case Design – Model Based Testing João Pascoal.
Accessible Formal Methods A Study of the Java Modeling Language
Chapter 1 Software Engineering.
SWE 332 Last Modified Spring 2010 Paul Ammann
Median Finding and Quick Sort
How do we convince people that in programming simplicity and clarity —in short: what mathematicians call "elegance"— are not a dispensable luxury, but.
Programming Languages 2nd edition Tucker and Noonan
Programming Language Basics
Java Modeling Language (JML)
CSE 1020:Software Development
Programming Languages 2nd edition Tucker and Noonan
Programming Languages 2nd edition Tucker and Noonan
IoT Modelling Framework and Papyrus Shuai Li, CEA
Unit Testing.
Presentation transcript:

Towards Model-Driven Unit Testing Gregor Engels Baris Güldali Marc Lohmann 02. October rd Workshop on Model design and MoDELS 2006

© s-lab, University of Paderborn - Engels, Güldali, Lohmann: Towards Model-Driven Unit Testing Model-driven Unit TestingUnit Testing Test CasesOperationComparator Test Case InputActual Result Expected Output Pass/No Pass Test Oracle Test Case Input Models generate

© s-lab, University of Paderborn - Engels, Güldali, Lohmann: Towards Model-Driven Unit Testing Development Process

© s-lab, University of Paderborn - Engels, Güldali, Lohmann: Towards Model-Driven Unit Testing UML Class Diagrams & Visual Contracts

© s-lab, University of Paderborn - Engels, Güldali, Lohmann: Towards Model-Driven Unit Testing Model-driven Unit Testing Test Cases Operation under Test Comparator Test Case InputActual Result Expected Output Pass/No Pass Test Oracle Test Case Input Models generate 

© s-lab, University of Paderborn - Engels, Güldali, Lohmann: Towards Model-Driven Unit Testing call operation under test execute original operation with call parameters Test Oracle Test driverSUT … check pre-condition check post-condition throw pre-condition exception throw post-condition exception return normally [pre-condition holds] [post-condition holds] [else] syste m state s k system state s k+1 return exception implemented by created by Programmer Designer Pass No Pass

© s-lab, University of Paderborn - Engels, Güldali, Lohmann: Towards Model-Driven Unit Testing Model-driven Unit Testing Test Cases Operation under Test Comparator Test Case InputActual Result Expected Output Pass/No Pass Test Oracle Test Case Input Models generate   1.Which test cases are adequate for testing a system wrt. a testing criterion? 2.How can a SUT be set to a state where the test cases can be executed?

© s-lab, University of Paderborn - Engels, Güldali, Lohmann: Towards Model-Driven Unit Testing Test case inputs: call parameters + system state 1.Generation of call parameters P = {cid=„abc“, prNo=„def“, num=1} 2.Generation of system state Test Case Generation Well-known test case generation techniques or random generation s input =

© s-lab, University of Paderborn - Engels, Güldali, Lohmann: Towards Model-Driven Unit Testing Setting System State …

© s-lab, University of Paderborn - Engels, Güldali, Lohmann: Towards Model-Driven Unit Testing … Setting System State 3.Generation of system setting sequence s v ⊇ s input s0s0 s1s1 s2s2 stst susu svsv … … … … … … … … cartCreate operation n … Model checking techniques for computation of the system setting sequence: cartCreate, …, operation n

© s-lab, University of Paderborn - Engels, Güldali, Lohmann: Towards Model-Driven Unit Testing Model-driven Unit Testing Test Cases Operation under Test Comparator Test Case InputActual Result Expected Output Pass/No Pass Test Oracle Test Case Input Models generate  

© s-lab, University of Paderborn - Engels, Güldali, Lohmann: Towards Model-Driven Unit Testing Development Process + Testing VC Workbench JML Compiler JMLUnit JML

© s-lab, University of Paderborn - Engels, Güldali, Lohmann: Towards Model-Driven Unit Testing Conclusion To do: Discussions on MoDeVa and other platforms Applying on a bigger case study Further reasearch with the aim of a dissertation Visual contracts for behavioral specification Generation of –Test oracles –Test cases Development Process and existing tools –Editor for visual contracts –Model checking tool –Test driver

© s-lab, University of Paderborn - Engels, Güldali, Lohmann: Towards Model-Driven Unit Testing Thank you for your attention! Any questions?

© s-lab, University of Paderborn - Engels, Güldali, Lohmann: Towards Model-Driven Unit Testing Contact Software Quality Lab University of Paderborn Warburger Str Paderborn Germany Baris Güldali Telefon: Fax: