Bài giảng Introduction to Software Engineering - Week 9: Software Testing - Nguyễn Thị Minh Tuyền
Program testing
£ Testing is intended
p to show that a program does what it is intended to do and
p to discover program defects before it is put into use.
£ When you test software, you execute a program using
artificial data.
£ You check the results of the test run for errors,
anomalies or information about the program's non-
functional attributes.
£ Can reveal the presence of errors NOT their absence.
£ Testing is part of a more general verification and
validation process, which also includes static validation
techniques.
4
V & V confidence
£ Aim of V & V is to establish confidence that the
system is 'fit for purpose'.
£ Depends on
p Software purpose: The level of confidence
depends on how critical the software is to an
organisation.
p User expectations: Users may have low
expectations of certain kinds of software.
p Marketing environment: Getting a product to
market ant than finding
defects in the program.
8
Inspections and testing
£ Software inspections
p Concerned with analysis of the static system
representation to discover problems(static
verification)
p May be supplement by tool-based document and
code analysis.
£ Software testing
p Concerned with exercising and observing product
behaviour (dynamic verification)
p The system is executed with test data and its
operational behaviour is observed.
9
Software inspections
£ Involve people examining the source
representation with the aim of discovering
anomalies and defects.
£ Do not require execution of a system so may be
used before
£ May be applied to any representation of the
system (requirements, design, configuration data,
test data, etc.).
£ Have been shown to be an effective technique for
discovering program errors.
11
Advantages of inspections
£ During testing, errors can mask (hide) other
errors. Because inspection is a static process,
you don’t have to be concerned with
interactions between errors.
£ Incomplettem can be
inspected without additional costs.
£ As well as searching for program defects, an
inspection can also consider broader quality
attributes
p such as compliance with standards, portability and
maintainability.
12
Inspections and testing
£ Both are complementary and not opposing
verification techniques.
£ Both should be used during the V & V process.
£ Inspections can check conformance with a
specification but not conformance with the
customer's real requirements.
£ Inspections cannot check non-functional
characteristics such as performance, usability, etc.
13
Development testing
£ Includes all testing activities that are carried out by the
team developing the system.
£ Unit testing
p Individual program units or object classes are tested.
p Should focus on testing the functionality of objects or methods.
£ Component testing
p Several individual units are integrated to create composite
components.
p Should focus on testing component interfaces.
£ System tes
p Some or all of the components in a system are integrated and
the system is tested as a whole.
p Should focus on testing component interactions.
17
Unit testing
£ Is the process of testing individual components in
isolation.
£ Is a defect testing process.
£ Units may be:
p Individual functions or methods within an object
p Object classes with several attributes and methods
p Composite components with defined interfaces used to
access their functionality.
18
Object class testing
£ Complete test coverage of a class involves
p Testing all operations associated with an object
p Setting and interrogating all object attributes
p Exercising the object in all possible states.
£ Inheritance o design object
class tests as the information to be tested is not
localised.
19
Tải về để xem bản đầy đủ
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng Introduction to Software Engineering - Week 9: Software Testing - Nguyễn Thị Minh Tuyền", để tải tài liệu gốc về máy hãy click vào nút Download ở trên
File đính kèm:
bai_giang_introduction_to_software_engineering_week_9_softwa.pdf

