Testing software Team Software Development Project.

Slides:



Advertisements
Similar presentations
Lecture 2: testing Book: Chapter 9 What is testing? Testing is not showing that there are no errors in the program. Testing cannot show that the program.
Advertisements

Defect testing Objectives
Test process essentials Riitta Viitamäki,
1 Software Engineering Lecture 11 Software Testing.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
1 CODE TESTING Principles and Alternatives. 2 Testing - Basics goal - find errors –focus is the source code (executable system) –test team wants to achieve.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Software Engineering Module 1 -Components Teaching unit 3 – Advanced development Ernesto Damiani University of Bozen- Bolzano Lesson 4 – Software Testing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
16/27/2015 3:38 AM6/27/2015 3:38 AM6/27/2015 3:38 AMTesting and Debugging Testing The process of verifying the software performs to the specifications.
Testing an individual module
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
Copyright by Scott GrissomCh 1 Software Development Slide 1 Software Development The process of developing large software projects Different Approaches.
Software Testing Prasad G.
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 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
System/Software Testing
Extreme Programming Software Development Written by Sanjay Kumar.
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
1 Shawlands Academy Higher Computing Software Development Unit.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
TESTING.
Objectives Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Explore.
CMSC 345 Fall 2000 Unit Testing. The testing process.
1 Testing Course notes for CEN Outline  Introduction:  terminology and philosophy  Factors that influence testing  Testing techniques.
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.
Vladimir Misic: Design111:43:34 AM Software design.
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
Testing -- Part II. Testing The role of testing is to: w Locate errors that can then be fixed to produce a more reliable product w Design tests that systematically.
Test Coverage CS-300 Fall 2005 Supreeth Venkataraman.
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.
Software Construction Lecture 18 Software Testing.
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.
The Software Development Process
Software Engineering 2004 Jyrki Nummenmaa 1 BACKGROUND There is no way to generally test programs exhaustively (that is, going through all execution.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
CS451 Lecture 10: Software Testing Yugi Lee STB #555 (816)
Chapter 1 Software Engineering Principles. Problem analysis Requirements elicitation Software specification High- and low-level design Implementation.
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.
Dynamic Testing.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
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.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Week # 4 Quality Assurance Software Quality Engineering 1.
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.
Software Testing. SE, Testing, Hans van Vliet, © Nasty question  Suppose you are being asked to lead the team to test the software that controls.
Defect testing Testing programs to establish the presence of system defects.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
Testing Integral part of the software development process.
Software Testing.
SOFTWARE TESTING OVERVIEW
Software Engineering (CSI 321)
CompSci 230 Software Construction
Types of Testing Visit to more Learning Resources.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Software testing strategies 2
Lecture 09:Software Testing
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.
© Oxford University Press All rights reserved.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Presentation transcript:

Testing software Team Software Development Project

21/11/20152 Why testing ? Would you trust a completely automated nuclear power plant ? Would you trust a completely automated pilot whose software was written by yourself ? What if it was written by your class ? Would you dare to write an expert system to diagnose cancer. What if you are personally held liable in cases where a patient dies because of a malfunction of the software? All software has faults!

21/11/20153 Poor testing can cost lives 1. The Mars Climate Orbiter crashed in September 1999 because of a "silly mistake": wrong units in a program. 2. The 1988 shooting down of the Airbus 320 by the USS Vincennes was attributed to the cryptic and misleading output displayed by the tracking software. 3. Several deaths of cancer patients were due to overdoses of radiation resulting from a race condition between concurrent tasks in the Therac-25 software. 4. A 2008 Quantas Flight suddenly has to make an emergency landing due to a bug in the autopilot system – resulting in 115 injuries (See for more)

21/11/20154 Why testing ? “Perfect" software doesn't exist All released software is imperfect Software is complex & software engineering is an immature field 60% of errors introduced during design, 40% during implementation Cost of error-correction goes up with life cycle stage 2/3 of design errors are discovered when the software is operational. Testing identifies failures and faults in the software

Some testing principles A programmer should not test his/her own program. One should test not only that the program does what it is supposed to do, but that it does not do what it is not supposed to. No amount of testing can guarantee error-free program. Parts of programs where a lot of errors have already been found are a good place to look for more errors. The goal is not to embarrass the programmer!

Before testing starts: Inspections and Walkthroughs Inspections and walkthroughs should be carried out throughout the development process. Done by a team of people. Performed at a meeting The programmer explains the program line by line. Questions are raised. Can find 30%-70% of errors. NB: Extreme programming uses pair programming to build this into the core development process

Checklist for inspections Data declaration All variables declared? Default values understood? Arrays and strings initialized? Variables with similar names? Correct initialization? Control flow Each loop terminates? Are errors handled? Input/output Format specification correct? Are invalid inputs handled?

21/11/20158 Types of tests requirements Analysis Design Implementation Acceptance Test System Test Integration Test Unit Test Each phase of the development life-cycle must be tested Mostly requires small test programmes to be written More likely to be GUI based

21/11/20159 Test strategies Testing only shows the presence or errors, not the absence. Exhaustive testing is impossible with most software test all valid inputs test all invalid inputs test all edited inputs test all variations on input timing Proving program correctness is almost impossible with most software There need to balance the level of certainty of correctness against cost and impact of faults.

21/11/ Classification of test techniques According to the criterion to measure the adequacy of the set of test cases: Coverage based testing Fault-based testing Error-based testing Based on the source of information used to derive test cases Black Box Testing (functional, specification-based) White Box Testing (structural, program-based) All tests require a clear description of what the test does and what result is expected. i.e. Enter numbers in name field and press okay. Expect a ‘please type in your name again’ i.e. pass value -1 for length parameter into GetNewAccount function. Expect error ABC to be thrown.

21/11/ Test Objectives Tests identify failures or faults in the software. Failures are ways in which the software fails to run according to requirements. Note that some requirements will be implicit: Safety requirements may not be stated! Failures are caused by faults which are caused by errors in the developed software. 1 error may lead to many faults A failure may occur a "long way" from the original fault One fault may lead to many failures

Black-Box testing The testing is not based on the structure of the program (which is hidden/unknown). Theoretically, in order to ensure correctness, every possible input needs to be tested this is impossible. The goal: to maximize the number of errors found for the available effort available for testing.

White-Box testing Is based on the internal structure of the program. There are several alternative criteria for checking “enough” paths in the program. Even checking all paths within a component does not guarantee finding all errors. Does not cover prior and post implications of errors.

Selection of test cases (for white-box testing) Select a good coverage criterion. Completeness would require: Cover all paths of the program. Execute every statement at least once. Each decision has a true or false value at least once. Each condition is taking each truth value at least once. Check all possible combinations of conditions in each decision. For this project, Select key components of the software for white-box testing Select key paths for detailed testing. Focus on black-box testing for the rest.

Identifying black-box test cases Partition the program into pieces of code with a single entry/exit point. For each piece find which variables are set/used/tested. Create test cases to check that the piece works according to expectation. E.g. handles unexpected values passed in, functions called out of order etc.

21/11/ Analysing test results Once testing has discovered failures and faults, they need to be classified by impact on the software. e.g. Type A: System failure – a significant component of the software does not work causing the whole system to fail. Type B: Module failure – a sub-set of the software does not work, but does not impact the overall operation of the software Type C: Minor failure – some non-core functionality does not work according to specification. Type D: Cosmetic issue: e.g. User Interface issues

21/11/ Release criteria Before testing commences release criteria are set by the QA manager which need to be met before the software can be released: Software should never be released with type A failures/faults. Where faults/failures exist in the released software, either They need to documented in release notes The functionality associated needs to be removed from the release

21/11/ Test plan/results document For this module, the test plan and test results documents have been combined. All projects must complete the plan and results sections as part of their completed project. Note: This is very simplified version of what is actually be used.