Presented by: Ritesh Jain Date: 16-Jun-05 Software Quality Testing.

Slides:



Advertisements
Similar presentations
Defect testing Objectives
Advertisements

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.
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.
Chapter 17 Software Testing Techniques
TESTING LOOPS ● Simple Loops ● Nested Loops ● Concatenated Loops ● Unstructured Loops.
1 “White box” or “glass box” tests “White Box” (or “Glass Box”) Tests.
IMSE Week 18 White Box or Structural Testing Reading:Sommerville (4th edition) ch 22 orPressman (4th edition) ch 16.
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.
Software Engineering Lecture 12 Software Testing Techniques 1.
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
Path testing Path testing is a “design structural testing” in that it is based on detailed design & the source code of the program to be tested. The methodology.
Software Systems Verification and Validation Laboratory Assignment 3
System/Software Testing
Software Testing. Recap Software testing – Why do we do testing? – When it is done? – Who does it? Software testing process / phases in software testing.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
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.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
CMSC 345 Fall 2000 Unit Testing. The testing process.
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 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
Software Testing. 2 CMSC 345, Version 4/12 Topics The testing process  unit testing  integration and system testing  acceptance testing Test case planning.
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.
BASIS PATH TESTING.
A13. Testing Intro Data Structures & SE Computer Science Dept Va Tech Aug., 2001 © Barnette ND, McQuain WD 1 Levels of Verification The Unreachable.
White Box Testing Arun Lakhotia University of Southwestern Louisiana P.O. Box Lafayette, LA 70504, USA
CS451 Lecture 10: Software Testing Yugi Lee STB #555 (816)
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.
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.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
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.
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.
Software Engineering (CSI 321)
Chapter 17 Software Testing Techniques
Based on slides created by Ian Sommerville & Gary Kimura
Software Testing.
BASIS PATH TESTING.
Software Testing.
Software Testing.
Software Engineering (CSI 321)
Loop Testing.
Chapter 13 & 14 Software Testing Strategies and Techniques
Types of Testing Visit to more Learning Resources.
White Box Testing.
UNIT-IV ECS-602 Software engineering PART-I
Software Testing (Lecture 11-a)
Chapter 14 Software Testing Techniques
“White box” or “glass box” tests
Static Testing Static testing refers to testing that takes place without Execution - examining and reviewing it. Dynamic Testing Dynamic testing is what.
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
White-Box Testing Techniques I
Chapter 14 Software Testing Techniques
Control Structure Testing
Chapter 18 Testing Conventional Applications.
Software Testing Techniques
CS410 – Software Engineering Lecture #11: Testing II
Chapter 13 & 14 Software Testing Strategies and Techniques 1 Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Presentation transcript:

Presented by: Ritesh Jain Date: 16-Jun-05 Software Quality Testing

Strategies & Methodologies of testing White Box. Black Box.

Testing StaticDynamic FunctionalStructural (Functionality of the program)(Logic of the Program) Black Box Testing White Box Testing

Black Box Testing Methods. 1.Functional Testing 2.Load Testing 3.Stress Testing 4.Ad-hoc Testing 5.Exploratory Testing 6.Usability Testing 7.Smoke Testing 8.Recovery Testing 9.Volume Testing. 10 Regression Testing. 11 User Acceptance Testing 12 Alpha Testing 13 Beta Testing

White Box Testing Focus: thoroughness (coverage) every statement in the component is executed at least once. Four types of White Box testing techniques 1.Statement Testing 2.Loop Testing 3.Path Testing 4.Branch Testing.

Techniques of white box testing Memory –access & memory-management error detection. Memory leaks Uninitialized memory reads Array-bounds errors Memory allocation errors Garbage-collection issues (JAVA) Internationalization errors embedded string literals Use of unsafe functions Pointer arithmetic Time, Date, Number, Currency functions. Performance profiling Fault Injection Static Analysis.

I Statement Testing (Algebraic Testing): Test single statements (choice of operators in polynomials) II Loop Testing 1Simple Loop 2Nested Loop 3Concatenated Loop 4Unstructured Loop III Path Testing IV Branch Testing. V Mutation Testing

Types of Loop & their Testing. Simple LoopNested LoopConcatenated Loop Unstructured Loop

Testing Simple Loop The following sets 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

Testing Nested loop If we extend the test approach from simple loops to nested loops, the number of possible tests would grow geometrically as the level of nesting increases. 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 values. Add other tests for out-of-range or exclude values. 3. Work outward, conducting tests for the next loop, but keep all other outer loops at minimum values and other nested loops to “typical” values. 4. Continue until all loops have been tested.

Testing Concatenated loop Concatenated loops can be tested using the approach defined for simple loops, if each of the loops is independent of the other. However, if two loops are concatenated and the loop counter for loop 1 is used as the initial value for loop 2, then the loops are not independent.

Testing Unstructured loop Whenever possible, this class of loops should be redesigned to reflect the use of the structured programming constructs.

Path Testing Make sure all the path should be executed at least once.

Path Testing

Constructing the logical flow diagram

Finding the test cases

Cyclomactic Complexity Cyclomatic complexity is a measure of software complexity first introduced by Thomas McCabe in 1976 and measures the number of linearly-independent paths through a program module. How to measure the Cyclomactic Complexity. V(G)= No of Regions V(G)=E-N+2 V(G)=P+1 Where V(G) Represents the cyclomactic complexity,E represents the no of edges, N represents the no of node, P represents the predicate node.

Ex.

Solutions No of Regions is 4.

On the basis of Edges & Nodes V(G)=E-N+2 No of Edges =11 No of Nodes=9 V(G)= V(G)=4

On the basis of Predicate nodes V(G)=P+1 Predicate Node = 3(1,2.3,6) V(G)=3+1 V(G)=4.

Devise a test plan A program reads 3 integer values. The 3 values are interpreted as representing the lengths of the sides of a triangle. The program prints a message that states whether the triangle is scalene, isosceles, or equilateral. Write test cases that would adequately test this program.

Test Cases 1. Valid scalene (5, 3, 4) => scalene 2. Valid isosceles (3, 3, 4) => isosceles 3. Valid equilateral (3, 3, 3,) => equilateral 4. First permutation of 2 sides (50, 50, 25) => isosceles 5. Second perm of 2 sides (25, 50, 50) => isosceles 6. Third perm of 2 sides (50, 25, 50) => isosceles 7. One side zero (1000, 1000, 0) => invalid

Test Cases 8. One side has negative length (3, 3, -4) => invalid 9. first perm of two equal sides (5, 5, 10) => invalid 10. Second perm of 2 equal sides (10, 5, 5) => invalid 11. Third perm of 2 equal sides (5, 10, 5) => invalid 12. Three sides >0, sum of 2 smallest invalid 13. Perm 2 of line lengths in test 12 (2, 5, 8) => invalid 14. Perm 3 of line lengths in test 12 (2, 8, 5) => invalid

Test Cases 15. Perm 4 of line lengths in test 12 (8, 5, 2) => inv 16. Perm 5 of line lengths in test 12 (5, 8, 2) => inv 17. Perm 6 of line lengths in test 12 (5, 2, 8) => inv 18. All sides zero (0, 0, 0) => inv 19. Non-integer input, side a 4, 5) => inv 20. Non-integer input, side b (3, $, 5) => inv 21. Non-integer input, side c (3, 4, %) => inv

Test Cases 22. Missing input a (, 4, 5) => invalid 23. Missing input b (3,, 5) => invalid 24. Missing input c (3, 4, ) => invalid 25. Three sides > 0, one side equals the sum of the other two (12, 5, 7) => inv 26. Perm 2 of line lengths in test 25 (12, 7, 5) => inv 27. Perm 3 of line lengths in test 25 (7, 5, 12) => inv 28. Perm 4 of line lengths in test 25 (7, 12, 5) => inv 29. Perm 5 of line lengths in test 25 (5, 12, 7) => inv 30. Perm 6 of line lengths in test 25 (5, 7, 12) => inv

Test Cases 31. Three sides at max values (32767, 32767, ) => inv 32. Two sides at max values (32767, 32767, 1) => inv 33. One side at max values (32767, 1, 1) => inv

White Box Testing Tools

Queries.