Chapter 3: Dynamic Testing Techniques

Similar documents
1 Black Box Test Data Generation Techniques

Software Testing. 1. Testing is the process of demonstrating that errors are not present.

1 Visible deviation from the specification or expected behavior for end-user is called: a) an error b) a fault c) a failure d) a defect e) a mistake

Test design techniques

Software Testing for Developer Development Testing. Duvan Luong, Ph.D. Operational Excellence Networks

7.0 Test Design Techniques & Dynamic Testing

CS 4387/5387 SOFTWARE V&V LECTURE 4 BLACK-BOX TESTING

Coursework Completion

Software Testing CS 408

Computer Grade 5. Unit: 1, 2 & 3 Total Periods 38 Lab 10 Months: April and May

Create your first workbook

Sample Question Paper. Software Testing (ETIT 414)

PESIT Bangalore South Campus

Software Testing Prof. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Modern Methods in Software Engineering. Testing.

SE 3S03. Zahra Ali. Week of Feb 22, 2016

Week - 01 Lecture - 04 Downloading and installing Python

SE 3S03 - Tutorial 10. Helen Brown. Week of Mar 23, 2015

Specification-based test design

Lecture 10: Introduction to Correctness

Black Box Testing (revisited) Csci 565 Spring 2007

PES INSTITUTE OF TECHNOLOGY- BANGALORE SOUTH CAMPUS

UNIT-4 Black Box & White Box Testing

Please always review the latest document available through the website

Test design: Part I. Software Testing: INF3121 / INF4121

UNIT-4 Black Box & White Box Testing

Notebook Assignments

Software Testing. Software Testing. in the textbook. Chapter 8. Verification and Validation. Verification Techniques

CSE 403 Lecture 13. Black/White-Box Testing. Reading: Software Testing: Principles and Practices, Ch. 3-4 (Desikan, Ramesh)

Sample Exam Syllabus

Advanced Syllabus 2007 Release Plan

: 65% to 84% - M for Merit : 50% to 64% - P for Pass : 0% to 49% - R for Referral

Types of Software Testing: Different Testing Types with Details

Subject Software Testing Structural Testing

Software Testing. Testing 1

Interim Registration

Aerospace Software Engineering

A Summary of Out of the Tar Pit

Introduction to Software Engineering

Types of Dynamic System Testing. Testing Practice. Lecture 9

ADDITIONAL EXCEL FUNCTIONS

Computational Systems COMP1209

AP Statistics Assignments Mr. Kearns José Martí MAST 6-12 Academy

Theme 2 Program Design and Testing

Black-box Testing Techniques

Welcome to Introduction to Microsoft Excel 2010

THE EXCEL ENVIRONMENT... 1 EDITING...

2017 External Examinations Results Day, Enquiries About Results (EAR) and Resit Guidelines

Read and fill in this page now

Propositional Logic. Part I

A Tutorial for Excel 2002 for Windows

Equivalence Class Partitioning and Boundary Value Analysis -Black Box Testing Techniques

BCS HIGHER EDUCATION QUALIFICATIONS - REGULATIONS

Exercises Software Development I. 02 Algorithm Testing & Language Description Manual inspection, test plan, grammar, metasyntax notations (BNF, EBNF)

INFORMATION TECHNOLOGY SPREADSHEETS. Part 1

CS 451 Software Engineering Winter 2009

In this section you will learn some simple data entry, editing, formatting techniques and some simple formulae. Contents

Software Testing. Testing: Our Experiences

Introduction to Computer Applications. CISY 1225 Chapter 11. Dr. Zahoor Khan

An introduction to plotting data

Read and fill in this page now. Your lab section day and time: Name of the person sitting to your left: Name of the person sitting to your right:

Calendar PPF Production Cycles Non-Production Activities and Events

UNIT ONE: The Worksheet. Workbook Window Excel Worksheet Fill handle Automatic fill Column widths Opening a file Saving a file

Software Engineering Software Testing Techniques

a. The following method would allow an object of the static type List<String> to be passed to it as an argument.

Introduction to the Course

Graded Project. Microsoft Excel

Sample Exam. Certified Tester Foundation Level

Coding and Unit Testing! The Coding Phase! Coding vs. Code! Coding! Overall Coding Language Trends!

Let s get started with the module Getting Data from Existing Sources.

1. Managing Information in Table

4B Summary of some Key SW Testing Concepts 1

Functional Testing (Black Box Testing)

Microsoft Access Database How to Import/Link Data

Structural Testing. (c) 2007 Mauro Pezzè & Michal Young Ch 12, slide 1

Programme Specification. MSc Telecommunications Engineering 2016/17

ITIL v3. Qualification & Certification scheme. itsmf International The IT Service Management Forum 1

CS317 File and Database Systems

White-Box Testing Techniques

Arrays. Arrays (8.1) Arrays. One variable that can store a group of values of the same type. Storing a number of related values.

Part 5. Verification and Validation

ShiftWizard User Guide. Version 4

The Bizarre Truth! Automating the Automation. Complicated & Confusing taxonomy of Model Based Testing approach A CONFORMIQ WHITEPAPER

Excel 2007 Fundamentals

Chapter 10. Testing and Quality Assurance

Course Content. Objectives of Lecture 18 Black box testing and planned debugging. Outline of Lecture 18

Excel Basics Fall 2016

Depending on the computer you find yourself in front of, here s what you ll need to do to open SPSS.

INTRODUCTION TO SOFTWARE ENGINEERING

Facts About Testing. Cost/benefit. Reveal faults. Bottom-up. Testing takes more than 50% of the total cost of software development

Why Jan 1, 1960? See:

InfoSphere Master Data Management Reference Data Management Hub Version 10 Release 0. User s Guide GI

This Particular unit will prepare one for an assignment which is expected to be submitted towards the end of the module.

Graded Project. Microsoft Excel

Example. Section: PS 709 Examples of Calculations of Reduced Hours of Work Last Revised: February 2017 Last Reviewed: February 2017 Next Review:

Week 9 Implementation

Darshan Institute of Engineering & Technology for Diploma Studies

SOFTWARE TESTING UNIT II TEST CASE DESIGN

Part 4: Using the Power Behind the Process Entering Data & Generating Reports

Part 1. Getting Started. Chapter 1 Creating a Simple Report 3. Chapter 2 PROC REPORT: An Introduction 13. Chapter 3 Creating Breaks 57

Transcription:

Chapter 3: Dynamic Testing Techniques " The system was not fully tested to a satisfactory level of quality and resilience before full implementation on 26 October 1992." Extract from the main conclusions of the official report into the failure of the London Ambulance Service's Computer Systems on October 26th and 27th and November 4th 1992. 3.1 OVERVIEW This module introduces idea of a test case design technique. Broadly, these are categorized as either functional or structural testing techniques. The advantage of using these proven design methods is that they provide a more intelligent and effective means of identifying tests than a purely intuitive approach. You will be expected to know two functional techniques and two structural techniques in detail and be aware there are many other techniques that can be applied to test case design. There are many excellent books on testing techniques some of which are listed in the appendix. 3.2 OBJECTIVES After completing this module you will: Understand the difference between black box (functional) and white box (structural) testing techniques. Be able to name at least three black box techniques. Understand how to use equivalence partitioning and boundary value analysis to design test cases. Appreciate the use of state transition testing. Be able to name at least three white box techniques. Understand the meaning of statement testing and branch testing. Be aware that the BS7925 standard details some (but not all) of the recognized testing techniques. Know that all of these testing techniques can be supplemented by error guessing. http://www.softwaretestinggenius.com/ Page 1 of 9

3.3 INTRODUCTION Each of the techniques we are about to describe has its strengths and weaknesses. A useful rule of thumb is that if you are having difficulty applying a particular technique to a testing problem then perhaps you ought to try a different technique. This section introduces the different types of testing technique and discusses the difference between them. 3.3.1 Functional test techniques Functional test techniques are often referred to as 'black box' test techniques and the common parlance is that we are 'doing black box testing'. A functional test technique will help design test cases based on functionality of component or system under test, without necessarily having to understand underlying detail of software design. Consider functionality of system of determine test inputs and expected results. Structural test techniques are sometime called white box text techniques hence term 'white box testing'. Glass box testing is less widely used term for structural test case design. Structural test techniques help design test cases based on internal structure and design of component or system under test. Look at code, database spec, data model, etc., to determine test inputs and expected results. Exercise What's the difference between Black and White box testing? BASED ON USED BY SUITABLE FOR Black Box Requirements Independent tester System test Functionality Users Acceptance test White Box Internal structure Developer Unit test Code DB design Designer Link test Sub-system test http://www.softwaretestinggenius.com/ Page 2 of 9

3.4 BLACK BOX TECHNIQUES The following list of black box techniques is from BS 7925-2. On this course we will describe and give an example of only those ones highlighted in bold: /Equivalent Partitioning. Boundary Value Analysis State Transition Testing Cause-Effect Graphing /' Syntax Testing / Equivalence partitioning (EP) is a test case design technique that is based on the premise that the inputs and outputs of a component can be partitioned into classes that, according to the component's specification, will be treated similarly by the component.. Thus the result of testing a single value from an equivalence partition is considered representative of the complete partition. As an example consider any program that accepts days of ht week and months of they year as inputs. Intuitively you would probably not expect to have to test every date of the year. You would obviously try months with 30 days (e.g. June) and months with 31 days (e.g. January) and you may even remember to try out the special case of February for both non-leap year (28 days) and leap years (29 days). Equally, looking at the days of the week you would not, depending on the application, test every day. You may test for weekdays (e.g. Tuesday) and weekends (e.g. Sunday). What you are in effect doing is deciding on equivalence classes for the set of data in question. Not everyone will necessarily pick the same equivalence classes; there is some subjectivity involved. But the basic assumption you are making is that anyone value from the equivalence, class, is as good as any other when we come to design the test. We hope that you can see how this technique can dramatically reduce the number of tests that you may have for a particular software component. http://www.softwaretestinggenius.com/ Page 3 of 9

Exercise Consider a software component called GENERATE-GRADING, which is used by the system to calculate student's grade based on an examination mark and a coursework mark. The component is passed an exam mark (out of75) and a coursework mark (out of 25) from which it generates a grade fro the course in the range' A' to 'D'. The grade is calculated from the overall mark, which is calculated as the sum of the exam mark and coursework marks, as follows. OVERALL MARK Greater than or equal to 70 Greater than or equal to 50 but less than 70 Greater than or equal to 30 but less than 50 Less than 30 GRADE A B C D http://www.softwaretestinggenius.com/ Page 4 of 9

Exercise Identify valid partitions: Identify invalid partitions: Identify output partitions: Now derive some test cases based on input exam mark partition: TEST CASE 1 2 3 Input (exam mark) Input (coursework) Total mark (calculated) Partition tested Expected output http://www.softwaretestinggenius.com/ Page 5 of 9

The standard goes on to derive test cases form the other partitions but in this course we will not have time to do this completely. Boundary Value Analysis is base on the following premise. Firstly, the inputs and outputs of a component can be partitioned into classes that, according to the component's specification, will be treated similarly by the component and, secondly, that developers are prone to marking errors in their treatment of the boundaries of these classes. Thus test cases are generated to exercise these boundaries. Exercise Look at the boundaries for input exam mark. Choose values on each boundary and one either side of it in order to generate a set of test cases. TEST CASE 1 2 3 4 5 6 Input (exam mark) Input (coursework) Boundary tested Expected output Again the standard continues to describe boundary tests for all of the other valid boundaries. http://www.softwaretestinggenius.com/ Page 6 of 9

3.5 White Box Techniques The following list of white box techniques is from BS79252. On this course we will describe and give an example of only those ones highlighted in bold. Statement testing Branch Decision Testing. Data Flow Testing. Branch Condition Testing.. Branch Condition Combination Testing Modified Condition Decision Testing. LCSAJ Testing. Random Testing. Statement testing is a structural technique based on decomposition of a software component into constituent statements. Statements are identified as executable or non-executable. For each test case, you must specify inputs to component, identification of statement(s) to be executed and expected outcome of test case. Example of program with 4 statements: X=INPUT; Y=4; IF X>Y THEN Message= "Limited exceeded" ELSE z=o Message= "No problems reported" END IF Branch testing requires model of source code, which identifies decisions and decision outcomes. A decision is an executable statement, which may transfer control to another statement depending upon logic of decision statement. Typical decisions are found in loops and selections. Each possible transfer of control is a decision outcome. F or each test case you must specify inputs to component, identification of decision outcomes to be executed by test case and expected outcome of test case. http://www.softwaretestinggenius.com/ Page 7 of 9

3.5.1 Comparison of white box techniques from "Software Testing in the Real World" Each column in this figure represents a distinct method of white-box testing, and each row (1-4) defines a different test characteristics. For a given method (column), "Y" in a given row means that test characteristic is required for method. "N" signifies no requirement. "Implicit" means test characteristic is achieved implicitly by other requirements of method. (@ 1993, 1994 Software Development Technologies) reproduced with permission. http://www.softwaretestinggenius.com/ Page 8 of 9

3.7 Summary In module three you have learnt that applying a formal, recognized testing technique in a systematic way is the most effective approach to finding errors in software. In particular you can now Explain the difference between black box (functional) and white box (structural) testing techniques. Name at least three black box techniques. Use equivalence partitioning and boundary value analysis to design test cases. Recognize a state transition testing technique. Name at least three white box techniques. Understand what the meaning of statement testing and branch testing. Use the standard BS7925 to find out more about testing techniques. Know when to apply error-guessing techniques to supplement the formal techniques. http://www.softwaretestinggenius.com/ Page 9 of 9