Chapter 2: Boundary Value Testing : BVT Software Testing

Slides:



Advertisements
Similar presentations
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Chapter 20 Software Testing.
Advertisements

Black Box Testing Sources: Code Complete, 2 nd Ed., Steve McConnell Software Engineering, 5 th Ed., Roger Pressman Testing Computer Software, 2 nd Ed.,
Certificate of Appreciation to
Overview Functional Testing Boundary Value Testing (BVT)
Chapter 6 Path Testing Software Testing
DETAILED DESIGN, IMPLEMENTATIONA AND TESTING Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Chapter 4: Decision Table Testing Software Testing
Boundary Value Analysis
AB 11 22 33 44 55 66 77 88 99 10  20  19  18  17  16  15  14  13  12  11  21  22  23  24  25  26  27  28.
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
Availability of socio-economic variables at sub- national level - case study Thailand By Dr. Somporn Sangawongse Department of Geography, Faculty of Social.
Boundary Value Testing A type of “Black box” functional testing –The program is viewed as a mathematical “function” –The program takes inputs and maps.
Figure 1.1 Basic components of a simple computer system © 2003 Brooks/Cole Publishing / Thomson Learning™
Gate-Level Minimization1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Combinational Logic1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Chapter 5 Retrospective on Functional Testing Software Testing
Chapter 7 Unit Testing & Integration Testing Software Testing By Wararat Songpan(Rungworawut),PH.D. Department of Computer Science, Faculty of.
Chapter 1: Introduction to Software Testing Software Testing
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
By Asst.Prof.Dr. Wararat Songpan (Rungworawut) Faculty of Computer Science, Department of Science, Khon Kaen University, Thailand 1 Chapter 3: Equivalence.
1 Tatiana Lopes Functional Analyst at Auto Sueco.
computer
Cause & Effect Graph Comparison Testing. Cause & Effect Graph This is basically a hardware testing technique adapted to software testing. It considers.
Erik Jonsson School of Engineering and Computer Science FEARLESS Engineeringwww.utdallas.edu/~pervin EE/CE 2310 – HON/002 Introduction to Digital Systems.
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
Black Box Testing Focuses in the functional requirements of the program It is not an alternative to white-box techniques It is a complementary approach.
COSC 235: Programming and Problem Solving Ch. 2: Your first programs!!! Instructor: Dr. X.
1 Boundary Value Testing Chapter 5. 2 Introduction Input domain testing is the most commonly taught (and perhaps the most commonly used) software testing.
Combinational Logic Digital Design Department of Software Development Faculty of Information Technology Islamic University of Gaza Dr. Rebhi Baraka
1 Software Test Computer Science Department, Information Faculty Dr. KaiYu Wan.
Thai Traditional Medicine An Introduction. Objectives 1. To give an overview of history and development of TTM, including all aspects of TTM 2. To briefly.
1 Software Testing & Quality Assurance Lecture 5 Created by: Paulo Alencar Modified by: Frank Xu.
DETAILED DESIGN, IMPLEMENTATION AND TESTING Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Theory and Practice of Software Testing Chapter 14 Presman Software Testing Tactics BLACK BOX TESTING.
Computer Science 112 Fundamentals of Programming II.
Unit Testing (Lab 6) Tool Junit on Eclipse SDK By Asst.Prof.Dr. Wararat Songpan(Rungworawut) Software Testing Department of Computer Science, Faculty.
1 © 2011 Professor W. Eric Wong, The University of Texas at Dallas Requirements-based Test Generation for Functional Testing W. Eric Wong Department of.
VI SEM CSE UNIT IV SOFTWARE ENGINEERING PROJECT MANAGEMENT TESTING STRATEGIES By Mr. Vaibhav V. Bhujade DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING DMIETR,
ITEC 370 Lecture 18 Testing. Review Questions? Design document due W –System can be implemented just by following it Implementation –Methods (prototype,
1Computer Sciences Department. 2 QUICKSORT QUICKSORT TUTORIAL 5.
Testing and Debugging UCT Department of Computer Science Computer Science 1015F Hussein Suleman March 2009.
Cause & Effect Graph Comparison Testing
Chapter 3: Equivalence Class Testing :EC Software Testing
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
Equivalence partitioning
Equivalence partitioning
Chapter 10 Software Quality Assurance& Test Plan Software Testing
Lecture on Black Box Testing
Chapter 5 Retrospective on Functional Testing Software Testing
Overview Functional Testing Boundary Value Testing (BVT)
Design via Frequency Response Techniques
CSCE 747 Software Testing and Quality Assurance
الطراز الليوكونى والصفات العامة لشعبة الجوفمعويات
User Interface Design and Evaluation
Topics discussed in this section:
Software Verification and Validation
Software Verification and Validation
National University of Laos
Advanced System Security
Overview Functional Testing Boundary Value Testing (BVT)
FACULTY OF TECHNOLOGIES
Chapter 1: Boundary Value Testing
Software Verification and Validation
Overview Functional Testing Boundary Value Testing (BVT)
Software Development Chapter 1.
Applications of Definite Integrals
SCHOLARS OF THE FUTURE An Implementation Model for Increasing Diversity in Information Technology The Scholars of the Future program is a four-year initiative.
Dr. David A. Gaitros Department of Computer Science
Semantic Technologies for Smart Cities
Programming Techniques
Presentation transcript:

Chapter 2: Boundary Value Testing : BVT 322235 Software Testing By Dr. Wararat Songpan (Rungworawut) Faculty of Computer Science, Department of Science, Khon Kaen University, Thailand

Guideline of Boundary Value Testing This technique focuses on variable as number.

Boundary Value Testing : BVT BVT is a black box testing technique There are 4 sub-techniques of BVT 1) Boundary Value Analysis: BVA 2) Robustness Testing: RT 3) Worst-Case Testing: WT 4) Robust Worst-Case Testing: RWT

1) Boundary Value Analysis: BVA When the function F is implemented as a program, the input variable x1 and x2 will have boundaries as follows, a =< x1 =< b c =< x2 =< d x2 d c x1 a b

Example: A function of addition Spec. 1<=x1<=10 Function: Addition X1 and x2 x1 x2 Spec. 1<=x2<=10 Results =

1) Boundary Value Analysis: BVA(Cont.) The 5 values used to test the extremities are: 1) minimum (min) 2) above minimum (min+) 3) nominal (nom) 4) below maximum (max-) 5) maximum (max)

1) Boundary Value Analysis: BVA(Cont.) BVA Test cases for function F X1 X2 Expected Results x1nom x2min x2min+ x2nom x2max- x2max x1min x1min+ x1max- x1max The number of test case is 4n+1 ,where n is the number of variable

1) Boundary Value Analysis: BVA(Cont.) BVA Test cases for function F of addition X1 X2 Expected Results 5 1 6 2 7 10 9 14 15 ? Function: Addition X1 and x2 x1 x2 Results =

1) Boundary Value Analysis: BVA(Cont.) The idea and motivation behind BVA is that errors tend to occur near the extremities of the input variables. The defects found on the boundaries of these input variables can obviously be the result of countless possibilities. For example if the programmer forgot to count from zero or they just miscalculated. Errors in the code concerning loop counters being off by one or the use of a < operator instead of ≤. One of the values taking on their extreme values at any one particular time. The reason for this is that generally Boundary Value Analysis uses that called “Single Fault Assumption”.

Example: The Triangle Problem Problem statements (Simple version) input 3 integers: a, b, c are side of triangle Output is type of triangle Equilateral Isosceles Scalene Not a Triangle (how to chek it?)

Example: The Triangle Problem Problem statements (Improved version) input 3 integers: a, b, c are side of triangle Spec and condition c1: 1 =< a =<200 c4: b+c > a (As a triangle) c2: 1 =< b =<200 c5: a+c > b (As a triangle) c3: I =< c =< 200 c6: a+b > c (As a triangle) Output is type of triangle Equilateral Isosceles Scalene Not a Triangle

The Triangle Problem: Flowchart Input a, b, c Match=0 y a=b? Match=Match+1 n a=c? y Match=Match+2 n b=c? y Match=Match+3 n Match=0? y a+b ≤ c? n n n Match=1? y y a+b ≤ c? b+c ≤ a? Match=2? y y y n n a+c ≤ b? n y a+c ≤ b? Match=3? n y y n n b+c ≤ a? y Equilateral Not a Triangle Scalene n Isosceles

Triangle: BVA Test Cases Design Test case ID a b c Expected Results Actual Results 1 100 Isosceles 2 3 Equilateral 4 199 5 200 Not a Triangle 6 7 8 9 10 11 12 13 14 15

Example: The Next Date Function Problem Statements input 3 variables: month, date, year Output: as the next date from input the date Spec. and Conditions: C1: January =< month =< December C2: 1 =< day =< 31 C3: 1812 =< year =< 2012 **Remark: The year should be verified as leap year

Leap Year One year has the length of 365 days, 5 hours, 48 minutes and 47 seconds. A normal year has been given 365 days and a leap year 366 days. So at leap years February 29th is added, which doesn't exist in a normal year. A leap year is every 4 years, but not every 100 years, then again every 400 years. For example: 1992 is Leap Year (1992 mod 4 = 0 but1992 mod 100 and 400 ≠ 0) 1900 is NOT a Leap Year (1900 mod 4 and 1900 mod100 = 0 but 1900 mod 400 ≠ 0) 2000 is Leap Year (2000 mod 4,100 and 400 = 0)

Next Date: BVA Test Cases Design Test case ID Month Day Year Expected Results Actual Results 1 June 15 1812 June 16, 1812 2 1813 June 16, 1813 3 1912 June 16, 1912 4 2011 June 16, 2011 5 2012 June 16, 2012 6 7 8 9 30 10 31 11 January 12 February 13 14 November December

2) Robustness Testing: RT Robustness testing can be seen as and extension of Boundary Value Analysis. The idea behind Robustness testing is to test input variables that fall just outside this input domain. We use two more values for each variable min- and max+ which are designed to fall just outside of the input range. Robustness testing is still “Single Fault Assumption” because one of the values taking on their 7 extreme values at any one particular time.

2) Robustness Testing: RT Robustness Test cases for function F X1 X2 Expected Results x1nom x2min- Alert message (out of range) x2min x2min+ x2nom x2max- x2max x2max+ x1min- x1min x1min+ x1max- x1max x1max+ The number of test case is 6n+1 ,where n is the number of variable

3) Worst-Case Testing: WT Worst-case Testing uses the critical fault assumption for more than one variable at a time assuming its extreme values called “multiple faults assumption” So we are able to test the outcome if more than one variable were to assume its extreme value. To generate test cases we take the original 5 extreme values (min, min+, nom, max-, max) and perform the Cartesian product of these values. The end product is a much larger set of results than we have seen before.

3) Worst-Case Testing: WT(Cont.) Worst-Case Test cases for function F x1 x2 min min+ nom max- max min min+ nom max- max The number of test case is 5n ,where n is the number of variable

3) Worst-Case Testing: WT(Cont.) Worst-Case Test cases for function F X1 X2 Expected Results x1min x2min x2min+ x2nom x2max- x2max x1min+ … 322 235 Software Testing

4) Robust Worst-Case Test: RWT If the function under test were to be of the greatest importance we could use a method named Robust Worst-Case testing which as the name suggests draws it attributes from Robust Worst-Case testing. Test cases are constructed by taking the Cartesian product of the 7 extreme values (min-, min, min+, nom, max-, max, max+) There are more than one variable at a time assuming its extreme values occurred critical fault called “multiple faults assumption”

4) Robust Worst-Case Test: RWT x2 x1 min- min min+ nom max- max max+ min- min min+ nom max- max max+ The number of test case is 7n ,where n is the number of variable

4) Robust Worst-Case Test: RWT Robust Worst-Case Test cases for function F X1 X2 Expected Results x1min- x2min- x2min x2min+ x2nom x2max- x2max x2max+ x1min … 322 235 Software Testing

How to use Boundary Value Testing (BVT) BVT is considered in 2 approaches: 1) By the number of variables. We could use a certain set integer, we could allow the program to use the highest or lowest possible integer. 2) By the kind of ranges. For example in the Next Date example Some languages to declare an enumerated type {Jan, Feb, Mar,......, Dec}. It would normally encode for testing of the month’s variable so that January corresponded to 1 and February corresponded to 2 etc.

Summary of Boundary Value Testing (BVT) BVT only focuses on variable as number. BVT works well for consideration the function of several independent variables that represent boundary value such as Triangle Program. But it is not good enough for the next date program that has dependent variable.

Summary of Boundary Value Testing (BVT) BVT has divided into 2 characteristics: 1) Normal vs Robust value Normal (Valid) Robust (Valid+Invalid) Boundary Value Analysis Worst-Case Testing Robustness Testing Robust Worst-Case Testing 2) Single fault vs multiple fault assumption Single fault (1 and extreme value) Multiple fault (1+ and extreme value) Boundary Value Analysis Robustness Testing Worst-Case Testing Robust Worst-Case Testing