Ch8.SoftwareTesting 34
Ch8.SoftwareTesting 34
Software Testing
1
Program Testing
2
Program Testing Goals
4
Testing Process Goals
Validation Testing
To demonstrate to the developer and the system customer that
the software meets its requirements
A successful test shows that the system operates as intended.
Defect Testing
To discover faults or defects in the software where its behavior is
incorrect or not in conformance with its specification
A successful test is a test that makes the system perform
incorrectly and so exposes a defect in the system.
5
An Input-Output Model of Program Testing
6
Verification Vs Validation
Verification:
"Are we building the product right”.
The software should conform to its specification.
Validation:
"Are we building the right product”.
The software should do what the user really requires.
7
V & V Confidence
8
Inspections and Testing
9
Inspections and Testing
10
Software Inspections
11
Advantages of Inspections
13
A Model of the Software Testing Process
14
Stages of Testing
15
Development Testing
16
Unit Testing
17
Automated Testing
Activity: Who can prepare a complete demo on JUnit?
It may be considered as bonus!
18
Automated Test Components
Here is what you need to do for the demo
19
General Testing Guidelines
20
Interface Testing
21
Interface Errors
Interface misuse
A calling component calls another component and makes an
error in its use of its interface e.g. parameters in the wrong
order.
Interface misunderstanding
A calling component embeds assumptions about the behaviour
of the called component which are incorrect.
Timing errors
The called and the calling component operate at different
speeds and out-of-date information is accessed.
22
Interface Testing Guidelines
23
System Testing
24
System and Component Testing (Integration)
25
Test-driven Development
27
TDD process Activities (5 Steps)
Code coverage
Every code segment that you write has at least one associated
test so all code written has at least one test.
Regression testing
A regression test suite is developed incrementally as a program
is developed.
Simplified debugging
When a test fails, it should be obvious where the problem lies.
The newly written code needs to be checked and modified.
System documentation
The tests themselves are a form of documentation that describe
what the code should be doing.
29
Regression Testing
30
User 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 with
the system developers.
Acceptance testing
Customers test a system to decide whether or not it is ready to
be accepted from the system developers and deployed in the
customer environment. Primarily for custom systems.
31
The Acceptance Testing Process
32
Stages in the Acceptance Testing Process
33
Agile Methods and Acceptance Testing
34