Software Testing and Quality Assurance

Slides:



Advertisements
Similar presentations
Testing “Multiple Conditions” with Decision Table Technique
Advertisements

Overview Functional Testing Boundary Value Testing (BVT)
Decision Table Based Testing
Equivalence Class Testing
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Software Testing and Quality Assurance
Testing an individual module
CS4723 Software Validation and Quality Assurance Lecture 02 Overview of Software Testing.
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
Equivalence Class Testing
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 9 Functional Testing
Black Box Software Testing
1 Functional Testing Motivation Example Basic Methods Timing: 30 minutes.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Verificarea şi Validarea Sistemelor Soft Tem ă Laborator 2 Testare Black Box Dat ă primire laborator: Lab 2 Dat ă predare laborator: Lab 2,3.
Com1040 Systems Design and Testing Part II – Testing (Based on A.J. Cowling’s lecture notes) LN-Test3: Equivalence classes and boundary conditions Marian.
Software Testing (Part 2)
CMSC 345 Fall 2000 Unit Testing. The testing process.
Prof. Mohamed Batouche Software Testing.
CS4311 Spring 2011 Unit Testing Dr. Guoqiang Hu Department of Computer Science UTEP.
Black-Box Testing Techniques I Software Testing Lecture 4.
University of Palestine software engineering department Testing of Software Systems Test-Case Design instructor: Tasneem Darwish.
CS /51 Illinois Institute of Technology CS487 Software Engineering Software Testing Techniques Mr. David A. Lash.
Software Testing The process of operating a system or component under specified conditions, observing and recording the results, and making an evaluation.
Requirements-based Test Generation for Functional Testing (© 2012 Professor W. Eric Wong, The University of Texas at Dallas) 1 W. Eric Wong Department.
Black-Box Testing Techniques I
Introduction to Software Testing. Types of Software Testing Unit Testing Strategies – Equivalence Class Testing – Boundary Value Testing – Output Testing.
Software testing techniques Software testing techniques Equivalence partitioning Presentation on the seminar Kaunas University of Technology.
CS451 – Software Testing Technologies Blackbox Testing Equivalence Partitioning.
INF 111 / CSE 121: Software Tools and Methods Lecture Notes for Fall Quarter, 2007 Michele Rousseau Set 12 (Some slides adapted from Sommerville 2000 &
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
Software Testing Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim.
1 Equivalence Class Testing Chapter 6. 2 Introduction Boundary Value Testing derives test cases with Massive redundancy Serious gaps Equivalence Class.
Today’s Agenda  Reminder: HW #1 Due next class  Quick Review  Input Space Partitioning Software Testing and Maintenance 1.
QA and Testing. QA Activity Processes monitoring Standards compliance monitoring Software testing Infrastructure testing Documentation testing Usability.
1 Boundary Value Testing Chapter 5. 2 Introduction Input domain testing is the most commonly taught (and perhaps the most commonly used) software testing.
1 Input Space Partitioning(2). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Chapter 4  Section 4.1  Section
Equivalence Class Testing In chapter 5, we saw that all four variations of boundary value testing are vulnerable to –gaps of untested functionality, and.
Test Case Designing UNIT - 2. Topics Test Requirement Analysis (example) Test Case Designing (sample discussion) Test Data Preparation (example) Test.
Testing Data Structures Tao Xie Visiting Professor, Peking University Associate Professor, North Carolina State University
1 Software Testing & Quality Assurance Lecture 5 Created by: Paulo Alencar Modified by: Frank Xu.
Theory and Practice of Software Testing Chapter 14 Presman Software Testing Tactics BLACK BOX TESTING.
1 © 2011 Professor W. Eric Wong, The University of Texas at Dallas Requirements-based Test Generation for Functional Testing W. Eric Wong Department of.
1 Software Testing. 2 Equivalence Class Testing 3 The use of equivalence class testing has two motivations: –Sense of complete testing –Avoid redundancy.
Equivalence Class Testing Use the mathematical concept of partitioning into equivalence classes to generate test cases for Functional (Black-box) testing.
Software Testing. SE, Testing, Hans van Vliet, © Nasty question  Suppose you are being asked to lead the team to test the software that controls.
Defect testing Testing programs to establish the presence of system defects.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
Dynamic Black-Box Testing Part 1 What is dynamic black-box testing? How to reduce the number of test cases using: Equivalence partitioning Boundary value.
Equivalence Partitioning
Functional testing, Equivalence class testing
Software Engineering (CSI 321)
Equivalence partitioning
Equivalence partitioning
Domain Testing Functional testing which tests the application by giving inputs and evaluating its appropriate outputs. system does not accept invalid and.
Decision Table Testing
Input Space Partition Testing CS 4501 / 6501 Software Testing
CS5123 Software Validation and Quality Assurance
Chapter 5 Retrospective on Functional Testing Software Testing
Types of Testing Visit to more Learning Resources.
Overview Functional Testing Boundary Value Testing (BVT)
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Overview Functional Testing Boundary Value Testing (BVT)
Software Testing “If you can’t test it, you can’t design it”
Chapter 1: Boundary Value Testing
Overview Functional Testing Boundary Value Testing (BVT)
Overview Functional Testing Boundary Value Testing (BVT)
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Presentation transcript:

Software Testing and Quality Assurance Lecture 7 - Software Testing Techniques

Lecture Outline Discuss Equivalence Partitioning How to select test cases based on equivalence Partitioning. Discuss Boundary-value Analysis How to select test cases based on boundary-value analysis.

Equivalence Partitioning Partition the input of a program using the functional requirements. Test inputs are executed on the program, and The tester evaluates whether the output of the program is in the expected output domain.

Choosing Equivalence Classes Aim is to minimize the number of test cases required to cover all of the Equivalence Classes (EC). Identify the initial EC. Identify overlapping EC, and Eliminate them by making the overlapping part a new equivalence classes. Select one element from each EC as the first test input; and Work out the expected result for that test input.

Identify initial equivalence classes No clear formula We need to build up some judgment and intuition. Guidelines to identify potential EC. We may need to choose extra cases in order to explore difficult subsets of the input domain.

Identify initial equivalence classes - Guidelines Input condition specifies range of vales, Identify one valid EC Two invalid EC One for the set of values below the range One for the set of values above the range. For example, range of values 1…. 99, The valid EC 1…99; and Two invalid EC i.e. {x | x < 1} and {x | x > 99}

Identify initial equivalence classes - Guidelines Input condition specifies a set of input values. A valid EC for each element of the set, and One EC class for the elements not in the set. For example, input selected from a set of N inputs, we need N + 1 EC; One valid EC for each element of set,and One invalid EC for element outside the set.

Identify initial equivalence classes - Guidelines Input condition specifies a ‘must be’ situation, Identify one valid EC and one invalid EC. For example, if character input must be numeric, we need two EC A valid EC --- { s | the first character of s is a numeric} One invalid EC --- {s | the first character of s is not a numeric}

Identify initial equivalence classes - Guidelines If program handles each valid input differently, then define one valid EC per valid input. For example, input from a menu Define one valid EC for each menu item. If elements in EC are handled differently by the program, then Split the EC into smaller EC Some of the guidelines are very general in nature. Domain knowledge and experience plays a key role in identifying EC.

Eliminating Overlapping EC

Eliminating Overlapping EC - Example Disjoint EC A - an empty list B - list with one element C - list with at least two element D - a sorted list; and E - an unsorted list Two or more elements are either sorted or unsorted. Unsorted list with at least 2 elements. Sorted list with at least 2 elements.

Selecting Test Cases Once EC have been identified Any value from EC is identified to be as likely to produce a failure as any other value in that class. Thus, any element of the class servers as a test input. However, selecting just any value in EC may not be optimal for finding faults. For example, faulty implementation of square function.

Important Question? How to resolve the overlap so that we do not derive too many test cases?

Boundary-value Analysis (BVA) Greater number of errors occur at the boundaries of the input domain. Select test cases to explore the boundary conditions of a program. BVA complements equivalence partitioning. Rather then selecting any element from EC, BVA leads to the selection of test cases at the ‘edges’ of the class.

Boundary-value Analysis Faults are more likely to introduced at boundary because Unsure of the correct boundary for an input condition; Have incorrectly tested the boundary.

Example - Triangle Program A program reads floating point values from the standard input. The three values are interpreted as representing the lengths of the sides of a triangle. Program prints a message that states whether the triangle is Equilateral, isosceles, scalene or invalid.

Example - Triangle Program Equilateral triangle Only one boundary where x = y = z. Test cases to explore this boundary (3,3,3) On Point (2.99, 3, 3) Off Point Below (3.001,3,3) Off Point Above

Example - Triangle Program Isosceles Triangle x = y AND y ≠z, y = z AND z ≠x ….. Test cases to explore the boundary x = y AND y ≠z (3,3,4) On Point (2.99, 3, 4) Off Point Below (3.001,3,4) Off Point Above

Boundary-value Analysis - Guidelines Input condition specifies a range bounded by values a and b, test cases should designed with values a and b as well as just above and just below a and b. Input condition specifies a number of values, Test cases should check the minimum and maximum numbers.

Boundary-value Analysis - Guidelines Guidelines 1 and 2 are applied to output domain as well. A program generates temperature vs pressure table. Test case should create output that produces maximum (and minimum) allowable number of table entries.

Boundary-value Analysis and Equivalence Partitioning One or more test cases be selected from the edge of the EC or close to the EC. Simply requires that any element in the equivalence class will do. Test cases be derived from the output conditions. Only the input domain is usually considered.

Key points Equivalence partitioning is one of the oldest and still most widely used method for selecting test cases based on a partitioning of the input domain. Boundary conditions are predicates that apply directly on, above, and beneath the input boundaries of input and output EC.