Lecture 2. White- box Tes2ng and Structural Coverage (see Amman and Offut, Chapter 2)
|
|
- Patience Hart
- 5 years ago
- Views:
Transcription
1 Lecture 2 White- box Tes2ng and Structural Coverage (see Amman and Offut, Chapter 2)
2 White- box Tes2ng (aka. Glass- box or structural tes2ng) An error may exist at one (or more) loca2on(s) Line numbers Boolean tests Expressions etc. If tests don t exercise that (those) loca4on(s) then error can never be observed So iden2fy and exercise loca2ons No loops finitely many loca2ons good! Loops infinitely many loca2ons bad! Loops + branches exponen2al growth in loca2ons with loop depth very bad!!!!
3 Structural Tes2ng Structural tes2ng is the process of exercising sopware with test scenarios wriqen from the source code, not from the requirements. Usually structural tes2ng has the goal to exercise a minimum collec2on of (combina2ons of) loca2ons. How many loca2ons and combina2ons are enough?
4 Coverage The size of a test suite is an unreliable indicator of the work achieved by tes4ng. Coverage refers to the extent to which a given tes2ng ac2vity has sa2sfied its objec2ves. Enough tes4ng is defined in terms of coverage rather than test suite size. A major advantage of structural tes2ng is that coverage can be easily and accurately defined. Structural coverage measures
5 Structural Tes2ng Problems! What about sins of omission? Missing code = no path to go down! Unimplemented requirements! What about dead code is a path possible? How to avoid redundant tes2ng? What about tes2ng the user requirements? How to handle combinatorial explosion of loca2ons and their combina2ons?
6 Requirements- based tes2ng versus Structural tes2ng (DO- 178B) SoPware Requirements- based Test Genera2on Unit tests Integra2on tests HW/SW integra2on tests SoPware Requirements Coverage analysis End SoPware Structure Coverage analysis
7 Problems with requirements- based tes2ng A test set that meets requirements coverage is not necessarily a thorough test set Requirements may not contain a complete and accurate specifica2on of all code behaviour Requirements may be too coarse to assure that all implemented behaviours are tested Requirements- based tes2ng alone cannot confirm that code doesn t include unintended func2onality. Need structural tes2ng too! Three main types of glass box tes2ng based on 3 types of coverage criteria.
8 Coverage Criteria 1: Control flow Measure the flow of control between statements and sequences of statements Examples: node coverage, edge coverage. Mainly measured in terms of statement invoca2ons (line numbers). Exercise main flows of control. Oldest and most common method
9 Coverage Criteria 2: Logic Analyse the influence of all Boolean variables Examples: predicate coverage, clause coverage, MCDC (FAA DO178B) Exercise Boolean variables at control points. Modern method, and increasingly common
10 Coverage Criteria 3: Data Flow Data flow criteria measure the flow of data between variable assignments (writes) and variable references (reads). Examples: all- defini4ons, all- uses Exercise paths between defini2on of a variable and its subsequent use. S2ll rather rare in industry
11 Glass- box Test Requirements These are requirements on input values to sa2sfy a property: either Graph- theore2c property (control & data flow) data constraint (logic) Easy to define using graph theory Possible to automate genera2on by constraint solving Easy to measure coverage! Oracle is usually just crash (fail)/no crash(pass) Therefore they ignore func2onality!
12 Star2ng Point: a Condensa2on Graph aka. Flowchart Assignments1 true Cond2 false true Cond1 false Assignments2 Assignments4 Assignments3 A node is either an assignment block or a Boolean test. Every program statement is associated with exactly one node.
13 Building condensa2on graphs Boolean tests can be from: If- then- else statements if (bexp) then.. else.. If statements if (bexp) Loops (of any kind) while (bexp) An assignment block contains consecu2ve assignments x = exp return statements return exp procedure/method calls myfunc( ) expressions e.g. i++
14 Type 1 and Type 3 Coverage A path is a sequence of nodes n 0,, n k in a (condensa2on) graph G, such that each adjacent node pair, (n i, n i+1 ) forms an edge in G. For types 1 and 3 tes2ng, a test requirement tr(.) is a graph theore2c criterion e.g. Node n ( p ) iff p passes through node n Edge e (p) iff p has edge e
15 Covering a Graph Criterion C Defini&on: Let TR be a set of test requirements demanded by a graph criterion C. A test suite T sa2sfies C on graph G if, and only if for every test requirement tr(.) TR, there is at least one test case t in T such that for the path p in G taken by t, tr(p) is true This implies 100% coverage. Obviously we can have less!
16 Why so Formal? Answers: 1. Some2mes coverage proper2es become very technical to define for reasons of accuracy. 2. Precise defini2ons can be automated to make test case genera2on tools.
17 Type 1 : Graph Coverage 2.1. Node Coverage (NC) Set TR contains each reachable node in G. Myers : NC is so weak that it is generally considered useless 2.2. Edge Coverage (EC) Set TR contains each reachable path of length 1.
18 Node vs. Edge Coverage true n 1 x < y n 2 false p 1 = n 0, n 1, n 2 p 2 = n 0, n 2 TS 1 = {p 1 } sa2sfies node coverage Abstract test cases TS 2 = {p 1, p 2 } sa2sfies edge coverage
19 2.3 Edge- Pair Coverage (EPC = EC 2 ) Set TR contains each reachable path of length 2. Clearly we can con2nue this beyond 1,2 to EC n Combinatorial explosion! Doesn t deal with loops, which have unbounded length.
20 n 0 p 1 = n 0, n 1, n 3, n 4 true x < y false p 2 = n 0, n 2, n 3, n 5 n 1 n 2 n 3 true w < y false n 4 n 5 p 3 = n 0, n 2, n 3, n 4 p 4 = n 0, n 1, n 3, n 5 TS 1 = {p 1, p 2 } sa2sfies edge coverage TS 2 = {p 1, p 2, p 3, p 4 } sa2sfies edge- pair coverage
21 Simple Paths How to deal with code loops? A path p is simple if it has no repe22ons of nodes other than (possibly) the first and last node. So a simple path p has no internal loops, but may itself be a loop Problem: there are too many simple paths, since many are just sub- paths of longer simple paths.
22 Prime Paths A path p is prime iff p is a maximal simple path i.e. p cannot be extended without losing simplicity. This cuts down the number of cases to consider 2.4. Prime Path Coverage (PPC) Set TR contains each prime path in G
23 n 1 n 0 cond true n 3 Prime Paths = (n 0, n 1, n 2 ), (n 0,n 1,n 3,n 4 ), (n 1,n 3,n 4,n 1 ), (n 3,n 4,n 1,n 3 ), (n 4,n 1,n 3,n 4 ), (n 3,n 4,n 1,n 2 ) false n 4 P 1 = (n 0, n 1, n 2 ) n 2 P 2 = (n 0, n 1, n 3, n 4, n 1, n 2 ) P 3 = (n 0, n 1, n 3, n 4, n 1, n 3, n 4, n 1, n 2 ) TS 1 = {p 1, p 3 } sa2sfies prime path coverage TS 2 = {p 1, p 2 } doesn t sa2sfy prime path coverage! (why?)
24 Compu2ng Prime Paths One advantage is that the set of all prime paths can be computed by a simple dynamic programming algorithm See Amman and Offut Chpt. 2 for details Then test cases can be derived manually (heuris2c: start from longest paths?) or automa2cally.
25 2.7. Complete Path Coverage (CPC) Set TR contains all paths in G. Infeasible if G has infinitely many paths 2.8. Specified Path Coverage (SPC) Set TR contains a set S of test paths, where S is supplied as a parameter. Example heuris&c. S contains paths that traverse every loop free path p in G and every loop in G both 0 and 1 2mes.
26 Type 2 : Logic Coverage Graph and data flow coverage force execu2on of certain paths (branches) through code. They don t necessarily exercise different ways of taking the same branch. We can par22on the number of ways to be finite and coverable. Since a Boolean condi2on may contain many Boolean and data (int, float, object) variables, we consider exercising the condi2on in different ways.
27 Clauses and Predicates A clause is a Boolean valued expression with no Boolean valued sub- expression (i.e. atomic) Examples p, myguard, x==y, x<=y, x>y A predicate is a Boolean combina2on of clauses using Boolean operators e.g. &, I,!, Let P be a set of predicates For p P, let C p be the set of all clauses in p. For logic coverage, a test requirement tr is a logical constraint on input data values
28 Logic Coverage Measures Look at some well known coverage models Increasingly sophis2cated and subtle, Powerful for exactly these reasons! Should produce beqer tes2ng results? Since a test requirement is a constraint, it may not be solvable i.e. dead code
29 Predicate Coverage 3.12 Predicate Coverage (PC) For each predicate p P, the set TR contains two requirements: p is reached and evaluates to true, and p is reached and evaluates to false. Example: p = a I b TR1 P = true, TC1 = (a = T, b = F) TR2 P = false, TC2 = (a = F, b = F) No2ce here we never test for b = T
30 Clause Coverage 3.13 Clause Coverage (CC) For each predicate p P, and each clause c C p the set TR contains two requirements: c is reached and evaluates to true, and c is reached and evaluates to false. Example: p = a I b TR1 a = true, TC1 = (a = T, b = F) TR2 a = false, TC2 = (a = F, b = T) TR3 b = true, TC3 = TC2 TR4 b = false, TC4 = TC1 No2ce p is always false, so we sa2sfy CC but not PC So PC and CC are independent coverage criteria.
31 Distribu2ve vs. non- distribu2ve Note: these defini2ons of PC and CC are non- distribu2ve, i.e. We don t take all combina2ons of all predicate or clause values. (Can be unsolvable combina2ons even without dead code!) (Non- distribu2ve) PC linear growth. (Non- distribu2ve) PC implies EC, but not EC n for n >= 2. Distribu2ve PC - exponen2al growth.
32 Brute Force Approach to PC & CC 3.14 Combinatorial Coverage (CoC) For each predicate p P, the set TR contains requirements so that p is reached, and the clauses c C p evaluate to every possible combina2on of truth values. CoC implies both PC and CC. CoC is also called mul2ple condi2on coverage (MCC). Too strong? Too many test cases? Use less?
33 Ac2ve Clause Coverage Example: p = a I b TC1 = (a = T, b = T), TC2 = (a = F, b = F) (TC1, TC2) sa2sfies both PC and CC Effect of a on its own and b on its own are never considered. No2ce b = T masks the effect of a (and vice versa) But b = F completely exposes the effect of a (vice versa) We say that a determines p in this laqer case Can we find something more expressive than PC & CC but less expensive than CoC which handles this? Use no2on of ac2ve clause which determines the overall predicate value
34 Determina2on Defini2on: Given a clause c in a predicate p we say that c determines p under assignment α iff changing the value of c under α (and only this value) changes the truth value of p. The idea is that in some contexts (assignments) c has complete control of p, and we should test this context. No2ce determina2on is a local property depending only on a truth table.
35 Below, when G1(C) = G1(D) = G1(E) = T then D determines P When R1(C) = R1(D) = R1(E) = F then D again determines P. C D E P T T T T F T T T T F T F F F T T T T F T F T F F T F F T F F F T G1 G2 R1 R2
36 Refined Clause Coverage Models 3.43 Ac&ve Clause Coverage (ACC) For each predicate p P and each clause c C p which determines p (under some α), the set TR contains two requirements for c: c is reached and evaluates to true, and c is reached and evaluates to false. Example: For ACC of clause D above there are 4 possible pairs of test cases (G1,G2), (R1,R2), (G1,R2), (G2,R1)
37 Ambiguity ACC can be seen as ambiguous. Do the other clauses get the same assignment when c is true and c is false, or can they have different assignments? We may not be able to isolate individual clauses Problems of masking, logical overlap and side- effects (e.g. variable synonyms) between clauses Consider e.g. p = (x>10) - > (x>0) If the first clause is set to true the second can never be false.
38 Different Values 3.15 General Ac&ve Clause Coverage (GACC) For each predicate p P and each clause c C p which determines p, the set TR contains two requirements for c: c is reached and evaluates to true, and c is reached and evaluates to false. The values chosen for the other clauses d C p, d c, need not be the same in both cases. Example: For GACC of clause D above there are 4 possible pairs of test cases (G1,G2), (R1,R2), (G1,R2), (G2,R1)
39 GACC Problem: Clause Correla2on One problem is that GACC does not imply PC. Consider the predicate p = a b For some α, a determines p (so does b) so let: TC1: a = T, b = T so p = true TC2: a = F, b = F so p = true For this test suite p never becomes false so PC is not sa2sfied although GACC is! Here the correla2on between a and b is explicit in the condi2on, but it may be implicit in the code.
40 Combining GACC and PC 3.16 Correlated Ac&ve Clause Coverage (CACC) For each predicate p P and each clause c C p which determines p, the set TR contains two requirements for c: c is reached and evaluates to true, and c is reached and evaluates to false. The values chosen for the other clauses d C p, d c, must cause p to be true in one case and false in the other. Example: For CACC of clause D above there are 2 possible test suites (G1,G2), (R1,R2).
41 Why not solve using Determina2on? 3.15 Restricted Ac&ve Clause Coverage (RACC) For each predicate p P and each clause c C p which determines p, the set TR contains two requirements for c: c is reached and evaluates to true, and c is reached and evaluates to false. The values chosen for the other clauses d C p, d c, must be the same in both cases. Example: For RACC of clause D above there are 2 possible test suites (G1,G2), (R1,R2).
42 Determina2on is really a global property! Consider the code snippet!x := y;!!if (x>0 or y>0 ) then! For predicate p = ( x>0 I y>0 ) it looks like PC using RACC is possible from a determinacy analysis of (a I b) where a = x>0 and b = y>0. But this is misleading, since here x and y are effec2vely synonyms and RACC is not sa2sfiable at all. Amman and Offut give a different kind of example, based (essen2ally) on logical overlap of clauses.
43 Safety Cri2cal Tes2ng: MCDC In DO- 178B, the Federal Avia2on Authority (FAA) has mandated a minimum level of logic coverage for level A (highest safety) avionic sopware. Modified Condi4on Decision Coverage (MCDC) Has been some confusion about this defini2on Unique Cause MCDC (original defini2on) is RACC Masking MCDC (new defini2on) is CACC
44 Type 3: Data Flow Coverage A defini2on of a variable v is any statement that writes to v in memory A use of v is any statement that reads v from memory. A path p = (n 1,.., n k ) from a node n 1 to a node n k is def- clear for v if for each 1 < j < k node n j has no statements which write to v
45 Defini2on/Use Paths (du- paths) A du- path w.r.t. v is a simple path p = (n 1,.., n k ) Such that: 1. A statement in n 1 writes to v 2. Path p is def- clear for v 3. A statement in n k reads v du(n,v) = set of all du- paths wrt v star2ng at n du(m,n,v) = set of all du- paths wrt v star2ng at m and ending at n
46 Data flow coverage models 2.9. All- defs Coverage (ADC) For each def- path set S = du(n, v) the set TR contains at least one path d in S All- uses Coverage (AUC) For each def- pair set S = du(m,n,v) the set TR contains at least one path d in S All- du- paths Coverage (ADUPC) For each def- pair set S = du(m,n,v) the set TR contains every path d in S.
47 n 0 write v n 1 n 2 n 3 read v n 4 n 5 read v All- defs = {(n 0, n 1, n 3, n 4 )} All- uses = {(n 0, n 1, n 3, n 4 ) (n 0, n 1, n 3, n 5 )} All- du- paths = {(n 0, n 1, n 3, n 4 ) (n 0, n 1, n 3, n 5 ), (n 0, n 2, n 3, n 4 ), (n 0, n 2, n 3, n 5 ) }
Lecture 2. White- box Tes2ng and Structural Coverage (see Amman and Offut, Chapter 2)
Lecture 2 White- box Tes2ng and Structural Coverage (see Amman and Offut, Chapter 2) White- box Tes2ng (aka. Glass- box or structural tes2ng) An error may exist at one (or more) loca2on(s) Line numbers
More informationIntroduc)on to So,ware Tes)ng (2nd edi(on) Overview Graph Coverage Criteria. Paul Ammann & Jeff OffuA. hap:// so,waretest/
Tes)ng (2nd edi(on) Overview Graph Coverage Criteria Paul Ammann & Jeff OffuA hap://www.cs.gmu.edu/~offua/ so,waretest/ First version, 23 September 2013 Graph Coverage Four Structures for Modeling Software
More informationSo#ware Tes+ng. See also Sommerville, Chapter 8 Amman and Offut, Introduc)on to So,ware Tes)ng, Cambridge University Press, 2008.
So#ware Tes+ng See also Sommerville, Chapter 8 Amman and Offut, Introduc)on to So,ware Tes)ng, Cambridge University Press, 2008. Tes+ng Most basic form of post- hoc SQA Helps define program func+onality
More informationCombinatorial Clause Coverage CoC
Introduction to Software Testing Chapter 3.2 Logic Coverage Paul Ammann & Jeff Offutt Covering Logic Expressions Logic expressions show up in many situations Covering logic expressions is required by the
More informationAgenda. Predicate Testing. CSE 5321/4321, Ali Sharifara, UTA
Agenda Predicate Testing CSE 5321/4321, Ali Sharifara, UTA 1 Predicate Testing Introduction Basic Concepts Predicate Coverage Summary CSE 5321/4321, Ali Sharifara, UTA 2 Motivation Predicates are expressions
More informationIntroduction to Software Testing Chapter 3, Sec# 1 & 2 Logic Coverage
Introduction to Software Testing Chapter 3, Sec# 1 & 2 Logic Coverage Paul Ammann & Jeff Offutt http://www.cs.gmu.edu/~offutt/soft waretest/ Ch. 3 : Logic Coverage Four Structures for Modeling Software
More informationLogic Coverage. Moonzoo Kim School of Computing KAIST. The original slides are taken from Chap. 8 of Intro. to SW Testing 2 nd ed by Ammann and Offutt
Logic Coverage Moonzoo Kim School of Computing KAIST The original slides are taken from Chap. 8 of Intro. to SW Testing 2 nd ed by Ammann and Offutt Covering Logic Expressions Logic expressions show up
More informationTesting: (A Little) Logic Coverage
Testing: (A Little) Logic Coverage Testing, Quality Assurance, and Maintenance Winter 2018 Prof. Arie Gurfinkel Why Logic Coverage? MC/DC (Modified condition/decision coverage) MC/DC is required by the
More informationIntroduction to Software Testing Chapter 3.1, 3.2 Logic Coverage Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 3.1, 3.2 Logic Coverage Paul Ammann & Jeff Offutt http://www.cs.gmu.edu/~offutt/softwaretest/ Ch. 3 : Logic Coverage Four Structures for Modeling Software Graphs
More informationIntroduction to Software Testing Chapter 3.1, 3.2 Logic Coverage Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 3.1, 3.2 Logic Coverage Paul Ammann & Jeff Offutt www.introsoftwaretesting.com Ch. 3 : Logic Coverage Four Structures for Modeling Software Graphs Logic Input Space
More informationLogic Coverage for Source Code
Logic Coverage for Source Code CS 4501 / 6501 Software Testing [Ammann and Offutt, Introduction to Software Testing, Ch. 8] 1 Structural Logic Coverage for Source Code Aim: to identify test requirements
More informationIntroduction to Software Testing Chapter 2, Sections: 2.1 & 2.2 Overview Graph Coverage Criteria
Introduction to Software Testing Chapter 2, Sections: 2.1 & 2.2 Overview Graph Coverage Criteria Paul Ammann & Jeff Offutt http://www.cs.gmu.edu/~offutt/softwa retest/ Ch. 2 : Graph Coverage Four Structures
More informationCISC327 - So*ware Quality Assurance
CISC327 - So*ware Quality Assurance Lecture 12 Black Box Tes?ng CISC327-2003 2017 J.R. Cordy, S. Grant, J.S. Bradbury, J. Dunfield Black Box Tes?ng Outline Last?me we con?nued with black box tes?ng and
More informationIntroduction to Software Testing Chapter 2.1, 2.2 Overview Graph Coverage Criteria Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 2.1, 2.2 Overview Graph Coverage Criteria Paul Ammann & Jeff Offutt www.introsoftwaretesting.com Ch. 2 : Graph Coverage Four Structures for Modeling Software Graphs
More informationCISC327 - So*ware Quality Assurance
CISC327 - So*ware Quality Assurance Lecture 12 Black Box Tes?ng CISC327-2003 2017 J.R. Cordy, S. Grant, J.S. Bradbury, J. Dunfield Black Box Tes?ng Outline Last?me we con?nued with black box tes?ng and
More informationOverview Graph Coverage Criteria
Overview Graph Coverage Criteria Graph Coverage Four Structures for Modeling Software Graphs Logic Input Space Syntax Applied to Applied to Source FSMs Applied to Specs DNF Source Specs Source Models Design
More informationTesting Object Oriented Software 2010
Testing Object Oriented Software 2010 Graph Coverage Barry van Veen Rick van der Zwet 2.1 Graph coverage Introduction into graph coverage Theoretical definition of
More informationLogic-based test coverage
Eduardo Marques, Vasco Thudichum Vasconcelos Logic-based test coverage Basic approach Clauses and predicates Basic coverage criteria: CC, PC, CoC Structural logic coverage of source code Logic coverage
More informationLogic-based test coverage
Logic-based test coverage!!! Basic approach Clauses and predicates Basic coverage criteria: CC, PC, CoC Structural logic coverage of source code Logic coverage of specifications Active clause coverage
More informationAutoma'c Test Genera'on
Automa'c Test Genera'on First, about Purify Paper about Purify (and PurifyPlus) posted How do you monitor reads and writes: insert statements before and a?er reads, writes in code can s'll be done with
More informationCOMP 3705 Advanced Software Engineering: Software Testing
COMP 3705 Advanced Software Engineering: Software Testing Prof. Matt Rutherford For Next Week Readings For Midterm: Chapter 1 and Sections 2.1-2.6, 3.1 3.5 New material: Chapter 4 Homework #5 http://mjrutherford.org/teaching/2009/winter/comp3705/homeworks
More informationIntroduction to Software Testing Chapter 5.1 Syntax-based Testing
Introduction to Software Testing Chapter 5.1 Syntax-based Testing Paul Ammann & Jeff Offutt http://www.cs.gmu.edu/~offutt/ softwaretest/ Ch. 5 : Syntax Coverage Four Structures for Modeling Software Graphs
More informationProofs about Programs
Proofs about Programs Program Verification (Rosen, Sections 5.5) TOPICS Program Correctness Preconditions & Postconditions Program Verification Assignment Statements Conditional Statements Loops Composition
More informationCISC327 - So*ware Quality Assurance. Lecture 13 Black Box Unit
CISC327 - So*ware Quality Assurance Lecture 13 Black Box Unit Tes@ng Black Box Unit Tes@ng Black box method tes@ng Test harnesses Role of code- level specifica@ons (asser@ons) Automa@ng black box unit
More informationLecture 18: Structure-based Testing
Test Case First Strategy White box testing: Statement Coverage Branch Coverage Condition Coverage Data Path Coverage Lecture 18: Structure-based Testing Testing with good and bad data Testing Object Oriented
More informationOp#miza#on Problems, John Gu7ag MIT Department of Electrical Engineering and Computer Science LECTURE 2 1
Op#miza#on Problems, John Gu7ag MIT Department of Electrical Engineering and Computer Science 6.0002 LECTURE 2 1 Relevant Reading for Today s Lecture Chapter 13 6.0002 LECTURE 2 2 The Pros and Cons of
More informationTesting: Coverage and Structural Coverage
Testing: Coverage and Structural Coverage Testing, Quality Assurance, and Maintenance Winter 2017 Prof. Arie Gurfinkel based on slides by Prof. Marsha Chechik and Prof. Lin Tan How would you test this
More informationCISC327 - So*ware Quality Assurance
CISC327 - So*ware Quality Assurance Lecture 8 Introduc
More informationMTAT : Software Testing
MTAT.03.159: Software Testing Lecture 03: White-Box Testing (Textbook Ch. 5) Dietmar Pfahl Spring 2016 email: dietmar.pfahl@ut.ee Lecture Chapter 5 White-box testing techniques (Lab 3) Structure of Lecture
More informationCompiler: Control Flow Optimization
Compiler: Control Flow Optimization Virendra Singh Computer Architecture and Dependable Systems Lab Department of Electrical Engineering Indian Institute of Technology Bombay http://www.ee.iitb.ac.in/~viren/
More informationLecture 3. Black- box Tes3ng
Lecture 3 Black- box Tes3ng Black- box Tes3ng Test cases are constructed without reference to the code structure + Can test the requirements not the code + Can overcome combinatorial explosions + Complementary
More informationLogic Coverage from Source Code
Logic Coverage from Source Code Moonzoo Kim School of Computing KAIST The original slides are taken from Chap. 8 of Intro. to SW Testing 2 nd ed by Ammann and Offutt Logic Expressions from Source Predicates
More informationAutomated White-Box Testing Beyond Branch Coverage
Bardin et al. Dagstuhl seminar 14442 1/ 22 Automated White-Box Testing Beyond Branch Coverage Sébastien Bardin, Nikolai Kosmatov, Mickaël Delahaye CEA LIST, Software Safety Lab (Paris-Saclay, France) The
More informationModel Transformation Impact on Test Artifacts: An Empirical Study
Model Transformation Impact on Test Artifacts: An Empirical Study Anders Eriksson Informatics Research Center University of Skövde, Sweden anders.eriksson@his.se Birgitta Lindström Sten F. Andler Informatics
More informationVulnerability Analysis (III): Sta8c Analysis
Computer Security Course. Vulnerability Analysis (III): Sta8c Analysis Slide credit: Vijay D Silva 1 Efficiency of Symbolic Execu8on 2 A Sta8c Analysis Analogy 3 Syntac8c Analysis 4 Seman8cs- Based Analysis
More informationTesting: Coverage and Structural Coverage
Testing: Coverage and Structural Coverage Testing, Quality Assurance, and Maintenance Winter 2018 Prof. Arie Gurfinkel based on slides by Prof. Marsha Chechik and Prof. Lin Tan How would you test this
More informationCS 4604: Introduc0on to Database Management Systems. B. Aditya Prakash Lecture #17: Transac0ons 1: Intro. to ACID
CS 4604: Introduc0on to Database Management Systems B. Aditya Prakash Lecture #17: Transac0ons 1: Intro. to ACID Why Transac0ons? Database systems are normally being accessed by many users or processes
More informationCS 5614: (Big) Data Management Systems. B. Aditya Prakash Lecture #6: Transac/ons 1: Intro. to ACID
CS 5614: (Big) Data Management Systems B. Aditya Prakash Lecture #6: Transac/ons 1: Intro. to ACID Project dates Proposal due: Feb 23 Milestone due: Mar 28 Final report/posters etc: May 2 (last class)
More informationWhite-Box Testing Techniques
T-76.5613 Software Testing and Quality Assurance Lecture 3, 18.9.2006 White-Box Testing Techniques SoberIT Content What are white-box testing techniques Control flow testing Statement coverage Branch coverage
More informationSoftware Testing part II (white box) Lecturer: Giuseppe Santucci
Software Testing part II (white box) Lecturer: Giuseppe Santucci 4. White box testing White-box (or Glass-box) testing: general characteristics Statement coverage Decision coverage Condition coverage Decision
More informationIntroduction to Software Testing Chapter 2.3 Graph Coverage for Source Code. Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 2.3 Graph Coverage for Source Code Paul Ammann & Jeff Offutt Overview The most common application of graph criteria is to program source Graph : Usually the control
More informationSubject Software Testing Structural Testing
Subject Software Testing Structural Testing Objective: 1. Understand Concept of structural testing 2. How structural (code-based or glass-box) testing complements functional (black-box) testing 3. Recognize
More informationDesign and Debug: Essen.al Concepts CS 16: Solving Problems with Computers I Lecture #8
Design and Debug: Essen.al Concepts CS 16: Solving Problems with Computers I Lecture #8 Ziad Matni Dept. of Computer Science, UCSB Outline Midterm# 1 Grades Review of key concepts Loop design help Ch.
More informationMTAT : Software Testing
MTAT.03.159: Software Testing Lecture 03: White-Box Testing (Textbook Ch. 5) Spring 2013 Dietmar Pfahl email: dietmar.pfahl@ut.ee Lecture Chapter 5 White-box testing techniques (Lab 3) Structure of Lecture
More informationIntroduction to Software Testing Chapter 3, Sec# 3.3 Logic Coverage for Source Code
Introduction to Software Testing Chapter 3, Sec# 3.3 Logic Coverage for Source Code Paul Ammann & Jeff Offutt http://www.cs.gmu.edu/~offutt/soft waretest/ Logic Expressions from Source Predicates are derived
More informationcsc444h: so(ware engineering I matt medland
csc444h: so(ware engineering I matt medland matt@cs.utoronto.ca http://www.cs.utoronto.ca/~matt/csc444 tes2ng top- 10 infrastructure source code control including other types of testing reproducible builds
More informationStructural Testing. White Box Testing & Control Flow Analysis
Structural Testing White Box Testing & Control Flow Analysis Functional vs. Structural Functional Have I built the right product? Tests derived from the program specification Internal Structure ignored
More informationTesting: Dataflow Coverage
Testing: Dataflow Coverage Testing, Quality Assurance, and Maintenance Winter 2018 Arie Gurfinkel based on slides by Thibaud Lutellier, Marsha Chechik and Prof. Lin Tan Non-looping Path Selection Problem
More informationSta$c Single Assignment (SSA) Form
Sta$c Single Assignment (SSA) Form SSA form Sta$c single assignment form Intermediate representa$on of program in which every use of a variable is reached by exactly one defini$on Most programs do not
More informationL7: Tes(ng. Smoke tes(ng. The test- vee Black- box vs. white- box tes(ng Tes(ng methods. Four levels of tes(ng. Case study
Smoke tes(ng L7: Tes(ng The test- vee Black- box vs. white- box tes(ng Tes(ng methods Matrix test Step- by- step test Automated test scripts Four levels of tes(ng Debugging Unit tes?ng Integra?on tes?ng
More informationCOSC 111: Computer Programming I. Dr. Bowen Hui University of Bri>sh Columbia Okanagan
COSC 111: Computer Programming I Dr. Bowen Hui University of Bri>sh Columbia Okanagan 1 First half of course SoEware examples From English to Java Template for building small programs Exposure to Java
More informationSec$on 4: Parallel Algorithms. Michelle Ku8el
Sec$on 4: Parallel Algorithms Michelle Ku8el mku8el@cs.uct.ac.za The DAG, or cost graph A program execu$on using fork and join can be seen as a DAG (directed acyclic graph) Nodes: Pieces of work Edges:
More informationStructural Testing. Testing Tactics. Why Structural? Structural white box. Functional black box. Structural white box. Functional black box
From Pressman, Software Engineering a practitioner s approach, Chapter 14 and Pezze + Young, Software Testing and Analysis, Chapters 12-13 Structural Testing Software Engineering Andreas Zeller Saarland
More informationSTRUCTURAL TESTING. AKA White Box Testing. Thanks go to Andreas Zeller for allowing incorporation of his materials. F. Tip and M.
F. Tip and M. Weintraub STRUCTURAL TESTING AKA White Box Testing Thanks go to Andreas Zeller for allowing incorporation of his materials STRUCTURAL TESTING Testing based on the structure of the code Test
More informationTesting. Prof. Clarkson Fall Today s music: Wrecking Ball by Miley Cyrus
Testing Prof. Clarkson Fall 2017 Today s music: Wrecking Ball by Miley Cyrus Review Previously in 3110: Modules Specification (functions, modules) Today: Validation Testing Black box Glass box Randomized
More informationSoftware Verification and Validation. Prof. Lionel Briand Ph.D., IEEE Fellow
Software Verification and Validation Prof. Lionel Briand Ph.D., IEEE Fellow 1 White-Box Testing 2 White-Box vs. Black-BoxTesting: Reminder Software Representation (Model) Associated Criteria Test cases
More informationLecture 26: Testing. Software Engineering ITCS 3155 Fall Dr. Jamie Payton
Lecture 26: Testing Software Engineering ITCS 3155 Fall 2008 Dr. Jamie Payton Department of Computer Science University of North Carolina at Charlotte Dec. 9, 2008 Verification vs validation Verification:
More informationWhat is Search For? CS 188: Ar)ficial Intelligence. Constraint Sa)sfac)on Problems Sep 14, 2015
CS 188: Ar)ficial Intelligence Constraint Sa)sfac)on Problems Sep 14, 2015 What is Search For? Assump)ons about the world: a single agent, determinis)c ac)ons, fully observed state, discrete state space
More informationSTRUCTURAL TESTING. AKA White Box Testing. Thanks go to Andreas Zeller for allowing incorporation of his materials. F. Tip and M.
F. Tip and M. Weintraub STRUCTURAL TESTING AKA White Box Testing Thanks go to Andreas Zeller for allowing incorporation of his materials STRUCTURAL TESTING Testing based on the structure of the code Test
More informationSearch Engines. Informa1on Retrieval in Prac1ce. Annota1ons by Michael L. Nelson
Search Engines Informa1on Retrieval in Prac1ce Annota1ons by Michael L. Nelson All slides Addison Wesley, 2008 Evalua1on Evalua1on is key to building effec$ve and efficient search engines measurement usually
More informationMTAT : Software Testing
MTAT.03.159: Software Testing Lecture 03: White-Box Testing (Textbook Ch. 5) Dietmar Pfahl Spring 2017 email: dietmar.pfahl@ut.ee Lecture Chapter 5 White-box testing techniques (Lab 3) Structure of Lecture
More information61A LECTURE 22 TAIL CALLS, ITERATORS. Steven Tang and Eric Tzeng July 30, 2013
61A LECTURE 22 TAIL CALLS, ITERATORS Steven Tang and Eric Tzeng July 30, 2013 Announcements Homework 12 due Thursday, not Monday. Take the time to get started on the project instead! Almost done with Scheme
More informationStructural Testing. (c) 2007 Mauro Pezzè & Michal Young Ch 12, slide 1
Structural Testing (c) 2007 Mauro Pezzè & Michal Young Ch 12, slide 1 Learning objectives Understand rationale for structural testing How structural (code-based or glass-box) testing complements functional
More informationAdvanced Test Coverage Criteria: Specify and Measure, Cover and Unmask
Advanced Test Coverage Criteria: Specify and Measure, Cover and Unmask Sébastien Bardin & Nikolai Kosmatov joint work with Omar Chebaro, Robin David, Mickaël Delahaye, Michaël Marcozzi, Mike Papadakis,
More informationBioinforma)cs Resources - NoSQL -
Bioinforma)cs Resources - NoSQL - Lecture & Exercises Prof. B. Rost, Dr. L. Richter, J. Reeb Ins)tut für Informa)k I12 Short SQL Recap schema typed data tables defined layout space consump)on is computable
More informationReview. Asser%ons. Some Per%nent Ques%ons. Asser%ons. Page 1. Automated Tes%ng. Path- Based Tes%ng. But s%ll need to look at execu%on results
Review Asser%ons Computer Science 521-621 Fall 2011 Prof. L. J. Osterweil Material adapted from slides originally prepared by Prof. L. A. Clarke Dynamic Tes%ng Execute program on real data and compare
More information6. Test-Adequacy. Assessment Using Control Flow and Data Flow. Andrea Polini
6. Test-Adequacy Assessment Using Control Flow and Data Flow Andrea Polini Software Engineering II Software Testing MSc in Computer Science University of Camerino (Software Engineering II Software Testing)
More informationVHDL: Concurrent Coding vs. Sequen7al Coding. 1
VHDL: Concurrent Coding vs. Sequen7al Coding talarico@gonzaga.edu 1 Concurrent Coding Concurrent = parallel VHDL code is inherently concurrent Concurrent statements are adequate only to code at a very
More informationMTAT : Software Testing
MTAT.03.159: Software Testing Lecture 02: Basic Black-Box and White-Box Testing Techniques (Textbook Ch. 4 & 5) Spring 2018 Dietmar Pfahl email: dietmar.pfahl@ut.ee Structure of Lecture 2 Black-Box vs.
More informationDesign and Debug: Essen.al Concepts Numerical Conversions CS 16: Solving Problems with Computers Lecture #7
Design and Debug: Essen.al Concepts Numerical Conversions CS 16: Solving Problems with Computers Lecture #7 Ziad Matni Dept. of Computer Science, UCSB Announcements We are grading your midterms this week!
More informationRegression Tes+ng. Midterm Wednesday Oct. 26, 7:00-8:30pm Room 142
Regression Tes+ng Computer Science 521-621 Fall 2011 Prof. L. J. Osterweil Material adapted from slides originally prepared by Prof. L. A. Clarke Midterm Wednesday Oct. 26, 7:00-8:30pm Room 142 Closed
More informationMSc Software Testing MSc Prófun hugbúnaðar
MSc Software Testing MSc Prófun hugbúnaðar Fyrirlestrar 7 & 8 Structural Testing White-box tests. 29/8/27 Dr Andy Brooks 1 Case Study Dæmisaga Reference Structural Testing of Programs, A Survey, A A Omar
More informationLecture 17: Testing Strategies. Developer Testing
Lecture 17: Testing Strategies Structural Coverage Strategies (White box testing): Statement Coverage Branch Coverage Condition Coverage Data Path Coverage Function Coverage Strategies (Black box testing):
More informationFormal Approach in Software Testing
Formal Approach in Software Testing #Abhishek Dixit, #Shivani Goel 1 csed, TIET biodatadixit@yahoo.co.in 2 csed, TIET shivani@tiet.ac.in Abstract Testing is an important activity for checking the correctness
More informationModel-Based Testing. (DIT848 / DAT261) Spring Lecture 3 White Box Testing - Coverage
Model-Based Testing (DIT848 / DAT261) Spring 2017 Lecture 3 White Box Testing - Coverage Gerardo Schneider Dept. of Computer Science and Engineering Chalmers University of Gothenburg Some slides based
More informationDRAFT: Prepublication draft, Fall 2014, George Mason University Redistribution is forbidden without the express permission of the authors
Chapter 9 Syntax-based Testing Date last generated: September 29, 2014. DRAFT: Prepublication draft, Fall 2014, George Mason University Redistribution is forbidden without the express permission of the
More information1 Black Box Test Data Generation Techniques
1 Black Box Test Data Generation Techniques 1.1 Equivalence Partitioning Introduction Equivalence partitioning is based on the premise that the inputs and outputs of a component can be partitioned into
More informationMTAT : Software Testing
MTAT.03.159: Software Testing Lecture 04: White-Box Testing (advanced) Part1 Dietmar Pfahl Spring 2018 email: dietmar.pfahl@ut.ee White-Box Testing Techniques Control-Flow Testing Data-Flow Testing Mutation
More informationOpera&ng Systems ECE344
Opera&ng Systems ECE344 Lecture 10: Scheduling Ding Yuan Scheduling Overview In discussing process management and synchroniza&on, we talked about context switching among processes/threads on the ready
More informationCSE P 501 Compilers. Parsing & Context-Free Grammars Hal Perkins Winter /15/ Hal Perkins & UW CSE C-1
CSE P 501 Compilers Parsing & Context-Free Grammars Hal Perkins Winter 2008 1/15/2008 2002-08 Hal Perkins & UW CSE C-1 Agenda for Today Parsing overview Context free grammars Ambiguous grammars Reading:
More informationApproach starts with GEN and KILL sets
b -Advanced-DFA Review of Data Flow Analysis State Propaga+on Computer Science 5-6 Fall Prof. L. J. Osterweil Material adapted from slides originally prepared by Prof. L. A. Clarke A technique for determining
More information{HEADSHOT} In this lesson, we will look at the process that enables to leverage this source of real- world tes;ng data.
{HEADSHOT} Despite our best efforts, even a9er extensive tes;ng, we as so9ware developers rarely put out bug- free code. In this lesson, we will look at a type of debugging technique used throughout the
More informationRV: A Run'me Verifica'on Framework for Monitoring, Predic'on and Mining
RV: A Run'me Verifica'on Framework for Monitoring, Predic'on and Mining Patrick Meredith Grigore Rosu University of Illinois at Urbana Champaign (UIUC) Run'me Verifica'on, Inc. (joint work with Dongyun
More informationProgramming Embedded Systems
Programming Embedded Systems Overview of testing techniques Monday March 3, 2014 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/70 Lecture outline Background, testing in general Unit testing
More informationJUnit tes)ng. Elisa Turrini
JUnit tes)ng Elisa Turrini Automated Tes)ng Code that isn t tested doesn t work Code that isn t regression tested suffers from code rot (breaks eventually) If it is not automated it is not done! Boring
More informationTesting. Lydie du Bousquet, Ioannis Parissis. TAROT Summer School July (TAROT 2009)
Testing TAROT Summer School Lustre/SCADE programs 2009 - July 6-10 Lydie du Bousquet, Ioannis Parissis 1 (TAROT 2009) Synchrone Scade/Lustre Siesta Issues 2 Synchronous / safety-critical software control/command
More informationData Types. Numeric Data Types
Data Types Data comes in different types and different formats Integer Floating point numbers Characters A key issue is whether there is hardware support for a particular data type. Hardware support means
More informationD0010E Object- oriented programming and design. Today. Today An introduc<on to the basic syntax and seman<cs of Java
D0010E Object- oriented programming and design An introduc
More informationTesting Tactics. Structural Testing. Why Structural? Why Structural? Functional black box. Structural white box. Functional black box
ing Tactics Structural ing Functional black box Structural white box Software Engineering Andreas Zeller Saarland University s based on spec covers as much specified behavior as possible s based on code
More informationF.P. Brooks, No Silver Bullet: Essence and Accidents of Software Engineering CIS 422
The hardest single part of building a software system is deciding precisely what to build. No other part of the conceptual work is as difficult as establishing the detailed technical requirements...no
More informationCSE P 501 Compilers. Parsing & Context-Free Grammars Hal Perkins Winter UW CSE P 501 Winter 2016 C-1
CSE P 501 Compilers Parsing & Context-Free Grammars Hal Perkins Winter 2016 UW CSE P 501 Winter 2016 C-1 Administrivia Project partner signup: please find a partner and fill out the signup form by noon
More information4.1 Review - the DPLL procedure
Applied Logic Lecture 4: Efficient SAT solving CS 4860 Spring 2009 Thursday, January 29, 2009 The main purpose of these notes is to help me organize the material that I used to teach today s lecture. They
More informationSQLite with a Fine-Toothed Comb. John Regehr Trust-in-So1 / University of Utah
SQLite with a Fine-Toothed Comb John Regehr Trust-in-So1 / University of Utah Feasible states for a system we care about No execu
More informationSoftware Testing for Developer Development Testing. Duvan Luong, Ph.D. Operational Excellence Networks
Software Testing for Developer Development Testing Duvan Luong, Ph.D. Operational Excellence Networks Contents R&D Testing Approaches Static Analysis White Box Testing Black Box Testing 4/2/2012 2 Development
More informationIntroduction to Dynamic Analysis
Introduction to Dynamic Analysis Reading assignment Gary T. Leavens, Yoonsik Cheon, "Design by Contract with JML," draft paper, http://www.eecs.ucf.edu/~leavens/jml//jmldbc.pdf G. Kudrjavets, N. Nagappan,
More informationHigh-Level Synthesis Creating Custom Circuits from High-Level Code
High-Level Synthesis Creating Custom Circuits from High-Level Code Hao Zheng Comp Sci & Eng University of South Florida Exis%ng Design Flow Register-transfer (RT) synthesis - Specify RT structure (muxes,
More informationProgramming Embedded Systems
Programming Embedded Systems Lecture 8 Overview of software testing Wednesday Feb 8, 2012 Philipp Rümmer Uppsala University Philipp.Ruemmer@it.uu.se 1/53 Lecture outline Testing in general Unit testing
More informationIntroduction to Software Testing Chapter 2.4 Graph Coverage for Design Elements Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 2.4 Graph Coverage for Design Elements Paul Ammann & Jeff Offutt www.introsoftwaretesting.com OO Software and Designs Emphasis on modularity and reuse puts complexity
More informationProgramming Languages and Techniques (CIS120)
Programming Languages and Techniques (CIS120) Lecture 20 Feb 29, 2012 Transi@on to Java II DON T PANIC Smoothing the transi@on Eclipse set- up instruc@ons in lab today/tomorrow First Java homework assignment
More informationCMPSCI 521/621 Homework 2 Solutions
CMPSCI 521/621 Homework 2 Solutions Problem 1 Direct data dependencies: 3 is directly data dependent on 1 and 5 5 is directly data dependent on 1,3, and 5 7 is directly data dependent on 1,3, and 5 Note,
More information