Software Engineering-Lecture 08
Software Engineering-Lecture 08
Lecture 08
Software Testing and Maintenance
BSc (Hons) Computer Science|Software Engineering|Information
Technology
Department of Computer Science
Faculty of Computing & Technology
Saegis Campus
Nugegoda.
Session
Outcomes
• Testing
– V&V
– Types of testing
• Black Box testing
• White box testing
– Software Testing Strategies
• Unit testing
• Integration Testing
• System Testing
• Acceptance Testing
• Maintenance
Ms. Chathurangi D. Weerasinghe, MSc(UCSC Col), BSc(Ruh)
4
Story So Far …
• You have already learned how to carry out
– Feasibility Study
– Requirements Gathering, Analysis and Specification
– Design
– Implementation
• Now you have an implemented system with
you to start testing…..
Verification vs validation
• Verification:
"Are we building the product right"
–The software should conform to its specification – functional
and non-functional requirements
• Validation:
"Are we building the right product"
–The software should do what the user really requires which
might be different from specification
V & V Techniques
Software inspections - Concerned with analysis of the static
system representation to discover problems (static
verification)
No need to execute a software to verify it.
Software testing - Concerned with exercising and observing
product behaviour (dynamic verification)
The system is executed with test data and its operational
behaviour is observed
Think…
Types of Testing
Inputs Outputs
Activity 1
-2 5 17
x<1 1 ≤ x ≤ 12 12 < x
Equivalence partitions
• In equivalence-partitioning technique we need to test
only one condition from each partition.
– This is because we are assuming that all the conditions in
one partition will be treated in the same way by the
software.
• Equivalence partitioning is an effective approach to
testing because it helps to reduce the number of tests.
Activity
• In a Library, students can borrow books. There is a limit
given for students on the number of books they can
borrow at one time. A student can borrow 2-5 books at
one time.
• With equivalence partitioning identify the test values to
check the borrowing limit of a student at one time.
-2 1 5 12 17
0 2 11 13
x<1 1 ≤ x ≤ 12 12 < x
Activity
An online Movie ticket booking system lets users book movie tickets for currently
playing movies and newly releasing movies. When a user is going to make a
booking, he/she must select type of movie (English/Tamil/Hindi) and enter Type
of ticket (Full/Half). Also must enter No of Tickets wanted (1 to 10) and if taking
any children (age 3 to 12) must fill as “Yes” if not “No”. The maximum no of tickets
allowed for a booking is 10. The system interface shows multiple text boxes for
the user to enter the needed values.
Write 8 Sample test data to check the format and correctness of user- entered
data to the above system using equivalence partitioning and Boundary Value
Analysis. Use the Format given below.
Unit testing
• Unit testing is the process of testing individual
components in isolation.
• Unit testing can be automated, but may still be
performed manually.
• Units may be:
– Individual functions or methods within an object
– Object classes with several attributes and methods
Unit Testing
Method Used for unit testing: White Box Testing method is used for executing the unit test.
Integration Testing
System testing
Acceptance testing
• Alpha testing
– Users of the software work with the development team to
test the software at the developer’s site.
• Beta testing
– A release of the software is made available to users to allow
them to experiment and to raise problems that they discover.
– tested by users in an uncontrolled environment
Requirements Acceptance
Implementation Unit
Software Maintenance
“Managing the processes of system change”
System1
System2
Types of Maintenance
• Perfective maintenance
–Changing a system to make it meet its requirements more
effective. Adding Functionality.
• Adaptive maintenance
–Maintenance due to changes in environment. New Operating
Systems, new hardware
• Corrective maintenance
–Correct newly found bugs