SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.

Slides:



Advertisements
Similar presentations
Software Testing Techniques
Advertisements

Chapter 14 Software Testing Techniques - Testing fundamentals - White-box testing - Black-box testing - Object-oriented testing methods (Source: Pressman,
Software Testing Technique. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves.
Unit-V testing strategies and tactics.
Chapter 14 Testing Tactics
Lecture 8: Testing, Verification and Validation
Chapter 6 Path Testing Software Testing
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
Creator: ACSession No: 13 Slide No: 1Reviewer: SS CSE300Advanced Software EngineeringFebruary 2006 Testing - Techniques CSE300 Advanced Software Engineering.
Software Testing.
IMSE Week 18 White Box or Structural Testing Reading:Sommerville (4th edition) ch 22 orPressman (4th edition) ch 16.
BASIS PATH TESTING ● By Tom McCabe ● McCabe, T., "A Software Complexity Measure," IEEE Trans. Software Engineering, vol. SE-2, December 1976, pp
Testing an individual module
Chapter 18 Testing Conventional Applications
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
Unit Testing CS 414 – Software Engineering I Don Bagert Rose-Hulman Institute of Technology January 16, 2003.
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Software Systems Verification and Validation Laboratory Assignment 3
System/Software Testing
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 Techniques
CMSC 345 Fall 2000 Unit Testing. The testing process.
Testing phases. Test data Inputs which have been devised to test the system Test cases Inputs to test the system and the predicted outputs from these.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Defect testing l Testing programs to establish the presence of system defects.
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.
Software Reviews & testing Software Reviews & testing An Overview.
CS /51 Illinois Institute of Technology CS487 Software Engineering Software Testing Techniques Mr. David A. Lash.
Software Testing Testing types Testing strategy Testing principles.
Software Testing The process of operating a system or component under specified conditions, observing and recording the results, and making an evaluation.
Agenda Introduction Overview of White-box testing Basis path testing
Black-box Testing.
INTRUDUCTION TO SOFTWARE TESTING TECHNIQUES BY PRADEEP I.
White-box Testing.
1 Program Testing (Lecture 14) Prof. R. Mall Dept. of CSE, IIT, Kharagpur.
BASIS PATH TESTING.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
White Box Testing Arun Lakhotia University of Southwestern Louisiana P.O. Box Lafayette, LA 70504, USA
Software Construction Lecture 19 Software Testing-2.
Theory and Practice of Software Testing
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
 Software Testing Software Testing  Characteristics of Testable Software Characteristics of Testable Software  A Testing Life Cycle A Testing Life.
Dynamic Testing.
White Box Testing by : Andika Bayu H.
SOFTWARE TESTING. SOFTWARE Software is not the collection of programs but also all associated documentation and configuration data which is need to make.
Defect testing Testing programs to establish the presence of system defects.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
Testing Integral part of the software development process.
Based on slides created by Ian Sommerville & Gary Kimura
PREPARED BY G.VIJAYA KUMAR ASST.PROFESSOR
BASIS PATH TESTING.
Software Testing.
Software Testing.
Software Engineering (CSI 321)
Structural testing, Path Testing
Types of Testing Visit to more Learning Resources.
White Box Testing.
Software Testing Those slides are taken from : extra material is used from
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Software Testing (Lecture 11-a)
Chapter 14 Software Testing Techniques
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Chapter 14 Software Testing Techniques
Software Testing “If you can’t test it, you can’t design it”
Software Testing.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
By: Lecturer Raoof Talal
Software Testing Those slides are taken from : extra material is used from
Unit III – Chapter 3 Path Testing.
Presentation transcript:

SOFTWARE TESTING LECTURE 9

OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers “ Testing can show the presence of bugs but never their absence. ” - Dijkstra

GOOD TESTING PRACTICES Avoid non reproducible or on-the-fly testing Write test cases for valid as well as invalid input conditions. Thoroughly inspect the results of each test As the number of detected defects in a piece of software increases, the probability of the existence of more undetected defects also increases

GOOD TESTING PRACTICES Assign your best people to testing Ensure that testability is a key objective in your software design Never alter the program to make testing easier

LEVELS OF TESTING Unit Testing Integration Testing Validation Testing Acceptance Testing

UNIT TESTING Algorithms and logic Data structures (global and local) Interfaces Independent paths Boundary conditions Error handling

WHY INTEGRATION TESTING IS NECESSARY One module can have an adverse effect on another Subfunctions, when combined, may not produce the desired major function Interfacing errors not detected in unit testing may appear Timing problems (in real-time systems) are not detectable by unit testing

VALIDATION TESTING Determine if the software meets all of the requirements defined in the SR Having written requirements is essential Regression testing involves selectively repeating existing validation tests, not developing new tests

ACCEPTANCE TESTING Similar to validation testing except that customers are present or directly involved. Usually the tests are developed by the customer

TEST TECHNIQUE White box or glass box testing Black box testing

11 TWO UNIT TESTING TECHNIQUES Black-box testing  Knowing the specified function that a product has been designed to perform, test to see if that function is fully operational and error free  Not concerned with internal logical structure of the software White-box testing  Knowing the internal workings of a product, test that all internal operations are performed according to specifications and all internal components have been exercised  Logical paths through the software are tested  Test cases exercise specific sets of conditions and loops

WHITE-BOX TESTING

WHITE BOX TESTING Test cases are derived from the internal design specification or actual code for the program. Advantages  Tests the internal details of the code;  Checks all paths that a program can execute. Limitations  Wait until after designing and coding the program under test in order to select test cases.

15 WHITE-BOX TESTING These test cases  Guarantee that all independent paths within a module have been exercised at least once  Exercise all logical decisions on their true and false sides  Execute all loops at their boundaries and within their operational bounds  Exercise internal data structures to ensure their validity

16 BASIS PATH TESTING White-box testing technique proposed by Tom McCabe enables the test case designer to derive a logical complexity measure of a procedural design Uses this measure as a guide for defining a basis set of execution paths Test cases derived to exercise the basis set are guaranteed to execute every statement in the program at least one time during testing

17 FLOW GRAPH NOTATION A circle in a graph represents a node, which stands for a sequence of one or more procedural statements A node containing a simple conditional expression is referred to as a predicate node  Each compound condition in a conditional expression containing one or more Boolean operators (e.g., and, or) is represented by a separate predicate node  A predicate node has two edges leading out from it (True and False) An edge, or a link, is a an arrow representing flow of control in a specific direction  An edge must start and terminate at a node  An edge does not intersect or cross over another edge

18 FLOW GRAPH EXAMPLE FLOW CHARTFLOW GRAPH 0

19 INDEPENDENT PROGRAM PATHS Defined as a path through the program from the start node until the end node that introduces at least one new set of processing statements or a new condition (i.e., new nodes) Must move along at least one edge that has not been traversed before by a previous path Basis set for flow graph on previous slide  Path 1:  Path 2:  Path 3:  Path 4: The number of paths in the basis set is determined by the cyclomatic complexity

20 CYCLOMATIC COMPLEXITY Provides a quantitative measure of the logical complexity of a program Defines the number of independent paths in the basis set Provides an upper bound for the number of tests that must be conducted to ensure all statements have been executed at least once Can be computed two ways  V(G) = E – N + 2, where E is the number of edges and N is the number of nodes in graph G  V(G) = P + 1, where P is the number of predicate nodes in the flow graph G Results in the following equations for the example flow graph  V(G) = 14 edges – 12 nodes + 2 = 4  V(G) = 3 predicate nodes + 1 = 4

21 DERIVING THE BASIS SET AND TEST CASES 1)Using the design or code as a foundation, draw a corresponding flow graph 2)Determine the cyclomatic complexity of the resultant flow graph 3)Determine a basis set of linearly independent paths 4)Prepare test cases that will force execution of each path in the basis set

BLACK-BOX TESTING

BLACK BOX TESTING Test cases are derived from formal specification of the system. Test case selection can be done without any reference to the program design or code. Only tests the functionality and features of the program. Not the internal operation. Advantages  Test case selection is done before the implementation of a program.  Help in getting the design and coding correct with respect to the specification.

25 BLACK-BOX TESTING CATEGORIES Incorrect or missing functions Interface errors Errors in data structures or external data base access Behavior or performance errors Initialization and termination errors