Black-box Testing.

Slides:



Advertisements
Similar presentations
Testing Relational Database
Advertisements

Chapter 14 Software Testing Techniques - Testing fundamentals - White-box testing - Black-box testing - Object-oriented testing methods (Source: Pressman,
Software Testing Technique. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves.
Black Box Testing Sources: Code Complete, 2 nd Ed., Steve McConnell Software Engineering, 5 th Ed., Roger Pressman Testing Computer Software, 2 nd Ed.,
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
1 CODE TESTING Principles and Alternatives. 2 Testing - Basics goal - find errors –focus is the source code (executable system) –test team wants to achieve.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
IMSE Week 18 White Box or Structural Testing Reading:Sommerville (4th edition) ch 22 orPressman (4th edition) ch 16.
Testing an individual module
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
Chapter 18 Testing Conventional Applications
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
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.
System/Software Testing
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.
Software Engineering Chapter 23 Software Testing Ku-Yaw Chang Assistant Professor Department of Computer Science and Information.
Overview of Software Testing 07/12/2013 WISTPC 2013 Peter Clarke.
Coverage – “Systematic” Testing Chapter 20. Dividing the input space for failure search Testing requires selecting inputs to try on the program, but how.
1 Software testing. 2 Testing Objectives Testing is a process of executing a program with the intent of finding an error. A good test case is in that.
CS /51 Illinois Institute of Technology CS487 Software Engineering Software Testing Techniques Mr. David A. Lash.
Software Testing Testing types Testing strategy Testing principles.
Software Testing The process of operating a system or component under specified conditions, observing and recording the results, and making an evaluation.
Agenda Introduction Overview of White-box testing Basis path testing
Testing Methods Carl Smith National Certificate Year 2 – Unit 4.
Software testing techniques Software testing techniques Equivalence partitioning Presentation on the seminar Kaunas University of Technology.
CSE403 Software Engineering Autumn 2001 More Testing Gary Kimura Lecture #10 October 22, 2001.
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
Test Coverage CS-300 Fall 2005 Supreeth Venkataraman.
Unit Testing 101 Black Box v. White Box. Definition of V&V Verification - is the product correct Validation - is it the correct product.
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.
INTRUDUCTION TO SOFTWARE TESTING TECHNIQUES BY PRADEEP I.
CS 217 Software Verification and Validation Week 7, Summer 2014 Instructor: Dong Si
Black Box Testing : The technique of testing without having any knowledge of the interior workings of the application is Black Box testing. The tester.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Test Case Designing UNIT - 2. Topics Test Requirement Analysis (example) Test Case Designing (sample discussion) Test Data Preparation (example) Test.
Testing and inspecting to ensure high quality An extreme and easily understood kind of failure is an outright crash. However, any violation of requirements.
Theory and Practice of Software Testing
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
How to manage the testing phase of the PSIP(s)
1. Black Box Testing  Black box testing is also called functional testing  Black box testing ignores the internal mechanism of a system or component.
 Software Testing Software Testing  Characteristics of Testable Software Characteristics of Testable Software  A Testing Life Cycle A Testing Life.
Dynamic Testing.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
SOFTWARE TESTING. SOFTWARE Software is not the collection of programs but also all associated documentation and configuration data which is need to make.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Software Testing. SE, Testing, Hans van Vliet, © Nasty question  Suppose you are being asked to lead the team to test the software that controls.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
Testing Integral part of the software development process.
Functional testing, Equivalence class testing
Software Testing.
Software Testing.
Black Box Testing PPT Sources: Code Complete, 2nd Ed., Steve McConnell
Software Engineering (CSI 321)
Lecture on Black Box Testing
Types of Testing Visit to more Learning Resources.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Software Testing (Lecture 11-a)
Chapter 14 Software Testing Techniques
Software testing.
Chapter 10 – Software Testing
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Software Testing “If you can’t test it, you can’t design it”
TYPES OF TESTING.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
By: Lecturer Raoof Talal
Presentation transcript:

Black-box Testing

Contents Black-box Testing Black-box Testing Categories Types of Black box testing Equivalence class Partitioning Boundary Value Analysis Cause and Effect Decision Table Advantages of Black Box Testing Disadvantages of Black Box Testing

Black-box Testing Complements white-box testing by uncovering different classes of errors Focuses on the functional requirements and the information domain of the software Used during the later stages of testing after white box testing has been performed The tester identifies a set of input conditions that will fully exercise all functional requirements for a program The test cases satisfy the following: Reduce, by a count greater than one, the number of additional test cases that must be designed to achieve reasonable testing Tell us something about the presence or absence of classes of errors, rather than an error associated only with the specific task at hand BACK

Black-box Testing Categories Incorrect or missing functions Interface errors Errors in data structures or external data base access Behavior or performance errors Initialization and termination errors BACK

Types of Black box testing Equivalence class partitioning Boundary value analysis Decision Table based testing Cause Effect Graph BACK

Equivalence class Partitioning A black-box testing method that divides the input domain of a program into classes of data from which test cases are derived An ideal test case single-handedly uncovers a complete class of errors, thereby reducing the total number of test cases that must be developed Test case design is based on an evaluation of equivalence classes for an input condition An equivalence class represents a set of valid or invalid states for input conditions

From each equivalence class, test cases are selected so that the largest number of attributes of an equivalence class are exercise at once Input values to a program are partitioned into equivalence classes. Partitioning is done such that: program behaves in similar ways to every input value belonging to an equivalence class.

If the input data to the program is specified by a range of values: e.g. numbers between 1 to 5000. one valid and two invalid equivalence classes are defined. 5000 1

Example 5000 1 There are three equivalence classes: the set of negative integers, set of integers in the range of 1 and 5000, integers larger than 5000. 5000 1 BACK

Boundary Value Analysis A greater number of errors occur at the boundaries of the input domain rather than in the "center" Boundary value analysis is a test case design method that complements equivalence partitioning It selects test cases at the edges of a class It derives test cases from both the input domain and output domain

Some typical programming errors occur: at boundaries of equivalence classes might be purely due to psychological factors. Programmers often fail to see: special processing required at the boundaries of equivalence classes. Programmers may improperly use < instead of <= Boundary value analysis: select test cases at the boundaries of different equivalence classes.

Example For a function that computes the square root of an integer in the range of 1 and 5000: test cases must include the values: {0,1,5000,5001}. 5000 1 BACK

Cause and Effect Testing would be a lot easier: if we could automatically generate test cases from requirements. Work done at IBM: Can requirements specifications be systematically used to design functional test cases?

Cause and Effect Examine the requirements: restate them as logical relation between inputs and outputs. The result is a Boolean graph representing the relationships called a cause-effect graph. Convert the graph to a decision table: each column of the decision table corresponds to a test case for functional testing

Steps to create cause-effect graph Study the functional requirements. Mark and number all causes and effects. Numbered causes and effects: become nodes of the graph. Draw causes on the LHS Draw effects on the RHS Draw logical relationship between causes and effects as edges in the graph. Extra nodes can be added to simplify the graph

Cause-Effect Graphs A B If A then B A C B If (A and B)then C

Cause-Effect Graphs A C B If (A or B) then C A C ~ B If (not(A and B)) then C

Cause-Effect Graphs A C B A B ~ B If (not (A or B))then C ~ A B If (not A) then B BACK

Decision Table Two dimensional mapping of condition against actions to be performed Conditions evaluate to Boolean Action corresponds to expected activity They can be derived from Cause Effect graph too Map cause as condition Map effect as action

Cause effect graph- Decision table Test 1 Test 2 Test 3 Test 4 Test 5 Cause 1 I I I S I I I X S Cause 2 I S X Cause 3 I S X X I S X Cause 4 S X X Cause 5 S S I Effect 1 P P A A A A Effect 2 A P A A Effect 3 A A A P P Cause effect graph- Decision table

Cause effect graph- Example Put a row in the decision table for each cause or effect: in the example, there are five rows for causes and three for effects. The columns of the decision table correspond to test cases. Define the columns by examining each effect: list each combination of causes that can lead to that effect. We can determine the number of columns of the decision table by examining the lines flowing into the effect nodes of the graph.

Cause effect graph- Example Theoretically we could have generated 25=32 test cases. Using cause effect graphing technique reduces that number to 5.

Cause effect graph Not practical for systems which: include timing aspects feedback from processes is used for some other processes. BACK

Advantages of Black Box Testing more effective on larger units of code than glass box testing tester needs no knowledge of implementation, including specific programming languages tester and programmer are independent of each other tests are done from a user's point of view will help to expose any ambiguities or inconsistencies in the specifications test cases can be designed as soon as the specifications are complete BACK

Disadvantages of Black Box Testing only a small number of possible inputs can actually be tested, to test every possible input stream would take nearly forever without clear and concise specifications, test cases are hard to design there may be unnecessary repetition of test inputs if the tester is not informed of test cases the programmer has already tried may leave many program paths untested cannot be directed toward specific segments of code which may be very complex (and therefore more error prone) most testing related research has been directed toward glass box testing BACK

THANKS BACK TO INDEX