SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Software Testing and Quality Assurance
            Theory and Practice
                 Chapter 2
         Theory of Program Testing




                                         1
Outline of the Chapter
•   Basic Concepts in Testing Theory
•   Theory of Goodenough and Gerhart
•   Theory of Weyuker and Ostrand
•   Theory of Gourlay
•   Adequacy of Testing
•   Limitations of Testing
•   Summary




                                              2
Basic Concepts in Testing Theory
•   Testing theory puts emphasis on
     – Detecting defects through program execution
     – Designing test cases from different sources: requirement specification, source
       code, and input and output domains of programs
     – Selecting a subset of tests cases from the entire input domain
     – Effectiveness of test selection strategies
     – Test oracles used during testing
     – Prioritizing the execution of test cases
     – Adequacy analysis of test cases




                                                                                        3
Theory of Goodenough and Gerhart
•   Fundamental Concepts
     – Let P be a program, and D be its input domain. Let T ⊆ D. P(d) is the result of
       executing P with input d.




            Figure 2.1: Executing a program with a subset of the input domain.
     – OK(d): Represents the acceptability of P(d). OK(d) = true iff P(d) is
       acceptable.
     – SUCCESSFUL(T): T is a successful test iff ∀t ∈ T, OK(t).
     – Ideal Test: T is an ideal test if OK(t), ∀t ∈ T => OK(d), ∀d ∈ D.



                                                                                         4
Theory of Goodenough and Gerhart
•   Fundamental Concepts (Contd.)
     – Reliable Criterion: A test selection criterion C is reliable iff either every test
       selected by C is successful, or no test selected is successful.
     – Valid Criterion: A test selection criterion C is valid iff whenever P is incorrect,
       C selects at least one test set T which is not successful for P.
     – Let C denote a set of test predicates. If d ∈ D satisfies test predicate c ∈ C,
       then c(d) is said to be true.
     – COMPLETE(T, C) ≡ (∀c ∈ C)(∃t ∈ T) c(t) ∧ (∀t ∈ T)(∃c ∈ C) c(t)


•   Fundamental Theorem
     – (∃T ⊆ D) (COMPLETE(T,C) ∧ RELIABLE(C) ∧ VALID(C) ∧ SUCCESSFUL(T))
                 => (∀d ∈ D) OK(d)




                                                                                             5
Theory of Goodenough and Gerhart
•   Program faults occur due to our
     – inadequate understanding of all conditions that a program must deal with.
     – failure to realize that certain combinations of conditions require special care.
•   Kinds of program faults
     – Logic fault
         • Requirement fault
         • Design fault
         • Construction fault
     – Performance fault
     – Missing control-flow paths
     – Inappropriate path selection
     – Inappropriate or missing action
•   Test predicate: It is a description of conditions and combinations of
    conditions relevant to correct operation of the program.

                                                                                          6
Theory of Goodenough and Gerhart
•   Conditions for Reliability of a set of test predicates C
     – Every branching condition must be represented by a condition in C.
     – Every potential termination condition must be represented in C.
     – Every condition relevant to the correct operation of the program must be
       represented in C.

•   Drawbacks of the Theory
     – Difficulty in assessing the reliability and validity of a criterion.
     – The concepts of reliability and validity are defined w.r.t. to a program. The
       goodness of a test should be independent of individual programs.
     – Neither reliability nor validity is preserved throughout the debugging process.




                                                                                         7
Theory of Weyuker and Ostrand
•   d ∈ D, the input domain of program P and T ⊆ D.
•   OK(P, d) = true iff P(d) is acceptable.
•   SUCC(P, T): T is a successful test for P iff forall ∀t ∈ T, OK(P, t).
•   Uniformly valid criterion: Criterion C is uniformly valid iff
     – (∀P) [ (∃d ∈ D)(¬OK(P,d)) => (∃T ⊆ D) (C(T) ∧ ¬SUCC(P, T)) ].
•   Uniformly reliable criterion: Criterion C is uniformly reliable iff
     (∀P) (∀T1, ∀T2 ⊆ D) [ (C(T1) ∧ C(T2)) => (SUCC(P, T1) <==> SUCC(P,T2)) ].
•   Uniformly Ideal Test Selection
     – A uniformly ideal test selection criterion for a given specification is both
       uniformly valid and uniformly reliable.
•   A subdomain S is a subset of D.
     – Criterion C is revealing for a subdomain S if whenever S contains an input
       which is processed incorrectly, then every test set which satisfies C is
       unsuccessful.
         • REVEALING(C, S) iff
                               (∃d ∈ S) (¬OK(d)) => (∀T ⊆ S)(C(T) => ¬SUCC(T)) .

                                                                                      8
Theory of Gourlay
•   The theory establishes a relationship between three sets of entities
     – specifications, programs and tests.
•   Notation
               – P: The set of all programs (p ∈ P ⊆ P)
               – S: The set of all specifications (s ∈ S ⊆ S)
               – T: The set of all tests (t ∈ T ⊆ T)
               – “p ok(t) s” means the result of testing p with t is judged to be acceptable by s.
               – “p ok(T) s” means “p ok(t) s,” ∀t ∈ T.
               – “p corr s” means p is correct w.r.t. s.
•   A testing system is a collection < P, S, T, corr, ok>, where corr
    ⊆ P x S and ok ⊆ T x P x S, and ∀p∀s∀t(p corr s => p ok(t) s).
•   A test method is a function M: P x S →T
     – Program dependent: T = M(P)
     – Specification dependent: T = M(S)
     – Expectation dependent

                                                                                                     9
Theory of Gourlay
•   Power of test methods: Let M and N be two test methods.
     – For M to be at least as good as N, we want the following to occur:
         • Whenever N finds an error, so does M.
         • (FM and FN are sets of faults discovered by test sets produced by test
           methods M and N, respectively.)
         • (TM and TN are test sets produced by test methods M and N, respectively.)
     – Two cases: (a) TN ⊆ TM and (b) TM and TN overlap




                                                                                       10
Adequacy of Testing
•   Reality: New test cases, in addition to the planned test cases, are
    designed while performing testing. Let the test set be T.

•   If a test set T does not reveal any more faults, we face a dilemma:
     – P is fault-free. OR
     – T is not good enough to reveal (more) faults.
      Need for evaluating the adequacy (i.e. goodness) of T.

•   Some ad hoc stopping criteria
     – Allocated time for testing is over.
     – It is time to release the product.
     – Test cases no more reveal faults.




                                                                          11
Adequacy of Testing




Figure 2.4: Context of applying test adequacy.

                                                 12
Adequacy of Testing
•   Two practical methods for evaluating test adequacy
     – Fault seeding
     – Program mutation
•   Fault seeding
     – Implant a certain number (say, X) of known faults in P, and test P with T.
     – If k% of the X faults are revealed, T has revealed k% of the unknown faults.
     – (More in Chapter 13)
•   Program mutation
     – A mutation of P is obtained by making a small change to P.
     – Some mutations are faulty, whereas the others are equivalent to P.
     – T is said to be adequate if it causes every faulty mutations to produce
       unexpected results.
     – (More in Chapter 3)



                                                                                      13
Limitations of Testing
•   Dijkstra’s famous observation
     – Testing can reveal the presence of faults, but not their absence.
•   Faults are detected by running P with a small test set T, where |T| <<
    |D|, where |.| denotes the “size-of” function and “<<“ denoted “much
    smaller.”
     – Testing with a small test set raises the concern of testing efficacy.
     – Testing with a small test set is less expensive.
•   The result of each test must be verified with a test oracle.
     – Verifying a program output is not a trivial task.
     – There are non-testable programs. A program is non-testable if
         • There is no test oracle for the program.
         • It is too difficult to determine the correct output.




                                                                               14
Summary
•   Theory of Goodenough and Gerhart
         • Ideal test, Test selection criteria, Program faults, Test predicates
•   Theory of Weyuker and Ostrand
         • Uniformly ideal test selection
         • Revealing subdomain
•   Theory of Gourlay
         • Testing system
         • Power of test methods (“at least as good as” relation)
•   Adequacy of Testing
         • Need for evaluating adequacy
         • Methods for evaluating adequacy: fault seeding and program mutation
•   Limitations of Testing
         • Testing is performed with a test set T, s.t. |T| << |D|.
         • Dijkstra’s observation
         • Test oracle problem
                                                                                  15

Weitere ähnliche Inhalte

Was ist angesagt?

Lecture3
Lecture3Lecture3
Lecture3soloeng
 
Unit iii(part c - user interface design)
Unit   iii(part c - user interface design)Unit   iii(part c - user interface design)
Unit iii(part c - user interface design)BALAJI A
 
McCall Software Quality Model in Software Quality Assurance
McCall Software Quality Model in Software Quality Assurance McCall Software Quality Model in Software Quality Assurance
McCall Software Quality Model in Software Quality Assurance sundas Shabbir
 
Software testing principles
Software testing principlesSoftware testing principles
Software testing principlesDonato Di Pierro
 
Introduction To Software Quality Assurance
Introduction To Software Quality AssuranceIntroduction To Software Quality Assurance
Introduction To Software Quality Assuranceruth_reategui
 
Integration testing
Integration testingIntegration testing
Integration testingqueen jemila
 
Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing StrategiesNayyabMirTahir
 
Random testing
Random testingRandom testing
Random testingCan KAYA
 
Orthogonal array testing
Orthogonal array testingOrthogonal array testing
Orthogonal array testingPrince Bhanwra
 
Formal Approaches to SQA.pptx
Formal Approaches to SQA.pptxFormal Approaches to SQA.pptx
Formal Approaches to SQA.pptxKarthigaiSelviS3
 
Defects in software testing
Defects in software testingDefects in software testing
Defects in software testingsandeepsingh2808
 
Chapter 14 software testing techniques
Chapter 14 software testing techniquesChapter 14 software testing techniques
Chapter 14 software testing techniquesSHREEHARI WADAWADAGI
 
Chapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.pptChapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.pptVijayaPratapReddyM
 
Introduction to System, Simulation and Model
Introduction to System, Simulation and ModelIntroduction to System, Simulation and Model
Introduction to System, Simulation and ModelMd. Hasan Imam Bijoy
 

Was ist angesagt? (20)

Lecture3
Lecture3Lecture3
Lecture3
 
Unit iii(part c - user interface design)
Unit   iii(part c - user interface design)Unit   iii(part c - user interface design)
Unit iii(part c - user interface design)
 
McCall Software Quality Model in Software Quality Assurance
McCall Software Quality Model in Software Quality Assurance McCall Software Quality Model in Software Quality Assurance
McCall Software Quality Model in Software Quality Assurance
 
Software quality management lecture notes
Software quality management lecture notesSoftware quality management lecture notes
Software quality management lecture notes
 
Software Verification & Validation
Software Verification & ValidationSoftware Verification & Validation
Software Verification & Validation
 
Software testing principles
Software testing principlesSoftware testing principles
Software testing principles
 
Introduction To Software Quality Assurance
Introduction To Software Quality AssuranceIntroduction To Software Quality Assurance
Introduction To Software Quality Assurance
 
Integration testing
Integration testingIntegration testing
Integration testing
 
Software Testing Strategies
Software Testing StrategiesSoftware Testing Strategies
Software Testing Strategies
 
Random testing
Random testingRandom testing
Random testing
 
Orthogonal array testing
Orthogonal array testingOrthogonal array testing
Orthogonal array testing
 
Formal Approaches to SQA.pptx
Formal Approaches to SQA.pptxFormal Approaches to SQA.pptx
Formal Approaches to SQA.pptx
 
Ch 2 what is software quality
Ch 2 what is software qualityCh 2 what is software quality
Ch 2 what is software quality
 
Defects in software testing
Defects in software testingDefects in software testing
Defects in software testing
 
Hierarchical models of software quality
Hierarchical models of software qualityHierarchical models of software quality
Hierarchical models of software quality
 
Chapter 14 software testing techniques
Chapter 14 software testing techniquesChapter 14 software testing techniques
Chapter 14 software testing techniques
 
Chapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.pptChapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.ppt
 
Test case development
Test case developmentTest case development
Test case development
 
Introduction to System, Simulation and Model
Introduction to System, Simulation and ModelIntroduction to System, Simulation and Model
Introduction to System, Simulation and Model
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 

Andere mochten auch (9)

Ch1 preliminaries
Ch1 preliminariesCh1 preliminaries
Ch1 preliminaries
 
Ch5
Ch5Ch5
Ch5
 
Ch3
Ch3Ch3
Ch3
 
Ch2
Ch2Ch2
Ch2
 
Ch6
Ch6Ch6
Ch6
 
Ch7
Ch7Ch7
Ch7
 
Ch1
Ch1Ch1
Ch1
 
Ch3
Ch3Ch3
Ch3
 
Ch4
Ch4Ch4
Ch4
 

Ähnlich wie Software Testing Theory and Program Testing Chapter Outline

Testing foundations
Testing foundationsTesting foundations
Testing foundationsNeha Singh
 
Test suite minimization
Test suite minimizationTest suite minimization
Test suite minimizationGaurav Saxena
 
Test case prioritization usinf regression testing.pptx
Test case prioritization usinf regression testing.pptxTest case prioritization usinf regression testing.pptx
Test case prioritization usinf regression testing.pptxmaheshwari581940
 
Black Box Testing.pdf
Black Box Testing.pdfBlack Box Testing.pdf
Black Box Testing.pdfSupunLakshan4
 
Bridging the Gap: Machine Learning for Ubiquitous Computing -- Evaluation
Bridging the Gap: Machine Learning for Ubiquitous Computing -- EvaluationBridging the Gap: Machine Learning for Ubiquitous Computing -- Evaluation
Bridging the Gap: Machine Learning for Ubiquitous Computing -- EvaluationThomas Ploetz
 
A05 Continuous One Variable Stat Tests
A05 Continuous One Variable Stat TestsA05 Continuous One Variable Stat Tests
A05 Continuous One Variable Stat TestsLeanleaders.org
 
A05 Continuous One Variable Stat Tests
A05 Continuous One Variable Stat TestsA05 Continuous One Variable Stat Tests
A05 Continuous One Variable Stat TestsLeanleaders.org
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhPankaj Thakur
 
Transfer defect learning
Transfer defect learningTransfer defect learning
Transfer defect learningSung Kim
 
an-experimental-evaluation-of-the-reliability-.ppt
an-experimental-evaluation-of-the-reliability-.pptan-experimental-evaluation-of-the-reliability-.ppt
an-experimental-evaluation-of-the-reliability-.pptMuhammadRusydiAlwi
 
Test Case Point Analysis
Test Case Point AnalysisTest Case Point Analysis
Test Case Point Analysisvuqn
 
A Test-suite Diagnosability Metric for Spectrum-based Fault Localization Appr...
A Test-suite Diagnosability Metric for Spectrum-based Fault Localization Appr...A Test-suite Diagnosability Metric for Spectrum-based Fault Localization Appr...
A Test-suite Diagnosability Metric for Spectrum-based Fault Localization Appr...Rui Maranhao Abreu
 

Ähnlich wie Software Testing Theory and Program Testing Chapter Outline (20)

AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
 
Testing foundations
Testing foundationsTesting foundations
Testing foundations
 
Catapult DOE Case Study
Catapult DOE Case StudyCatapult DOE Case Study
Catapult DOE Case Study
 
Test suite minimization
Test suite minimizationTest suite minimization
Test suite minimization
 
Testing
TestingTesting
Testing
 
11 whiteboxtesting
11 whiteboxtesting11 whiteboxtesting
11 whiteboxtesting
 
Test case prioritization usinf regression testing.pptx
Test case prioritization usinf regression testing.pptxTest case prioritization usinf regression testing.pptx
Test case prioritization usinf regression testing.pptx
 
Black Box Testing.pdf
Black Box Testing.pdfBlack Box Testing.pdf
Black Box Testing.pdf
 
Bridging the Gap: Machine Learning for Ubiquitous Computing -- Evaluation
Bridging the Gap: Machine Learning for Ubiquitous Computing -- EvaluationBridging the Gap: Machine Learning for Ubiquitous Computing -- Evaluation
Bridging the Gap: Machine Learning for Ubiquitous Computing -- Evaluation
 
A05 Continuous One Variable Stat Tests
A05 Continuous One Variable Stat TestsA05 Continuous One Variable Stat Tests
A05 Continuous One Variable Stat Tests
 
A05 Continuous One Variable Stat Tests
A05 Continuous One Variable Stat TestsA05 Continuous One Variable Stat Tests
A05 Continuous One Variable Stat Tests
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR Chandigarh
 
Spc
SpcSpc
Spc
 
Transfer defect learning
Transfer defect learningTransfer defect learning
Transfer defect learning
 
an-experimental-evaluation-of-the-reliability-.ppt
an-experimental-evaluation-of-the-reliability-.pptan-experimental-evaluation-of-the-reliability-.ppt
an-experimental-evaluation-of-the-reliability-.ppt
 
Lesson 2....PPT 1
Lesson 2....PPT 1Lesson 2....PPT 1
Lesson 2....PPT 1
 
Test Case Point Analysis
Test Case Point AnalysisTest Case Point Analysis
Test Case Point Analysis
 
A Test-suite Diagnosability Metric for Spectrum-based Fault Localization Appr...
A Test-suite Diagnosability Metric for Spectrum-based Fault Localization Appr...A Test-suite Diagnosability Metric for Spectrum-based Fault Localization Appr...
A Test-suite Diagnosability Metric for Spectrum-based Fault Localization Appr...
 

Kürzlich hochgeladen

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Kürzlich hochgeladen (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

Software Testing Theory and Program Testing Chapter Outline

  • 1. Software Testing and Quality Assurance Theory and Practice Chapter 2 Theory of Program Testing 1
  • 2. Outline of the Chapter • Basic Concepts in Testing Theory • Theory of Goodenough and Gerhart • Theory of Weyuker and Ostrand • Theory of Gourlay • Adequacy of Testing • Limitations of Testing • Summary 2
  • 3. Basic Concepts in Testing Theory • Testing theory puts emphasis on – Detecting defects through program execution – Designing test cases from different sources: requirement specification, source code, and input and output domains of programs – Selecting a subset of tests cases from the entire input domain – Effectiveness of test selection strategies – Test oracles used during testing – Prioritizing the execution of test cases – Adequacy analysis of test cases 3
  • 4. Theory of Goodenough and Gerhart • Fundamental Concepts – Let P be a program, and D be its input domain. Let T ⊆ D. P(d) is the result of executing P with input d. Figure 2.1: Executing a program with a subset of the input domain. – OK(d): Represents the acceptability of P(d). OK(d) = true iff P(d) is acceptable. – SUCCESSFUL(T): T is a successful test iff ∀t ∈ T, OK(t). – Ideal Test: T is an ideal test if OK(t), ∀t ∈ T => OK(d), ∀d ∈ D. 4
  • 5. Theory of Goodenough and Gerhart • Fundamental Concepts (Contd.) – Reliable Criterion: A test selection criterion C is reliable iff either every test selected by C is successful, or no test selected is successful. – Valid Criterion: A test selection criterion C is valid iff whenever P is incorrect, C selects at least one test set T which is not successful for P. – Let C denote a set of test predicates. If d ∈ D satisfies test predicate c ∈ C, then c(d) is said to be true. – COMPLETE(T, C) ≡ (∀c ∈ C)(∃t ∈ T) c(t) ∧ (∀t ∈ T)(∃c ∈ C) c(t) • Fundamental Theorem – (∃T ⊆ D) (COMPLETE(T,C) ∧ RELIABLE(C) ∧ VALID(C) ∧ SUCCESSFUL(T)) => (∀d ∈ D) OK(d) 5
  • 6. Theory of Goodenough and Gerhart • Program faults occur due to our – inadequate understanding of all conditions that a program must deal with. – failure to realize that certain combinations of conditions require special care. • Kinds of program faults – Logic fault • Requirement fault • Design fault • Construction fault – Performance fault – Missing control-flow paths – Inappropriate path selection – Inappropriate or missing action • Test predicate: It is a description of conditions and combinations of conditions relevant to correct operation of the program. 6
  • 7. Theory of Goodenough and Gerhart • Conditions for Reliability of a set of test predicates C – Every branching condition must be represented by a condition in C. – Every potential termination condition must be represented in C. – Every condition relevant to the correct operation of the program must be represented in C. • Drawbacks of the Theory – Difficulty in assessing the reliability and validity of a criterion. – The concepts of reliability and validity are defined w.r.t. to a program. The goodness of a test should be independent of individual programs. – Neither reliability nor validity is preserved throughout the debugging process. 7
  • 8. Theory of Weyuker and Ostrand • d ∈ D, the input domain of program P and T ⊆ D. • OK(P, d) = true iff P(d) is acceptable. • SUCC(P, T): T is a successful test for P iff forall ∀t ∈ T, OK(P, t). • Uniformly valid criterion: Criterion C is uniformly valid iff – (∀P) [ (∃d ∈ D)(¬OK(P,d)) => (∃T ⊆ D) (C(T) ∧ ¬SUCC(P, T)) ]. • Uniformly reliable criterion: Criterion C is uniformly reliable iff (∀P) (∀T1, ∀T2 ⊆ D) [ (C(T1) ∧ C(T2)) => (SUCC(P, T1) <==> SUCC(P,T2)) ]. • Uniformly Ideal Test Selection – A uniformly ideal test selection criterion for a given specification is both uniformly valid and uniformly reliable. • A subdomain S is a subset of D. – Criterion C is revealing for a subdomain S if whenever S contains an input which is processed incorrectly, then every test set which satisfies C is unsuccessful. • REVEALING(C, S) iff (∃d ∈ S) (¬OK(d)) => (∀T ⊆ S)(C(T) => ¬SUCC(T)) . 8
  • 9. Theory of Gourlay • The theory establishes a relationship between three sets of entities – specifications, programs and tests. • Notation – P: The set of all programs (p ∈ P ⊆ P) – S: The set of all specifications (s ∈ S ⊆ S) – T: The set of all tests (t ∈ T ⊆ T) – “p ok(t) s” means the result of testing p with t is judged to be acceptable by s. – “p ok(T) s” means “p ok(t) s,” ∀t ∈ T. – “p corr s” means p is correct w.r.t. s. • A testing system is a collection < P, S, T, corr, ok>, where corr ⊆ P x S and ok ⊆ T x P x S, and ∀p∀s∀t(p corr s => p ok(t) s). • A test method is a function M: P x S →T – Program dependent: T = M(P) – Specification dependent: T = M(S) – Expectation dependent 9
  • 10. Theory of Gourlay • Power of test methods: Let M and N be two test methods. – For M to be at least as good as N, we want the following to occur: • Whenever N finds an error, so does M. • (FM and FN are sets of faults discovered by test sets produced by test methods M and N, respectively.) • (TM and TN are test sets produced by test methods M and N, respectively.) – Two cases: (a) TN ⊆ TM and (b) TM and TN overlap 10
  • 11. Adequacy of Testing • Reality: New test cases, in addition to the planned test cases, are designed while performing testing. Let the test set be T. • If a test set T does not reveal any more faults, we face a dilemma: – P is fault-free. OR – T is not good enough to reveal (more) faults.  Need for evaluating the adequacy (i.e. goodness) of T. • Some ad hoc stopping criteria – Allocated time for testing is over. – It is time to release the product. – Test cases no more reveal faults. 11
  • 12. Adequacy of Testing Figure 2.4: Context of applying test adequacy. 12
  • 13. Adequacy of Testing • Two practical methods for evaluating test adequacy – Fault seeding – Program mutation • Fault seeding – Implant a certain number (say, X) of known faults in P, and test P with T. – If k% of the X faults are revealed, T has revealed k% of the unknown faults. – (More in Chapter 13) • Program mutation – A mutation of P is obtained by making a small change to P. – Some mutations are faulty, whereas the others are equivalent to P. – T is said to be adequate if it causes every faulty mutations to produce unexpected results. – (More in Chapter 3) 13
  • 14. Limitations of Testing • Dijkstra’s famous observation – Testing can reveal the presence of faults, but not their absence. • Faults are detected by running P with a small test set T, where |T| << |D|, where |.| denotes the “size-of” function and “<<“ denoted “much smaller.” – Testing with a small test set raises the concern of testing efficacy. – Testing with a small test set is less expensive. • The result of each test must be verified with a test oracle. – Verifying a program output is not a trivial task. – There are non-testable programs. A program is non-testable if • There is no test oracle for the program. • It is too difficult to determine the correct output. 14
  • 15. Summary • Theory of Goodenough and Gerhart • Ideal test, Test selection criteria, Program faults, Test predicates • Theory of Weyuker and Ostrand • Uniformly ideal test selection • Revealing subdomain • Theory of Gourlay • Testing system • Power of test methods (“at least as good as” relation) • Adequacy of Testing • Need for evaluating adequacy • Methods for evaluating adequacy: fault seeding and program mutation • Limitations of Testing • Testing is performed with a test set T, s.t. |T| << |D|. • Dijkstra’s observation • Test oracle problem 15

Hinweis der Redaktion

  1. Handouts ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------- --------------------------------------------------------------------
  2. Handouts
  3. Handouts
  4. Handouts
  5. Handouts
  6. Handouts
  7. Handouts
  8. Handouts
  9. Handouts
  10. Handouts
  11. Handouts
  12. Handouts
  13. Handouts
  14. Handouts
  15. Handouts