SlideShare a Scribd company logo
Software Testing Strategies
based on

Chapter 13

1
Software Testing

Testing is the process of exercising a program with the
specific intent of finding errors prior to delivery
o the end user.
errors
requirements conformance
performance
an indication
of quality
2
Who Tests the Software?

developer
Understands the system
but, will test "gently"
and, is driven by "delivery "

3

independent tester
Must learn about the system,
but, will attempt to break it
and, is driven by quality
Software Testing
Goals
Types of tests
Levels of tests
Test measures
Test plan
Goals
Verification: Have we built the software right?
Bug-free, meets specs

Validation: Have we built the right software?
Meets customers’ needs

Are Verification and Validation different or variation of the
same idea
My argument: “meeting specs” should equal “meeting
customer needs”...
not generally true (my kitchen, satellite systems)
Software Testing
Goals
Types of tests
Levels of tests
Test measures
Test plan

most of this discussion focuses
on verification
(more specifically bug testing)
Types of tests
Black box
White box
Black box tests
input

output
interfa
ce

1. Does it perform the specified
functions?
2.Does it handle obvious errors in
input?
3.Ariane5 – lousy error handling
4.Classic ints vs floats, yards vs
meters
Black box should catch these if
there is adequate “test coverage”
Example: ordered list of ints
L=create()
L.insert(5)
L.insert(-1)
L.insert(-1)
p=L.getFirst()
print (p)
L.delete(p)
p=L.getFirst()
print(p)
p=L.getNext(p)
print(p)
p=L.getNext(p)

class OrdInts
create
getFirst
getNext
insert
delete
print

-1
-1
5
error
Black box tests
Advantage: black box tester≠developer is unbiased by

implementation details. e.g., Use Case testing, just work through
all the Use Cases
Disadvantage: black box tester is uninformed about
implementation details
unnecessary tests – test same thing in different way
insufficient tests – can miss the extremes, especially if actual use

follows a different pattern
black box tests
Code

Input

x
x
x

x

choose good distribution of input – hope good distribution of code tested
unnecessary tests
Input

Code

large range of input may exercise a small part of code
e.g., operator test of satellite control stations, run through
each
input and output light/key option. Testing same functions,
insufficient tests
Input

Code

a small range of input may exercise a large range of code
but can you ‘know’ this without knowing the code? Did we miss
the 20%
sufficient tests
Input

Code

complex
code

a small range of input may exercise a small but important/error-prone region
White box tests
Based on code
test 1

test 2
Example: ordered list of ints
class ordInts {
public: …

private:
int vals[1000];
int maxElements=1000;
…
}
Example: ordered list of ints
bool testMax()
{
L=create();
num=maxElements;
for (int i=0; i<=num; i++)
print i
L.insert(i)
print maxElements;
}
White box tests
Advantage:
design tests to achieve good code coverage and avoid duplication
can stress complicated, error-prone code
can stress boundary values (fault injection)

Disadvantage:
tester=developer may have bias
if code changes, tests may have to be redesigned (is this bad?)
Example: ordered list of ints
L=create()
L.insert(1)
L.insert(2)
L.insert(3)

class OrdInts
create
getFirst

1
2
3

insert
delete
print

…

L.insert(1001)
p=L.getFirst()
print(p)
p=L.getNext(p)
print p

…

…

getNext
Types of tests

Black box: test based on interface, through interface
White box: test based on code, through code

Testing strategy can/should include all
approaches!
My experience:
Black Box = non developer, outside testing idiots
in your case who?
White Box = developer, part of development process
in your case who?
Gray Box = hated, non developer within developer
organization
in your case who?
Software Testing
White-Box Testing

Black-Box Testing
requirements

output

.
.. our goal is to ensure that all
statements and conditions have
een executed at least once ...
21

input

events
White-Box Testing

Basis Path
Testingwe compute the cyclomatic
First,
complexity:
number of simple decisions + 1
or
number of enclosed areas + 1
In this case, V(G) = 4

22
White-Box Testing

Basis Path
Next, we derive the
Testing independent paths:

1

Since V(G) = 4,
there are four paths

2

3
4
5

7

8

6

Path 1:
Path 2:
Path 3:
Path 4:

1,2,4,7,8
1,2,3,5,7,8
1,2,3,6,7,8
1,2,4,7,2,4,...7,8

Finally, we derive test
cases to exercise these
paths.

A number of industry studies have indicated
that the higher V(G), the higher the probability
23
or errors.
White-Box Testing

Loop Testing

Simple
loop
Nested
Loops
Concatenated
Unstructured
Loops
Loops
24

Why is loop testing important?
White-Box Testing
Equivalence Partitioning

Black-Box
& Boundary Testing

Value Analysis




25

If x = 5 then …

If x > -5 and x < 5 then …

What would be the equivalence classes?
Black-Box Testing

Comparison Testing
Used only in situations in which the reliability of software is

absolutely critical (e.g., human-rated systems)
Separate software engineering teams develop independent

versions of an application using the same specification
 Each version can be tested with the same test data to ensure
that all provide identical output
Then all versions are executed in parallel with real-time
comparison of results to ensure consistency

26
Levels of tests
Unit

white

Integration
System
System integration

black
Testing measures (white box)
Code coverage – individual modules
Path coverage – sequence diagrams
Code coverage based on complexity – test of the risks, tricky

part of code (e.g., Unix “you are not expected to understand
this” code)
Levels of Testing
 Unit testing
 Integration testing
 Validation testing
 Focus is on software requirements
 System testing
 Focus is on system integration
 Alpha/Beta testing
 Focus is on customer usage
 Recovery testing
 forces the software to fail in a variety of ways and verifies that recovery is properly performed
 Security testing
 verifies that protection mechanisms built into a system will, in fact, protect it from improper penetration
 Stress testing
 executes a system in a manner that demands resources in abnormal quantity, frequency, or volume
 Performance Testing
 test the run-time performance of software within the context of an integrated system

29
Unit Testing
Tests the smallest individually executable code units.
Usually done by programmers. Test cases might be
selected based on code, specification, intuition, etc.
Tools:
Test driver/harness
Code coverage analyzer
Automatic test case generator
Integration Testing
Tests interactions between two or more units or
components. Usually done by programmers.
Emphasizes interfaces.
Issues:
In what order are units combined?
How do you assure the compatibility and correctness of
externally-supplied components?
Integration Testing
How are units integrated? What are the implications of
this order?
Top-down => need stubs; top-level tested repeatedly.
Bottom-up => need drivers; bottom-levels tested repeatedly.
Critical units first => stubs & drivers needed; critical units tested

repeatedly.
Integration Testing
Potential Problems:
Inadequate unit testing.
Inadequate planning & organization for integration testing.
Inadequate documentation and testing of externally-supplied
components.
Stages of Testing
Testing in the Large
 System Testing
 End-to-End Testing
 Operations Readiness Testing
 Beta Testing
 Load Testing
 Stress Testing
 Performance Testing
 Reliability Testing
 Regression Testing
System Testing

Test the functionality of the entire system.
Usually done by professional testers.
Realities of System Testing
Not all problems will be found no matter how thorough or

systematic the testing.
Testing resources (staff, time, tools, labs) are limited.
Specifications are frequently unclear/ambiguous and changing
(and not necessarily complete and up-to-date).
Systems are almost always too large to permit test cases to be
selected based on code characteristics.

More Related Content

PPT
Ppt19
raj732723
 
PPTX
Object oriented testing
Haris Jamil
 
PPT
Software testing strategies
Krishna Sujeer
 
PPT
Testing of Object-Oriented Software
Praveen Penumathsa
 
PDF
SE2_Lec 20_Software Testing
Amr E. Mohamed
 
PPTX
Object Oriented Testing
AMITJain879
 
PPTX
Research issues in object oriented software testing
Anshul Vinayak
 
PPT
Types of Software Testing
Nishant Worah
 
Ppt19
raj732723
 
Object oriented testing
Haris Jamil
 
Software testing strategies
Krishna Sujeer
 
Testing of Object-Oriented Software
Praveen Penumathsa
 
SE2_Lec 20_Software Testing
Amr E. Mohamed
 
Object Oriented Testing
AMITJain879
 
Research issues in object oriented software testing
Anshul Vinayak
 
Types of Software Testing
Nishant Worah
 

What's hot (20)

PPTX
Python: Object-Oriented Testing (Unit Testing)
Damian T. Gordon
 
PPTX
Software testing methods
Homa Pourmohammadi
 
PPT
Software Testing
Kiran Kumar
 
PDF
@#$@#$@#$"""@#$@#$"""
nikhilawareness
 
PDF
SE2_Lec 21_ TDD and Junit
Amr E. Mohamed
 
PPT
A survey of software testing
Tao He
 
PDF
7 stages of unit testing
Jorge Ortiz
 
PPT
Black Box Testing
Nivetha Padmanaban
 
PPT
Testing chapter updated (1)
abdullah619
 
PPT
New software testing-techniques
Fincy V.J
 
PPTX
Importance of Software testing in SDLC and Agile
Chandan Mishra
 
PPTX
Unit testing
Mani Kanth
 
PPTX
Software testing introduction
Sriman Eshwar
 
PDF
Test cases
Chandra Maddigapu
 
PPTX
Black & White Box testing
Mohamed Zeinelabdeen Abdelgader Farh jber
 
PPTX
H testing and debugging
missstevenson01
 
PPTX
Software testing and process
gouravkalbalia
 
PPTX
Unit testing
software testingcompany
 
PDF
Software testing quiz questions and answers
RajendraG
 
Python: Object-Oriented Testing (Unit Testing)
Damian T. Gordon
 
Software testing methods
Homa Pourmohammadi
 
Software Testing
Kiran Kumar
 
@#$@#$@#$"""@#$@#$"""
nikhilawareness
 
SE2_Lec 21_ TDD and Junit
Amr E. Mohamed
 
A survey of software testing
Tao He
 
7 stages of unit testing
Jorge Ortiz
 
Black Box Testing
Nivetha Padmanaban
 
Testing chapter updated (1)
abdullah619
 
New software testing-techniques
Fincy V.J
 
Importance of Software testing in SDLC and Agile
Chandan Mishra
 
Unit testing
Mani Kanth
 
Software testing introduction
Sriman Eshwar
 
Test cases
Chandra Maddigapu
 
H testing and debugging
missstevenson01
 
Software testing and process
gouravkalbalia
 
Software testing quiz questions and answers
RajendraG
 
Ad

Viewers also liked (14)

PDF
Guerrilla usability testing
John Whalen
 
PDF
ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
Eliane Collins
 
PPTX
Implementing BDD at scale for agile and DevOps teams
Laurent PY
 
KEY
Bahaviour Driven Development
buildmaster
 
PPT
Role+Of+Testing+In+Sdlc
mahendra singh
 
PPTX
Introduction to Behaviour Driven Development
Christophe Achouiantz
 
PDF
Anand Bagmar - Behavior Driven Testing (BDT) in Agile
Anand Bagmar
 
PPTX
Validation testing
Slideshare
 
PPTX
Basis path testing
Hoa Le
 
PDF
Inverting The Testing Pyramid
Naresh Jain
 
PPT
Behavior Driven Development Pros and Cons
Iosif Itkin
 
PDF
Agile Testing Framework - The Art of Automated Testing
Dimitri Ponomareff
 
PPT
Test Automation Strategies For Agile
Naresh Jain
 
Guerrilla usability testing
John Whalen
 
ICTSS 2010 - Iterative Software Testing Process for Scrum and Waterfall Projects
Eliane Collins
 
Implementing BDD at scale for agile and DevOps teams
Laurent PY
 
Bahaviour Driven Development
buildmaster
 
Role+Of+Testing+In+Sdlc
mahendra singh
 
Introduction to Behaviour Driven Development
Christophe Achouiantz
 
Anand Bagmar - Behavior Driven Testing (BDT) in Agile
Anand Bagmar
 
Validation testing
Slideshare
 
Basis path testing
Hoa Le
 
Inverting The Testing Pyramid
Naresh Jain
 
Behavior Driven Development Pros and Cons
Iosif Itkin
 
Agile Testing Framework - The Art of Automated Testing
Dimitri Ponomareff
 
Test Automation Strategies For Agile
Naresh Jain
 
Ad

Similar to Software testing (20)

PPTX
Software Testing and Debugging
university of education,Lahore
 
PPTX
Software Testing & Debugging
Computing Cage
 
PPT
CS8494 SOFTWARE ENGINEERING Unit-4
SIMONTHOMAS S
 
PPT
Software Engineering Lec 10 -software testing--
Taymoor Nazmy
 
PPTX
Black box software testing
Rana Muhammad Asif
 
PPTX
Software testing strategies
Sophia Girls' College(Autonomous), Ajmer
 
PPT
Testing
Mohammed
 
PPTX
System Testing.pptx
MohamedNowfeek1
 
PPT
5.Black Box Testing and Levels of Testing.ppt
SyedAhmad732853
 
PPT
CPP09 - Testing
Michael Heron
 
PPT
Testing
Sonali Chauhan
 
PPTX
SOFTWARE TESTING.pptx
ssrpr
 
PDF
Software testing ppt
Savyasachi14
 
PDF
Class9_SW_Testing_Strategies.pdf
FarjanaParvin5
 
PPT
Software testing part
Preeti Mishra
 
PPTX
SE - Lecture 8 - Software Testing State Diagram.pptx
TangZhiSiang
 
PPTX
Software_Testing_Techniques_undergraduate.pptx
MrittikaMahbub1
 
PDF
Software Engineering TESTING AND MAINTENANCE
Dr Anuranjan Misra
 
PPTX
White box & black box testing
Saket Khopkar
 
PDF
Block 1 ms-034 unit-1
Nirmal Jasmatiya
 
Software Testing and Debugging
university of education,Lahore
 
Software Testing & Debugging
Computing Cage
 
CS8494 SOFTWARE ENGINEERING Unit-4
SIMONTHOMAS S
 
Software Engineering Lec 10 -software testing--
Taymoor Nazmy
 
Black box software testing
Rana Muhammad Asif
 
Software testing strategies
Sophia Girls' College(Autonomous), Ajmer
 
Testing
Mohammed
 
System Testing.pptx
MohamedNowfeek1
 
5.Black Box Testing and Levels of Testing.ppt
SyedAhmad732853
 
CPP09 - Testing
Michael Heron
 
SOFTWARE TESTING.pptx
ssrpr
 
Software testing ppt
Savyasachi14
 
Class9_SW_Testing_Strategies.pdf
FarjanaParvin5
 
Software testing part
Preeti Mishra
 
SE - Lecture 8 - Software Testing State Diagram.pptx
TangZhiSiang
 
Software_Testing_Techniques_undergraduate.pptx
MrittikaMahbub1
 
Software Engineering TESTING AND MAINTENANCE
Dr Anuranjan Misra
 
White box & black box testing
Saket Khopkar
 
Block 1 ms-034 unit-1
Nirmal Jasmatiya
 

More from Bala Ganesh (20)

PPT
DDL,DML,1stNF
Bala Ganesh
 
PPT
sfdfds
Bala Ganesh
 
PPTX
Dbms chapter viii
Bala Ganesh
 
PPTX
Dbms chapter vii
Bala Ganesh
 
PPTX
Dbms chapter v
Bala Ganesh
 
PPTX
Dbms chapter iv
Bala Ganesh
 
PPTX
Dbms chapter iii
Bala Ganesh
 
PPTX
Dmbs chapter vi
Bala Ganesh
 
PPTX
Dbms chapter ii
Bala Ganesh
 
PPTX
Dbms chap i
Bala Ganesh
 
PPTX
Flip flop& RAM ROM
Bala Ganesh
 
PPTX
karnaugh maps
Bala Ganesh
 
PPTX
Chap iii-Logic Gates
Bala Ganesh
 
PPTX
Chap ii.BCD code,Gray code
Bala Ganesh
 
PPTX
DEL-244Chep i
Bala Ganesh
 
DOCX
Software engineering Questions and Answers
Bala Ganesh
 
PPT
Design
Bala Ganesh
 
PPTX
Comp 107 cep 8
Bala Ganesh
 
PPTX
Comp 107 cep 7
Bala Ganesh
 
PPT
Cocomo model
Bala Ganesh
 
DDL,DML,1stNF
Bala Ganesh
 
sfdfds
Bala Ganesh
 
Dbms chapter viii
Bala Ganesh
 
Dbms chapter vii
Bala Ganesh
 
Dbms chapter v
Bala Ganesh
 
Dbms chapter iv
Bala Ganesh
 
Dbms chapter iii
Bala Ganesh
 
Dmbs chapter vi
Bala Ganesh
 
Dbms chapter ii
Bala Ganesh
 
Dbms chap i
Bala Ganesh
 
Flip flop& RAM ROM
Bala Ganesh
 
karnaugh maps
Bala Ganesh
 
Chap iii-Logic Gates
Bala Ganesh
 
Chap ii.BCD code,Gray code
Bala Ganesh
 
DEL-244Chep i
Bala Ganesh
 
Software engineering Questions and Answers
Bala Ganesh
 
Design
Bala Ganesh
 
Comp 107 cep 8
Bala Ganesh
 
Comp 107 cep 7
Bala Ganesh
 
Cocomo model
Bala Ganesh
 

Recently uploaded (20)

PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Software Development Methodologies in 2025
KodekX
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 

Software testing

  • 2. Software Testing Testing is the process of exercising a program with the specific intent of finding errors prior to delivery o the end user. errors requirements conformance performance an indication of quality 2
  • 3. Who Tests the Software? developer Understands the system but, will test "gently" and, is driven by "delivery " 3 independent tester Must learn about the system, but, will attempt to break it and, is driven by quality
  • 4. Software Testing Goals Types of tests Levels of tests Test measures Test plan
  • 5. Goals Verification: Have we built the software right? Bug-free, meets specs Validation: Have we built the right software? Meets customers’ needs Are Verification and Validation different or variation of the same idea My argument: “meeting specs” should equal “meeting customer needs”... not generally true (my kitchen, satellite systems)
  • 6. Software Testing Goals Types of tests Levels of tests Test measures Test plan most of this discussion focuses on verification (more specifically bug testing)
  • 7. Types of tests Black box White box
  • 8. Black box tests input output interfa ce 1. Does it perform the specified functions? 2.Does it handle obvious errors in input? 3.Ariane5 – lousy error handling 4.Classic ints vs floats, yards vs meters Black box should catch these if there is adequate “test coverage”
  • 9. Example: ordered list of ints L=create() L.insert(5) L.insert(-1) L.insert(-1) p=L.getFirst() print (p) L.delete(p) p=L.getFirst() print(p) p=L.getNext(p) print(p) p=L.getNext(p) class OrdInts create getFirst getNext insert delete print -1 -1 5 error
  • 10. Black box tests Advantage: black box tester≠developer is unbiased by implementation details. e.g., Use Case testing, just work through all the Use Cases Disadvantage: black box tester is uninformed about implementation details unnecessary tests – test same thing in different way insufficient tests – can miss the extremes, especially if actual use follows a different pattern
  • 11. black box tests Code Input x x x x choose good distribution of input – hope good distribution of code tested
  • 12. unnecessary tests Input Code large range of input may exercise a small part of code e.g., operator test of satellite control stations, run through each input and output light/key option. Testing same functions,
  • 13. insufficient tests Input Code a small range of input may exercise a large range of code but can you ‘know’ this without knowing the code? Did we miss the 20%
  • 14. sufficient tests Input Code complex code a small range of input may exercise a small but important/error-prone region
  • 15. White box tests Based on code test 1 test 2
  • 16. Example: ordered list of ints class ordInts { public: … private: int vals[1000]; int maxElements=1000; … }
  • 17. Example: ordered list of ints bool testMax() { L=create(); num=maxElements; for (int i=0; i<=num; i++) print i L.insert(i) print maxElements; }
  • 18. White box tests Advantage: design tests to achieve good code coverage and avoid duplication can stress complicated, error-prone code can stress boundary values (fault injection) Disadvantage: tester=developer may have bias if code changes, tests may have to be redesigned (is this bad?)
  • 19. Example: ordered list of ints L=create() L.insert(1) L.insert(2) L.insert(3) class OrdInts create getFirst 1 2 3 insert delete print … L.insert(1001) p=L.getFirst() print(p) p=L.getNext(p) print p … … getNext
  • 20. Types of tests Black box: test based on interface, through interface White box: test based on code, through code Testing strategy can/should include all approaches! My experience: Black Box = non developer, outside testing idiots in your case who? White Box = developer, part of development process in your case who? Gray Box = hated, non developer within developer organization in your case who?
  • 21. Software Testing White-Box Testing Black-Box Testing requirements output . .. our goal is to ensure that all statements and conditions have een executed at least once ... 21 input events
  • 22. White-Box Testing Basis Path Testingwe compute the cyclomatic First, complexity: number of simple decisions + 1 or number of enclosed areas + 1 In this case, V(G) = 4 22
  • 23. White-Box Testing Basis Path Next, we derive the Testing independent paths: 1 Since V(G) = 4, there are four paths 2 3 4 5 7 8 6 Path 1: Path 2: Path 3: Path 4: 1,2,4,7,8 1,2,3,5,7,8 1,2,3,6,7,8 1,2,4,7,2,4,...7,8 Finally, we derive test cases to exercise these paths. A number of industry studies have indicated that the higher V(G), the higher the probability 23 or errors.
  • 25. White-Box Testing Equivalence Partitioning Black-Box & Boundary Testing Value Analysis   25 If x = 5 then … If x > -5 and x < 5 then … What would be the equivalence classes?
  • 26. Black-Box Testing Comparison Testing Used only in situations in which the reliability of software is absolutely critical (e.g., human-rated systems) Separate software engineering teams develop independent versions of an application using the same specification  Each version can be tested with the same test data to ensure that all provide identical output Then all versions are executed in parallel with real-time comparison of results to ensure consistency 26
  • 28. Testing measures (white box) Code coverage – individual modules Path coverage – sequence diagrams Code coverage based on complexity – test of the risks, tricky part of code (e.g., Unix “you are not expected to understand this” code)
  • 29. Levels of Testing  Unit testing  Integration testing  Validation testing  Focus is on software requirements  System testing  Focus is on system integration  Alpha/Beta testing  Focus is on customer usage  Recovery testing  forces the software to fail in a variety of ways and verifies that recovery is properly performed  Security testing  verifies that protection mechanisms built into a system will, in fact, protect it from improper penetration  Stress testing  executes a system in a manner that demands resources in abnormal quantity, frequency, or volume  Performance Testing  test the run-time performance of software within the context of an integrated system 29
  • 30. Unit Testing Tests the smallest individually executable code units. Usually done by programmers. Test cases might be selected based on code, specification, intuition, etc. Tools: Test driver/harness Code coverage analyzer Automatic test case generator
  • 31. Integration Testing Tests interactions between two or more units or components. Usually done by programmers. Emphasizes interfaces. Issues: In what order are units combined? How do you assure the compatibility and correctness of externally-supplied components?
  • 32. Integration Testing How are units integrated? What are the implications of this order? Top-down => need stubs; top-level tested repeatedly. Bottom-up => need drivers; bottom-levels tested repeatedly. Critical units first => stubs & drivers needed; critical units tested repeatedly.
  • 33. Integration Testing Potential Problems: Inadequate unit testing. Inadequate planning & organization for integration testing. Inadequate documentation and testing of externally-supplied components.
  • 34. Stages of Testing Testing in the Large  System Testing  End-to-End Testing  Operations Readiness Testing  Beta Testing  Load Testing  Stress Testing  Performance Testing  Reliability Testing  Regression Testing
  • 35. System Testing Test the functionality of the entire system. Usually done by professional testers.
  • 36. Realities of System Testing Not all problems will be found no matter how thorough or systematic the testing. Testing resources (staff, time, tools, labs) are limited. Specifications are frequently unclear/ambiguous and changing (and not necessarily complete and up-to-date). Systems are almost always too large to permit test cases to be selected based on code characteristics.

Editor's Notes