JUnit Presentation
JUnit Presentation
Deli o rk
v r s w
app ered om e r re
licat
ion r y cust lo pe
An g ve
d e
er /
Itera to m
tion u s
build C
s e
r tim
e
API e lop
e v
D
Testing
“Exercising a product to identify differences
between expected and actual behaviour”
Testing is more natural than formal
methods.
Testing may scale better than formal
Unit
Basic
Call Coverage
Branch Coverage
Statement Coverage
Condition Coverage
Multiple Condition Coverage
Loop Coverage
Path Coverage
Advanced
Clover
Nature of testing
Specification, implementation, test cases
Return only copies of fields (reference types)
JUnit overview
Test case: method with test+MethodName
Test fixture: class collecting common tests
Test suite: set of fixtures
Assertions
Execution model
Multiple instantiation of test class
Independence of test cases
No ordering guarantee
Conclusion