Software Systems Verification and Validation Laboratory Assignment 3

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.
Chapter 14 Testing Tactics
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Creator: ACSession No: 13 Slide No: 1Reviewer: SS CSE300Advanced Software EngineeringFebruary 2006 Testing - Techniques CSE300 Advanced Software Engineering.
Chapter 17 Software Testing Techniques
TESTING LOOPS ● Simple Loops ● Nested Loops ● Concatenated Loops ● Unstructured Loops.
Software Testing Techniques. December Introduction Many aspects to achieving software quality –Formal reviews (of both the software process and.
White Box Testing Techniques Dynamic Testing. White box testing(1) Source code is known and used for test design While executing the test cases, the internal.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
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
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Unit Testing CS 414 – Software Engineering I Don Bagert Rose-Hulman Institute of Technology January 16, 2003.
Software Engineering Lecture 12 Software Testing Techniques 1.
Verificarea şi Validarea Sistemelor Soft Tem ă Laborator 2 Testare Black Box Dat ă primire laborator: Lab 2 Dat ă predare laborator: Lab 2,3.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Software Testing Techniques
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
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
1 Software Testing. 2 Path Testing 3 Structural Testing Also known as glass box, structural, clear box and white box testing. A software testing technique.
Unit Testing 101 Black Box v. White Box. Definition of V&V Verification - is the product correct Validation - is it the correct product.
INTRUDUCTION TO SOFTWARE TESTING TECHNIQUES BY PRADEEP I.
White-box Testing.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 14a: Software Testing Techniques Software Engineering: A Practitioner’s Approach, 6/e Chapter.
Software Testing and Reliability Southern Methodist University CSE 7314.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 6/e (McGraw-Hill 2005). Slides copyright 2005 by Roger Pressman.1.
Presented by: Ritesh Jain Date: 16-Jun-05 Software Quality Testing.
1 Program Testing (Lecture 14) Prof. R. Mall Dept. of CSE, IIT, Kharagpur.
BASIS PATH TESTING.
White Box Testing Arun Lakhotia University of Southwestern Louisiana P.O. Box Lafayette, LA 70504, USA
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.
Dynamic Testing.
White Box Testing by : Andika Bayu H.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
CSC 395 – Software Engineering Lecture 27: White-Box Testing.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
Software Engineering (CSI 321)
Chapter 17 Software Testing Techniques
Based on slides created by Ian Sommerville & Gary Kimura
BASIS PATH TESTING.
Software Testing.
White-Box Testing Pfleeger, S. Software Engineering Theory and Practice 2nd Edition. Prentice Hall, Ghezzi, C. et al., Fundamentals of Software Engineering.
Software Testing.
Software Engineering (CSI 321)
Loop Testing.
Chapter 18 Testing Conventional Applications
Chapter 13 & 14 Software Testing Strategies and Techniques
Structural testing, Path Testing
Types of Testing Visit to more Learning Resources.
White Box Testing.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Software Testing (Lecture 11-a)
Chapter 18 Testing Conventional Applications
Chapter 18 Testing Conventional Applications
Chapter 14 Software Testing Techniques
“White box” or “glass box” tests
Chapter 18 Testing Conventional Applications
White-Box Testing Techniques I
Chapter 14 Software Testing Techniques
Control Structure Testing
Chapter 18 Testing Conventional Applications.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
By: Lecturer Raoof Talal
Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Unit III – Chapter 3 Path Testing.
Presentation transcript:

Software Systems Verification and Validation Laboratory Assignment 3 White Box Testing Assignment date: Lab 3 Delivery date: Lab 3, 4

Software Systems Verification and Validation Testing The key issue of testing becomes: What subset of all possible test cases has the highest probability of detecting the most errors? Test-case design testing - cannot guarantee the absence of all errors. test-case design is important because complete testing is impossible.

Software Systems Verification and Validation Testing Black Box Testing Equivalence partitioning. Boundary-value analysis. Cause-effect graphing. Error guessing. White Box Testing Statement coverage. Decision coverage. Condition coverage. Decision-condition coverage. Multiple-condition coverage. …

Software Systems Verification and Validation White box Selection criteria statement branch coverage path coverage Termination criteria 1 test for coverage n>1 tests for coverage Need sufficient tests for statistical significance (statistical testing)

Software Systems Verification and Validation White box Basis path testing Flow Graph Notation (Control Flow Graph) A CFG is a graphical representation of a program unit. Three symbols are used to construct a CFG. Cyclomatic complexity - a software metric that provides a quantitative measure of the logical complexity of a program. used in the context of the basis path testing method, the value computed for cyclomatic complexity defines the number of independent paths in the basis set of a program and provides us with an upper bound for the number of tests that must be conducted to ensure that all statements have been executed at least once. (1) The number of regions of the flow graph correspond to the cyclomatic complexity. (2) Cyclomatic complexity, V(G), for a flow graph, G, is defined as V(G) = E - N + 2, where E is the number of flow graph edges, N is the number of flow graph nodes. (3) Cyclomatic complexity, V(G), for a flow graph, G, is also defined as V(G) =P+1, where P is the number of predicate nodes contained in the flow graph G. An independent path is any path through the program that introduces at least one new set of processing statements or a new condition. When stated in terms of a flow graph, an independent path must move along at least one edge that has not been traversed before the path is defined.

Software Systems Verification and Validation White box - Basis path testing The cyclomatic complexity can be computed using each of the algorithms just noted: 1. The flow graph has four regions. 2. V(G) = 11 edges 9 nodes + 2 = 4. 3. V(G) = 3 predicate nodes + 1 = 4. A set of independent paths for the flow graph is: path 1: 1-11 path 2: 1-2-3-4-5-10-1-11 path 3: 1-2-3-6-8-9-10-1-11 path 4: 1-2-3-6-7-9-10-1-11 Note that each new path introduces a new edge. The path 1-2-3-4-5-10-1-2-3-6-8-9-10-1-11 is not considered to be an independent path because it is simply a combination of already specified paths and does not traverse any new edges. Paths 1, 2, 3, and 4 constitute a basis set for the flow graph. That is, if tests can be designed to force execution of these paths (a basis set), every statement in the program will have been guaranteed to be executed at least one time and every condition will have been executed on its true and false sides.

Software Systems Verification and Validation Node coverage Edge coverage Select test case so that every edge in the graph is visited Also called branch coverage Implies node coverage Select test cases such that every node in the graph is visited Nodes represent statements Also called statement coverage – Each statement is executed at least once Select the minimal number of test cases Loop coverage - select test cases such that every loop boundary and interior is tested. Boundary: 0 iterations; Interior: 1 iteration and > 1 iterations. Condition coverage For each boolean condition, both the true and false case must be activated. Does not imply branch coverage. Multiple condition coverage. All the possible combinations of conditions must be activated. Implies branch coverage. Path coverage select test cases such that every path in the graph is visited

Software Systems Verification and Validation Loop coverage Simple loops The following set of tests can be applied to simple loops, where n is the maximum number of allowable passes through the loop. 1. Skip the loop entirely. 2. Only one pass through the loop. 3. Two passes through the loop. 4. m passes through the loop where m < n. 5. n 1, n, n + 1 passes through the loop. Nested loops 1. Start at the innermost loop. Set all other loops to minimum values. 2. Conduct simple loop tests for the innermost loop while holding the outer loops at their minimum iteration parameter (e.g., loop counter) values. Add other tests for out-of-range or excluded values. 3. Work outward, conducting tests for the next loop, but keeping all other outer loops at minimum values and other nested loops to "typical" values. 4. Continue until all loops have been tested.

Software Systems Verification and Validation JUnit & EclEmma Installation: Eclipse (JUnit included). EclEmmaEclipse_Help_menuSoftware_UpdatesAvailable_SoftwareAdd_Site (http://update.eclemma.org) and install it. click-dr. bara-meniuCustomizePerspectiveCommands tab Coverage See file JUnit_EclEMMA.pdf for instruction and example. http://junit.sourceforge.net/ http://www.eclemma.org/

Software Systems Verification and Validation Laboratory Assignment 3 White Box testing Assignment date: Lab 3 Delivery date: Lab 3, 4 See file AssignmentLab03.pdf