Documente Academic
Documente Profesional
Documente Cultură
OO testing Activities
Review OOA and OOD models
Class testing after code is written
Integration testing within subsystems
Integration testing as subsystems are added to the
system
Validation testing based on OOA use-cases
Cont’d…
Correctness of OOA/OOA Models
Syntactic correctness
judged by making sure proper modeling
conventions and symbolism were used
Semantic correctness
Does the model reflect the real world
problem?
Cont’d…
Consistency of OOA/OOD Models
Assess the class-responsibility-collaborator (CRC)
model and object-relationship diagram
Review system design
examine the object-behavior model to check
mapping of system behavior to subsystems
review concurrency and task allocation
examine the use-case scenarios and exercise the
user interface design
Cont’d
Test object model against the object relationship
network to ensure that all design object contain
necessary attributes and operations needed to
implement the collaborations defined for each
CRC card
Class Model Assessment
1. Revisit the Use Cases, CRC cards and UML
class model. Check that all collaborations are
properly represented.
Inspect the description of each CRC index card
to make sure a delegated responsibility is part of
the collaborator’s definition.
Cont’d…
Example: in a point of sale system.
A read credit card responsibility of a credit sale
class is accomplished if satisfied by a credit
card collaborator
2. Invert connections to ensure that each
collaborator asked for a service is receiving requests
from a reasonable source
Example: a credit card being asked for a
purchase amount
Cont’d
3. Using the inverted connections from step 3, determine
whether
other classes might be required
responsibilities are properly grouped among classes
Object-oriented Testing Strategies
1) Unit Testing
Smallest testable unit is the encapsulated class or
object.
Approach:
Test each method within a class
Test the attributes of the class between
methods
Cont’d
2) Integration Testing
Focuses on groups of classes that collaborate in
some manner
Integration of operations one at a time into a
class is often meaningless
Because of direct and indirect interaction of
components
Cont’d…
Thread-based testing
testing all classes required to respond to one
system input or event
Use-based testing
test independent classes first
test dependent classes making use of them next
Cluster testing
groups of collaborating classes are tested for
interaction errors.
Cont’d….
3)Validation Testing
Are we building the right product?
Validation succeeds when software functions in
a manner that can be reasonably expected by the
customer.
Focuses on visible user actions and user
recognizable outputs
Validation tests are based on the use-case
scenarios
Apply:
Black-box testing to create a deficiency list
Acceptance tests through alpha (at developer’s site) and
beta (at customer’s site) testing with actual customers
Cont’d…
4) System Testing
Types of System Testing:
Recovery testing: how well and quickly does
the system recover from faults
Security testing: verify that protection
mechanisms built into the system will protect
from unauthorized access (hackers, disgruntled
employees, fraudsters)
Stress testing: place abnormal load on the
system
Performance testing: investigate the run-time
performance within the context of an integrated
system
Notice
Requirements
Design
Implementation
Testing
Maintenance
Drawback of the waterfall model
It is the difficult to accommodate changes after the
process is underway. In principle, a phase has to be
complete before moving onto the next phase.
Inflexible partitioning of the project into distinct
stages makes it difficult to respond to changing customer
requirements.
–Therefore, this model is only appropriate when the
requirements are well-understood and changes will
be fairly limited during the design process.
–Few business systems have stable requirements.
Incremental Model
Incremental development model benefits
• The cost of accommodating changing customer
requirements is reduced.
–The amount of analysis and documentation that has to
be redone is much less than is required with the waterfall
model.
• It is easier to get customer feedback on the development
work that has been done.
• More rapid delivery and deployment of useful software to
the customer is possible.
–Customers are able to use and gain value from the
software earlier than is possible with a waterfall process.
Incremental development model problems
• The process is not visible.
–Managers need regular deliverables to measure
progress. If systems are developed quickly, it is
not cost-effective to produce documents that
reflect every version of the system.
• System structure tends to degrade as new
increments are added.
–Unless time and money is spent on refactoring
to improve the software, regular change tends
to corrupt its structure.
25