1 Joe Meehean. 2 Testing is the process of executing a program with the intent of finding errors. -Glenford Myers.

Slides:



Advertisements
Similar presentations
Lecture 2: testing Book: Chapter 9 What is testing? Testing is not showing that there are no errors in the program. Testing cannot show that the program.
Advertisements

Formal Methods and Testing Goal: software reliability Use software engineering methodologies to develop the code. Use formal methods during code development.
Testing and Quality Assurance
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
Grey Box testing Tor Stålhane. What is Grey Box testing Grey Box testing is testing done with limited knowledge of the internal of the system. Grey Box.
Boundary Value Testing A type of “Black box” functional testing –The program is viewed as a mathematical “function” –The program takes inputs and maps.
1 CSE1301 Computer Programming: Lecture 15 Flowcharts and Debugging.
Software Testing and Quality Assurance
OOP #10: Correctness Fritz Henglein. Wrap-up: Types A type is a collection of objects with common behavior (operations and properties). (Abstract) types.
16/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Testing The process of verifying the software performs to the specifications.
Testing an individual module
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
1 CSE1301 Computer Programming: Lecture 15 Flowcharts, Testing and Debugging.
1 Functional Testing Motivation Example Basic Methods Timing: 30 minutes.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Software Systems Verification and Validation Laboratory Assignment 3
System/Software Testing
CS 217 Software Verification and Validation Week 6, Summer 2014 Instructor: Dong Si
CMSC 345 Fall 2000 Unit Testing. The testing process.
1 Testing Course notes for CEN Outline  Introduction:  terminology and philosophy  Factors that influence testing  Testing techniques.
What is software testing? 1 What are the problems of software testing? 2 Time is limited Applications are complex Requirements are fluid.
Testing and Debugging Version 1.0. All kinds of things can go wrong when you are developing a program. The compiler discovers syntax errors in your code.
Flow of Control Part 1: Selection
Neil Ghani Software testing. 2 Introduction In a perfect world all programs fully verified testing thus redundant Back in the real.
Introduction to Software Testing. Types of Software Testing Unit Testing Strategies – Equivalence Class Testing – Boundary Value Testing – Output Testing.
1 Intro to Java Week 12 (Slides courtesy of Charatan & Kans, chapter 8)
DEBUGGING. BUG A software bug is an error, flaw, failure, or fault in a computer program or system that causes it to produce an incorrect or unexpected.
Grey Box testing Tor Stålhane. What is Grey Box testing Grey Box testing is testing done with limited knowledge of the internal of the system. Grey Box.
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.
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.
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
Week 9 Data structures / collections. Vladimir Misic Week 9 Monday, 4:20:52 PM2 Data structures (informally:) By size: –Static (e.g. arrays)
What is Testing? Testing is the process of finding errors in the system implementation. –The intent of testing is to find problems with the system.
Java Basics Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
SOFTWARE TESTING. INTRODUCTION Testing forms the first step in determining the errors in a program. It is the major quality control measure used during.
Test Case Designing UNIT - 2. Topics Test Requirement Analysis (example) Test Case Designing (sample discussion) Test Data Preparation (example) Test.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
Software Quality Assurance and Testing Fazal Rehman Shamil.
Testing Data Structures Tao Xie Visiting Professor, Peking University Associate Professor, North Carolina State University
Dynamic Testing.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
Boundary Value Testing 1.A type of “Black box” functional testing –The program is viewed as a mathematical “function” –The program takes inputs and maps.
Mutation Testing Breaking the application to test it.
Week 6 MondayTuesdayWednesdayThursdayFriday Testing III Reading due Group meetings Testing IVSection ZFR due ZFR demos Progress report due Readings out.
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.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
Testing Data Structures
Software Testing.
Testing Verification and the Joy of Breaking Code
Testing Tutorial 7.
Software Testing.
Chapter 13 & 14 Software Testing Strategies and Techniques
Structural testing, Path Testing
Testing Approaches.
UNIT-4 BLACKBOX AND WHITEBOX 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 Verification and Validation
Software Verification and Validation
CSE403 Software Engineering Autumn 2000 More Testing
Software Verification and Validation
Review of Previous Lesson
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Software Testing.
Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Presentation transcript:

1 Joe Meehean

2 Testing is the process of executing a program with the intent of finding errors. -Glenford Myers

 Testing is done to find errors not to prove there are none successful tests find errors  Any useful program has errors you won’t be able to find them all find and fix the big ones 3

 Program is an opaque box ignore internal algorithms or structure act like someone else wrote it give it to someone else to test  Provide a variety of inputs, check for correct output seems simple, its not 4

 Problem:  Even simplest programs can have billions of possible inputs cannot possibly test them all must choose a useful subset  How do we do this methodically? 5

 Equivalence partitioning partition input into sets provide a test for each set  Month # to Month Name Program 6 … …… … Valid Partition Invalid Partition 1 Invalid Partition 2

 Boundary-value analysis select inputs from boundary of equivalence partitions where inputs switch from one set to another 7 … …… … Valid Partition Invalid Partition 1 Invalid Partition 2

 All pairs testing for exactly 2 input arguments only test all combinations of those inputs or all combination of boundary values  Intuition most common errors involve 1 argument next most common involve 2 … 2 highest we can go without prohibitive cost 8

 Fuzz testing create a program that generates random inputs feed random input into program under test  Monitor tested program for crashes unhandled exceptions wedging (hanging)  Term coined by Barton Miller 9

 Model-based testing create a mathematical model of your program create real test cases and abstract test cases compare the results of real run with abstract run 10 Model Program Test Idea Real Input Model Input Real Output Model Output Compare

 Model-based testing runtime complexity can be a model not the only model  E.g., you expect your program to be O(N) run your program with input size X use your model to calculate runtime for size 2X run program with size 2X compare results 11

 Exploratory Testing play with it to see how it works knowing how it works, try to break it “it looks like it works like this” “what if I try this” make fun of a program until it cries 12

 How/when to use these techniques?  Equivalence partitioning ALWAYS  Boundary-value analysis ALWAYS  All-pairs as needed if your program takes pairs of inputs 13

 How/when to use these techniques?  Fuzz-testing in school, try this by hand (make up random) at work, write software to support  Model-based when it makes sense is your program behaving strangely, but still producing correct output? 14

 How/when to use these techniques?  Exploratory ALWAYS 15

16

 Create tests to evaluate source code specific functions specific lines specific conditions  Most common kind of testing done by developers 17

 API Testing Application Programming Interface (API) ensure every public & private method does what it should using either black box (method is black box) or other white box techniques can add testing code directly to program 18

 API Testing e.g., test LCVector::doubleCapacity() does it double the capacity? does it copy all of the items over to the new array? print raw array before double capacity print raw array after double capacity 19

 Code coverage technique to evaluate black box tests ensure every piece of code executed once requires software support  Types function coverage statement coverage condition coverage  every boolean sub-expression of a condition  test for both true and false 20

 Fault injection  What is a fault? unexpected event or condition faults may cause errors e.g., disk drive fails, memory corrupted, …  What is an error? output that doesn’t meet spec crashing hung 21

 Fault injection artificially cause faults at runtime see what the program does try to inject faults at specific times e.g., modify OS to pretend disk crash during file read observe the programs behavior kind of like extra mean fuzz testing 22

 Testing all parts of your program doesn’t guarantee it is bug-free  Program may be missing code  Won’t find data-sensitivity errors covers all lines of code not all possible inputs 23

 How/when to use these techniques?  API testing ALWAYS test it as you build it  Code coverage when tools are available and not time prohibitive this may be a requirement of your job 24

 How/when to use these techniques?  Fault injection when your program must work all the time graduate school designing robust, mission-critical systems e.g., autopilot software 25

26