Software Testing: Introduction Iain McCowatt imccowatt.

Slides:



Advertisements
Similar presentations
Verification and Validation
Advertisements

Software Testing: Test Design Iain McCowatt imccowatt.
Software Process Models
Software Engineering-II Sir zubair sajid. What’s the difference? Verification – Are you building the product right? – Software must conform to its specification.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
The Process of Interaction Design. Overview What is Interaction Design? —Four basic activities —Three key characteristics Some practical issues —Who are.
The Process of Interaction Design
Software Testing. Overview Definition of Software Testing Problems with Testing Benefits of Testing Effective Methods for Testing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
The Process of Interaction Design. What is Interaction Design? It is a process: — a goal-directed problem solving activity informed by intended use, target.
Testing an individual module
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
1 User Interface Design CIS 375 Bruce R. Maxim UM-Dearborn.
Verification and Validation
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
Software Testing: Bug Reporting Iain McCowatt imccowatt.
1CMSC 345, Version 4/04 Verification and Validation Reference: Software Engineering, Ian Sommerville, 6th edition, Chapter 19.
Emotions and Oracles Michael Bolton
CompSci 230 Software Design and Construction
Test and Verification Solutions116 th April 2010 Silicon South West, “Testing Times” The Economics of Verification Mike Bartley, TVS.
Test Design Techniques
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Verification and Validation Yonsei University 2 nd Semester, 2014 Sanghyun Park.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
Introduction Telerik Software Academy Software Quality Assurance.
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.
Black Box Software Testing Copyright © Cem Kaner & James Bach 1 Black Box Software Testing Fall 2005 Overview—Part 2 (Mission of Testing) Cem Kaner,
1 Introduction to Software Engineering Lecture 1.
Gary MarsdenSlide 1University of Cape Town Human-Computer Interaction - 4 User Centred Design Gary Marsden ( ) July 2002.
Session # Rational User Conference 2002 Author Note: To edit Session # go to: View/Master/Title Master ©1998, 1999, 2000, 2001, 2002 Rational Software.
Chapter 1: Fundamental of Testing Systems Testing & Evaluation (MNN1063)
Software Engineering Lecture # 1.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Software Testing. System/Software Testing Error detection and removal determine level of reliability well-planned procedure - Test Cases done by independent.
Requirement engineering & Requirement tasks/Management. 1Prepared By:Jay A.Dave.
Dynamic Testing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
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.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Testing Integral part of the software development process.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVII. Verification and Validation.
CX Introduction to Web Programming Testing.
Introduction to Software Quality Assurance & Testing
Dr. Rozmie Razif bin Othman
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
Module A Fundamentals of Testing
CSC 480 Software Engineering
Software Testing An Introduction.
Build vs. Buy WSATA Panel Discussion
Verification & Validation
Verification and Validation
Verification and Validation
Introduction to Software Testing
A test technique is a recipe these tasks that will reveal something
Fundamental Test Process
Software testing.
Introducing ISTQB Agile Foundation Extending the ISTQB Program’s Support Further Presented by Rex Black, CTAL Copyright © 2014 ASTQB 1.
CS240: Advanced Programming Concepts
Unit 1 :Basic Of Software Testing
Software Testing “If you can’t test it, you can’t design it”
Applying Use Cases (Chapters 25,26)
Applying Use Cases (Chapters 25,26)
THE PROCESS OF INTERACTION DESIGN
Chapter 7 Software Testing.
SIMULATION IN THE FINANCE INDUSTRY BY HARESH JANI
Presentation transcript:

Software Testing: Introduction Iain McCowatt imccowatt

Who am I? – A Software Testing Consultant – Designing testing services for several global banks Where seemingly innocuous bugs can destroy millions of dollars Who are you? – What do you know about testing? Introductions

Definitions: Quality What is “Quality”?

Definitions: Quality Gerald Weinberg: “value to some person” Quality is subjective: – It only exists in relation to peoples perceptions – Those perceptions may vary – Often it relates to the fulfillment of some (persons) need, or the value (to someone) attained through providing a solution to a problem

Definitions: Bugs What is a “bug”?

Definitions: Bugs Bolton & Bach: “something that bugs somebody who matters” Kaner & Bach: “anything that causes an unnecessary or unreasonable reduction of the quality of a software product” A bug is a relationship between a person and a software product: – If it reduces value to someone then it is a bug

Interlude: Requirements? But what about requirements? Aren’t bugs simply cases where requirements have not been fulfilled?

Interlude: Requirements? What is this?

Interlude: Requirements? What is this?

Interlude: Requirements? What is this?

Interlude: Requirements? What is this? Ce ne sont pas les requises.

Interlude: Requirements? What are requirements? – An abstraction – A flawed representation of a someone’s flawed mental model as to a solution to some problem – Where that problem is not necessarily understood yet, and may have been articulated (another flawed representation of a flawed mental model) by someone else

Interlude: Requirements? Relying on requirements will miss important problems: – Unfulfilled needs? – Unexpected behaviour? – Undesired behaviour? Conformance with specification has little value if the software solves the wrong problem See “Spec Checking and Bug Blindness”, Iain McCowatt:

Exercise Start MS Excel, or Calc etc. Explore the font size feature – How many tests can you think of? – Can you find any bugs?

Exercise What kinds of tests did you think of? – Different input methods – Boundaries – Rounding logic – Transitions – Feature interaction and other combinations There are a very large number of potential tests Can you test this feature in its entirety?

Exhaustive Testing Consider this example: – In this trivial program, there are 5 paths from A to B. – The code may loop up to 20 times before exiting. – There are therefore approximately 120 trillion unique paths through this program. At 5 minutes per test case that’s over 1 billion years of effort, even with automation this is impossible. – Yet certain types of bug (e.g. resource leaks) are prevalent in such scenarios B C A D I E FGH Loop up to 20 times

Exhaustive Testing Exhaustive testing is impossible To “test everything” we would have to: – Test every possible value of every input and output variable, and every possible combination of every variable – Test every possible INVALID value of every input and output variable, and the associated error handling – Test every possible path through the code – Test every possible event, combination of events, including timing, overlaps and sequencing – Test every possible software configuration, hardware configuration and combination of hardware / software configurations – Etc.

Exhaustive Testing Testing can prove the presence but not absence of defects: – As exhaustive testing is impossible, it is impossible to find all the defects – As it is impossible to find all the defects, it is impossible to prove that the software “works” To quote Einstein: – “No amount of experimentation can ever prove me right, a single experiment can prove me wrong”

Definitions: Testing If we can’t prove that it works, why do we test software? What is testing anyway?

Definitions: Testing Cem Kaner: “Software Testing is an empirical technical investigation conducted to provide stakeholders with information about the quality of the product or service under test” In other words, a test is an experiment designed to reveal information about software quality

The Mission of Testing If we can’t prove that it works, why do we test software? Possible missions might include: – Find the important bugs – Help make release decisions – Identify issues and workarounds to help reduce support costs – Identify safe usage scenarios – Discover product behaviour in certain scenarios – Assess compliance vs. regulations, standards, specifications – Demonstrate compliance to reduce liability – Reverse engineer an existing solution – Etc.

The Mission of Testing Each of these missions relates to providing information, and will vary depending on context Testing is context dependant – Would you test the autopilot of an airliner in the same way as website? “There are good practices in context, but there are no best practices” - Cem Kaner, James Bach

Context A variety of factors will affect selection of practices: – Degree and type of risk, e.g. safety critical, financial impact, time to market, reputational risk – Degree of solution complexity, e.g. system of systems – Degree of project complexity, e.g. team composition, contractual factors, geographic factors – Development lifecycle / methodology, e.g. Waterfall vs. Iterative – Nature of solution, e.g. COTS vs. new development – Constraints, e.g. time, cost, available skills – Compliance requirements; legislative / regulatory, standards, policy, process & procedure – Available information; requirements, design, models – Team dynamics; collaboration, access to stakeholders, developers, analysts, architects etc. – Target customers / users, and the degree to which their needs are understood

Exercise Back to MS Excel, or Calc etc. Explore the font size feature – How do you know the result of using this feature (i.e. the resulting font size) is “right”? – How would you test this?

Oracles Testing is often viewed as checking actual results vs. expected results Under this view, an oracle is a reference function or other model that enables you to determine expected results This is problematic: – Does such a function exist? – Is it feasible to create such a function? – Does the function factor all conditions that might affect the outcome of a test? – Can the function be considered “right” in all cases that matter?

Oracles An alternate view (Kaner, Bach): – “It works” really means “It appears to meet some requirement to some degree” – An oracle is a heuristic principle or mechanism by which you recognize a potential problem ALL oracles are heuristic, that is to say fallible but possibly useful An oracle does not need to be complete or infallible to be useful Even without a formal oracle, it is possible to test (see assigned reading).

Summary Quality is value to some person, and a bug is a relationship between some person and the software product Exhaustive or “complete” testing is impossible A test is an experiment designed to reveal information about software quality Our specific information objectives, and therefore the practices we adopt, are driven by project context All oracles are heuristic, and testing is not simply a matter of checking vs. expected results Testing is an intractable problem for which there is no correct or optimal solution

Readings and Preparation for Next Week Assigned reading: on heuristic oracles: TestingWithoutAMap.pdf TestingWithoutAMap.pdf Next week we will be discussing Test Management You should already be familiar with the Heuristic Test Strategy Model from your assignment. If you have not started this yes, please familiarize yourself with it: 1.pdf 1.pdf

Further Information Much of the content of this lecture has been inspired or derived from the Black Box Software Testing (BBST) series of courses by Kaner, Bach and others: Additional information, such as video lectures, exercises and readings are available from: –