WHY BOTHER TO UNIT TEST Suprinder Pujji. OVERVIEW What is Unit testing Emphasis of Unit testing Benefits of Unit Testing Popular Misconceptions Prevailing.

Slides:



Advertisements
Similar presentations
Automating Software Module Testing for FAA Certification Usha Santhanam The Boeing Company.
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
By Veronika Movagharianpour and Adam Brakel. Software Developers face challenges:  Producing high-quality software  with low-defect levels  while doing.
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.
1 Software Testing and Quality Assurance Lecture 13 - Planning for Testing (Chapter 3, A Practical Guide to Testing Object- Oriented Software)
Systems Analysis, Prototyping and Iteration Systems Analysis.
CIS-74 Computer Software Quality Assurance Systematic Software Testing Chapter 1: An Overview of the Testing Process.
CHAPTER 1 SOFTWARE DEVELOPMENT. 2 Goals of software development Aspects of software quality Development life cycle models Basic concepts of algorithm.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 1 1 Disciplined Software Engineering Lecture #7 Software Engineering.
Case Tools Trisha Cummings. Our Definition of CASE  CASE is the use of computer-based support in the software development process.  A CASE tool is a.
RBM in the context of Operations and Programme and Project Management Material of the Technical Assistance Unit (TAU)
Software engineering for real-time systems
Week 1 intro to PM Project Management Introduction to Project Management and the Software Development Lifecycle Week 1 Winter quarter 1/7/02 SOS.
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.
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
System Implementation
Blue’s Support for Object-Oriented Testing By: James Majidian Christopher Nersisyan.
Designing Unit Test Cases Vivek Gulati COMP595VAV Dept. of Computer Science California State University, Northridge.
Using A Defined and Measured Personal Software Process Watts S. Humphrey CS 5391 Article 8.
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
Introduction to Systems Analysis and Design Trisha Cummings.
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.
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
1 Shawlands Academy Higher Computing Software Development Unit.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
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.
Understand Application Lifecycle Management
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.
Copyright Prentice Hall, Inc. 1 Computers: Information Technology in Perspective, 11e Larry Long and Nancy Long Chapter 11 Developing Business Information.
Leaders in Asset Management Big Plans for your Property System? How to plan for a Property System Project Prepared by: Yudiann Carlo, CPPS
The Software Development Life Cycle. Software Development SDLC The Software Development Life-Cycle Sometimes called the program development lifecycle.
Disciplined Software Engineering Lecture #7 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
Well-behaved objects Main concepts to be covered Testing Debugging Test automation Writing for maintainability Objects First with Java - A Practical.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 7 1 Design and Code Reviews - Overview What are design and code.
Definition of Terms Software/Programs Programs that directs the operation of a computer system Set of instructions Codes Programming Process of planning,
1 Ch. 1: Software Development (Read) 5 Phases of Software Life Cycle: Problem Analysis and Specification Design Implementation (Coding) Testing, Execution.
Cmpe 589 Spring 2006 Lecture 2. Software Engineering Definition –A strategy for producing high quality software.
The Software Development Process
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
Program Development Cycle
Objects First With Java A Practical Introduction Using BlueJ Well-behaved objects 2.1.
Software Quality Assurance and Testing Fazal Rehman Shamil.
Software Project Management
Building usable software through early testing. Objective Show the value of testing from the beginning of the development cycle. Consensus in the industry.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Testing Integral part of the software development process.
Cs498dm Software Testing Darko Marinov January 24, 2012.
Software Development. The Software Life Cycle Encompasses all activities from initial analysis until obsolescence Analysis of problem or request Analysis.
MANAGEMENT INFORMATION SYSTEM
Information Systems Development
Testing More In CS430.
Testing and Debugging PPT By :Dr. R. Mall.
Software Testing Introduction CS 4501 / 6501 Software Testing
Verification and Validation Overview
Software Development Life Cycle
Object oriented system development life cycle
Information Systems Development
Software testing strategies 2
Introduction to Systems Analysis and Design
Verification and Validation Unit Testing
Software Verification, Validation, and Acceptance Testing
Chapter 10: Software Engineering
Software Design & Production Methodologies
Presentation transcript:

WHY BOTHER TO UNIT TEST Suprinder Pujji

OVERVIEW What is Unit testing Emphasis of Unit testing Benefits of Unit Testing Popular Misconceptions Prevailing Who Should Unit Test A Case Study Conclusion

WHAT IS UNIT TESTING Lowest level of testing performed - Individual units of software are tested – Example - –Function or subroutine in structured Programming Language –Class in an object oriented language –Menu or display in a 4GL

EMPHASIS OF UNIT TESTING Have to be repeated - All tests have to be maintained –

BENEFITS OF UNIT TESTING Test parts of a project without waiting for the other parts to be available, Achieve parallelism in testing Able to detect and remove defects at a much less cost compared to other later stages of testing, Simplifies debugging Tests internal conditions that are not easily reached by external inputs

Popular Misconceptions Prevailing It consumes too much time Integration Tests will catch all the Bugs Anyway I’m too good a Programmer to Need Unit tests It only proves that the code does what the code does It is not Cost Effective

Who Should do it Unit Testing focuses on implementation Should be done by Test designers Test Designers should know the System requirements and design thoroughly. Test Designer should be more experienced Should be independent

WORK FLOW USING TEST CASES

CASE STUDY Analysis of the Integration Testing and System Testing bugs was done Found that about 30 % of bugs caught in the final stages could have been caught in the early stages it self.

CASE STUDY Adopted concept of Static Analysis on unit test cases 15 % reduction in the number of bugs escaping to the final stages of software development.

CASE STUDY Logical errors contributed to only 8 %. Found that % of logical defects caught in the static analysis phase increased to about 13 %.

CASE STUDY Without Using Unit Test Cases

CASE STUDY With Unit Test Cases

QUESTIONS FOR EVALUATING THE UNIT TESTING FOR ADEQUACY Have all the statements been exercised by at least one test Has each conditional statement been exercised at least once each way by the tests Have all boundary cases been exercised

QUESTIONS FOR EVALUATING THE UNIT TESTING FOR ADEQUACY Were any design assumptions made about the operation of this unit? Have the tests demonstrated these assumptions Have the tests exercised the unit over the full range of operational conditions it is expected to address

CONCLUSION Unit testing can be very effective and affordable. It will result in reduction of total efforts while simultaneously increasing the quality of the product significantly also reducing in the long-term maintenance cost and the total life cycle cost.