Program Testing Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.

Slides:



Advertisements
Similar presentations
Object Oriented Analysis And Design-IT0207 iiI Semester
Advertisements

Software Testing. Quality is Hard to Pin Down Concise, clear definition is elusive Not easily quantifiable Many things to many people You'll know it when.
Lecture 8: Testing, Verification and Validation
1 Integration Testing CS 4311 I. Burnstein. Practical Software Testing, Springer-Verlag, 2003.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
Practical Testing Techniques. Verification and Validation Validation –does the software do what was wanted? “Are we building the right system?” –This.
1 SOFTWARE TESTING Przygotował: Marcin Lubawski. 2 Testing Process AnalyseDesignMaintainBuildTestInstal Software testing strategies Verification Validation.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
Informatics 43 – April 30, What is a test case? An input to a system, and the correct output. An “input” may be complex. Example: – What is an input.
Testing L. Grewe Why test? Detect and eliminate errors in programDetect and eliminate errors in program Feedback to improve softwareFeedback to improve.
1 CSE1301 Computer Programming: Lecture 15 Flowcharts and Debugging.
Software Testing and Quality Assurance
Software Development Study Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Extreme Programming Team Members Gowri Devi Yalamanchi Sandhya Ravi.
Department of Computer Science University of Maryland, College Park
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.
1 CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
Java Review 2 – Errors, Exceptions, Debugging Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
1 CSE1301 Computer Programming: Lecture 15 Flowcharts, Testing and Debugging.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
1 CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
Outline Types of errors Component Testing Testing Strategy
Lecture 9 Testing Topics TestingReadings: Spring, 2008 CSCE 492 Software Engineering.
BY RAJESWARI S SOFTWARE TESTING. INTRODUCTION Software testing is the process of testing the software product. Effective software testing will contribute.
System/Software Testing
ECE 355: Software Engineering
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
Software Testing. Introduction Testing is often left to the end of the project which is generally not a good idea. Testing should be conducted throughout.
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.
INT-Evry (Masters IT– Soft Eng)IntegrationTesting.1 (OO) Integration Testing What: Integration testing is a phase of software testing in which.
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.
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
Software Development Software Testing. Testing Definitions There are many tests going under various names. The following is a general list to get a feel.
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 23 Reliability III.
Software Testing. 2 CMSC 345, Version 4/12 Topics The testing process  unit testing  integration and system testing  acceptance testing Test case planning.
Testing. 2 Overview Testing and debugging are important activities in software development. Techniques and tools are introduced. Material borrowed here.
Unit Testing 101 Black Box v. White Box. Definition of V&V Verification - is the product correct Validation - is it the correct product.
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.
A13. Testing Intro Data Structures & SE Computer Science Dept Va Tech Aug., 2001 © Barnette ND, McQuain WD 1 Levels of Verification The Unreachable.
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.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
Testing and Debugging. Testing Fundamentals  Test as you develop Easier to find bugs early rather than later Prototyping helps identify problems early.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
CS223: Software Engineering Lecture 18: The XP. Recap Introduction to Agile Methodology Customer centric approach Issues of Agile methodology Where to.
1 CSE1301 Computer Programming: Lecture 16 Flow Diagrams and Debugging.
CSC 395 – Software Engineering Lecture 27: White-Box Testing.
SOFTWARE TESTING. SOFTWARE Software is not the collection of programs but also all associated documentation and configuration data which is need to make.
Testing i. explain the importance of system testing and installation planning;
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
Software Testing. Software Quality Assurance Overarching term Time consuming (40% to 90% of dev effort) Includes –Verification: Building the product right,
Software Testing Strategies for building test group
Software Testing.
Rekayasa Perangkat Lunak Part-13
Different Types of Testing
Verification and Testing
Chapter 13 & 14 Software Testing Strategies and Techniques
Lecture 09:Software Testing
Testing and Test-Driven Development CSC 4700 Software Engineering
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 11: Integration- and System Testing
CSE 1020:Software Development
Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Presentation transcript:

Program Testing Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park

Testing Goal Detect and eliminate errors in program Feedback to improve software Specification changes Add new functionality Extremely important for success!

Testing Empirical testing Test software with selected test cases More scalable than verification Not guaranteed to detect all errors

Testing – Terminology Test case Individual test Test suite Collection of test cases Test harness Program that executes a series of test cases Test framework Software that facilitates writing & running tests Example – JUnit

Testing – Terminology Test driver Program to create environment for running tests Declares variables, creates objects, assigns values Executes code and displays results of tests Stub Skeleton code in place of unfinished method / class Simply return if called Possibly print message indicating stub called Allows software testing to begin

Testing – Terminology Tester (Quality Assurance) Person devising and / or performing tests More effective if 2nd person writes tests Walkthrough Programmer explains code to 2 nd person

Types of Testing Clear box testing Allowed to examine code Attempt to improve thoroughness of tests Black box testing No knowledge of code Treat program as “black box” Test behavior in response to inputs

Levels (Stages) of Testing 1. Unit test 2. Integration test 3. System test 4. Acceptance test

Unit Test Test individual units extensively Classes Methods Central part of “eXtreme Programming” (XP) Extensive unit testing during development Pair programming (1 coder, 1 tester) Design unit tests along with specification Approach Test each method of class Test every possible flow path through method

Flow Path Unique execution sequence through program Example S1 while (B1) { if (B2) S2 else S3 } Flows S1 S1, S2 S1, S3 S1, S2, S2 S1, S2, S3 S1, S3, S2 S1, S3, S3 …

Unit Test – Flow Path Not possible to test all flow paths Many paths by combining conditionals, switches Infinite number of paths for loops New paths caused by exceptions Test coverage Alternative to flow path Ensure high % (if not all) of lines of code tested Does not capture all possible flow paths Even if all lines of code tested by some test case

Integration Test Test interaction between units Possible units fail when combined May find problems in specifications Approach Test units together Proceed bottom up, in increasing size Example test sequence 1. AB, AC, AD, CD, CE 2. ACD 3. ABCDE B A C D E

System Test Test entire software Include all components of software In context in which software will be used Ensure all pieces of software interact correctly

Acceptance Test Test full functionality of software Ensure program meets all requirements Approach Place software in user environment Test software with Real-world data Real users Typical operating conditions Test cases selected by users

Acceptance Test – Stages Alpha test Test components during development Usually clear box test Beta test Test in real user environment Always black box test

Regression Test Ensure functionality is not lost / changed As software is modified / extended Approach Save suite of tests and expected results Rerun test suite periodically after software changes Report any loss of functionality Typically run overnight Software is more stable when developers leave work

Developing Test Cases Quality of testing depends on test cases Tips on developing test cases Develop test data during analysis & design phases Attempt to exercise alternate program paths Check boundary conditions 1 st and last iterations of loop 1 st and last values added to data structure Pay close attention to problem specification UML use cases  test cases