Escolar Documentos
Profissional Documentos
Cultura Documentos
presented at
Ninth Annual
BorlandConference
August 11, 1998
Denver Colorado
by
Email: info@software-architects.com
Phone: (423) 238-3288
Web: www.software-architects.com
Fax: (423) 238-3289
Section 1
Course Overview
Course Goals
Testing Context
Risk Analysis
Why Do We Test?
Testing
The implementation
Improper analysis
Improper design
Improper implementation
Copyright 1993-1998 Timothy Korson. All rights reserved.
Borland Conference, Denver, August 11, 1998
-5
Risk Analysis
Risk Analysis
Complexity of idea
Stability of specification
Iterative Incremental
Development Process
Increments
Domain
Analysis
Domain
Domain
Analysis
Analysis
Iteration
Application
Analysis
Application
Application
Analysis
Analysis
Architecture &
High Level
Architecture
& Design
Architecture
&
High Level Design
High Level Design
Detailed Design
ClassDesign
Development
Detailed
Detailed
Design
Class Development
Class Development
Application
Assembly
Application
Application
Assembly
Assembly
System
SystemTesting
System
Testing
Testing
To generate applications
AND
To develop an inventory of components
and frameworks for use in future projects
What is Different
What do We Test?
Requirements
Models
Architectures and Frameworks
Designs
Components
Class
Cluster
Increments
Applications
Processes
Testing Requirements
Prototypes
Use Cases
Radio Detector
Vehicle
Phase
Thru
1+
Detector
Traffic
Left Turn
2+
Phase Plan
1+
Lane
1+
Pedestrian TCS
Vehicle TCS
1+
Road
Controller
Clock
Testing Models
Pedestrian
Magnetic Detector
Pressure Detector
Testing Frameworks
m(P)
Testing Designs
What If
1. Meets best current practices and guidelines
2. is the most robust against What If?
Testing Components
Testing Increments
ste
m
?
Stubs
Simulation
U
ni
t?
In
cr
em
en
t5
Sy
Testing Applications
Not much new here...
Except
Testing Process
Section 2
Static Testing
Reviews
Inspections
Walkthroughs
Inspecting Requirements
Inspecting Analysis Models
Static Testing
Walkthroughs
Inspections in
Object-Oriented Projects
Good news:
The use of domain terminology in the
development process makes it easier for
clients to effectively participate in
inspections.
Bad news:
The iterative/incremental approach requires
careful coordination and scheduling of
inspections.
Correctness
It is judged to be equivalent to a reference
standard believed to be an infallible source
of truth, i.e. a domain expert.
Completeness
Consistency
There are no contradictions among the
elements within the work product (internal)
or between work products (external).
Create Domain-level
Object Interaction Diagrams
Assignment
Student
Student
Work
Grader
Grade
Create
Assign (Assignment)
Create
Submit (Student Work)
Determine
Record (Grade)
1.
Grade
Book
Annotation
Guardian
Student Work
*
*
* Student
*
Grade
*
Assignment
*
Category
Section 3
Testing Components
In this section we will discuss:
A philosophy of testing
Class testing
- Functional testing
- Structural testing
- Interaction testing
Subclass testing
Cluster testing
Framework testing
-
Exhaustive
Minimal
Weighted
Representative
Representative
Adequate
Types of Objects
Passive
Active
Definition of Terms
Topics
A philosophy of testing
Class testing
Functional testing
Structural testing
Interaction testing
Subclass testing
Cluster testing
Framework testing
Topics
A philosophy of testing
Class testing
Functional testing
Structural testing
Interaction testing
Subclass testing
Cluster testing
Framework testing
Topics
A philosophy of testing
Class testing
Functional testing
Structural testing
Interaction testing
Subclass testing
Cluster testing
Framework testing
int width
Here the two methods
are in the same class
get_width()
stop
read_
lapsed
reset
Simple
Timer
start
stop
read_
lapsed
reset
Topics
A philosophy of testing
Class testing
Functional testing
Structural testing
Interaction testing
Subclass testing
Cluster testing
Framework testing
List
Queue
Stack
Deque
Questions:
Important Question:
Hierarchical Incremental
Testing (HIT)
Superclass
Subclass
Not Defined
Redefinable
Redefinable
Abstract
Abstract
New Code
No New
Code
New Code
No New
Code
New Code
Functional
Tests
Write?
yes
no
no
no
no
Execute?
yes
no
yes
no
yes
Structural
Tests
Write?
yes
no
yes
no
yes
Execute?
yes
no
yes
no
yes
Interaction
Tests
Write?
yes
no*
yes*
no
yes
Execute?
yes
yes
yes
no
yes
m(){...}
m(){...}
m(){...}
m(){...}
m()
m()
m(){...}
Topics
A philosophy of testing
Class testing
Functional testing
Structural testing
Interaction testing
Subclass testing
Cluster testing
Framework testing
Cluster Interface
Cluster
Cluster
Interface
Copyright 1993-1998 Timothy Korson. All rights reserved.
Borland Conference, Denver, August 11, 1998
-50
Rest
of
System
Clusters
Topics
A philosophy of testing
Class testing
Functional testing
Structural testing
Interaction testing
Subclass testing
Cluster testing
Framework testing
Using Frameworks
framework
application
m(P)
Section 4
Testing Strategies
Case Study - Timer Classes
State-Based Testing
add
create
add
Not
Empty
Empty
remove/item
remove/exception
remove/item
This level of testing assures that no necessary methods are missing, but does not guarantee that all
required states are present.
This level of testing assures that no states are missing, but does not guarantee that all required methods
are present.
This level of testing would identify any missing states or methods. It would also identify some extra
states, if they are present.
This level tests combinations of transitions. It will find additional extra states and some corruption.
This level of testing would identify all missing and extra states and methods. It is seldom practical and
often not possible.
Section 5
testMethod1()
testMethod2()
testAll()
Automating Testing
or
void main() {
TesterOfX bar;
bar.functionalSuite();
bar.structuralSuite();
bar.interactionSuite();
}
PACT
TesterOf
Class1
TesterOf
Class2
TesterOf
Class4
TesterOf
Class3
TesterOf
Class5
TesterOf
Class6
Class4
Class1
Class2
Class3
Class5
Class6
Production
Architecture
An Alternative Approach
Class
method1()
testMethod1()
method2()
testMethod2()
...
testAll()
Advantages?
Disadvantages
Section 6
System Testing
In this session we will discuss:
Object-Oriented System
Testing
Object-Oriented System
Testing
Design Test
Cases
System
Test Cases
Use
Cases
Requirement
Use Case
Scenario
...
Scenario
...
Scenario
Iterative Measurement of
Effectiveness
Section 7
Summary
Higher Reliance
on
Functional Testing
Subclass Testing
Not
Defined
Virtual
Virtual
Abstract
Abstract
Subclass
New
Code
No New
Code
New
Code
No New
Code
New
Code
Functional
Tests
Write?
Yes
No
No
No
No
Execute?
Yes
No
Yes
No
Yes
Structural
Tests
Write?
Yes
No
Yes
No
Yes
Execute?
Yes
No
Yes
No
Yes
Interaction
Tests
Write?
Yes
No
Yes
No
Yes
Execute?
Yes
Yes
Yes
No
Yes
PACT
TesterOf
Class1
TesterOf
Class2
TesterOf
Class4
TesterOf
Class3
TesterOf
Class5
TesterOf
Class6
Class4
Class1
Class2
Class3
Class5
Class6
Production
Architecture
Interaction Testing
L4 (23)
1
L8 (27)
L9 (34)
1
System Testing
Developer-led
Testing
Focus
Test Test
GroupGroup
Time
Thanks
Bibliography
Bibliography
[1] Software Quality Management II. Building Quality into Software. Comp. Mech. Publications,
Southampton, UK, 1994.
[2] Marick, Brian. Testing Object-oriented Software. ACM, New York, NY, USA, 1995.
[3] R.D. Ammann, M.H.; Cameron. Measuring program structure with inter-module metrics. IEEE
Comput. Soc. Press, Los Alamitos, CA, USA, 1994.
[4] Thomas R. Arnold and William A. Fuson. Testing in a perfect world. CACM, 37(9):78-86, September 1994.
[5] R.J.; Wright C.; Zweig-D. Banker, R.D.; Kauffman. Automating output size and reuse metrics in a
repository-based computer-aided software engineering (case) environment. IEEE Transactions on
Software Engineering, 20(3):169-87, March 1994.
[6] A. Barbey, S.; Strohmeier. The problematics of testing object-oriented software. Comp. Mech.
Publications, Southampton, UK, 1994.
[7] B. Beizer. Software Testing Techniques. Van Nostrand Reinhold Company, Inc., New York,
1990.
[8] Robert V. Binder. Design for testability in object-oriented systems. CACM, 37(9):87-101, September 1994.
[9] J. Prowse Brownlie, R and M.S. Phadke. Robust testing of AT&T
AT&T Technical Journal, pages 41-47, May-June 1992.
[10]D.M. Chao, B.P.; Smith. Applying software testing practices to an object-oriented software development. OOPS Messenger, 5(2):49-52, April 1994.
[11]Thomas J. Cheatham and Lee Mellinger. Testing object-oriented software systems. In 1990 ACM
Eighteenth Annual Computer Science Conference Proceedings, pages 161-165, 1990.
[12][13]In Sang Chung. Methods of comparing test criteria for object-oriented programs based on subsumption, power relation and test reusability. Journal of the Korea Information Science Society,
22(5):693-704, May 1995.
[14]M.-C. Chung, C.-M.; Lee. Object-oriented programming testing methodology. International
Journal of Mini and Microcomputers, 16(2):73-81.
[15]Z.E. Cusack. Inheritance in object oriented z. In European Conference on Object-Oriented Programming, pages 167-179, 1991.
[16]S.R. Davis. Armor cladding c++ classes. C++ Report vol.6, no.8, p.36-9, 41, Oct. 1994.
[17]P. K. Devanbu, D. S. Rosenblum, and A. L. Wolf. Automated construction of testing and analysis
tools. In Proceedings of 16th International Conference on Software Engineering, pages 241-250, Los
Alamitos, CA, 1994. IEEE Comput. Soc. Tech. Committee on Software Eng., IEEE Comput. Soc.
Press.
[18]R.K. Doong and Phyllis G. Frankl. Case studies on testing object-oriented programs. In Proceedings of the Fourth Symposium on Testing, Analysis and Verification(TAV4), pages 165-177, 1991.
[19]R. J. DSouza and R. J. Leblanc Jr. Class testing by examining pointers. Journal of Object-Oriented Programming, 7(4):33-39, July-Aug 1994.
[20]D. Duke and Roger Duke. Towards a semantics for object-z. In VDM and Z-Formal Methods in
Software Development, pages 244-259, 1990.
[21]Dawn Stockbridge Dunaway and Eugenia Gillan. Applying object-oriented design principles to
developing a test strategy. In 11th International Conference and Exposition on Testing Computer Software, pages 341-368. ASQC and STSC, June 13-16 1994.
[22]M. Felder and P. San Pietro. Testing by executing logic specification. In A.D. Halang, W.A.;
Stoyenko, editor, Proceedings of the NATO Advanced Study Institute on Real Time Computing, pages 683-684, Berlin, Germany, 1994. Springer-Verlag.
[23]S.P. Fielder. Object-oriented unit testing. Hewlett-Packard Journal, April 1989.
[24]S. Frost. Modeling for the rdbms legacy. Object Magazine, 4(5):43-4, 46, 48-51, Sept. 1994.
[25]T.J. Gattis, G.F.; Cheatham. Testing object-oriented software. ACM, New York, NY, USA, 1995.
[26]Mary Jean Harrold and John D. McGregor. Incremental testing of object-oriented class structures. In Proceedings of the International Conference on Software Engineering, pages 68-80, May
1992.
[27]P. A. Hausler, R. C. Linger, and C. J. Trammell. Adopting cleanroom software engineering with a
phased approach. IBM Systems Journal, 33(1):89-109, 1994.
[28]J.H. Hayes. Testing of object-oriented programming systems (oops), 1994.
[29]Ivar Jacobson, Magnus Christerson, Patrik Jonsson, and Gunnar Overgaard. Object-Oriented Software Engineering. Addison-Wesley, 1991.
[30]Paul C. Jorgensen and Carl Erickson. Object-oriented integration testing. CACM, 37(9):30-38,
September 1994.
[31]P. Juettner, P. Zimmerer, U. Naumann, and S. Kolb. A complete test process in object-oriented
software development. In The 7th International Software Quality Week in San Francisco, pages 3-A-2.
Software Research, Inc., May 17-20 1994.
[32]P. Juttner, S. Kolb, S. Sieber, and P. Zimmerer. Testing major object-oriented software systems.
Siemens Review (Special Issue), pages 25-29, Spring 1994.
[33]S. Kanjulal, S. T. Chakradhar, and V. D. Agrawal. A test function architecture for interconnected
finite state machines. In Proceedings of 7th International Conference on VLSI Design, pages 113-116,
Los Alamitos, CA, 1994. VLSI Soc. India, IEEE Comput. Soc. Press.
[34]Mark Lorenz. Object-Oriented Software Development: a practical guide. PTR Prentice Hall, Englewood Cliffs, N.J., 1993.
[35]T. J. McCabe and A. H. Watson. Combining comprehension and testing in object-oriented development. Object Magazine, 4(1):63-64, March-April 1994.
[36]R.L. McGarvey. Object-oriented test development in ABBET. IEEE, New York, NY, USA, 1994.
[37]J.D. McGregor and D. Dyer. A note on inheritance and state machines. Technical report, Clemson
University, 1993.
[38]John McGregor. Constructing functional test cases using incrementally derived state machines. In
11th International Conference and Exposition on Testing Computer Software, pages 377-386. ASQC
and STSC, June 13-16 1994.
[39]John D. McGregor. Selecting functional test cases for a class. In The 7th International Software
Quality Week in San Francisco, pages 2-T-2. Software Research, Inc., May 17-20 1994.
[40]John D. McGregor and Douglas M. Dyer. Selecting specification- based test cases for object-oriented systems. Technical Report, Clemson University, 1993.
[41]John D. McGregor and Tim Korson. Understanding object-oriented: A unifying paradigm. Communications of the ACM, 33(9):40-60, September 1990.
[42]John D. McGregor and Timothy D. Korson. Integrating object-oriented testing and development
processes. CACM, 37(9):59-77, September 1994.
[43]M. D. Smith and D.J. Robson. A framework for testing object-oriented programs. Journal of Object-Oriented Programming, 5(3):45-53, June 1992.
[44]Gail C. Murphy, Paul Townsend, and Pok Sze Wong. Experiences with cluster and class testing.
CACM, 37(9):39-47, September 1994.
[45]Udo Naumann. Experiences in testing object-oriented software. In 11th International Conference
and Exposition on Testing Computer Software, pages 373-376. ASQC and STSC, June 13-16 1994.
[46]A. Parrish and D. Cordes. Applying conventional unit testing techniques to abstract data type. International Journal of Software Engineering and Knowledge, 4(1):103-122, March 1994.
[47]A. Parrish, D. Cordes, and M. Govindarajan. Removal from object- oriented modules. In The 7th
International Software Quality Week in San Francisco, pages 2-T-1. Software Research, Inc., May 1720 1994.
[48]D.E. Perry and G.E. Kaiser. Adequate testing and object-oriented programming. Journal of Object-Oriented Programming, 2:13-19, Jan/Feb 1990.
[49]M.; Staples-G. Petruv, V.; Ross. Testing for tomorrows professionals, 1994.
[50]Robert M. Poston. Automated testing from object models. CACM, 37(9):48-58, September 1994.
[51]Marc Rettig. Testing made palatable. Communications of the ACM, 34(5):25-29, May 1991.
[52]P.G. Roong-Ko Doong; Frankl. The astoot approach to testing object-oriented programs. ACM
Transactions on Software Engineering and Methodology, 3(2):101-30, April 1994.
[53]M.J. Harrold and Rothermel, G.; Selecting regression tests for object- oriented software. IEEE
Comput. Soc. Press, Los Alamitos, CA, USA, 1994.
[54]S.J. Samadzadeh, M.H.; Khan. Stability, coupling, and cohesion of object-oriented software systems. ACM, New York, NY, USA, 1994.
[55]A. Serra and P. Nesi. Object-oriented approach for a non-invasive, automatic testing tool. In The
7th International Software Quality Week in San Francisco, pages 4-A-3. Software Research, Inc., May
17-20 1994.
[56]S. Siegel. Automating integration testing for oo projects. In The 7th International Software Quality
Week in San Francisco, pages 4-A-4. Software Research, Inc., May 17-20 1994. Paper not included in
the conference proceedings.
[57]A.R. Siepmann, E.; Newton. Tobac: a test case browser for testing object-oriented software. SIGSOFT Software Engineering Notes special issue, pages 154-68, 1994.
[58]M.D. Smith and D.J. Robson. Object-oriented programming - theproblems of validation. In Proceedings of the Conference on Software Maintenance, pages 272-281, 1990.
[59]Bob Stahl. How to test object-oriented software. In 11th International Conference and Exposition
on Testing Computer Software, pages 369-372. ASQC and STSC, June 13-16 1994.
[60]S. Subramanian, Wei-Tek Tsai, and S. H. Kirani. Hierarchical dataflow analysis for o-o programs.
Journal of Object-Oriented Programming, 7(2):36-46, May 1994.
[61]C.D. Turner and D.J. Robson. The testing of object-oriented programs. Technical report, University of Durham, England, 1992.
[62]J.; Mraz R. Von Mayrhauser, A.; Walls. Sleuth : a domain based testing tool. In Int. Test Conference, Altoona, PA, USA, 1994.
[63]Chi-Ming Chung; Ming-Chi Lee; Ching-Chian Wang. Inheritance testing for object-oriented programming by transitive, closure strategies. Advances in Modelling & Analysis B, 31(2), 1994.
[64]K.; Srivastava A.; Krueger-J. Weber, R.; Thelen. Automated validation test generation. 1994.
[65]Stuart H. Zweben. Testing formally specified data-oriented modules using program-based test
data adequacy criteria. Technical report, Ohio State University, 1989.