Software Quality and Testing CPS 109: Program Design and Construction October 28, 2003.

Slides:



Advertisements
Similar presentations
Testing Relational Database
Advertisements

Black Box Testing Sources: Code Complete, 2 nd Ed., Steve McConnell Software Engineering, 5 th Ed., Roger Pressman Testing Computer Software, 2 nd Ed.,
Lecture 8: Testing, Verification and Validation
Chapter 12 Prototyping and Testing Design of Biomedical Devices and Systems By Paul H. King Richard C. Fries.
DETAILED DESIGN, IMPLEMENTATIONA AND TESTING Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
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.
Software Modeling SWE5441 Lecture 3 Eng. Mohammed Timraz
(ADAPTED FROM DIANE POZEFSKY) Software and System Testing.
15 November Essay 1  Methodologies Points on the spectrum All can adapt to changes Required vs. permitted  Releases vs. iterations  Spool’s.
Chapter 9 Testing the System, part 2. Testing  Unit testing White (glass) box Code walkthroughs and inspections  Integration testing Bottom-up Top-down.
March 30, Exploratory Testing Testing Approaches Analytical Information-driven Intuitive Exploratory Design the tests and test concurrently Learn.
Requirements - Why What and How? Sriram Mohan. Outline Why ? What ? How ?
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
March 16, Calendar Next week: Thursday meeting instead of Tuesday (May 25) Web update later today.
OHT 9.1 Galin, SQA from theory to implementation © Pearson Education Limited 2004 Chapter 9.3 Software Testing Strategies.
Chapter 11: Testing The dynamic verification of the behavior of a program on a finite set of test cases, suitable selected from the usually infinite execution.
1 Functional Testing Motivation Example Basic Methods Timing: 30 minutes.
TEST CASE DESIGN Prepared by: Fatih Kızkun. OUTLINE Introduction –Importance of Test –Essential Test Case Development A Variety of Test Methods –Risk.
University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec22 1 Lecture 22: Software Measurement Basics of software measurement.
© 2012 IBM Corporation Rational Insight | Back to Basis Series Chao Zhang Unit Testing.
CPIS 357 Software Quality & Testing
CMSC 345 Fall 2000 Unit Testing. The testing process.
Business Analysis and Essential Competencies
CS 360 Lecture 3.  The software process is a structured set of activities required to develop a software system.  Fundamental Assumption:  Good software.
Chapter 8 – Software Testing Lecture 1 1Chapter 8 Software testing The bearing of a child takes nine months, no matter how many women are assigned. Many.
1 Software testing. 2 Testing Objectives Testing is a process of executing a program with the intent of finding an error. A good test case is in that.
 CS 5380 Software Engineering Chapter 8 Testing.
March 25, Announcements Friday – recruiting event 12-6 Dean Smith Center Bloomberg LP, New York City full-time positions and summer internships.
Testing Workflow In the Unified Process and Agile/Scrum processes.
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
Introduction to Software Testing. Types of Software Testing Unit Testing Strategies – Equivalence Class Testing – Boundary Value Testing – Output Testing.
16 October Reminder Types of Testing: Purpose  Functional testing  Usability testing  Conformance testing  Performance testing  Acceptance.
NIST (2002) cost to US $59B annual Why do we care?  Therac-25 (1985) 6 massive radiation overdoses  Multiple space fiascos (1990s) Ariane V exploded.
18 October Why do we care?  Therac-25 (1985) 6 massive radiation overdoses  Multiple space fiascos (1990s) Ariane V exploded after 40 seconds.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Chapter 8 Lecture 1 Software Testing. Program testing Testing is intended to show that a program does what it is intended to do and to discover program.
Testing. Today’s Topics Why Testing? Basic Definitions Kinds of Testing Test-driven Development Code Reviews (not testing) 1.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Software Quality Assurance and Testing Fazal Rehman Shamil.
29 March Software Quality and Testing. Why do we care? Therac-25 (1985) Multiple space fiascos (1990s) Ariane V exploded after 40 seconds (conversion)
1 Object-Oriented Analysis and Design with the Unified Process Figure 13-1 Implementation discipline activities.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Software Development Process CS 360 Lecture 3. Software Process The software process is a structured set of activities required to develop a software.
Lecturer: Eng. Mohamed Adam Isak PH.D Researcher in CS M.Sc. and B.Sc. of Information Technology Engineering, Lecturer in University of Somalia and Mogadishu.
Copyright 2015, Robert W. Hasker. Classic Model Gathering Requirements Specification Scenarios Sequences Design Architecture Class, state models Implementation.
Introduction to Software Testing Maili Markvardt.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Testing Integral part of the software development process.
Test Plans Test Driven Development – Unit test plan first Code coverage Automated Regression built as you go Debug is easier Serves as system doc – Still.
Dynamic Black-Box Testing Part 1 What is dynamic black-box testing? How to reduce the number of test cases using: Equivalence partitioning Boundary value.
 System Requirement Specification and System Planning.
Why is Design so Difficult? Analysis: Focuses on the application domain Design: Focuses on the solution domain –The solution domain is changing very rapidly.
ISQB Software Testing Section Meeting 10 Dec 2012.
Prepared by: Fatih Kızkun
TQS - Teste e Qualidade de Software (Software Testing and Quality) Software Testing Concepts João Pascoal Faria
PREPARED BY G.VIJAYA KUMAR ASST.PROFESSOR
Regression Testing with its types
Software Testing.
Software Engineering (CSI 321)
Chapter 13 & 14 Software Testing Strategies and Techniques
Introduction to Software Testing
Testing and Test-Driven Development CSC 4700 Software Engineering
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 Testing “If you can’t test it, you can’t design it”
Chapter 7 Software Testing.
Overview Activities from additional UP disciplines are needed to bring a system into being Implementation Testing Deployment Configuration and change management.
Chapter 10: Testing and Quality Assurance
Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Presentation transcript:

Software Quality and Testing CPS 109: Program Design and Construction October 28, 2003

Why do we care? Therac-25 (1985) Patriot missile (1991) Ariane V (1996) Millenium bug (2000) Microsoft attacks (2003) NIST: cost to US, $59 billion

Quality and testing “Errors should be found and fixed as close to their place of origin as possible.” Fagan “Trying to improve quality by increasing testing is like trying to lose weight by weighing yourself more often.” t McConnell

Life Testing Used regularly in hardware Addresses “normal use” n specimens put to test Test until r failures have been observed Choose n and r to obtain the desired statistical errors As r and n increase, statistical errors decrease Expected time in test = mu 0 (r / n) Where mu 0 = mean failure time

Butler and Finelli “The Infeasibility of Experimental Quantification of Life-Critical Software Reliability” In order to establish that the probability of failure of software is less than in 10 hours, testing required with one computer is greater than 1 million years

Tools for Improving Quality Formal specification Self-checking (paranoid) code Program verification and validation Testing Deploy with capabilities to repair

Types of Testing: Purpose Conformance testing Usability testing Performance testing Acceptance testing Reliability testing …

Other classifications Scope Unit, component, system, regression, … Access to code Black box vs. white box (Note that black box testing still assumes knowledge of coding and development in general)

What are you trying to test? Most common actions? Most likely problem areas? Risk-based testing

Risks Identify criteria of concern: availability, quality, performance, … Risk of it not being met likelihood consequences If I’m testing code for a grocery store, what is the impact of the code not being highly available?

Risk Heuristics (just a few) New features New technology Overworked developers Regression Dependencies Complexity Bug history Language specific bugs Environment changes Late changes Slipped in “pet” features Ambiguity Changing requirements Bad publicity Liability Learning curve Criticality Popularity

Who should test code? Unit test is always done by developer Different views on system test Build to test Test-driven development Completely independent Acceptance testing Middle-of-the-road

Four Parts of Testing Model Select test cases Execute test cases Measure

Model

Basic Software Model capabilities environment User interfaces APIs Operating system Files Input Output Storage Processing

Test Case Selection

From the User Interface: Inputs Error messages Default values Character sets and data types Overflow input buffers Input interactions Repeated inputs

From the User Interface: Outputs Concept: What inputs create interesting outputs? REQUIRES DOMAIN EXPERTISE State-based outputs Invalid outputs Changeable outputs Screen refreshes

Bubble diagrams: Reverse state exploration Define a failure state What would have happened to get you there? Repeat Find a way to force it down that path Let’s try it: BMW key fobs

Capabilities – Storage and Processing Same input, different initial conditions Too many or too few values in a data structure Alternative ways to modify constraints Invalid operator/operand combinations Recursive functions Overflow/underflow computations Feature interaction

How to select specific cases Data based Boundary conditions Equivalence classes Control based State transitions

Execution

Execution tools Automation – often primarily scripts Critical for regression testing GUI tools are abundant, but marginal

Measurement

Test Coverage Metrics Statement coverage basic block coverage Decision coverage Each Boolean expression Condition coverage Each entity in Boolean expressions Path coverage loops Advantages of different models?

Estimating how many bugs are left Historical data Capture-recapture model from biology

A variant: exploratory testing

Testing Approaches Analytical Information-driven Intuitive Exploratory Design the tests and test concurrently Learn the system and test it as you go Structure creative testing Think while testing Risk-based Analogous to Extreme Programming

Exploratory Testing Tasks Explore Elements of the product How the product should work Design Tests Which elements Speculate on possible quality problems Execute Tests Observe behavior Evaluate against expectations All with test design techniques best suited for the product

Exploratory Testing Practice Used to probe for weak areas Especially useful when Weak specifications and requirements Little domain knowledge Time pressures Less appropriate when Well-defined test requirements Strong need for regression testing Repeatable over releases Cost of maintenance Few new test cases

Planning Decompose the product into elements Areas of function that you can test in 1-2 days Define charters Decomposition into units that can be tested in 1-2 hours Quality criteria Capability, reliability, usability, performance, installability, compatibility, … Select test techniques

Charter Provides clear mission of why this test Suggests what and how it should be tested, as well as problems to look for Not a detailed plan, but should be as specific as possible Might include risks, documents and desired output

References Whittaker, How to Break Software Kaner, The Impossibility of Complete Testing at (Articles)

References Therac-25: 25/Therac_1.html 25/Therac_1.html Patriot missile: 6.htm Ariane 5: _p_EN.html _p_EN.html NIST: ofc/report02-3.pdf