Software testing Main issues: There are a great many testing techniques Often, only the final code is tested.

Slides:



Advertisements
Similar presentations
Software testing Main issues:
Advertisements

Test process essentials Riitta Viitamäki,
Component-Based Software Engineering Main issues: assemble systems out of (reusable) components compatibility of components.
Verification and Validation
Software Engineering-II Sir zubair sajid. What’s the difference? Verification – Are you building the product right? – Software must conform to its specification.
Software Quality Assurance Inspection by Ross Simmerman Software developers follow a method of software quality assurance and try to eliminate bugs prior.
Software testing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
1 Software Testing and Quality Assurance Lecture 1 Software Verification & Validation.
 QUALITY ASSURANCE:  QA is defined as a procedure or set of procedures intended to ensure that a product or service under development (before work is.
Introduction to Software Testing
Verification and Validation CIS 376 Bruce R. Maxim UM-Dearborn.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
CS527: (Advanced) Topics in Software Engineering Overview of Software Quality Assurance Tao Xie ©D. Marinov, T. Xie.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Dr. Pedro Mejia Alvarez Software Testing Slide 1 Software Testing: Building Test Cases.
Unit Testing & Defensive Programming. F-22 Raptor Fighter.
Verification and Validation Yonsei University 2 nd Semester, 2014 Sanghyun Park.
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
111 Testing Overview CS 4311 Frank Tsui, Orland Karam, and Barbara Bernal, Essential of Software Engineering, 3rd edition, Jones & Bartett Learning. Sections.
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.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Integration testing l Tests complete systems or subsystems composed of integrated.
Implementation & Integration Phase Implementation, then integration: Implementation, then integration:  Each module is implemented by member of programmer.
Software Testing.
1 Debugging and Testing Overview Defensive Programming The goal is to prevent failures Debugging The goal is to find cause of failures and fix it Testing.
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.
Verification and Validation Overview References: Shach, Object Oriented and Classical Software Engineering Pressman, Software Engineering: a Practitioner’s.
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
Chapter 13: Regression Testing Omar Meqdadi SE 3860 Lecture 13 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Well-behaved objects Main concepts to be covered Testing Debugging Test automation Writing for maintainability Objects First with Java - A Practical.
This chapter is extracted from Sommerville’s slides. Textbook chapter
1 Phase Implementation. Janice Regan, Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine subphases)
CHAPTER 9: VERIFICATION AND VALIDATION 1. Objectives  To introduce software verification and validation and to discuss the distinction between them 
Chapter 12: Software Inspection Omar Meqdadi SE 3860 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
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.
CS451 Lecture 10: Software Testing Yugi Lee STB #555 (816)
Chapter 5 – Software Testing & Maintenance (Evolution) 1.
Software Quality Assurance and Testing Fazal Rehman Shamil.
PROGRAMMING TESTING B MODULE 2: SOFTWARE SYSTEMS 22 NOVEMBER 2013.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
Well-behaved objects Main concepts to be covered Testing Debugging Test automation Writing for maintainability Objects First with Java - A Practical.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
This chapter is extracted from Sommerville’s slides. Textbook chapter 22 1 Chapter 8 Validation and Verification 1.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
MAY 19 th 2016 Jovan Poljački
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.
Software Engineering Lecture 11 Software Testing Presenter: Josef Hallberg 1.
Software Development. The Software Life Cycle Encompasses all activities from initial analysis until obsolescence Analysis of problem or request Analysis.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVIII. Software Testing.
Software Testing. Software Quality Assurance Overarching term Time consuming (40% to 90% of dev effort) Includes –Verification: Building the product right,
CompSci 280 S Introduction to Software Development
Test-Driven Development
Verification and Validation
Testing Tutorial 7.
Testing and Debugging PPT By :Dr. R. Mall.
Chapter 8 – Software Testing
Verification and Testing
Software Testing.
Verification and Validation Overview
Verification & Validation
Chapter 18 Software Testing Strategies
Introduction to Software Testing
Component-Based Software Engineering
Verification and Validation Unit Testing
Baisc Of 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.
CSE 1020:Software Development
Presentation transcript:

Software testing Main issues: There are a great many testing techniques Often, only the final code is tested

SE, Testing, Hans van Vliet, ©2008 State-of-the-Art errors are made per 1000 lines of source code extensively tested software contains errors per 1000 lines of source code testing is postponed, as a consequence: the later an error is discovered, the more it costs to fix it. error distribution: 60% design, 40% implementation. 66% of the design errors are not discovered until the software has become operational.

SE, Testing, Hans van Vliet, ©2008 Relative cost of error correction REdesigncodetestoperation

SE, Testing, Hans van Vliet, ©2008 Lessons Many errors are made in the early phases These errors are discovered late Repairing those errors is costly ⇒ It pays off to start testing real early

SE, Testing, Hans van Vliet, ©2008 How then to proceed? Exhaustive testing most often is not feasible Proof correctness does not work for most cases Therefore, we look for systematic ways to proceed during testing

SE, Testing, Hans van Vliet, ©2008 Some preliminary questions What exactly is an error? How does the testing process look like? When is test technique A superior to test technique B? What do we want to achieve during testing? When to stop testing?

SE, Testing, Hans van Vliet, ©2008 Error, fault, failure an error is a human activity resulting in software containing a fault a fault is the manifestation of an error a fault may result in a failure

SE, Testing, Hans van Vliet, ©2008 When exactly is a failure a failure? Failure is a relative notion: e.g. a failure w.r.t. the specification document Verification: evaluate a product to see whether it satisfies the conditions specified at the start: Have we built the system right? Validation: evaluate a product to see whether it does what we think it should do: Have we built the right system?

SE, Testing, Hans van Vliet, ©2008 What is our goal during testing? Objective 1: find as many faults as possible Objective 2: make you feel confident that the software works OK

Unit Testing Goal: isolate smallest unit (using stubs, mocks, fakes) verify individual units are functioning correctly Smallest unit for functional programming: function or program for OO programming: method How? step through debugger use a framework (JUnit, etc.)

Unit Testing: Advantages find problems early allows change process: change code → run tests (build automation) → fix errors regression testing after refactoring integration becomes easy test parts, then the sum serves as documentation states class’s capability always up-to-date

Test-Driven Design (TDD) replace the formal design process start with writing tests implementation comes later used heavily in Agile or XP Development advantage over other design methods (UML) design document used for implementation, testing

Unit Testing: Limitations Not the best for integration testing can’t show the absence of errors (like others) test code may be buggy as well! requires lots of discipline "Never take two chronometers to sea. Always take one or three." - Fred Brooks, The Mythical Man-Month

Interface Testing The unit is a part of the interface (object, library) Kinds of interfaces parameter shared memory message passing Kinds of interface errors Interface misuse (e.g., sending wrong paramter) Interface misunderstanding (using interface incorrectly) timing errors (e.g.: producer, consumer speeds)

Testing Techniques Static testing code is not executed compiler helps: declarations, types, method calls, etc. Dynamic testing code is executed give input, test results

Manual Test Techniques Static techniques Reading peer review/programming: quality, readability, usability egoless programming Walkthroughs and Inspections formal team-based assessmenet Correctness proofs formal methods (e.g., preconditions, postconditions)

Coverage-based Techniques Dynamic: cover or trace the program Control-flow coverage cover all or some statements in the program Data-flow coverage trace lifetime (scope), values of variables