Informatics 43 – May 5, 2015. Restatement of goals Want to verify software’s correctness  Need to test  Need to decide on test cases  No set of test.

Slides:



Advertisements
Similar presentations
Testing and Quality Assurance
Advertisements

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.
Practical Testing Techniques. Verification and Validation Validation –does the software do what was wanted? “Are we building the right system?” –This.
Introduction to Software Engineering Lecture 11 André van der Hoek.
1 Software Engineering Lecture 11 Software Testing.
Informatics 43 – May 7, Restatement of Goals for Testing Want to verify software’s correctness  Need to test  Need to decide on test cases  No.
Informatics 43 – May 12, Restatement of Goals for Testing Want to verify software’s correctness  Need to test  Need to decide on test cases 
1 CODE TESTING Principles and Alternatives. 2 Testing - Basics goal - find errors –focus is the source code (executable system) –test team wants to achieve.
Informatics 43 – April 30, What is a test case? An input to a system, and the correct output. An “input” may be complex. Example: – What is an input.
1 Software Testing and Quality Assurance Lecture 30 - Introduction to Software Testing.
Topic 13Summer ICS 52: Introduction to Software Engineering Lecture Notes for Summer Quarter, 2003 Michele Rousseau Topic 13 Partially based on.
Testing an individual module
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
Lecture 9 Testing Topics TestingReadings: Spring, 2008 CSCE 492 Software Engineering.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Automated SW testing Lukáš Miňo
White-box Testing Black-box Testing Extensions
CPIS 357 Software Quality & Testing
Software Systems Verification and Validation Laboratory Assignment 3 Integration, System, Regression, Acceptance Testing Assignment date: Lab 3 Delivery.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
Requirements-based Test Generation for Functional Testing (© 2012 Professor W. Eric Wong, The University of Texas at Dallas) 1 W. Eric Wong Department.
Introduction to Software Testing. Types of Software Testing Unit Testing Strategies – Equivalence Class Testing – Boundary Value Testing – Output Testing.
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.
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.
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
White Box-based Coverage Testing (© 2012 Professor W. Eric Wong, The University of Texas at Dallas) 111 W. Eric Wong Department of Computer Science The.
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.
Coevolutionary Automated Software Correction Josh Wilkerson PhD Candidate in Computer Science Missouri S&T.
Test Case Designing UNIT - 2. Topics Test Requirement Analysis (example) Test Case Designing (sample discussion) Test Data Preparation (example) Test.
Integration testing Integrate two or more module.i.e. communicate between the modules. Follow a white box testing (Testing the code)
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
08120: Programming 2: SoftwareTesting and Debugging Dr Mike Brayshaw.
1. Black Box Testing  Black box testing is also called functional testing  Black box testing ignores the internal mechanism of a system or component.
Dynamic Testing.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
1 © 2011 Professor W. Eric Wong, The University of Texas at Dallas Requirements-based Test Generation for Functional Testing W. Eric Wong Department of.
Testing JUnit Testing. Testing Testing can mean many different things It certainly includes running a completed program with various inputs It also includes.
Week 6 MondayTuesdayWednesdayThursdayFriday Testing III Reading due Group meetings Testing IVSection ZFR due ZFR demos Progress report due Readings out.
Introduction to Domain Testing. 2 What is Domain Testing? Domain testing is: one of several software testing techniques designed to help you find bugs.
Informatics 43 – May 3, Restatement of goals Want to verify software’s correctness  Need to test  Need to decide on test cases  No set of test.
SOFTWARE TESTING AND QUALITY ASSURANCE. Software Testing.
Testing 1. Aims To understand the purpose of testing To understand the different test strategies To explore the four types of test data Have a understanding.
CS223: Software Engineering Lecture 25: Software Testing.
Informatics 43 – May 5, Restatement of Goals for Testing Want to verify software’s correctness  Need to test  Need to decide on test cases  No.
Software Testing. Software Quality Assurance Overarching term Time consuming (40% to 90% of dev effort) Includes –Verification: Building the product right,
Introduction to Domain Testing
Functional testing, Equivalence class testing
Software Testing.
Highcliffe ICT Department
Domain Testing Functional testing which tests the application by giving inputs and evaluating its appropriate outputs. system does not accept invalid and.
Testing Tutorial 7.
Informatics 43 – May 10, 2016.
John D. McGregor Session 9 Testing Vocabulary
Black Box Testing PPT Sources: Code Complete, 2nd Ed., Steve McConnell
CS5123 Software Validation and Quality Assurance
Software engineering – 1
Testing the Software with Blinders on
John D. McGregor Session 9 Testing Vocabulary
Testing Approaches.
Informatics 43 – May 3, 2016.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
John D. McGregor Session 9 Testing Vocabulary
Informatics 43 – April 28, 2016.
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
CSE 1020:Software Development
UNIT-4 BLACKBOX AND WHITEBOX TESTING
08120: Programming 2: SoftwareTesting and Debugging
Presentation transcript:

Informatics 43 – May 5, 2015

Restatement of goals Want to verify software’s correctness  Need to test  Need to decide on test cases  No set of test cases is sufficient What is a systematic approach to the selection of test cases that will lead to accurate, thorough, repeatable identification of bugs?

Approaches to test case selection “White box” – or structural Test cases based on the structure of the code Can be partially automated “Thorough”ness measured against code qualities “Black box” – or specification based Test cases based on specifications Requires “formal” specs to automate “Thorough”ness measured against either the set of functionality, or the set of inputs

The Testing Process Model 1.Decide what to test. 2.Select a test case input, with input I 3.Determine the expected output E. 4.Run the system with the test case input I 5.Capture the actual output A. 6.Compare E and A. Different? Inform programmer 7.Loop back to 1 or 2, if time permits.

Back to Black box test case selection Based on specifications, not source code. How to select inputs for test cases? Typical values Boundary values Extreme values Special cases Invalid values Environmental factors, such as date, type of user This is all pretty haphazard.

The Testing Process Model (with test case suite focus) 1.Decide what to test. 2.Select a suite of test case inputs, with input I1, I2, … 3.For I n, determine the expected output E. 4.Run the system with the test case input I n 5.Capture the actual output A. 6.Compare E and A. Different? Inform programmer 7.Loop back to 1 or 2 or 3, if time permits.

Back to Black box test case selection Equivalence Class Partitioning – a systematic approach to selecting a suite of test cases. 1.Identify the set of all possible inputs (to what is being tested). 2.Identify a basis for subdividing the set of inputs. stated requirements size, order, structure your smarts 3.Use this basis to divide the set of all possible inputs into subsets (domain into subdomains). 4.From each subset/subdomain, select a representative to be a test case input.

Back to Black box test case selection An example The Multiply function: Input: two numbers Output: a single number which is the multiplicative product of the inputs

Equivalence Class Partitioning with Multiply 1.Identify the set of all possible inputs. the set of all ordered pairs of integers numbers 2.Identify a basis for subdividing the set of inputs. The value of the first number in the pair 3.Use this basis for dividing the set of all possible inputs into subsets (domain into subdomains). a. all pairs with 0 as first; b. all pairs with 1 as first, c. all pairs with -1 as first, d.all pairs with 2 as first, etc. 3.From each subset/subdomain, select a representative. a. (0, 4) b. (1, 20) c. (-1, 8) d. (2, )

Back to Black box test case selection Another example The QuizAverage function: Input: a list of numbers Output: a single number which is the average of the numbers on the input list, not counting the lowest number on the list.

Equivalence Class Partitioning with QuizAverage 1.Identify the set of all possible inputs. all lists of numbers between 0 and 100 inclusive, with 2 decimal places Identify a basis for subdividing the set of inputs. list length grade scale (60s, 70s, 80s, 90s) value of expected output number of lowest scores the mean or median of the inputs 3.Use this basis to divide the set of all possible inputs into subsets (domain into subdomains). a.Lists of length b. lists of length 0-10 c. lists of length 100+ A. 0 B. 1 C >1 0-50, 50-85, From each subset/subdomain, select an element. A. () B. (57.20) C. (40, 70) (5, 6) (60, 60, 60, 60) (89, 90, 91)

The Testing Process Model 1.Decide what to test. 2.Select a test case input. 3.Determine the expected output E. 4.Run the system with the test case input. 5.Capture the actual output A. 6.Compare E and A. Different? Inform programmer. 7.Loop back to 1 or 2, if time permits. Equivalence class partitioning

The Testing Process Model 1.Decide what to test. 2.Select a test case input. 3.Determine the expected output E. 4.Run the system with the test case input. 5.Capture the actual output A. 6.Compare E and A. Different? Inform programmer. 7.Loop back to 1 or 2, if time permits. Where does this come from?

Testing Oracles Where does a test case’s “expected output” come from? A “testing oracle” is a mechanism for deciding whether a test case execution succeeded or failed. Critical to testing. Difficult to create systematically – typically done with guesswork. Can be automated with formal specifications.

Testing Oracle Example The cosine function. You test input = 0.5, the actual output is What’s your oracle?

Oracles from Formal Specifications Formal specification of QuizAverage QuizAverage(list)  (sumof(list) – min(list)) / (sizeof(list) – 1) Formal specifications can be interpreted to compute or evaluate results.