Chapter 7 Unit Testing & Integration Testing 322 235 Software Testing By Wararat Songpan(Rungworawut),PH.D. Department of Computer Science, Faculty of.

Slides:



Advertisements
Similar presentations
EEE 243B Applied Computer Programming Software engineering Life cycle and when to test.
Advertisements

Chapter 6 Path Testing Software Testing
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.
System/Software Testing Error detection and removal determine level of reliability well-planned procedure - Test Cases done by independent quality assurance.
Physical Architecture Layer Design
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
Integration testing Satish Mishra
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Software Development Software Life Cycle UML Diagrams.
Integration and System Testing CSSE 376, Software Quality Assurance Rose-Hulman Institute of Technology March 29, 2007.
Software Testing and Quality Assurance
1 Software Testing and Quality Assurance Lecture 30 - Introduction to Software Testing.
Program Testing Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Illinois Institute of Technology
CS 425/625 Software Engineering Software Testing
Program unit A Program unit B Program unit T Function 1 Function 2 Function Component 1 Whole System (e.g. regression testing) Component 3....
Software Testing Introduction. Agenda Software Testing Definition Software Testing Objectives Software Testing Strategies Software Test Classifications.
SOFTWARE QUALITY ASSURANCE Maltepe University Faculty of Engineering SE 410.
Software System Integration
BY RAJESWARI S SOFTWARE TESTING. INTRODUCTION Software testing is the process of testing the software product. Effective software testing will contribute.
Chapter 13 & 14 Software Testing Strategies and Techniques
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.
Chapter 1: Introduction to Software Testing Software Testing
Overview Integration Testing Decomposition Based Integration
Different Levels of Testing
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
CPIS 357 Software Quality & Testing
INT-Evry (Masters IT– Soft Eng)IntegrationTesting.1 (OO) Integration Testing What: Integration testing is a phase of software testing in which.
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
Software Testing. 2 CMSC 345, Version 4/12 Topics The testing process  unit testing  integration and system testing  acceptance testing Test case planning.
Article for last Tuesday u “Enhancing Software Testing by Judicious Use of Code Coverage Information” 1 540f07testing20nov06.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
TESTING LEVELS Unit Testing Integration Testing System Testing Acceptance Testing.
UNIT 2 TESTING TECHNIQUES Testing begins with a proposal for software/system application development/maintenance and end with the system is formally accepted.
System Testing Beyond unit testing. 2 System Testing Of the three levels of testing, system level testing is closest to everyday experience We evaluate.
1 Integration Testing CS 4311 I. Burnstein. Practical Software Testing, Springer-Verlag, 2003.
Software Engineering Saeed Akhtar The University of Lahore.
Integration testing Integrate two or more module.i.e. communicate between the modules. Follow a white box testing (Testing the code)
Software Engineering Issues Software Engineering Concepts System Specifications Procedural Design Object-Oriented Design System Testing.
1 Software Testing Strategies: Approaches, Issues, Testing Tools.
Integration Testing Beyond unit testing. 2 Testing in the V-Model Requirements Detailed Design Module implementation Unit test Integration test System.
What is a level of test?  Defined by a given Environment  Environment is a collection of people, hard ware, software, interfaces, data etc.
1 Software Testing & Quality Assurance Lecture 15 Created by: Paulo Alencar Modified by: Frank Xu.
CS 325: Software Engineering February 16, 2016 Designing a Design Class Diagram Design Class Diagrams DCD: Restaurant Example DCD: ATM Example Software.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
CSC 395 – Software Engineering Lecture 27: White-Box Testing.
CHAPTER 9 - PART 1 Software Testing Strategies. Lesson Outlines Definitions and objectives Software testing strategies Software test classifications White.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
ANOOP GANGWAR 5 TH SEM SOFTWARE TESTING MASTER OF COMPUTER APPLICATION-V Sem.
Testing i. explain the importance of system testing and installation planning;
Lec 10 Integration Testing- 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 10 – Integration Testing 9/30/
CSE 219 Final exam review.
Software Testing Strategies for building test group
Software Testing.
Rekayasa Perangkat Lunak Part-13
Software Testing Techniques
Integration Testing This is the step after the individual pieces of code or modules (programs) are tested. A set of programs do not exist in vacuum. They.
Software Engineering (CSI 321)
Chapter 13 & 14 Software Testing Strategies and Techniques
Definition of Integration Testing
Higher-Level Testing and Integration Testing
Different Levels of Testing
Chapter 10 – Software Testing
Integration Testing CS 4311
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 System Integration
Chapter 11: Integration- and System Testing
TYPES OF TESTING.
Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Presentation transcript:

Chapter 7 Unit Testing & Integration Testing Software Testing By Wararat Songpan(Rungworawut),PH.D. Department of Computer Science, Faculty of Science, Khon Kaen University 1

Unit Testing 2 Requirements Specification Preliminary Design Preliminary Design Detailed Coding Detailed Coding Unit Testing Integration Testing Integration Testing System Testing System Testing Acceptance Testing

Unit testing Unit Testing is a level of the software testing process where individual units/components of a software/system are tested. The purpose is to validate that each unit of the software performs as designed. A unit is the smallest testable part of software. It usually has one or a few inputs and usually a single output. In procedural programming a unit may be an individual program, function, procedure, etc. 3

Unit Testing Method used for unit testing: Black Box/White Box Testing method is used for executing the unit test. Mostly Unit tests are basically written and executed by software developers to make sure that code meets its design and requirements and behaves as expected. but not always created by the developers themselves as well, whereas if a company does white box and black box testing, it can be done by Testers. 4

Unit Testing Environment 5 Stub Test case Black Box Method White Box Method Module is tested Driver Actual ResultsExpected Results Pass/Fail

Stub Complexity Stub Complexity 6 Stub A Stub A Stub B Stub B Stub C Stub C Stub D Stub D Called Stub A return Display text Called Stub B and send some parameters Called Stub C only return parameter Call Stub D and both send and return parameters

Example of Unit Testing C++ o Boost.Testing library o CPPUnit o CxxUnit Java o Junit NET Languages (C#, VB.NET, etc.) o Nunit Etc. 7

Example of Junit: 8

Integration Testing 9 Requirements Specification Preliminary Design Preliminary Design Detailed Coding Detailed Coding Unit Testing Integration Testing Integration Testing System Testing System Testing Acceptance Testing

Integration Testing Integration Testing is a level of the software testing process where individual units are combined and tested as a group. 10 M1 M2 M3 M5 M4 M6 M7

Integration Testing Task Integration Test Plan o Prepare o Review o Rework o Baseline Integration Test Cases/Scripts o Prepare o Review o Rework o Baseline Integration Test o Perform 11

Integration Testing Approach Top Down Bottom Up Big Bang Sandwich/Hybrid 12

Top Down Approach Top Down is an approach to Integration Testing where top level units are tested first and lower level units are tested step by step after that. This approach is taken when top down development approach is followed. Test Stubs are needed to simulate lower level units which may not be available during the initial phases. 2 Sub-top downs approach o Breadth First o Depth First 13

Example of Top-down 14 A BCD E H FG I JK LM

Example of Top-down : Breadth First A B C D E F G H I J K L M 15 A BCD E H FG I JK LM

Example of Top-down : Depth First A B E H C F I D G J L M K 16 A BCD E H FG I JK LM

Bottom Up is an approach to Integration Testing where bottom level units are tested first and upper level units step by step after that. This approach is taken when bottom up development approach is followed. Test Drivers are needed to simulate higher level units which may not be available during the initial phases. 17 Bottom Up Approach

Bottom-up Build 1: H E B -> create driver for testing Build 2: I F C D Build 3: L M J K G Integrate all Build 1, 2, 3 Final: A 18 A B CD E H FG I JK LM Cluster1 Cluster2 Cluster3

Sandwich/Hybrid is an approach to Integration Testing which is a combination of Top Down and Bottom Up approaches. 19 Sandwich/Hybrid Approach A B CD E H FG I JK LM

Big Bang is an approach to Integration Testing where all or most of the units are combined together and tested at one go. This approach is taken when the testing team receives the entire software in a bundle. So what is the difference between Big Bang Integration Testing and System Testing? Well, the former tests only the interactions between the units while the latter tests the entire system. 20 Big Bang Approach

Next Date Program 21 Date Day MonthYear

Top down 22 Date Day MonthYear Unit Under TestList of Stub DateDay, Month, Year DayMonth, Year MonthYear

Bottom Up 23 Date Day MonthYear Unit Under TestList of Stub Year0 Year+Month0 Year+Month+Day0 Year+Month+Day+Date0

Big Bang 24 Date Day MonthYear Unit Under TestList of Stub Date0

MM-Path Integration Source node is a program statement fragment at which program execution begins. Sink node is a statement fragment at which program execution terminates or ends. Module Execution Path (MEP) is a sequence of statements within a module Message is a programming language mechanism by which one unit transfers control to another unit Module to Module path(MM-path) is an interleaved sequence of module execution paths and messages 25

MM-Path example MEP(A, 1) = MEP(A, 2) = MEP(A, 3) = MEP(B, 1) = MEP(B, 2) = MEP (C,1) = MEP (C, 2) = ABC A1 A2 A3 B1 B2 C1 C2

MM-Path Graph 27 MEP(A,2)MEP(A,1) Module A Module B MEP(B,2) MEP(B,1) Module C MEP(C,2) MEP(C,1) MEP(A,3)

Apply Online System Apply Online System Enrollment Exam Schedule Grading Graduated Student Student Profile Quiz Integration Testing