Domain testing Tor Stålhane. Domain testing revisited We have earlier looked at domain testing as a simple strategy for selecting test cases. We will.

Slides:



Advertisements
Similar presentations
Two Segments Intersect?
Advertisements

Incremental Linear Programming Linear programming involves finding a solution to the constraints, one that maximizes the given linear function of variables.
Marking Schema question1: 40 marks question2: 40 marks question3: 20 marks total: 100 marks.
MATH 224 – Discrete Mathematics
PERMUTATION CIRCUITS Presented by Wooyoung Kim, 1/28/2009 CSc 8530 Parallel Algorithms, Spring 2009 Dr. Sushil K. Prasad.
LIAL HORNSBY SCHNEIDER
Random Testing Tor Stålhane Jonas G. Brustad. What is random testing The principle of random testing is simple and can be described as follows: 1.For.
50.530: Software Engineering Sun Jun SUTD. Week 10: Invariant Generation.
Comments We consider in this topic a large class of related problems that deal with proximity of points in the plane. We will: 1.Define some proximity.
Divide and Conquer. Subject Series-Parallel Digraphs Planarity testing.
Software Testing and QA Theory and Practice (Chapter 6: Domain Testing) © Naik & Tripathy 1 Domain Testing Some examples.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Advanced Topics in Algorithms and Data Structures Lecture 7.2, page 1 Merging two upper hulls Suppose, UH ( S 2 ) has s points given in an array according.
Grey Box testing Tor Stålhane. What is Grey Box testing Grey Box testing is testing done with limited knowledge of the internal of the system. Grey Box.
Some Graph Problems. LINIAL’S CONJECTURE Backgound: In a partially ordered set we have Dilworth’s Theorem; The largest size of an independent set (completely.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 13.
I. The Problem of Molding Does a given object have a mold from which it can be removed? object not removable mold 1 object removable Assumptions The object.
5/15/ Algorithms1 Algorithms – Ch4 - Divide & Conquer Recurrences: as we saw in another lecture, the Divide and Conquer approach leads to Recurrence.
Error-Correcting Codes
Intersections. Intersection Problem 3 Intersection Detection: Given two geometric objects, do they intersect? Intersection detection (test) is frequently.
Ordering and Consistent Cuts Presented By Biswanath Panda.
Vectors Sections 6.6.
Domain Testing Based on Character String Predicate Ruilian Zhao Computer Science Dept. Beijing University of Chemical Technology Michael R. Lyu Computer.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Lecture 11. Matching A set of edges which do not share a vertex is a matching. Application: Wireless Networks may consist of nodes with single radios,
9.3 Linear Inequalities in Two Variables. Objective 1 Graph linear inequalities in two variables. Slide
Software Testing and QA Theory and Practice (Chapter 6: Domain Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Ch. 8 & 9 – Linear Sorting and Order Statistics What do you trade for speed?
CSE53111 Computational Geometry TOPICS q Preliminaries q Point in a Polygon q Polygon Construction q Convex Hulls Further Reading.
October 8, 2013Computer Vision Lecture 11: The Hough Transform 1 Fitting Curve Models to Edges Most contours can be well described by combining several.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
MATH 224 – Discrete Mathematics
The Hat Game 11/19/04 James Fiedler. References Hendrik W. Lenstra, Jr. and Gadiel Seroussi, On Hats and Other Covers, preprint, 2002,
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
ME 2304: 3D Geometry & Vector Calculus Dr. Faraz Junejo Line Integrals.
1. Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Graphing Linear Equations and Inequalities CHAPTER 4.1The Rectangular.
MATH 224 – Discrete Mathematics
Order Statistics The ith order statistic in a set of n elements is the ith smallest element The minimum is thus the 1st order statistic The maximum is.
MA/CSSE 474 Theory of Computation DFSM Canonical Form Proof of NDFSM  DFSM ALGORITHM (as much as we have time for) This version includes the "answers"
Copyright © 2013, 2009, 2005 Pearson Education, Inc. 1 5 Systems and Matrices Copyright © 2013, 2009, 2005 Pearson Education, Inc.
The Selection Problem. 2 Median and Order Statistics In this section, we will study algorithms for finding the i th smallest element in a set of n elements.
Grey Box testing Tor Stålhane. What is Grey Box testing Grey Box testing is testing done with limited knowledge of the internal of the system. Grey Box.
Linear Inequalities and Linear Programming Chapter 5 Dr.Hayk Melikyan Department of Mathematics and CS
Arrays Arrays in C++ An array is a data structure which allows a collective name to be given to a group of elements which all have.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
ME 2304: 3D Geometry & Vector Calculus
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 7.
Navigation & Motion Planning Cell Decomposition Skeletonization Bounded Error Planning (Fine-motion Planning) Landmark-based Planning Online Algorithms.
UNIT 5.  The related activities of sorting, searching and merging are central to many computer applications.  Sorting and merging provide us with a.
1 Software Testing and Quality Assurance Theory and Practice Chapter 6 Domain Testing.
Computer Science 1620 Sorting. cases exist where we would like our data to be in ascending (descending order) binary searching printing purposes selection.
1 © 2011 Professor W. Eric Wong, The University of Texas at Dallas Requirements-based Test Generation for Functional Testing W. Eric Wong Department of.
Domain Testing Overview The domain-testing strategy is simple, and possibly tedious. 1. Domains are defined by their boundaries; therefore, domain testing.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. Fast.
Ch03-Algorithms 1. Algorithms What is an algorithm? An algorithm is a finite set of precise instructions for performing a computation or for solving a.
Computational Geometry
Theory of Computational Complexity Yusuke FURUKAWA Iwama Ito lab M1.
Graphing Linear Equations and Inequalities
CS223: Software Engineering
Fill Area Algorithms Jan
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 6 Domain Testing
11 Graphs of Linear Equations, and Inequalities, in Two Variables.
Chapter 3 Section 5.
Fitting Curve Models to Edges
I. The Problem of Molding
Chapter 3 Section 4.
Institute of Computing Tech.
Implementation of Learning Systems
Presentation transcript:

Domain testing Tor Stålhane

Domain testing revisited We have earlier looked at domain testing as a simple strategy for selecting test cases. We will now take this a step further. Testers have frequently observed that domain boundaries are particularly fault prone and should therefore be carefully checked.

Predicates We will assume that all predicates are simple. This implies that they contain only one relational operator. Allowable operators are =, > =,. Predicates that are not simple can be split into two or more simple predicates.

Path conditions Each path thorough a system is defined by a path condition – the conjunction of all predicates encountered along this path. An input traverses a path if and only if the path condition is fulfilled. The path condition defines a path domain, which is the set of all inputs that cause the path to be executed.

Path domains – 1 A path domain is surrounded by a boundary, consisting of one or more borders where each border corresponds to a predicate. A border is Closed if defined by a predicate containing =, = =. Closed borders belong to the path domain. Open if defined by a predicate containing > or >. Open borders do not belong to the path domain.

Path domains – 2 Note the difference between open and closed domains. Closed: what is on the line belongs to the domain Open: what is off the line – below or above – belongs to the domain X X X

Domain error A domain error occurs if an input traverses the wrong path through the program. We have no way to know the correct borders and there is no unique correct version of the program. When domain error occurs along a path, it may be thought of as being caused by one of the given borders being different from the correct one.

Path domains P1 P2 S1 S5 S4 S3 S2 P1 and P2: {S1, S3,S4} P1 and not P2: {S1, S3, S5} not P1 and P2: {S2, S3, S4} not P1 and not P2: {S2, S3, S5}

ON and OFF points – 1 The test strategy is a strategy for selecting ON and OFF points, defined as follows: ON point for a –Closed border lies on the border –Open border lies close to the border and satisfies the inequality relation OFF point lies close to the border and on the open side or – alternatively – does not satisfy the path condition associated with this border

ON and OFF points – 2 The ON and OFF points are used as follows: For testing a closed border we use –Two ON points to identify the border –One OFF point, to test that the correct border does not lie on the open side of the border For testing an open border the role of the ON and OFF points are reversed. The strategy can be extended to N- dimensional space by using N ON points

ON and OFF points – 3 If the border line has V vertices, we will need One ON point close to each vertex. One OFF point per vertex at a uniform distance from the border. In all cases, it is important that the OFF points are as close as possible to the ON points

Example – two-dimensional space Correct border Given border OFF ON Example for an open border: >. Border outside the line

Example – two-dimensional space Given border Correct border OFF ON Example for an closed border: “=“ predicate. Border on the line OFF

The problem of size The main problem with this strategy is the cost. Let us assume we have 20 input variables. Then the suggested strategy would need: For each > or <: 20 ON points and one OFF point For each = or ><: 20 ON points plus two or three OFF points Ten predicates would require 210 – 230 test cases.

The problem of precision The strategy described require the ON points to lie exactly on the border. For any pair of real numbers, there is always a third real number that lies between them. For a computer, however, this is not the case, due to limited precision. Thus, there exist borders for which no ON point can be represented in the computer.

A simplified strategy We will drop the requirement that the border can be exactly identified. Then we can also drop the requirement that the ON point lies exactly on the border. This remove the precision problem. In addition we can reduce the number of points by one per border. The only error that will not be detected is if the real border passes between an ON and an OFF point. Thus, these two points need to be close.

Simplified use of On and OFF points >, < =, >< ON OFF

Effectiveness >, < ON OFF L  Assume that m1 is the smallest real value m2 is the largest real value The length of L, called M, is M = m2 – m1 +1 P(not detect) =  / M

Code containing array references Code segment. The array b has 10 elements. i = x + 3; IF b[i] <=5 THEN,,, ELSE … We need three predicates: b[x + 3] <= 5 – the original predicate x + 3 >= 1 – not below lower bound x + 3 >= 10 – not above upper bound

Non-linear borders – 1 Everything discussed till now has been based on the assumption that the real border is linear. If this is not true, the domain strategy might fail. In the example on the next slide, the ON points are on the border, OFF point is off the border but nevertheless the given border is wrong.

Non-linear borders – 2 Given border OFF ON Correct border

A simple algorithm We can apply domain testing as follows: 1.Select a test case and run it. This will cause one path to be traversed. 2.Identify the borders of this path and test them with ON and OFF points 3.If the OFF point belongs to a new path then this path is selected for testing otherwise check another OFF point. 4.Terminate when no new path can be found

Simple algorithm - example IF x in A THEN S1 ELSE IF x in B THEN S2 ELSE S3 A B C 1 2 3

When to use domain testing Domain testing, as it is described here, requires that we know how the input partition the input space into input domains. Thus, it is only possible to use it for small chunks of code.

Acknowledgement This set of slides is based on the paper “A Simplified Domain-Testing Strategy” by B. Jeng and E.J. Weyuker.