1/38 2013 REU Program at ECU Software Testing - Foundations, Tools, and Applications Lecture 1 May 21, 2013 Introduction to Software Testing Dr. Sergiy.

Slides:



Advertisements
Similar presentations
Testing Relational Database
Advertisements

Test process essentials Riitta Viitamäki,
Testing and Quality Assurance
OHT 2.1 Galin, SQA from theory to implementation © Pearson Education Limited 2004 Software Quality assurance (SQA) SWE 333 Dr Khalid Alnafjan
Chapter 4 Quality Assurance in Context
1. Software in our lives, then and now  Medical (processing and analysis, Computer Aided Surgery, other various equipment)  Financial and business (banking,
Basic Concepts Snejina Lazarova Senior QA Engineer, Team Lead CRMTeam Dimo Mitev Senior QA Engineer, Team Lead SystemIntegrationTeam Telerik QA Academy.
Syllabus Case Histories WW III Almost Medical Killing Machine
WHY THEY FAILED AND LESSONS TO BE DRAWN Samuel Franklin G53QAT: Quality Assurance and Testing Famous Software Failures.
Software Engineering Disasters
Testing & Debugging CSC 171 FALL 2004 LECTURE 13.
Software Quality Assurance Inspection by Ross Simmerman Software developers follow a method of software quality assurance and try to eliminate bugs prior.
1 Basic Definitions: Testing What is software testing? Running a program In order to find faults a.k.a. defects a.k.a. errors a.k.a. flaws a.k.a. faults.
Software Testing. Overview Definition of Software Testing Problems with Testing Benefits of Testing Effective Methods for Testing.
1 Software Testing and Quality Assurance Lecture 1 Software Verification & Validation.
Swami NatarajanJuly 14, 2015 RIT Software Engineering Reliability: Introduction.
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.
Introduction to Software Testing
Software Verification and Validation (V&V) By Roger U. Fujii Presented by Donovan Faustino.
Test Design Techniques
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
CS527: (Advanced) Topics in Software Engineering Overview of Software Quality Assurance Tao Xie ©D. Marinov, T. Xie.
1/ REU Program at ECU Software Testing - Foundations, Tools, and Applications Lecture 1 May 27, 2014 Introduction to Software Testing Dr. Sergiy.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
System/Software Testing
Dr Andy Brooks1 FOR0383 Software Quality Assurance Lecture 1 Introduction Forkröfur/prerequisite: FOR0283 Programming II Website:
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
March 13, 2001CSci Clark University1 CSci 250 Software Design & Development Lecture #15 Tuesday, March 13, 2001.
Chapter 1: Introduction to Software Testing Software Testing
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
Objectives Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Explore.
Software Engineering Chapter 23 Software Testing Ku-Yaw Chang Assistant Professor Department of Computer Science and Information.
Software Metrics - Data Collection What is good data? Are they correct? Are they accurate? Are they appropriately precise? Are they consist? Are they associated.
Verification and Validation Overview References: Shach, Object Oriented and Classical Software Engineering Pressman, Software Engineering: a Practitioner’s.
Lecture 11 Testing and Debugging SFDV Principles of Information Systems.
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
Software Testing Testing types Testing strategy Testing principles.
INVARIANTS EEN 417 Fall When is a Design of a System “Correct”? A design is correct when it meets its specification (requirements) in its operating.
(1) A beginners guide to testing Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu.
Software Defects.
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.
Advanced Software Engineering: Software Testing COMP 3702 (Lecture1) Sada Narayanappa Seif Azgandhi Anneliese Andrews Thomas Thelin Carina Andersson.
SEN 460 Software Quality Assurance. Bahria University Karachi Campus Waseem Akhtar Mufti B.E(UIT), M.S(S.E) AAU Denmark Assistant Professor Department.
CPSC 873 John D. McGregor Session 9 Testing Vocabulary.
Chapter 1: Fundamental of Testing Systems Testing & Evaluation (MNN1063)
1 Software Quality Assurance COMP 4004 Notes Adapted from S. Som é, A. Williams.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Approaches to ---Testing Software Some of us “hope” that our software works as opposed to “ensuring” that our software works? Why? Just foolish Lazy Believe.
CPSC 871 John D. McGregor Module 8 Session 1 Testing.
Software Quality Assurance and Testing Fazal Rehman Shamil.
 Software Testing Software Testing  Characteristics of Testable Software Characteristics of Testable Software  A Testing Life Cycle A Testing Life.
Workshop on Integrating Software Testing into Programming Courses (WISTPC14:2) Friday July 18, 2014 Introduction to Software Testing.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
SOFTWARE TESTING SOFTWARE TESTING Presented By, C.Jackulin Sugirtha-10mx15 R.Jeyaramar-10mx17K.Kanagalakshmi-10mx20J.A.Linda-10mx25P.B.Vahedha-10mx53.
Introduction to Software Testing Maili Markvardt.
CS223: Software Engineering Lecture 25: Software Testing.
Testing Integral part of the software development process.
1 Advanced Computer Programming Project Management: Basics Copyright © Texas Education Agency, 2013.
CPSC 372 John D. McGregor Module 8 Session 1 Testing.
SOFTWARE FAILURES.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVIII. Software Testing.
Software Testing Introduction CS 4501 / 6501 Software Testing
Software Testing An Introduction.
Verification and Testing
Verification and Validation Overview
ECE 103 Engineering Programming Chapter 2 SW Disasters
UNIT-1 SOFTWARE TESTING FUNDAMENTALS
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
© Oxford University Press All rights reserved.
Software Engineering Disasters
Presentation transcript:

1/ REU Program at ECU Software Testing - Foundations, Tools, and Applications Lecture 1 May 21, 2013 Introduction to Software Testing Dr. Sergiy Vilkomir

2/38 Dr. Sergiy Vilkomir Instructor’s office: S & T Building, C

3/38 Software life cycle concept requirements design implementation (coding) testing installation operation and maintenance testing Is testing important ?

4/38 Software Errors Software errors can be found and eliminated during software testing “Software bugs, or errors, are so prevalent and so detrimental that they cost the U.S. economy an estimated $59.5 billion annually, or about 0.6 percent of the gross domestic product, according to a newly released study commissioned by the Department of Commerce's National Institute of Standards and Technology (NIST)”. (NIST News, June 38, 2002 )

5/38 Software Errors Buggy Software May Have Crashed Mars Polar Lander (March 2000) The software problem crashed the Mars Polar Lander into the Red Planet’s frozen ground The most likely cause of the lander’s failure, investigators decided, was that a spurious sensor signal associated with the craft’s legs falsely indicated that the craft had touched down when in fact it was some 130-feet (40 meters) above the surface. This caused the descent engines to shut down prematurely and the lander to free fall out of the martian sky. The error was traced to a single bad line of software code.

Causes of software defects Software Bugs with Fatal Consequences few patients were killed in a hospital in USA because the medicine dose was calculated wrongly (software bugs in Therac-25 treatment machine lead to radiation overdoses, approximately 100 times the intended dose). 6/38

7/38

Causes of software defects In1996 the Ariane 5 rocket of the European space agency was destroyed because they used the software from Ariane 4 rocket (was self-destroyed 40 seconds after takeoff; more than $370 million was lost ). 8/38

Causes of software defects Software Bugs with Fatal Consequences In 1962 NASA lost their 80 Million Dollar "Mariner 1" because of a missing "hyphen" in the program code. 9/38

Causes of software defects Software Bugs with Fatal Consequences During the Gulf War in February, 1991, a Patriot missile system operating in Dhahran, Saudi Arabia, failed to track and intercept an incoming Scud. The Iraqi missile impacted into an army barracks, killing 38 U.S. soldiers and injuring another /38 The cause of the missile system failing to defend against the incoming Scud was traced back to a bug in Patriot’s radar and tracking software. The bug occurs in the calculation of the next location of the incoming target. That modified software reached Dhahran the day after the attack.

Computers and Software Errors 11/38 On Tuesday, June 3, 1980, at 1:26 a.m., the display system at the command post of the Strategic Air Command (SAC) near Omaha, Nebraska, indicated that two submarine-launched ballistic missiles (SLBMs) were headed toward the United States. The SAC duty controller directed all alert crews to move to their B- 52 bombers and to start their engines Land-based missile crews were put on a higher state of alert, and battle-control aircraft prepared for flight Fortunately, there were a number of factors which made those involved in the assessment doubt that an actual attack was underway The cause of these incidents was eventually traced to the failure of a single integrated circuit chip in a computer which was part of a communication system

Causes of software defects Software Bugs with Fatal Consequences Software bugs in a Soviet early-warning monitoring system nearly brought on nuclear war in The software was supposed to filter out false missile detections caused by Soviet satellites picking up sunlight reflections off cloud-tops, but failed to do so. Disaster was averted when a Soviet commander, based on what he said was a '...funny feeling in my gut', decided the apparent missile attack was a false alarm. The filtering software code was rewritten. 12/38

Software Errors 13/38 Investigation found that the satellite in question had picked up the sun's reflection off the cloud tops and somehow interpreted that as a missile launch.

CNN Money - August 9, 2012 In less than an hour, Knight Capital's computers executed a series of automatic orders that were supposed to be spread out over a period of days. Millions of shares changed hands. The resulting loss, which was nearly four times the company's 2011 profit, crippled the firm and brought it to the edge of bankruptcy. 14/38 Computer glitch that set fire to $440 million of Knight Capital Group's funds

Top Software Failures Of 2011 (from 1.Financial services giant fined $25 million for hiding software glitch that cost investors $217 million 2.Computer system bugs cause Asian banking facilities’ downtime 3.Cash machine bug benefits customers by giving them extra money 4.22 people wrongly arrested in Australia due to failures in new NZ $54.5 million courts computer system 5.38,380 cars recalled after airbag-related software glitch 15/38

Top Software Failures Of 2011 (from Conclusions Software failures are costing companies and consumers large amounts of money The worst software failures have damaged reputations, impacted negatively on financials and caused stress to users. Each of the top 2011 software failure examples could easily have been avoided through an effective quality management and proper software testing 16/38

17/38 Software testing Software errors can be found during software testing Testing can help but it is not for free The cost of software testing could be around 40% of the overall costs of software development

18/38 Terminology Software testing Error Fault Failure Input domain Oracle Regression testing Unit testing Functional testing Verification Validation V&V

19/38 Terminology Unfortunately, SE terminology in textbooks is often contradictory Two different textbooks could provide two different definitions for the same term What to do in this situation? Solution: use terminology from standards

20/38 IEEE (Institute of Electrical and Electronics Engineers) standard IEEE Std IEEE Standard Glossary of Software Engineering Terminology

21/38 New standard IEEE Std has not been updated for many years Some terms are obsolete Instead: ISO/IEC/IEEE 24765:2010 “Systems and software engineering – Vocabulary”

22/38  S. Vilkomir, 2010 From IEEE Std testing - the process of operating a system or component under specified conditions, observing or recording the results, and making an evaluation of some aspect of the system or component Contrast with: Static Analysis, Inspection

23/38  S. Vilkomir, 2010 From IEEE Std Static Analysis - the process of evaluating a system or component based on its form, structure, content, or documentation. Inspection - a static analysis technique that relies on visual examination of development products to detect errors, violations of development standards, and other problems.

24/38  S. Vilkomir, 2010 From IEEE Std Fault - an incorrect step, process, or data definition in a computer program. Note: In common usage, the terms "error" and "bug" are used to express this meaning. Failure - the inability of a system or component to perform its required functions within specified performance requirements. The result of the fault.

25/38  S. Vilkomir, 2010 From IEEE Std test case - a set of test inputs, execution conditions, and expected results developed for a particular objective, such as to exercise a particular program path or to verify compliance with a specific requirement.

26/38  S. Vilkomir, 2010 Input domain – the set of all possible inputs to a program test oracle - a source to determine expected results to compare with the actual result of the software under test. An oracle may be the existing system (for a benchmark), a user manual, or an individual’s specialized knowledge, but should not be the code

27/38 Y= a X + b – it is very easy to determine expected results expected results ?

28 Goal of software testing Test case that did not find an error Test case that discovered a new error - successful Increasing the quality and reliability of the program after removing the error Increasing our confidence on the quality and reliability of the program

29 Goal of software testing Dual Goal To find undiscovered errors AND to get confidence on the quality and reliability of the program

30 Lifecycle phase in which testing takes place © Aditya P. Mathur 2005

31 From IEEE Std black-box testing -Testing that ignores the internal mechanism of a system or component and focuses solely on the outputs generated in response to selected inputs and execution conditions. Syn:. functional testing Contrast with: structural testing. white-box testing -Testing that takes into account the internal mechanism of a system or component. Types include branch testing, path testing, statement testing. Syn: structural testing, glass-box testing Contrast with: functional testing

Is testing always done in the same way? Types of softwareConsequences of defects Program A Program B Program C Program D Safety-critical software Personal software Company’s internal software Commercial software internal problems nothing serious financial losses, damaged reputation loss of human life 32/38

Testing is done differently in different contexts. –Type of software –Recourses (constraints): human recourses, financial recourses, time –Regulatory requirements Conclusion: testing is context dependent 33/38

Causes of software defects Human mistake (error) Defect (bug, fault) in software Failure during software execution 34/38

How much testing is enough? Exhaustive testing is impossible Testing everything (all combinations of inputs and preconditions) is not feasible Example: The exam has 30 questions and four possible answers for each question. What is a number of all possible combinations of answers? If we can test 1000 combinations per second, how long will we test all combinations? (An hour? A day? A month?) Total number of combinations: 4  4  4  ….  4= 4 30  times 1 year  sec. We need  years for testing 35/38

How much testing is enough? Not possible to say in general Depends on each specific situation Pressures on a project include time and budget Risk assessment to decide how much testing to do. Important: prioritization (do the most important tests first) setting criteria when to stop testing Take into account technical and business risk Take into account project constraints. 36/38

Testing principles Testing shows presence of defects Testing can show that defects are present, but cannot prove that there are no defects. Testing reduces the probability of undiscovered defects remaining in the software but, even if no defects are found, it is not a proof of correctness 37/38 “Program testing can be used to show the presence of bugs, but never to show their absence!” 1970, famous quote of ?

Testing principles Testing shows presence of defects 38/38 “Program testing can be used to show the presence of bugs, but never to show their absence!” 1970, famous quote of Dijkstra Edsger Dijkstra (1930 – 2002) was a Dutch computer scientist. Winner of the 1972 Turing Award; creator of "structured programming."