Object Oriented Testing
Object Oriented Testing
SOFTWARE
ENGINEERING
Object Oriented software Testing
Roll No:19
Roll No:20
AN OVERVIEW OF TESTING
Testing is defined as the activity to
check whether the actual results match
the expected results and to ensures
that software is defect free
50% of development effort is being
spend
TEST
Unit testing
TYPES
Integration testing
System testing
Regression testing
Operation testing
Full-scale testing
Performance testing
Stress testing
Negative testing
Test based on requirement specification
Ergonomic tests
Testing of user documents
Acceptance testing
Alpha testing
beta testing
TEST TYPES
Unit Testing--one and only one unit is tested
Integration testing—units are working
together correctly
System testing—integrated whole system
working correctly
Regression test– when made changes in
system, to verify the old functionality remains
Operation test—if system has to be
reconfigured during operation, should be
tested
Full scale test—run program in maximum
limits
Many simultaneous users , use cases ,
equipments are connected
TEST TYPES
Performance test—measure the performance
with different load
e.g. Store allocation , CPU utilization , speed
Stress testing
Stress test—an overload test
Negative test—perform to break the system
and verify the response of application during
unwanted inputs
Requirements specification test—check
explicitly requirement specification
Ergonomic test—user support and usability
test
Is the interface consistent between several
interfaces?
Are the menu readable?
TEST TYPES
Testing of user documents– user manual
and documentation for maintenance should
be checked
For language
Readability test
Balance between text
Balance between text and picture
inspections
Requirements UML
Software Database
specification diagram
architecture schemas program
model
System
prototype
Testing
Test
program
Expected
output
tested
unit
Release testing
User testing
1. DEVELOPMENT
TESTING
Development testing includes all
testing activities that are carried out by
the team developing the system.
Testing group are responsible for
developing tests and maintaining the
test details.
Testing carried out at the three level of
granularity:
A. Unit testing
B. Component testing(integration)
C. System testing
System
Sub System
Integration Testing
Service
package
Blocks
Unit Testing
Class
Fig: unit testing and integration testing are made on different levels
NOTE that service package and blocks are tested in both manners
TESTING ACTIVITIES
construction Testing
system
system
Sub system
sub
system Use case
Use case
Service packages Service packages
blocks blocks
classes class
Fig: the member function in (a) can be tested with only two test
Cases illustrated in(b) to do a full cover of each DDpath
unit test cont….
STRUCTURAL TESTING CONT……
polymorphism
Dynamic binding : runtime binding/late
binding
E.g.
Class member{
…………………..
Abstract boolean validate payment ( account a , int
amount , card c );
Gold member
………………………. Nepal Acc
Silver member China Acc
} Bronze Pakistan Acc
member EU Acc
Japan Acc
Visa card 3*5*3=45 possible combination of
Debit card dynamic binding
AM express Often difficult to find and test all binding
card that may occurs
unit test cont….
STRUCTURAL TESTING CONT……
Polymorphism
Cont…..
STRUCTURAL TESTING CONT…..
Inheritance
Not only when we modify an ancestor class
must we re-test the descendants, but also
when we added a new descendent we may
need to re-test inherited operations
class A {
Protected int x= 200; // invariant x>100
…………………………………
Void m()
{ ………………… //correctness depends on variable }
}
Above condition
Class B extends A { is not defined
here
Void m1() {x=1,2,3,…….}
}
State-Based testing
While messaging passing from one
object to another or receiving
message from object perform some
tasks (operation) which leads to
alternation of it’s state
STATE-BASED TESTING
Order received
Unprocessed
order
Checked (reject)
Checked (accept)
Fulfilled
Pending order
system
Inp
100000
9999 10000 50000 99999
Less than 10000 Between 10000 and 99999 More then 99999
Input values
Bottom up integration
Top down integration
Sandwich testing
Test cases are applied to the interface of
INTEGRATION TESTING
A B
Fig : interface testing
C
C) SYSTEM TESTING
System testing checks the components are
compatible , interact correctly and transfer
the right data at the right time across their
interfaces.
System testing may involve separate
testing teams with no involvement from
designer and programmers.
Because of focus on interactions , use case
based testing is an effective approach to
system testing.
SYSTEM TESTING
Includes following testes :
Operation testing
Full scale testing
Negative testing
Test based on requirement specifications
Test of user documents
SYSTEM TESTING CONT …….
Weather information system
acknowledge
Report weather()
acknowledge
get (summary) Summaries ()
Send (report)
Reply(report)
acknowledge
acknowledge
Acceptance testing:
tested with real data
Alpha testing—user of the software work with
development team in developer’s site
Beta testing—all user to experiment in user’s site
Thank you