Informatics 43 – May 3, 2016.

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.
Introduction to Software Engineering Lecture 11 André van der Hoek.
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 
Informatics 43 – May 5, Restatement of goals Want to verify software’s correctness  Need to test  Need to decide on test cases  No set of test.
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.
Software Testing and Quality Assurance
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.
Complexity (Running Time)
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
Software Testing Prasad G.
Even Numbers – Any number that can be divided by 2
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Software Systems Verification and Validation Laboratory Assignment 3 Integration, System, Regression, Acceptance Testing Assignment date: Lab 3 Delivery.
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
Introduction to Software Testing. Types of Software Testing Unit Testing Strategies – Equivalence Class Testing – Boundary Value Testing – Output Testing.
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.
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.
Fractions.
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.
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.
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.
Factors, Primes & Composite Numbers Chapter 4.1. Definition  Product – An answer to a multiplication problem. 7 x 8 = 56 Product.
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.
PREPARED BY G.VIJAYA KUMAR ASST.PROFESSOR
Regression Testing with its types
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.
5.2 The Integers.
John D. McGregor Session 9 Testing Vocabulary
Chapter 9, Testing.
Black Box Testing PPT Sources: Code Complete, 2nd Ed., Steve McConnell
Software engineering – 1
Chapter 13 & 14 Software Testing Strategies and Techniques
Testing the Software with Blinders on
John D. McGregor Session 9 Testing Vocabulary
Testing Approaches.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
John D. McGregor Session 9 Testing Vocabulary
Introduction to Exponents
VOCABULARY! EXAMPLES! Relation: Domain: Range: Function:
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.
CSE403 Software Engineering Autumn 2000 More Testing
CSE 1020:Software Development
Review of Previous Lesson
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Software Testing.
08120: Programming 2: SoftwareTesting and Debugging
Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Presentation transcript:

Informatics 43 – May 3, 2016

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 Decide what to test. Select a test case input, with input I Determine the expected output E. Run the system with the test case input I Capture the actual output A. Compare E and A. Different? Inform programmer 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) Decide what to test. Select a suite of test case inputs, with input I1, I2, … For In, determine the expected output E. Run the system with the test case input In Capture the actual output A. Compare E and A. Different? Inform programmer Loop back to 1 or 2, if time permits.

Back to Black box test case selection Equivalence Class Partitioning – a systematic approach to selecting a suite of test cases (step 2 from previous slide) Identify the set of all possible inputs (to what is being tested). Identify a basis for subdividing the set of inputs. stated requirements size, order, structure your smarts Use this basis to divide the set of all possible inputs into subsets (domain into subdomains). 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 Identify the set of all possible inputs. the set of all pairs of numbers Identify a basis for subdividing the set of inputs. evens and odds prime and composite sign magnitude Use this basis for dividing the set of all possible inputs into subsets (domain into subdomains). both even, both odd, one of each both negative, both zero, both positive, mixed size of first number in pair: 0, 1-16328 16328-2,000,000 >2,000,000 From each subset/subdomain, select a representative. (4, 6) (7, 13) (3, 2)

What is a “basis”?? Identify the set of all possible inputs. Identify a basis for subdividing the set of inputs. Use this basis for dividing the set of all possible inputs into subsets (domain into subdomains). From each subset/subdomain, select a representative. A basis (as used here) is a criterion, or a question, or a principle, or a justification. “On what basis does a student pass or fail a course?”

What is a “basis”?? Identify the set of all possible inputs. Identify a basis for subdividing the set of inputs. Use this basis for dividing the set of all possible inputs into subsets (domain into subdomains). From each subset/subdomain, select a representative. A basis (as used here) is a criterion, or a question, or a principle, or a justification. “On what basis does a student pass or fail a course?” “On the basis of the quality of the student’s work”

What is a “basis”?? Identify the set of all possible inputs. Identify a basis for subdividing the set of inputs. Use this basis for dividing the set of all possible inputs into subsets (domain into subdomains). From each subset/subdomain, select a representative. A basis (as used here) is a criterion, or a question, or a principle, or a justification. “On what basis does a student pass or fail a course?” “On the basis of the quality of the student’s work” “On the basis of whether the student’s score is > 60.”

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 Identify the set of all possible inputs. The set of all lists of numbers Identify a basis for subdividing the set of inputs. Whether number has a fractional component. The standard deviation of the numbers in the list How many numbers in the list are equal to the smallest Position of the smallest number in the list Use this basis for dividing the set of all possible inputs into subsets (domain into subdomains). All are equal to smallest, 1 = smallest, 2 = smallest, all others From each subset/subdomain, select a representative. (1, 1, 1) (1, 2, 3) (80, 90, 85,80), (93, 84, 84, 84)

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

The Testing Process Model Decide what to test. Select a test case input. Determine the expected output E. Run the system with the test case input. Capture the actual output A. Compare E and A. Different? Inform programmer. 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 0.8775825619. 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.