Mutation Testing Tutorial Answers

Slides:



Advertisements
Similar presentations
MUTATION TESTING. Mutation testing is a technique that focuses on measuring the adequacy (quality) of test data (or test cases). Modify a program by introducing.
Advertisements

(c) 2007 Mauro Pezzè & Michal Young Ch 16, slide 1 Fault-Based Testing.
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Computability (Chapter 2) ICS 535 Design and Implementation.
EOC Practice #12 SPI
Unit 2 – Week 4 Reasoning with Linear Equations and Inequalities Lesson 1.
Comparisons Hold up the ‘+’ card if you think the answer is always positive. Hold up the ‘-’ card if you think the answer is always negative. The ?? Card.
SOLUTION Write an inverse variation equation EXAMPLE 5 x–5–34824 y2.44–3–1.5–0.5 Tell whether the table represents inverse variation. If so, write the.
Factors, Prime, Composite Greatest Common Factor Simplifying Fractions
4.6 Model Direct Variation
12.1 Warm Up Warm Up Lesson Quiz Lesson Quiz Lesson Presentation Lesson Presentation Model Inverse Variation.
Week 5-6 MondayTuesdayWednesdayThursdayFriday Testing III No reading Group meetings Testing IVSection ZFR due ZFR demos Progress report due Readings out.
Mutation Testing Breaking the application to test it.
Identify direct and inverse variation EXAMPLE 1 Tell whether the equation represents direct variation, inverse variation, or neither. a. xy = 4 SOLUTION.
Example 4 Using Multiplication Properties SOLUTION Identity property of multiplication () 16 a. 6 = Find the product. () 16 a.b. 15– () 0 Multiplication.
Mutation Testing Laraib Zahid & Mariam Arshad. What is Mutation Testing?  Fault-based Testing: directed towards “typical” faults that could occur in.
Unit 1: Proportional Reasoning
The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development Lecture 2 Debugging,
White-Box Testing Techniques IV
Propositional Logic.
What Property is being demonstrated? 6x(4 – 2) = 24x – 12x
Commutative Associative Distributive Identity Zero Property
Solving Quadratic Equations by the Quadratic Formula
Properties of Multiplication and Division
White-Box Testing Techniques IV
3.2 Graphs of Linear Equations in Two Variables
DAILY WARMUP 1. (-12)² = 2. -4³ = 3. What is the base? 36⁸ 4. What is the exponent? 72⁸ 5. (3 + 7)³ =
Solving Quadratic Equations by the Quadratic Formula
Principles Principles are basic truths or laws..
Component 1 – 2A, B, C Binary Logic
Factorization by Cross-method
Properties of Addition and Multiplication
Commutative, Associative, Distributive, Identity, and Zero Properties
Solving Quadratic Equations by the Quadratic Formula
Notes Over 2.1 Function {- 3, - 1, 1, 2 } { 0, 2, 5 }
Algebraic Properties in solving equations
Solving Quadratic Equations by Factoring March 16, 2015
Tests for Convergence, Pt. 1
Solving Quadratic Equations by the Quadratic Formula
27. Determinants and Inverses
1.6 Represent Functions as Rules and Tables
Tests for Convergence, Pt. 2
VOCABULARY! EXAMPLES! Relation: Domain: Range: Function:
Equivalent Ratio In the ratio a : b if the terms ‘a’ and ‘b’ are multiplied by the same non zero number, we get equivalent ratios.
Tests for Convergence, Pt. 2
Tests for Convergence, Pt. 2
How to determine whether a given set of vectors
1.5 The Distribute Property of Multiplication over Addition
Solving Quadratic Equations by the Quadratic Formula
Graphs of Equations Objectives: Find intercepts from a Graph
Solving Quadratic Equations by the Quadratic Formula
Chapter 5: Exponential and Logarithmic Functions
1.5 Distributing and Factoring
Commutative, Associative, Distributive, Identity, and Zero Properties
Solving Quadratic Equations
Functions & Relations.
CS 101 First Exam Review.
Solving Quadratic Equations by the Quadratic Formula
Instructor: Aaron Roth
Solving Quadratic Equations by the Quadratic Formula
Graphs of Equations Objectives: Find intercepts from a Graph
5.6 Solving Quadratic Equations by the Quadratic Formula
Radicals and Inequalities
Properties of Exponents – Part 2 Division and Zero Powers
Solving Quadratic Equations by Factoring March 11, 2016
Warm up #2 Ch 1: SIMPLIFY if possible
Simplifying Monomials
Function Notation.
Solving Quadratic Equations by the Quadratic Formula
Mutation Testing Faults are introduced into the program by creating many versions of the program called mutants. Each mutant contains a single fault. Test.
Presentation transcript:

Mutation Testing Tutorial Answers 1. What is an equivalent mutant and why are equivalent mutants a problem? 2. For the program fragment x= x+y; give five examples of mutants which are equivalent and five which are not equivalent 3. Give examples of test cases which kill your five non-equivalent mutants 4. Now make up some simple program fragments and try to think of some more stubborn mutants of these fragments. That is, mutants which are hard to kill but which are not equivalent.

Equivalent mutant An equivalent mutant is one which cannot be killed by any test case because it gives identical output to the original program for every possible input. That is, it is possible to create a syntactic variant of a program (a mutant) which is syntactically different to the original, but which behaves identically to it. This is a problem because one cannot tell whether the failure of test data to kill a mutant stems from inadequate test data or the fact that the mutant is equivalent.

Equivalent mutants x = x + y ; is equivalent to:- x = y + x ; x = -z + x + y + z ; x = x+ (1==1)?y:z ; x = 2*x + y – x ; x = x + y + 0 ;

Non Equivalent mutants x = x + y ; is not equivalent to:- x = y * x ; x = x + z ; x = x - y; x = x + 1 ; x = 2 + y ;

Killing the Non Equivalent mutants x = y * x ; is killed by anything other than y=2, x=2 x = x + z ; is killed by any non-equal values for y and z x = x - y; is killed by any non zero value for y x = x + 1 ; is killed by any value of y other than 1 x = 2 + y ; is killed by any value of x other than 2

Stubborn mutant Consider if (a==b) then z=1; else z=2; Suppose we mutate this to if (a==b+1) then z=1; else z=2; This is only killed by test cases where a and b are equal or where b one more than a.