Structural Testing & Mutation
|
|
- Adam Arnold
- 5 years ago
- Views:
Transcription
1 Structural Testing & Mutation Filippo Ricca DISI, Università di Genova, Italy 1
2 White vs. Black box testing A white box testing is based upon explicit knowledge of the SUT and its structure Called also structural testing Statement coverage testing is an example The aim is to create enough testcases to ensure every statement is executed at least once Inputs Outputs A black box testing approach will device testcases without any knowledge of the SUT or any aspect of its structure Called also functional testing Usually testcases are generated starting from requirements/specifications Inputs Outputs 2
3 What is adequacy? Test suite T P Fault detection what if no faults are found? How good this test suite is? Has P been tested thoroughly?, or Is T adequate? Two possibilities: Test Coverage and program mutation 3
4 Test Coverage 4
5 Test Coverage Coverage can be based on: source code model control flow graph (extended) finite state machines data flow graph requirements checklist... 5
6 Coverage: what to measure? For any coverage measure, we need: A coverage unit: an element with the properties: We can count the total number of units in the software We can identify which units were hit during a single execution run This means that we can determine the percentage of units hit during one or more execution runs 89% 6
7 Control flow coverage Statement coverage Branch coverage (also called decision coverage) Minimum coverage specified by the IEEE unit test standard Multiple Condition coverage Covers combinations of condition in decisions If (x=6) && (y=7) then Path coverage 100% path coverage impossible in practice Loops... 7
8 Control Flow graph 1 int proc(int a, int b, int x) { if ((a>1) && (b==0)) // 1 { x = x/a; // 3 if ((a==2) (x>1)) // 4 { x = x+1; // 5 return x; // a > 1 AND b = 0 false a == 2 OR x>1 false true true x x/a x x
9 Statement Coverage Criterion: All statements must be covered during test execution This is the weakest form of coverage Some branches may be missed Procedure: Find paths that cover all statements Choose input data that will result in the selected paths 9
10 Statement Coverage The following path is sufficient for statement coverage: 1 a > 1 AND b = 0 true false x x/a 3 int proc(int a, int b, int x) Possible input: 4 a == 2 OR x>1 true a = 2, b = 0, x = 4 6 false x x
11 Not covered branches 1 a > 1 AND b = 0 true 2 false x x/a 3 4 a == 2 OR x>1 true 6 false x x
12 Branch Coverage Criterion: At any branch point, each branch must be covered during test execution The true and false branch of a 2-way if statement Each case in a switch statement Loops Procedure: While, for, goto,. Find paths that cover all branches Choose input data that will result in the selected paths Branch coverage includes statement coverage! 12
13 Branch Coverage The following paths are sufficient for branch coverage: 1 a > 1 AND b = 0 true Possible input: 1. a = 2, b = 2, x = a = 3, b = 0, x = false a == 2 OR x>1 false true x x/a x x
14 Multiple Condition Coverage Criterion: Every atomic (i.e. does not include AND or OR) condition must be true and false at some point during test execution In a compound logical statement (i.e. includes AND and OR), every combination of atomic conditions must be covered during test execution Achieving multiple condition coverage also satisfies statement and branch coverage 14
15 Multiple Condition Coverage int proc(int a, int b, int x) { Need cases where if ( (a>1) && (b==0) ) 1. { a > 1 is true and b = 0 is true x = x/a; 2. a > 1 is true and b = 0 is false 3. a > 1 is false and b = 0 is true if ( (a==2) (x>1) ) 4. a > 1 is false and b = 0 is false { 5. a = 2 is true and x > 1 is true x = x+1; 6. a = 2 is true and x > 1 is false 7. a = 2 is false and x > 1 is true return x; 8. a = 2 is false and x > 1 is false 15
16 Multiple Condition Coverage 1. a > 1 is true and b = 0 is true 2. a > 1 is true and b = 0 is false 3. a > 1 is false and b = 0 is true 4. a > 1 is false and b = 0 is false 5. a = 2 is true and x > 1 is true 6. a = 2 is true and x > 1 is false Possible input: a = 2, b = 0, x = 2 [1][5] a = 2, b = 1, x = 0 [2][6] a = 0, b = 0, x = 2 [3][7] a = 0, b = 1, x = 0 [4][8] 7. a = 2 is false and x > 1 is true 8. a = 2 is false and x > 1 is false 16
17 Multiple Condition Coverage Multiple condition coverage covers all branches and statements. Input values: a = 2, b = 0, x = 2 a = 2, b = 1, x = 0 a = 0, b = 0, x = 2 a = 0, b = 1, x = 0 Paths covered Equal a > 1 AND b = 0 false a == 2 OR x>1 7 1 false true true x x/a x x
18 All Paths Coverage Criterion: All paths through the code must be covered This is typically infeasible when loops are present A version of this coverage with loops is to treat loops as having two paths: 1. The loop is executed (normally, once) 2. The loop is skipped Some paths may also be infeasible because there is no combination of data conditions that permit a path to be taken See example below 18
19 All Paths Coverage Set of all paths: a > 1 AND b = 0 false true x x/a 3 Input values: a = 0, b = 1, x = 0 a = 3, b = 0, x = 0 a = 2, b = 1, x = 0 a = 2, b = 0, x = a == 2 OR x>1 false true x x
20 Comparison From the previous two examples, we can see that: Multiple condition coverage does not imply all paths coverage All paths coverage does not imply multiple condition coverage 20
21 Infeasible paths Set of paths: true a > false x x/a 3 To be able to take this path, we would have to have: 4 a > 4 true a <= 1 AND a > 4 which is logically impossible! 6 false x x
22 Code Coverage Tools Clover: Emma: Coverlipse: Cobertura:
23 Emma Open-source tool Supports class, method, and line coverage Fractional line coverage supported, but not branch coverage Only part of a line covered Standalone version Eclipse plugin EclEmma also available Installing the plug-in In Eclipse: Help -> install new software -> 23
24 Testcases are written in Junit! Emma coverage report 24
25 Emma source code annotations 25
26 Fractional line coverage Only part of conditional executed Loop increment not executed green for fully covered lines, yellow for partly covered lines and red for lines that have not been executed at all 26
27 EMMA example public class Calc { int tot; Calc(){ tot=0; int somma (int x) { tot=tot + x; return tot; int sottrai (int x) { tot=tot - x; return tot; int moltiplica (int x) { tot=tot * x; return tot; public class CalcTest { Calc public void setup(){ c= new public void testsomma() { assertequals(c.somma(3), public void testsottrai() { assertequals(c.sottrai(0), public void testmoltiplica() { c.somma(2); assertequals(c.moltiplica(3), 6);
28 Output EMMA Coverage = 100%
29 Program Mutation 29
30 What is program mutation? P is alterated in several istances (automatically) For several reasons: Computing test adequacy of a testsuite Improving/completing a testsuite Detecting new errors 30
31 Mutation terms Mutant: a copy of the original program with a small change (seeded fault) Mutation operator: applied to make change (automatically) to the original program Es. + --> * Mutant killed: if its behaviors/outputs differ from those of the original program Live otherwise 31
32 Mutation operator 32
33 Method-level operator (examples) Mutant operator In P In mutant Variable replacement z=x*y+1; x=x*y+1; Relational operator replacement if (x<y) z=x*x+1; if(x>y) if(x<=y) Off-by-1 z=x*y+1; z=x*(y+1)+1; z=(x+1)*y+1; Replacement by 0 z=x*y+1; z=0*y+1; Arithmetic operator replacement z=x*y+1; z=0; z=x*y-1; z=x+y-1; 33
34 Class-level operator (examples) Access modifier change: The AMC operator changes the access level for instance variables and methods to other access levels Hiding variable deletion: The IHD operator deletes a hiding variable, a variable in a subclass that has the same name and type as a variable in the parent class 34
35 Mutant score Mutant killed: if its behaviors/outputs differ from those of the original program testcase 35
36 Test adequacy using mutation Mutant/Mutation score can be also computed for the entire Testsuite MS(T)=number killed mutants/number mutants MS(T)=1 means that all the mutant are killed => the testsuite is 100% adequate Best case... In same cases it is not possible to reach MS(T)=1 Mutants equivalent to P! Ex. x+y --> x+y+0 Automatic tools should avoid it! 36
37 Computing Adequacy Foo Tools Usage Foo Foo Foo MS(FooTest)=? Mutating Foo Tests: FooTest Mutation points = 12, unit test time limit 2.02s.. M FAIL: Foo:31: negated conditional M FAIL: Foo:33: negated conditional M FAIL: Foo:34: - -> + M FAIL: Foo:35: negated conditional... Score: 67% 37
38 Test enhancement using mutation One has the opportunity to enhance a test set T after having assessed its adequacy If the mutation score (MS) is 1, then some other technique, or a different set of mutants, needs to be used to help enhance T If the mutation score (MS) is less than 1, then there exist live mutants. Each live mutant needs to be distinguished from P Adding testcases to the testuite!!!!! 38
39 Error detection using mutation There is no guarantee that tests derived to distinguish live mutants will reveal a yet undiscovered error in P Nevertheless, empirical studies have found to be the most powerful of all enhancement techniques The next simple example illustrates how test enhancement using mutation detects errors 39
40 Foo (1) Consider the following function foo that is required to return the sum of two integers x and y. Clearly foo is incorrect int foo(int x, y) { return (x-y); Now suppose that foo has been tested using a test set T that contains two tests T={ t1: <x=1, y=0>, t2: <x=-1, y=0> This should be return (x+y) Foo(1,0)=1 and Foo(-1,0)=-1 Correct? 40
41 Foo (2) int foo(int x, y) { return (x-y); mutants M1: int foo(int x, y) { M2: int foo(int x, y) { M3: int foo(int x, y) { return (x+y); return (x-0); return (0+y); Testsuite is not adequate! Next we execute each mutant against tests in T MS(T)= 1/3 T={ t1: <x=1, y=0>, t2: <x=-1, y=0> Test (t) foo(t) M1(t) M2(t) M3(t) t t Live Live Killed 41
42 Foo (3) int foo(int x, y) { return (x-y); M1: int foo(int x, y) { return (x+y); Let us examine M1 A test that distinguishes M1 from foo must satisfy the following condition: x-y x+y => -y y => -2y 0 => y 0 Hence we get t3: <x=1, y=1> Executing foo on t3 gives us foo(t3)=0 However, according to the requirements we must get foo(t3)=2 Thus t3 distinguishes M1 from foo and also reveals the error 42
43 Tools for mutation testing: features A typical tool for mutation testing offers the following features: MuClipse A selectable palette of mutation operators Management of test set T Ex. Junit Generation of mutants Execution of the program under test and mutants against T Report Mutation score (adequacy) 43
44 Tools Free for mutation testing Proteum is the first mutation testing tool that implements all mutation operators designed for the ANSI C programming language µjava (mujava) is a mutation system for Java programs MuClipse is an Eclipse plugin verion of µjava (mujava) Jumble is a mutation system for Java programs with JUnit tests. Jumble can be used from the command line or as an Eclipse plugin The bytecode is mutated Others at: 44
45 Jumble installation 1. Download Jumble from: 2. Unzip the downloaded file in a folder: jumble_1_1_0 3. Copy or Move the folder jumble (jumble_1_1_0 > eclipseplugin > plugin-export) to your Eclipse plugins folder: Eclipse >plugins, or Eclipse > dropins > eclipse > plugins 4. Restart Eclipse 45
46 Run default mutation testing If : class to be mutated <YourClass> and your test are in the same package and your test s name follows this pattern: <YourClass>Test.java, then you can run Jumble 1. Right click on <YourClass> 2. Choose Jumble > Jumble Class 3. Look at the Console view to see the mutant score 46
47 How Jumble work? class "Foo JUnit tests "FooTest" Jumble starts by running the unit tests (in FooTest.class) on the unmodified Foo class to check that they all pass, and to measure the time taken by each test Then it will mutate Foo in various ways and run the tests again to see if they detect the mutation It continues this process until all mutations of Foo have been tried It provides the output 47
48 Jumble Output Jumble found 12 different mutants of Foo Mutating Foo Tests: FooTest Mutation points = 12, unit test time limit 2.02s.. M FAIL: Foo:31: negated conditional M FAIL: Foo:33: negated conditional M FAIL: Foo:34: - -> + M FAIL: Foo:35: negated conditional... Score: 67% unit tests kill the mutant (indicated by a '.') if (C) decision on line 31 was mutated to if (!C) Overall, 67% (8/12) of the mutations were killed by the unit tests, which means that they probably need to be improved 48
49 Jumble mutations Conditionals: Jumble replaces each condition with its negation the condition x > y would mutate to become!(x > y) Arithmetic Operations: Jumble replace arithmetic operations A fixed table is used + --> -, * --> / Increments: Increments, decrement are mutated for example, i++ becomes i-- Constants: Jumble can change the value of literal constants for example, 0 --> 1 Return Values: Jumble can change return values for example, return X --> return 0 Switch Statements: Jumble can mutate each case of a switch swapping 49
50 Jumble Example public class Calc { int tot; Calc(){ tot=0; int somma (int x) { tot=tot + x; return tot; int sottrai (int x) { tot=tot - x; return tot; int moltiplica (int x) { tot=tot * x; return tot; public class CalcTest { Calc public void setup(){ c= new public void testsomma() { Assert.assertEquals(c.somma(3), public void testsottrai() { Assert.assertEquals(c.sottrai(0), public void testmoltiplica() { c.somma(2); Assert.assertEquals(c.moltiplica(3), 6);
51 Mutant non killed Jumble output Mutating Calc Tests: CalcTest Mutation points = 7, unit test time limit 2.31s...M FAIL: Calc:15: - -> +... Score: 85% public class Calc { int tot; Calc(){ tot=0; int somma (int x) { tot=tot + x; return tot; int sottrai (int x) { tot=tot + x; return tot; int moltiplica (int x) { tot=tot * x; return tot; 51
52 public class CalcTest { Calc public void setup(){ c= new public void testsomma() { Assert.assertEquals(c.somma(3), public void testsottrai() { Assert.assertEquals(c.sottrai(3), -3); Test enhancement Mutating Calc Tests: CalcTest Mutation points = 7, unit test time limit 2.31s... Score: public void testmoltiplica() { c.somma(2); Assert.assertEquals(c.moltiplica(3), 6);
53 Possible exercises at the exam Given a piece of code: Build the CFG Find paths that cover all statements, branches, conditions, or paths Choose input data that will result in the selected paths See exercise Delete rows from array at Enhance a test set T after having assessed its adequacy Given P, T (Junit tests) and a set of Jumble mutations Foo:33: negated conditional Error detection using mutation Ex. Foo 53
54 References (used to prepare these slides) Slides of the book Foundations of software testing by Aditya P. Mathur InstructorSlides.html Slides of Alan Williams, University of Ottawa Glover, Don t be fooled by the Coverage Report, IBM developer works article Slides of Cu Nguyen Duy, Software Analysis and Testing Wikipedia 54
Structural 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 informationMuClipse Requirements Specification
MuClipse Requirements Specification v0.4 Project Team: 12/6/2006 Document Author(s): Project Sponsor: Dr. Laurie Williams 1. Introduction There are already several open source Java mutation (JMutation)
More informationTest Case Specifications and Test adequacy. Research Methods - Barbara Russo SwSE - Software and Systems Engineering
Test Case Specifications and Test adequacy Research Methods - Barbara Russo SwSE - Software and Systems Engineering 1 Test Case Selection How do we create tests? Test are defined in terms of their adequacy
More informationWhat is software testing? Software testing is designing, executing and evaluating test cases in order to detect faults.
ϖοιδ τεσταδδανδχουντ() { ασσερ τεθυαλσ(1, ο.αδδανδχουντ(νεω ΑρραψΛιστ()); ϖοιδ τεσταδδανδχουντ() { ασσερ τεθυαλσ(1, ο.αδδανδχουντ(νεω ΑρραψΛιστ()); ιντ αδδανδχουντ(λιστ λιστ) { ρετυρν λιστ.σιζε(); ιντ
More informationWhite Box Testing III
White Box Testing III Outline Today we continue our look at white box testing methods, with mutation testing We will look at : definition and role of mutation testing what is a mutation? how is mutation
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 informationOn Code Coverage of Extended FSM Based Test Suites: An Initial Assessment
On Code Coverage of Extended FSM Based Test Suites: An Initial Assessment Khaled El-Fakih 1, Tariq Salameh 1, and Nina Yevtushenko 2 1 American University of Sharjah, Sharjah, UAE {Kelfakih,b00046306}@aus.edu
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 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 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 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 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 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 informationWritten exam TDDD04 Software Testing
LiTH, Linköpings tekniska högskola IDA, Institutionen för datavetenskap Ola Leifler Written exam TDDD04 Software Testing 2016-10-26 Permissible aids Dictionary (printed, NOT electronic) Teacher on duty
More informationTesting. CMSC 433 Programming Language Technologies and Paradigms Spring A Real Testing Example. Example (Black Box)?
Testing CMSC 433 Programming Language Technologies and Paradigms Spring 2007 Testing Feb. 15, 2007 Some slides adapted from FSE 98 Tutorial by Michal Young and Mauro Pezze Execute program on sample input
More informationOn Guiding the Augmentation of an Automated Test Suite via Mutation Analysis
On Guiding the Augmentation of an Automated Test Suite via Mutation Analysis Abstract Mutation testing has traditionally been used as a defect injection technique to assess the effectiveness of a test
More informationTesting! Prof. Leon Osterweil! CS 520/620! Spring 2013!
Testing Prof. Leon Osterweil CS 520/620 Spring 2013 Relations and Analysis A software product consists of A collection of (types of) artifacts Related to each other by myriad Relations The relations are
More informationSecond assignment came out Monday evening. Find defects in Hnefetafl rules written by your classmates. Topic: Code Inspection and Testing
Announcements Second assignment came out Monday evening Topic: Code Inspection and Testing Find defects in Hnefetafl rules written by your classmates Compare inspection, coverage testing, random testing,
More informationProblem Score Max Score 1 Syntax directed translation & type
CMSC430 Spring 2014 Midterm 2 Name Instructions You have 75 minutes for to take this exam. This exam has a total of 100 points. An average of 45 seconds per point. This is a closed book exam. No notes
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 informationUsing the code to measure test adequacy (and derive test cases) Structural Testing
Using the code to measure test adequacy (and derive test cases) Structural Testing Objectives To describe a second approach to testing which is geared to find program defects To explain the use of program
More informationCS 520 Theory and Practice of Software Engineering Fall 2018
Today CS 52 Theory and Practice of Software Engineering Fall 218 Software testing October 11, 218 Introduction to software testing Blackbox vs. whitebox testing Unit testing (vs. integration vs. system
More informationProgram Analysis. Program Analysis
Program Analysis Class #4 Program Analysis Dynamic Analysis 1 Static VS Dynamic Analysis Static analysis operates on a model of the SW (without executing it) If successful, produces definitive information
More informationAn Introduction to Systematic Software Testing. Robert France CSU
An Introduction to Systematic Software Testing Robert France CSU Why do we need to systematically test software? Poor quality products can Inconvenience direct and indirect users Result in severe financial
More informationOn Guiding the Augmentation of an Automated Test Suite via Mutation Analysis
On Guiding the Augmentation of an Automated Test Suite via Mutation Analysis Abstract Mutation testing has traditionally been used as a defect injection technique to assess the effectiveness of a test
More informationAgile Software Development. Lecture 7: Software Testing
Agile Software Development Lecture 7: Software Testing Mahmoud El-Gayyar elgayyar@ci.suez.edu.eg Slides are a modified version of the slides by Prof. Kenneth M. Anderson Outline Testing Terminology Types
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 informationhttps://www.lri.fr/ linaye/gl.html
Software Engineering https://www.lri.fr/ linaye/gl.html lina.ye@centralesupelec.fr Sequence 3, 2017-2018 1/61 Software Engineering Plan 1 2 3 4 5 2/61 Software Engineering Software Testing 3/61 Software
More informationSoftware Engineering. Unit Testing Gobo Eiffel Test and Clover
Chair of Software Engineering Software Engineering Prof. Dr. Bertrand Meyer March 2007 June 2007 Unit Testing Gobo Eiffel Test and Clover Agenda for Today 1. Testing 2. Main Concepts 3. Unit Testing Gobo
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 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 informationClass-Component Testability Analysis
Class-Component Testability Analysis SUPAPORN KANSOMKEAT Faculty of Engineering, Chulalongkorn University Bangkok, 10330, THAILAND WANCHAI RIVEPIBOON Faculty of Engineering, Chulalongkorn University Bangkok,
More informationDataflow-based Coverage Criteria
Dataflow-based Coverage Criteria W. Eric Wong Department of Computer Science The University of Texas at Dallas ewong@utdallas.edu http://www.utdallas.edu/~ewong Dataflow-based Coverage Criteria ( 2012
More informationDataflow testing of Java programs with DFC
Dataflow testing of Java programs with DFC Ilona Bluemke 1,, Artur Rembiszewski 1 1 Institute of Computer Science, Warsaw University of Technology Nowowiejska 15/19, 00-665 Warsaw, Poland I. Bluemke@ii.pw.edu.pl
More informationOn Code Coverage of Extended FSM Based Test Suites: An Initial Assessment
On Code Coverage of Extended FSM Based Test Suites: An Initial Assessment Khaled El-Fakih, Tariq Salameh, Nina Yevtushenko To cite this version: Khaled El-Fakih, Tariq Salameh, Nina Yevtushenko. On Code
More informationWhat is Mutation Testing? Mutation Testing. Test Case Adequacy. Mutation Testing. Mutant Programs. Example Mutation
What is Mutation Testing? Mutation Testing Breaking the application to test it n Mutation Testing is a testing technique that focuses on measuring the adequacy of test cases n Mutation Testing is NOT a
More informationUsing Mutation to Automatically Suggest Fixes for Faulty Programs
2010 Third International Conference on Software Testing, Verification and Validation Using Mutation to Automatically Suggest Fixes for Faulty Programs Vidroha Debroy and W. Eric Wong Department of Computer
More informationProgram Testing and Analysis: Manual Testing Prof. Dr. Michael Pradel Software Lab, TU Darmstadt
Program Testing and Analysis: Manual Testing Prof. Dr. Michael Pradel Software Lab, TU Darmstadt Partly based on slides from Peter Müller, ETH Zurich 1 Warm-up Quiz What does the following code print?
More informationBASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I
BASIC COMPUTATION x public static void main(string [] args) Fundamentals of Computer Science I Outline Using Eclipse Data Types Variables Primitive and Class Data Types Expressions Declaration Assignment
More informationChecking Current Code Coverage
Junit Tests Checking Current Code Coverage We use onap Sonar to track code coverage (sonar.onap.org) To see the appc coverage, click on the appc project on the front page (make sure you choose the most
More informationManuel Oriol, CHCRC-C, Software Testing ABB
Manuel Oriol, CHCRC-C, 08.11.2017 Software Testing Slide 1 About me 1998 2004 2005 2008 2011 Slide 2 Introduction Why do we test? Did you have to deal with testing in the past? Slide 3 Ariane 5 http://www.youtube.com/watch?v=kyurqduyepi
More informationFault-based testing. Automated testing and verification. J.P. Galeotti - Alessandra Gorla. slides by Gordon Fraser. Thursday, January 17, 13
Fault-based testing Automated testing and verification J.P. Galeotti - Alessandra Gorla slides by Gordon Fraser How good are my tests? How good are my tests? Path testing Boundary interior testing LCSAJ
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 informationTesting & Continuous Integration. Kenneth M. Anderson University of Colorado, Boulder CSCI 5828 Lecture 20 03/19/2010
esting & Continuous Integration Kenneth M. Anderson University of Colorado, Boulder CSCI 5828 Lecture 20 03/1/20 University of Colorado, 20 1 Goals 2 Review material from Chapter of Pilone & Miles esting
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 informationXVIII. Software Testing. Laurea Triennale in Informatica Corso di Ingegneria del Software I A.A. 2006/2007 Andrea Polini
XVIII. Software Testing Laurea Triennale in Informatica Corso di Objective General discussion on Testing Testing Phases Approaches to testing Structural testing Functional testing Testing non functional
More informationWeek 2. Relational Operators. Block or compound statement. if/else. Branching & Looping. Gaddis: Chapters 4 & 5. CS 5301 Spring 2018.
Week 2 Branching & Looping Gaddis: Chapters 4 & 5 CS 5301 Spring 2018 Jill Seaman 1 Relational Operators l relational operators (result is bool): == Equal to (do not use =)!= Not equal to > Greater than
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 informationSoftware Testing. Massimo Felici IF
Software Testing Massimo Felici IF-3.46 0131 650 5899 mfelici@staffmail.ed.ac.uk What is Software Testing? Software Testing is the design and implementation of a special kind of software system: one that
More informationIngegneria del Software Corso di Laurea in Informatica per il Management
Ingegneria del Software Corso di Laurea in Informatica per il Management Software testing Davide Rossi Dipartimento di Informatica Università di Bologna Validation and verification Software testing is
More informationOverview. State-of-the-Art. Relative cost of error correction. CS 619 Introduction to OO Design and Development. Testing.
Overview CS 619 Introduction to OO Design and Development ing! Preliminaries! All sorts of test techniques! Comparison of test techniques! Software reliability Fall 2012! Main issues: There are a great
More informationCOS 126 General Computer Science Fall Exam 1
COS 126 General Computer Science Fall 2005 Exam 1 This test has 9 questions worth a total of 50 points. You have 120 minutes. The exam is closed book, except that you are allowed to use a one page cheatsheet,
More informationTopics. Software Testing Test Driven Development Black Box Testing Unit Testing White Box Testing Coverage Testing Software Debugging
Supplemental Materials: Software esting CS2: Data Structures and Algorithms Colorado State University Chris Wilcox, Russ Wakefield, Wim Bohm, Dave Matthews opics Software esting est Driven Development
More informationTesting Stragegies. Black Box Testing. Test case
References: Teach Yourself Object-Oriented Programming in 21 Days by A.Sintes, 1 Testing Stragegies Test case a set of inputs and expected outputs looks at specific piece of functionality to determine
More informationAPCS Semester #1 Final Exam Practice Problems
Name: Date: Per: AP Computer Science, Mr. Ferraro APCS Semester #1 Final Exam Practice Problems The problems here are to get you thinking about topics we ve visited thus far in preparation for the semester
More informationTesting & Symbolic Execution
Testing & Symbolic Execution Software Testing The most common way of measuring & ensuring correctness Input 2 Software Testing The most common way of measuring & ensuring correctness Input Observed Behavior
More informationSoftware Testing. 1. Testing is the process of demonstrating that errors are not present.
What is Testing? Software Testing Many people understand many definitions of testing :. Testing is the process of demonstrating that errors are not present.. The purpose of testing is to show that a program
More informationSoftware Testing for Critical Systems
Software Testing for Critical Systems Julien Fayolle and Sandrine-Dominique Gouraud 1 1 Génie logiciel, LRI, Université d Orsay. {fayolle, gouraud}@lri.fr Web pages: www.lri.fr/ fayolle and www.lri.fr/
More informationClass 17. Discussion. Mutation analysis and testing. Problem Set 7 discuss Readings
Class 17 Questions/comments Graders for Problem Set 6 (4); Graders for Problem set 7 (2-3) (solutions for all); will be posted on T-square Regression testing, Instrumentation Final project presentations:
More informationCSE 331 Midterm Exam 2/13/12
Name There are 10 questions worth a total of 100 points. Please budget your time so you get to all of the questions. Keep your answers brief and to the point. The exam is closed book, closed notes, closed
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 informationSoftware Engineering I (02161)
Software Engineering I (02161) Week 4 Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2016 Recap Test in general validation and defect test unit-, component-, system-,
More informationJunit. Presentation & Tools (Eclipse, Maven, Mockito, Spring)
Junit Presentation & Tools (Eclipse, Maven, Mockito, Spring) arnaud.nauwynck@gmail.com This document: http://arnaud-nauwynck.github.io/lessons/coursiut-junit.pdf What is Junit? Wikipedia JUnit Junit birth
More informationEECS 481 Software Engineering Exam #1. You have 1 hour and 20 minutes to work on the exam.
EECS 481 Software Engineering Exam #1 Write your name and UM uniqname on the exam. There are ten (10) pages in this exam (including this one) and seven (7) questions, each with multiple parts. Some questions
More informationFacts About Testing. Cost/benefit. Reveal faults. Bottom-up. Testing takes more than 50% of the total cost of software development
Reveal faults Goals of testing Correctness Reliability Usability Robustness Performance Top-down/Bottom-up Bottom-up Lowest level modules tested first Don t depend on any other modules Driver Auxiliary
More informationBacterio 3.0: a Mutation Tool for Multi-Class Java Systems
Bacterio 3.0: a Mutation Tool for Multi-Class Java Systems Pedro Reales Mateo, Macario Polo Usaola Alarcos Research Group Department of Information Systems and Technologies University of Castilla-La Mancha
More informationIntroduction to Computer Science Midterm 3 Fall, Points
Introduction to Computer Science Fall, 2001 100 Points Notes 1. Tear off this sheet and use it to keep your answers covered at all times. 2. Turn the exam over and write your name next to the staple. Do
More informationCS 101 Fall 2006 Midterm 3 Name: ID:
You only need to write your name and e-mail ID on the first page. This exam is CLOSED text book, closed-notes, closed-calculator, closed-neighbor, etc. Questions are worth different amounts, so be sure
More informationThe most frequently asked questions about JUnit are answered here (especially sections 4, 5 and 7):
Java JUnit Tutorial Author: Péter Budai, BME IIT, 2011. The description of the annotations of JUnit can be found here: http://junit.sourceforge.net/javadoc/ The most frequently asked questions about JUnit
More informationOn the Use of Mutation Faults in Empirical Assessments of Test Case Prioritization Techniques
On the Use of Mutation Faults in Empirical Assessments of Test Case Prioritization Techniques Hyunsook Do, Gregg Rothermel Department of Computer Science and Engineering University of Nebraska - Lincoln
More informationCS 4387/5387 SOFTWARE V&V LECTURE 4 BLACK-BOX TESTING
1 CS 4387/5387 SOFTWARE V&V LECTURE 4 BLACK-BOX TESTING Outline 2 Quiz Black-Box Testing Equivalence Class Testing (Equivalence Partitioning) Boundary value analysis Decision Table Testing 1 3 Quiz - 1
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 informationa. The following method would allow an object of the static type List<String> to be passed to it as an argument.
On the final exam you will be provided UML diagrams for design patterns (as in the midterm) and also JavaDoc description of methods in the Reflection API. 1. True/False (if false, explain why) a. The following
More informationOffline Model-based Testing and Runtime Monitoring
Offline Model-based Testing and Runtime Monitoring of the Sensor Voting Module Paolo Arcaini Angelo Gargantini Elvinia Riccobene Università of Bergamo- Italy Università di Milano - Italy Tolouse, ABZ 2014
More information(CONDITIONALS_BOUNDARY)
Pitest (../../) Overview PIT currently provides ten built-in mutators, of which seven are activated by default. The default set can be overriden, and different operators selected, by passing the names
More informationCPSC 310: Sample Final Exam Study Questions 2014S1 (These are in addition to the Study Questions listed at the end of some lectures)
CPSC 310: Sample Final Exam Study Questions 2014S1 (These are in addition to the Study Questions listed at the end of some lectures) 1. Select the best functional requirement from the list of requirements
More informationSoftware Testing Prof. Meenakshi D Souza Department of Computer Science and Engineering International Institute of Information Technology, Bangalore
Software Testing Prof. Meenakshi D Souza Department of Computer Science and Engineering International Institute of Information Technology, Bangalore Lecture 04 Software Test Automation: JUnit as an example
More informationCSE 403 Lecture 13. Black/White-Box Testing. Reading: Software Testing: Principles and Practices, Ch. 3-4 (Desikan, Ramesh)
CSE 403 Lecture 13 Black/White-Box Testing Reading: Software Testing: Principles and Practices, Ch. 3-4 (Desikan, Ramesh) slides created by Marty Stepp http://www.cs.washington.edu/403/ Testing questions
More informationUNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger
UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division CS 164 Spring 2009 P. N. Hilfinger CS 164: Final Examination (corrected) Name: Login: You have
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 informationSoftware Testing TEST CASE SELECTION AND ADEQUECY TEST EXECUTION
Software Testing TEST CASE SELECTION AND ADEQUECY TEST EXECUTION Overview, Test specification and cases, Adequacy criteria, comparing criteria, Overview of test execution, From test case specification
More informationAN EVALUATION OF MUTATION OPERATORS FOR EQUIVALENT MUTANTS. Maryam Umar
AN EVALUATION OF MUTATION OPERATORS FOR EQUIVALENT MUTANTS By Maryam Umar Supervised By Mark Harman A project submitted to the Department of Computer Science. King s College, London. In partial fulfilment
More informationOHJ-306x: Software Testing Introduction to the Course Project Part 1: General Information and Project phases 1 & 2: Unit testing
1 OHJ-306x: Software Testing Introduction to the Course Project Part 1: General Information and Project phases 1 & 2: Unit testing Antti Jääskeläinen, leading course assistant Matti Vuori, course assistant
More informationUnit 3. Operators. School of Science and Technology INTRODUCTION
INTRODUCTION Operators Unit 3 In the previous units (unit 1 and 2) you have learned about the basics of computer programming, different data types, constants, keywords and basic structure of a C program.
More informationCheck out Decisions from SVN. Console Input, Text Formatting, Decision Statements and Expressions
Check out Decisions from SVN Console Input, Text Formatting, Decision Statements and Expressions String Input and Output Quick review of if statements == vs. equals() Selection operator,? : Optional:
More informationA Transformation-based Approach to Testing Concurrent Programs using UML Activity Diagrams
SOFTWARE PRACTICE AND EXPERIENCE Softw. Pract. Exper. 2014; 00:1 26 Published online in Wiley InterScience (www.interscience.wiley.com). A Transformation-based Approach to Testing Concurrent Programs using
More informationInvestigating Faults Missed by Test Suites Achieving High Code Coverage
Investigating Faults Missed by Test Suites Achieving High Code Coverage Amanda Schwartz, Daniel Puckett University of South Carolina Upstate aschwar2@uscupstate.edu,dpuckett@email.uscupstate.edu Ying Meng,
More informationAnnouncements. Testing. Announcements. Announcements
Announcements Testing HW0, HW1, and HW2 are graded Grades and feedback in Submitty Email us at csci2600@cs.lists.rpi.edu Use Submitty discussion board! HW0, HW1, and HW2, Quiz 1 and 2 Grades in Submitty
More informationQUIZ: What value is stored in a after this
QUIZ: What value is stored in a after this statement is executed? Why? a = 23/7; QUIZ evaluates to 16. Lesson 4 Statements, Expressions, Operators Statement = complete instruction that directs the computer
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 informationProperties of Criteria. 1. Applicability Property. Criteria
Properties of Criteria Program-based To recognize a good adequacy criteria And to discard poor choices Objective, well-defined properties 1. Applicability Property For every program, there exists an adequate
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 informationPredicting Mutation Score Using Source Code and Test Suite Metrics
Predicting Mutation Score Using Source Code and Test Suite Metrics RAISE 2012 Kevin Jalbert and Jeremy S. Bradbury {kevin.jalbert,jeremy.bradbury}@uoit.ca Software Quality Research Group (sqrg.ca) University
More informationIntermediate Code Generation
Intermediate Code Generation In the analysis-synthesis model of a compiler, the front end analyzes a source program and creates an intermediate representation, from which the back end generates target
More informationModule 2: Choice and Iteration
Module 2: Choice and Iteration Ron K. Cytron * Department of Computer Science and Engineering * Washington University in Saint Louis Thanks to Alan Waldman for comments that improved these slides Prepared
More information(See related materials in textbook.) CSE 435: Software Engineering (slides adapted from Ghezzi et al & Stirewalt
Verification (See related materials in textbook.) Outline What are the goals of verification? What are the main approaches to verification? What kind of assurance do we get through testing? How can testing
More informationMSc Software Testing and Maintenance MSc Prófun og viðhald hugbúnaðar
MSc Software Testing and Maintenance MSc Prófun og viðhald hugbúnaðar Fyrirlestrar 31 & 32 Structural Testing White-box tests. 27/1/25 Dr Andy Brooks 1 Case Study Dæmisaga Reference Structural Testing
More informationhttp://whiley.org @whileydave http://github.com/davepearce/whiley The Whiley Programming Language David J. Pearce Victoria University of Wellington New Zealand http://whiley.org Overview What is Whiley?
More informationSoftware Testing. Testing: Our Experiences
Software Testing Testing: Our Experiences Test Case Software to be tested Output 1 Test Case Generation When to Stop? Test Case Software to be tested Verification Output No Enough? Test Coverage Yes A
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 information