David Woo (dxw07u).  What is “White Box Testing”  Data Processing and Calculation Correctness Tests  Correctness Tests:  Path Coverage  Line Coverage.

Slides:



Advertisements
Similar presentations
Automating Software Module Testing for FAA Certification Usha Santhanam The Boeing Company.
Advertisements

Software Testing Techniques
Chapter 14 Software Testing Techniques - Testing fundamentals - White-box testing - Black-box testing - Object-oriented testing methods (Source: Pressman,
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Software Failure: Reasons Incorrect, missing, impossible requirements * Requirement validation. Incorrect specification * Specification verification. Faulty.
OHT 9.1 Galin, SQA from theory to implementation © Pearson Education Limited 2004 Definitions and objectives Software testing strategies Software test.
1 Static Analysis Methods CSSE 376 Software Quality Assurance Rose-Hulman Institute of Technology March 20, 2007.
Software engineering for real-time systems
OHT 9.1 Galin, SQA from theory to implementation © Pearson Education Limited 2004 Definitions and objectives Software testing strategies Software test.
24/06/2015Dr Andy Brooks1 MSc Software Maintenance MS Viðhald hugbúnaðar Fyrirlestur 41 Maintainability of OSS OSS Open Source Software CSS Closed Source.
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
Unit Testing CS 414 – Software Engineering I Don Bagert Rose-Hulman Institute of Technology January 16, 2003.
OHT 9.1 Galin, SQA from theory to implementation © Pearson Education Limited 2004 Chapter 9.3 Software Testing Strategies.
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
Test coverage Tor Stålhane. What is test coverage Let c denote the unit type that is considered – e.g. requirements or statements. We then have C c =
A Complexity Measure THOMAS J. McCABE Presented by Sarochapol Rattanasopinswat.
Cyclomatic Complexity Dan Fleck Fall 2009 Dan Fleck Fall 2009.
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.
Prof. Mohamed Batouche Software Testing.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Defect testing l Testing programs to establish the presence of system defects.
Software Quality Applied throughout SW Engineering Process Encompasses ▫ Analysis, design, coding, testing, tools ▫ Formal tech reviews ▫ Multi-tiered.
Software Reviews & testing Software Reviews & testing An Overview.
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
Testing Methods Carl Smith National Certificate Year 2 – Unit 4.
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 Program Testing (Lecture 14) Prof. R. Mall Dept. of CSE, IIT, Kharagpur.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
Black Box Testing : The technique of testing without having any knowledge of the interior workings of the application is Black Box testing. The tester.
Software Testing White Box Testing. Agenda What is White Box Testing Correctness Tests and Path Coverage Correctness Tests and Line Coverage McCabe Cyclomatic.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
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.
Agent program is the one part(class)of Othello program. How many test cases do you have to test? Reversi [Othello]
White Box Testing by : Andika Bayu H.
Cyclomatic complexity (or conditional complexity) is a software metric (measurement). Its gives the number of indepented paths through strongly connected.
CS223: Software Engineering Lecture 21: Unit Testing Metric.
Dynamic White-Box Testing What is code coverage? What are the different types of code coverage? How to derive test cases from control flows?
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Software Testing. SE, Testing, Hans van Vliet, © Nasty question  Suppose you are being asked to lead the team to test the software that controls.
CHAPTER 9 - PART 2 Software Testing Strategies. Lesson Outlines ■ White box testing – Data processing and calculation correctness tests – Correctness.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
White Box Testing. Agenda White-box vs Black-box Program Flow Controls White-box Test Methods Exercises Complexity Q&A.
Testing Integral part of the software development process.
Software Test Metrics When you can measure what you are speaking about and express it in numbers, you know something about it; but when you cannot measure,
PREPARED BY G.VIJAYA KUMAR ASST.PROFESSOR
BASIS PATH TESTING.
Software Metrics 1.
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)
Chapter 13 & 14 Software Testing Strategies and Techniques
Data Coverage and Code Coverage
Structural testing, Path Testing
Types of Testing Visit to more Learning Resources.
White Box Testing.
CHAPTER 4 Test Design Techniques
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Software Testing (Lecture 11-a)
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 Testing “If you can’t test it, you can’t design it”
UNIT-4 BLACKBOX AND WHITEBOX TESTING
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:

David Woo (dxw07u)

 What is “White Box Testing”  Data Processing and Calculation Correctness Tests  Correctness Tests:  Path Coverage  Line Coverage  McCabe’s Cyclomatic complexity Metrics  Software Qualification and Reusability Testing  Advantages and Disadvantages

 IEEE Definition “Testing that takes into account the internal mechanism of a system component”.  Examines internal Calculation paths in order identify bugs.  Software Quality Assurance tool used to enforce the Quality of the software.  Enables Performance: ◦ Data Processing ◦ Calculation correctness tests. ◦ Software Qualification Tests ◦ Maintainability Tests ◦ Re-usability Tests

 Is a procedure based on checking the data processing for each test case.  An Immediate Issue becomes apparent:  Coverage ◦ Number of possible processing paths ◦ Multitude of lines of code Two possible solutions “Path Coverage” to plan our test to cover all the possible paths, where coverage is measured by a percentage of paths covered. “Line Coverage” to plan our tests to cover all the program code lines, where coverage is measured by percentage of lines covered

 Path Testing when used is based upon achieving “complete” path coverage.  This involves following all of the possible paths in a module.  Different paths in a software module are created by the choice in conditional statements.  The main reason for working as a percentage to find out how much of the testing has been completed.  However when looking at the amount of resources needed it becomes very “impractical”.

 Another major problem that is addresses is “the cost” an example of this can be shown below.  Modules = 5 conditional statements ◦ Each with only 2 options (IF-THEN-ELSE)  EQUALS = 512 different paths (25 – 50 lines of code)  Achieve “Complete Path Coverage”  512 test cases should be prepared  Modules = 50 conditional statements  Equals = 51,200 different paths (25 – 50 lines of code)  Achieve “Complete Path Coverage”  51,200 test cases should be prepared  Realistic?!?!?

 Far fewer tests cases – resulting in a great of paths untested.  To achieve full line coverage, every line of code is to be executed at least once during the testing process.  Car Insurance Scenario  In the flow diagram: ◦ Diamonds Represent: a logical condition or predicate. ◦ Rectantgle Represents: a sequence of processing steps that are executed unconditionally. ◦ Head of Arrow: Indicates the flow of control ◦ Circ le – End of transition.

 Complete Full Path Coverage  1=  2=  3=  4=  …  13=  14=  …  23=  24=

 Measures the complexity of a program or module.  Addition to this it also measures the “maximum number of independent paths needed to successfully achieve full line coverage”  Calculates this through a formulae to work out the independent paths needed.  This type of method works off the characteristics of a flow graph. Our example will give us a better understanding of how McCabes theories work!

 The formulae:  V(G) = R  V (G) = E –N + 2  V(G) = P + 1  R = The number of regions that is involved in the program flow graph. (Any enclosed area)  E = The number of edges  N = The number of nodes  P = The number of decisions

 The formulae:  V(G) = R  V (G) = E –N + 2  V(G) = P + 1  Our Example  V(G) = 6  V(G) = = 6  V(G) = = 6  Resulting metrics calculations indicate that the maximum number of independent paths is 6.  Summary  Programs with cyclomatic complexities of less then 5 are simple and easy to understand  20+ The complexity is perceived as high.  50+ the software for practical purposes becomes unpractical.

This type of procedure is very crucial and is just important as the rest. Main objective is to check whether the software program qualifies (coding and documentation) to the correct standards. This will lead to a more efficient program when: Team leaders check the software, Replacement programmers proceed with existing programmers tasks. Maintenance programmer to fix and update the system. Software Qualification tests first takes into account whether the software development responded positively. Example: Does the coding style fulfil coding style procedures. Does the code fulfil the correct standards and structure of the code. Is the Documentation to the correct standard.

 Main procedure is to determine whether the packaging and documentation of the programs listed for reuse confirm to the correct standards.  Reduces the project resources requirements and improves the quality of the new software systems.  This shortens the development period.  Benefits the whole organisation.  Supporting the of growth of software reuse.

 Advantages  Enforces the determination of software correctness as explained in the processing paths.  Allows performance of line coverage, it allows the tester to identify the code that has not yet been executed and test cases can be applied to these lines of code.  It ensures quality of coding work and apply to coding standards.  Disadvantages  As knowledge of code and internal structure is a prerequisite, a skilled tester is needed to carry out this type of testing, which increases the cost. And it is nearly impossible to look into every bit of code to find out hidden errors, which may create problems, resulting in failure of the application