Topic 13Summer 2003 1 ICS 52: Introduction to Software Engineering Lecture Notes for Summer Quarter, 2003 Michele Rousseau Topic 13 Partially based on.

Slides:



Advertisements
Similar presentations
Test Design and Documentation. Test Design Test design is to ensure that all requirements are met through a series of test procedures, increasing the.
Advertisements

Defect testing Objectives
Testing and Quality Assurance
(c) 2009 University of California, Irvine – André van der Hoek1April 20, 2015 – 00:59:05 Informatics 122 Software Design II Lecture 11 André van der Hoek.
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.
CMSC 345, Version 11/07 SD Vick from S. Mitchell 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 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.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
1 Software Testing and Quality Assurance Lecture 30 - Introduction to Software Testing.
Midterm ReviewSummer ICS 52: Introduction to Software Engineering Lecture Notes for Summer Quarter, 2003 Michele Rousseau Midterm Review Partially.
Topic 12Summer ICS 52: Introduction to Software Engineering Lecture Notes for Summer Quarter, 2003 Michele Rousseau Topic 12 Partially based on.
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
1 Functional Testing Motivation Example Basic Methods Timing: 30 minutes.
System/Software 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 Testing Black-box Testing Extensions
1 Software Testing (Part-II) Lecture Software Testing Software Testing is the process of finding the bugs in a software. It helps in Verifying and.
TESTING.
Topic 11Summer ICS 52: Introduction to Software Engineering Lecture Notes for Summer Quarter, 2003 Michele Rousseau Topic 11 Partially based on.
Class Specification Implementation Graph By: Njume Njinimbam Chi-Chang Sun.
Introduction Telerik Software Academy Software Quality Assurance.
CMSC 345 Fall 2000 Unit Testing. The testing process.
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.
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
Black-Box Testing Techniques I
Introduction to Software Testing. Types of Software Testing Unit Testing Strategies – Equivalence Class Testing – Boundary Value Testing – Output Testing.
INF 111 / CSE 121: Software Tools and Methods Lecture Notes for Fall Quarter, 2007 Michele Rousseau Set 12 (Some slides adapted from Sommerville 2000 &
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
Unit Testing 101 Black Box v. White Box. Definition of V&V Verification - is the product correct Validation - is it the correct product.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Unit Testing LEVEL GAME.  Create pieces array  Call move or interact  Use getters or return type to verify correct behavior  Test ends (don’t go GameEngine.BOARD_SIZE-1)
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
Software Engineering 2004 Jyrki Nummenmaa 1 BACKGROUND There is no way to generally test programs exhaustively (that is, going through all execution.
CPSC 873 John D. McGregor Session 9 Testing Vocabulary.
SOFTWARE TESTING. INTRODUCTION Testing forms the first step in determining the errors in a program. It is the major quality control measure used during.
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.
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
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.
White-Box Testing Techniques. Definition of White-Box Testing Testing based on analysis of internal logic (design, code, etc.). (But expected results.
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.
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.
Functional testing, Equivalence class testing
Software Testing.
PREPARED BY G.VIJAYA KUMAR ASST.PROFESSOR
Chapter 13 & 14 Software Testing Strategies and Techniques
Informatics 43 – May 3, 2016.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Lecture 09:Software Testing
Static Testing Static testing refers to testing that takes place without Execution - examining and reviewing it. Dynamic Testing Dynamic testing is what.
Software Engineering Lecture #12.
Software testing.
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.
Chapter 1: Boundary Value Testing
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Presentation transcript:

Topic 13Summer ICS 52: Introduction to Software Engineering Lecture Notes for Summer Quarter, 2003 Michele Rousseau Topic 13 Partially based on lecture notes written by Sommerville, Frost, Van Der Hoek, Taylor & Tonne. Duplication of course material for any commercial purpose without the written permission of the lecturers is prohibited

Topic 13Summer Today’s Objectives l Testing continued l How to use a Test Matrix to organize test cases l More examples of test coverage l Formal Specification based testing

Topic 13Summer Recap: Choosing Test Cases l Identify what to test functionality from requirements (black box) classes, methods, statements (white box) l Determine set of all inputs l Identify one or more bases l For each basis, define equivalence partitions l For each eq. partition, choose test cases l Use combinations of eq. partitions when appropriate l For each test input, determine correct output l Use a matrix to organize your test cases Rows: test cases Columns: equivalence partitions

Topic 13Summer Example 1float homeworkAverage(float[] scores) { 2 float min = 99999; 3 float total = 0; 4 for (int i = 0 ; i < scores.length ; i++) { 5 if (scores[i] < min) 6 min = scores[i]; 7 total += scores[i]; 8 } 9 total = total – min; 10 return total / (scores.length – 1); 11}

Topic 13Summer Testing Matrix Test case (input) Basis (subdomain) Equivalence Partitions Expected output Notes

Topic 13Summer Testing Matrix - homeworkAverage 1 Test case (input) Basis: Array length Expected output Notes EmptyOneSmallLarge ()x0.0 (87.3)x87.3 (90,95,85)x92.5 (80,81,82,83, 84,85,86,87, 88,89,90,91) x86.0

Topic 13Summer Testing Matrix - homeworkAverage 2 Test case (input) Basis:Position of minimum Expected output Notes FirstMiddleLast (80,87,88,89)x88.0 (87,88,80,89)x88.0 (99,98,0,97,96)x97.5 (87,88,89,80)x88.0

Topic 13Summer Testing Matrix - homeworkAverage 3 Test case (input) Basis:Number of minimaExpected output Notes OneSeveralAll (80,87,88,89)x88.0 (87,86,86,88)x87.0 (99,98,0,97,0)x73.5 (88,88,88,88)x88.0

Topic 13Summer Security Dialog Example

Topic 13Summer Testing Matrix - Security Dialog 1 Test case (input) Choice of Button (Black Box) Expected output Notes Ok ButtonCancel Button Press Ok x See Security Dialog #2 Enter ID, Press Cancel x Text Boxes are cleared, dialog remains Don’t Enter ID, Press Cancel x Text Boxes are cleared, dialog remains

Topic 13Summer Testing Matrix - Security Dialog 2 Test case (input) Basis: Correctness of Input, with OK Button Press Expected output Notes Valid ID, Correct PW Valid ID, Incorrect PW Invalid. ID. Test1, x Proceed to Main Screen Test1, x Audible Beep, Dialog Remains Tes1, x Audible Beep, Dialog Remains

Topic 13Summer Another Structural Testing Example // In a linked list class Node getSecondElement() { 1 Node head = getHead(); 2 if (head == null) 3 return null; 4 if (head.next == null) 5 return null; 6 return head.next.node; }

Topic 13Summer Basis _______________________Test Case (Input) Expected Output Notes Testing Matrix - getSecondElement (White) All-Statement (white box) null list x x xnull (A  null) x x x x null (A  B  x x x x B null) (A  B  x x x x B C  null)

Topic 13Summer Basis _______________________Test Case (Input) Expected Output Notes Testing Matrix-homeworkAverage 3(White) All statements (White box) 123,4,5,6,7,8,11,4,5,8,11,4,13,14,15 Scores[30,30] x“all scores are the same” 30

Topic 13Summer Test Oracles l Where does “expected output” come from? l Critical to testing l Difficult to create systematically l Typically done with a lot of guesswork great dependence on the intuition of testers l Formal specifications make it possible to automate oracles A test oracle is a mechanism for deciding whether a test case execution failed or succeeded

Topic 13Summer Formal Verification l Techniques for proving consistency between two software descriptions subject to assumptions of proof system only as good as formal specification to prove consistency of specification to prove correctness of implementation does not show other qualities, especially the subjective ones has not been shown to scale up to large-scale software systems only informal techniques for validating against user needs

Topic 13Summer Verification with Formal Specifications

Topic 13Summer Testing with Formal Specifications

Topic 13Summer Specification-based testing should augment implementation-based testing, not replace it Specification-based testing should augment implementation-based testing, not replace it Formal Specification-Based Testing l Formalize functional testing for formal specifications l Extend implementation-based techniques to be applicable to formal specifications l Dependent on the specification language Model-based specifications: test cases selected to structurally cover specification Algebraic specifications: test cases selected to test against axioms or axioms tested by interpretation on test data State-based specifications: test cases selected to cover operations’ state changes

Topic 13Summer Something to think about: Testing Process/Integration l It is generally accepted that no single technique is sufficient to verify and validate software l How do you choose? strengths and weaknesses integration issues incremental issues