Towards%20Model-Driven%20Unit%20Testing%20Gregor%20Engels%20Baris%20G - PowerPoint PPT Presentation

About This Presentation
Title:

Towards%20Model-Driven%20Unit%20Testing%20Gregor%20Engels%20Baris%20G

Description:

system state sk. system state sk 1. return. exception. implemented ... Development Process and existing tools. Editor for visual contracts. Model checking tool ... – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 16
Provided by: barisg
Category:

less

Transcript and Presenter's Notes

Title: Towards%20Model-Driven%20Unit%20Testing%20Gregor%20Engels%20Baris%20G


1
TowardsModel-Driven Unit TestingGregor
EngelsBaris GüldaliMarc Lohmann02. October
20063rd Workshop on Model design and Validation
_at_ MoDELS 2006
2
Unit Testing
Model-driven Unit Testing
1
Models
3
2
generate
generate
4
Test Case Input
Expected Output
Test Oracle
Test Case Input
Actual Result
Test Cases
Operation
Comparator
Pass/No Pass
3
Development Process
4
UML Class Diagrams Visual Contracts
5
Model-driven Unit Testing
?
1
Models
3
2
generate
generate
4
Test Case Input
Expected Output
Test Oracle
Operation under Test
Test Case Input
Actual Result
Test Cases
Comparator
Pass/No Pass
6
Test Oracle
Designer
created by
Test driver
SUT
check pre-condition
created by
else
throw pre-condition exception
pre-condition holds

system state sk1
execute originaloperation with call parameters
system state sk
implemented by
call operation under test
Programmer
Pass
check post-condition
return
else
throw post-condition exception
exception
post-condition holds
No Pass
return normally
7
Model-driven Unit Testing
  • Which test cases are adequate for testing a
    system wrt. a testing criterion?
  • How can a SUT be set to a state where the test
    cases can be executed?

?
1
Models
?
3
2
generate
generate
4
Test Case Input
Expected Output
Test Oracle
Operation under Test
Test Case Input
Actual Result
Test Cases
Comparator
Pass/No Pass
8
Test Case Generation
  • Test case inputs call parameters system state
  • Generation of call parameters
  • P cidabc, prNodef, num1
  • Generation of system state

Well-known test case generation techniques or
random generation
sinput
9
Setting System State

10
Setting System State
  1. Generation of system setting sequence

s0
cartCreate


s1
s2






st
su

operationn
Model checking techniques for computation of
the system setting sequence cartCreate, ,
operationn
sv

sv ? sinput
11
Model-driven Unit Testing
?
1
Models
?
?
3
2
generate
generate
4
Test Case Input
Expected Output
Test Oracle
Operation under Test
Test Case Input
Actual Result
Test Cases
Comparator
Pass/No Pass
12
Development Process Testing
VC Workbench
JML
JML Compiler
JMLUnit
13
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

14
Thank you for your attention!Any questions?
15
Contact
  • Software Quality Lab
  • University of Paderborn
  • Warburger Str. 100
  • 33098 Paderborn
  • Germany
  • http//s-lab.upb.de
  • Baris Güldali
  • baris_at_s-lab.upb.de
  • Telefon 49 5251-60 53 91
  • Fax 49 5251-60 34 31
Write a Comment
User Comments (0)
About PowerShow.com