Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.

Slides:



Advertisements
Similar presentations
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.
Advertisements

System Development Life Cycle (SDLC)
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.
Programming Types of Testing.
T. E. Potok - University of Tennessee Software Engineering Dr. Thomas E. Potok Adjunct Professor UT Research Staff Member ORNL.
System Design and Analysis
CSI 101 Elements of Computing Spring 2009 Lecture #2 Development Life Cycle of a Computer Application Monday January 26th, 2009.
Illinois Institute of Technology
Software Engineering For Beginners. General Information Lecturer, Patricia O’Byrne, office K115A. –
Information Systems Development and Acquisition Chapter 8 Jessup & Valacich Instructor: Ramesh Sankaranarayanan.
Testing an individual module
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
ECE122 L17: Method Development and Testing April 5, 2007 ECE 122 Engineering Problem Solving with Java Lecture 17 Method Development and Testing.
The Program Design Phases
Testing in SDLC. COURSE CONTENT - Summary Part 1 – Life Cycle / Processes / SDLC Part 2 – LC Management in Turkcell.
BY RAJESWARI S SOFTWARE TESTING. INTRODUCTION Software testing is the process of testing the software product. Effective software testing will contribute.
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
Chapter 13 & 14 Software Testing Strategies and Techniques
Introduction to Computer Technology
Introduction to High-Level Language Programming
Introduction to Systems Analysis and Design Trisha Cummings.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
CMSC 345 Fall 2000 Unit Testing. The testing process.
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.
1 Principles of Computer Science I Prof. Nadeem Abdul Hamid CSC 120 – Fall 2005 Lecture Unit 10 - Testing.
Testing. 2 Overview Testing and debugging are important activities in software development. Techniques and tools are introduced. Material borrowed here.
CS 111 – Nov. 22 Chapter 7 Software engineering Systems analysis Commitment –Please read Section 7.4 (only pp ), Sections –Homework #2.
Well-behaved objects Main concepts to be covered Testing Debugging Test automation Writing for maintainability Objects First with Java - A Practical.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
Software Development Life Cycle by A.Surasit Samaisut Copyrights : All Rights Reserved.
TESTING LEVELS Unit Testing Integration Testing System Testing Acceptance Testing.
1 Introduction to Software Testing. Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Chapter 1 2.
1 Ch. 1: Software Development (Read) 5 Phases of Software Life Cycle: Problem Analysis and Specification Design Implementation (Coding) Testing, Execution.
Configuration Management and Change Control Change is inevitable! So it has to be planned for and managed.
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.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Systems Development Life Cycle
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Software Testing and Quality Assurance 1. What is the objectives of Software Testing?
Objects First With Java A Practical Introduction Using BlueJ Well-behaved objects 2.1.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
Dynamic Testing.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
CS223: Software Engineering
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
CODING VOCABULARY.  Binary  A number system based on 2  Hexadecimal  A number system based on 16  Domain  An internet location registered with the.
CMSC 2021 Software Development. CMSC 2022 Software Development Life Cycle Five phases: –Analysis –Design –Implementation –Testing –Maintenance.
C++ for Engineers and Scientists, Second Edition 1 Problem Solution and Software Development Software development procedure: method for solving problems.
Dynamic White-Box Testing What is code coverage? What are the different types of code coverage? How to derive test cases from control flows?
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
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.
Software Testing.
Chapter 9, Testing.
Software Engineering (CSI 321)
Verification and Testing
Chapter 13 & 14 Software Testing Strategies and Techniques
UNIT-4 BLACKBOX AND WHITEBOX TESTING
VISUAL BASIC – CHAPTER ONE NOTES An Introduction to Visual Basic
Introduction to Systems Analysis and Design
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
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Presentation transcript:

Testing

Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software (from Wikipedia)- Software testing can be stated as the process of validating and verifying that a computer program/application/product: meets the requirements that guided its design and development, works as expected *, can be implemented with the same characteristics, and satisfies the needs of stakeholders. * This is the only item we are concerned with. The others are important as software engineering requirements.

Testing Basics The key is to localize the problem How to do this? – Debug compilation units as they’re written – Start testing with small units of code (unit tests) – Integrate these pieces and test – Build to the full system and continue to test A test plan formalizes this process

Works as Expected How do we establish this? – Unit Testing * – Integration Testing – Regression Testing * We are mainly interested in this testing for this course.

Integration Testing Individual software modules are combined and tested as a group Keep integrating the smaller pieces into larger pieces and test them This process may continue though many layers as software systems may include large modules with communications links or even large distributed systems

Regression Testing You fix a bug Make a new test to verify that you fixed that bug Do you throw your new test away? No! Keep it and all subsequent versions This collection of test cases (including data) is called a test suite Very often, a bug that you fixed will appear in a future version (known as cycling) Use the saved test suites to ensure that known failures in prior versions do not reappear

Unit Testing Unit testing validates that a module or class is working correctly You write test cases for all functions (or methods) Done by the software developers- the author and possibly others.

Unit Testing Why don’t we wait and test the complete program? – If there is an error, how do we know where it occurred? – Many of the exceptions in the code can’t be intentionally triggered from the user interface Ensure each class or module (unit) works correctly first Then we test how they work together (integration testing)

Test Cases The set of data and procedures used to test a class or module – Procedures can be: Instructions for manual entry of data or selection of options in the code Driver functions, test harnesses (many names) that call the functions in the class to run the code Expected outcomes for each (manual or automated) test

Test Cases Developing test cases (or at least thinking about them) can (should?) be part of the software design and implementation process – You may realize that you need more exceptions – You may realize that you have too many exceptions – It will help you focus on the logic and flow of control in the source code

Test Cases Developing test cases can even help in the design phase, before you code! Consider an algorithm to convert a raw score to a letter grade (using no plus or minus grades) If score > 90 then grade = ‘A’ Else if score > 80 then grade = ‘B’ Else if score > 70 then grade = ‘C’ Else if score > 60 then grade = ‘D’ Else grade = ‘F’ So 90 is a B, 80 is a C, and so on? Are scores limited to the range 0 to 100?

Choosing Good Test Cases Positive test cases – Legitimate values you expect your code to use, such as 79 or 55 in the grade algorithm Boundary test cases – Legitimate values at the edge of ranges in your code, such as a score of 90 in the grade algorithm Negative test cases – Values you expect your code to reject, such as -13 or 234 in the grade algorithm

Test Coverage All logic paths and test cases should be included in the test A logic path is a flow of control through the program, i.e. each sequence of decisions (if, switch/case, or loop control statements) in the program For the grade algorithm you would want to test (at a minimum) scores for too high, too low, A, B, C, D, and F

Test Plan Documents how the program will be tested It should specify the test of test case, the data values or files required, the expected output, and any driver functions (test harness) to use Often is tabular: Each entry is as detailed as necessary- for complex systems one case could take an entire page Test plans vary greatly and are unique to each program Test Case Input Values Driver Functions Expected Outcomes Observed Outcomes