Black box testing  Black box tests focus on the input/output behavior of the component  Black-box tests do not deal with the internal aspects of the.

Slides:



Advertisements
Similar presentations
2017/3/25 Test Case Upgrade from “Test Case-Training Material v1.4.ppt” of Testing basics Authors: NganVK Version: 1.4 Last Update: Dec-2005.
Advertisements

CSCI 6962: Server-side Design and Programming Input Validation and Error Handling.
Black Box Testing Csci 565 Spring 2009.
Equivalence Class Testing
Testing in the Small (aka Unit Testing, Class Testing)
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
April 1, R McFadyen1 A Traditional Software Development Process Unit test Integration test System test Detailed design Architectural design.
Nov R McFadyen1 A Traditional Software Development Process Unit test Integration test System test Detailed design Architectural design Analysis.
Testing Team exercise Have each team member contribute answers: –Do you test your code? If no, why not? If yes: When? How? How often? –What is your team’s.
Testing an individual module
Equivalence Class Testing
Black Box Software Testing
CSE 403 Lecture 13 Black/White-Box Testing Reading: Software Testing: Principles and Practices, Ch. 3-4 (Desikan, Ramesh) slides created by Marty Stepp.
Testing techniques, example
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
System/Software Testing
Let us start from the V-Model Verification Phases Requirements analysis System Design Architecture Design Module Design Coding Validation phases Unit.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Black-Box Testing Techniques I Software Testing Lecture 4.
© Andrew IrelandSoftware Design F28SD2 Software Design (F28SD2): Life-Cycle Perspective - Part 2 Andrew Ireland School of Mathematical & Computer Sciences.
Overview of Software Testing 07/12/2013 WISTPC 2013 Peter Clarke.
Course Outline Traditional Static Program Analysis –Theory –Classic analysis and applications Points-to analysis, CHA, RTA –The Soot analysis framework.
Introduction to Software Testing
CS /51 Illinois Institute of Technology CS487 Software Engineering Software Testing Techniques Mr. David A. Lash.
Requirements-based Test Generation for Functional Testing (© 2012 Professor W. Eric Wong, The University of Texas at Dallas) 1 W. Eric Wong Department.
Representing numbers and Basic MATLAB 1. Representing numbers  numbers used by computers do not behave the same as numbers used in mathematics  e.g.,
Software Testing. 2 CMSC 345, Version 4/12 Topics The testing process  unit testing  integration and system testing  acceptance testing Test case planning.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Software testing techniques Software testing techniques Equivalence partitioning Presentation on the seminar Kaunas University of Technology.
CS451 – Software Testing Technologies Blackbox Testing Equivalence Partitioning.
CSE403 Software Engineering Autumn 2001 More Testing Gary Kimura Lecture #10 October 22, 2001.
Testing Testing Techniques to Design Tests. Testing:Example Problem: Find a mode and its frequency given an ordered list (array) of with one or more integer.
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
Black-box Testing.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
CS 217 Software Verification and Validation Week 7, Summer 2014 Instructor: Dong Si
Software Testing Input Space Partition Testing. 2 Input Space Coverage Four Structures for Modeling Software Graphs Logic Input Space Syntax Use cases.
Today’s Agenda  Reminder: HW #1 Due next class  Quick Review  Input Space Partitioning Software Testing and Maintenance 1.
Java Basics Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
1 STRINGS String data type Basic operations on strings String functions String procedures.
Test Case Designing UNIT - 2. Topics Test Requirement Analysis (example) Test Case Designing (sample discussion) Test Data Preparation (example) Test.
CS451 Lecture 10: Software Testing Yugi Lee STB #555 (816)
Testing Data Structures Tao Xie Visiting Professor, Peking University Associate Professor, North Carolina State University
 Variables can store data of different types, and different data types can do different things.  PHP supports the following data types:  String  Integer.
Theory and Practice of Software Testing Chapter 14 Presman Software Testing Tactics BLACK BOX TESTING.
Workshop on Integrating Software Testing into Programming Courses (WISTPC14:2) Friday July 18, 2014 Introduction to Software 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.
Equivalence Class Testing Use the mathematical concept of partitioning into equivalence classes to generate test cases for Functional (Black-box) testing.
October 21, 2010COMS W41561 COMS W4156: Advanced Software Engineering Prof. Gail Kaiser
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Defect testing Testing programs to establish the presence of system defects.
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
Testing Data Structures
Functional testing, Equivalence class testing
Equivalence partitioning
Equivalence partitioning
Types CSCE 314 Spring 2016.
WARNING 20 min These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint.
Black Box Testing PPT Sources: Code Complete, 2nd Ed., Steve McConnell
Structural testing, Path Testing
Types of Testing Visit to more Learning Resources.
Testing Approaches.
Requirements-Based Testing
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Chapter 14 Software Testing Techniques
Static Testing Static testing refers to testing that takes place without Execution - examining and reviewing it. Dynamic Testing Dynamic testing is what.
Chapter 1: Boundary Value Testing
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Presentation transcript:

Black box testing  Black box tests focus on the input/output behavior of the component  Black-box tests do not deal with the internal aspects of the component nor with the behavior or the structure of the components

Equivalence testing  Equivalence testing is a black box testing technique that minimizes the number of test cases

Equivalence testing  The possible inputs are partitioned into equivalence classes, a test case is selected for each class  The assumption of equivalence testing is that systems usually behave in similar ways for all members of a class

Equivalence testing  Equivalence testing consists of two steps:  identification of the equivalence classes  selection of the test inputs

Equivalence classes  Coverage: every possible input belongs to one of the equivalence classes  Disjointedness: no input belongs to more than one equivalence class  I.e., partition

Equivalence classes  Representation: if the execution demonstrates an error when a particular member of a equivalence class is used as input, then the same error can be detected by using any other member of the class as input.

Test cases  For each equivalence class, at least two pieces of data are selected  a typical input, which exercises the common case  an invalid input, which exercises the exception handling capabilities of the component

Boundary testing  Boundary testing is a special case of equivalence testing and focuses on the conditions at the boundary of the equivalence classes

Boundary testing  The assumption behind boundary testing is that developers often overlook special cases at the boundary of the equivalence classes  E.g.,  Empty strings  Year 2000 (millennium bug)  …

Int converter (again)  A function converts a sequence of chars in an integer number.  The sequence can start with a ‘-‘ (negative number).  The integer number must be in the range minint = to maxint =  The function signals an error if the sequence of chars is not allowed  The sequence must be <= 6 chars

Int converter (again) 1.Define equivalence classes, and related boundary condition 2.For each class, define at least one test case

Criterion  Input is a decimal number (well formed integer)  Valid: may start with –, no characters that are not digits  Invalid: …  Boundary: Starting “+”? Blanks?

Criterion  Length of string, number of characters  Valid: <= 6  Invalid: > 6  Boundary: 6, 0

Criterion  Range of number in output  Valid: = minint  Invalid: > maxint, < minint  Boundary: maxint, minint

Calendar BB Consider a method that returns the number of days in a month, given the month and year. public class MyGregorianCalendar { public static int getNumDaysInMonth(int x, int y){... } The month and the year are specified as integers. By convention, 1 represents the month of January, 2 the month of February, and so on. The range of valid inputs for the year is 0 to maxInt. 1.define equivalence classes, and related boundary condition 2.for each class, define at least one test case

Classes for month parameter  Three equivalence classes:  months with 31 days (i.e., 1, 3, 5, 7, 8, 10, 12)  months with 30 days (i.e., 4, 6, 9, 11)  February, which can have 28 or 29 days  Nonpositive integers and integers larger than 12 are invalid values

Classes for year parameter  Two equivalence classes:  leap years  non–leap years  Negative integers are invalid values

Selected valid inputs

Additional boundary cases

Equivalence classes definition  An interval condition will have classes for  Valid input within the interval  Invalid input less than the minimum  Invalid input greater than the maximum  Valid input close the boundaries  A single value condition will have classes for:  The valid value  Invalid values less than the value  Invalid values greater than the value

Equivalence classes definition  A discrete set condition will have classes for:  Each value in the set  A value not belonging to the set  A boolean value condition will have classes for:  TRUE value  FALSE value

Parallelogram  The function parallelogram(int x1, int x2, int x3, int x4, int y1, int y2, int y3, int y4) calculate the area of a parallelogram.

Parallelogram  Requirements  area is always strictly > 0  The parallelogram should stay in the first quadrant of the Cartesian plan  Define equivalence classes and tests

Criteria  Pair sides parallelism  Pair same sides length  Position (1 st quadrant)  Area > 0