Structural Coverage. Measurement of structural coverage of code is a means of assessing the thoroughness of testing. Such metrics do not constitute testing.

Slides:



Advertisements
Similar presentations
Software Testing. Quality is Hard to Pin Down Concise, clear definition is elusive Not easily quantifiable Many things to many people You'll know it when.
Advertisements

Whitebox Testing Fra: CS Fall Whitebox Testing AKA Structural, Basis Path Test Normally used at unit level Assumes errors at unit level are.
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Lecture 11 Instructor Paulo Alencar.
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
Software Failure: Reasons Incorrect, missing, impossible requirements * Requirement validation. Incorrect specification * Specification verification. Faulty.
David Woo (dxw07u).  What is “White Box Testing”  Data Processing and Calculation Correctness Tests  Correctness Tests:  Path Coverage  Line Coverage.
INFORMATION TECHNOLOGIES SAFETY AND QUALITY THROUGH INFORMATION TECHNOLOGY WSRS Ulm – 20 Sept St. Ramberger / Th.Gruber 1 Experience Report: Error.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 16, 1999.
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.
COMP2001 Testing. Aims of Testing To achieve a correct system producing correct results with a variety of input data.
Fall, 2006SW Eng Standalone Progs, Univ of Colorado Boulder 1 Wk 11 Glass Box Testing, Flow Graphs, Test Coverage SW Engineering of Standalone Programs.
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.
Software Testing and Quality Assurance
Software Testing and Quality Assurance White Box Testing.
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
© 2006 Fraunhofer CESE1 MC/DC in a nutshell Christopher Ackermann.
DAIMI(c) Henrik Bærbak Christensen1 White-box Testing Let us open the box...
Testing Dr. Andrew Wallace PhD BEng(hons) EurIng
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 =
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
Validation Metrics. Metrics are Needed to Answer the Following Questions How much time is required to find bugs, fix them, and verify that they are fixed?
CMSC 345 Fall 2000 Unit Testing. The testing process.
Chapter 13: Implementation Phase 13.3 Good Programming Practice 13.6 Module Test Case Selection 13.7 Black-Box Module-Testing Techniques 13.8 Glass-Box.
Testing Theory cont. Introduction Categories of Metrics Review of several OO metrics Format of Presentation CEN 5076 Class 6 – 10/10.
Path Testing + Coverage Chapter 9 Assigned reading from Binder.
© SERG Dependable Software Systems (Mutation) Dependable Software Systems Topics in Mutation Testing and Program Perturbation Material drawn from [Offutt.
Advantages and Disadvantages
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.
1 Software Testing & Quality Assurance Lecture 14 Created by: Paulo Alencar Modified by: Frank Xu.
University of Palestine software engineering department Testing of Software Systems Testing throughout the software life cycle instructor: Tasneem.
White Box-based Coverage Testing (© 2012 Professor W. Eric Wong, The University of Texas at Dallas) 111 W. Eric Wong Department of Computer Science The.
WHITE BOX TESTING IS4500 Copyright © 2012 by The Cathris Group and Martin J. Schedlbauer. All Rights Reserved. Do Not Duplicate or Distribute Without Written.
Chapter 1: Fundamental of Testing Systems Testing & Evaluation (MNN1063)
Computer Science 1 Systematic Structural Testing of Firewall Policies JeeHyun Hwang 1, Tao Xie 1, Fei Chen 2, and Alex Liu 2 North Carolina State University.
Theory and Practice of Software Testing
Chapter 9: Path Testing Csci 565 Spring Objectives  Decision-to-decision path (DD-Paths)  Test Coverage Metrics  Basis Path Testing  Observation.
1 Test Coverage Coverage can be based on: –source code –object code –model –control flow graph –(extended) finite state machines –data flow graph –requirements.
Mutation Testing Breaking the application to test it.
Chapter 8 Testing the Programs. Integration Testing  Combine individual comp., into a working s/m.  Test strategy gives why & how comp., are combined.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
CS223: Software Engineering Lecture 26: Software Testing.
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.
ISQB Software Testing Section Meeting 10 Dec 2012.
Software Dependability
BASIS PATH TESTING.
White-Box Testing Techniques IV
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
White-Box Testing Techniques IV
Cyclomatic complexity
Data Coverage and Code Coverage
CONTROL FLOW TESTING.
White-Box Testing.
CHAPTER 4 Test Design Techniques
UNIT-4 BLACKBOX AND WHITEBOX TESTING
CSCE 747 Software Testing and Quality Assurance
White-Box Testing.
Fundamental Test Process
Different Testing Methodology
Structural Coverage.
Test coverage Tor Stålhane.
Sudipto Ghosh CS 406 Fall 99 November 16, 1999
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Structural Coverage.
Logic Coverage for Source Code CS 4501 / 6501 Software Testing
Whitebox Testing.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Unit III – Chapter 3 Path Testing.
Presentation transcript:

Structural Coverage

Measurement of structural coverage of code is a means of assessing the thoroughness of testing. Such metrics do not constitute testing techniques, but a measure of the effectiveness of testing techniques.

A coverage metric is expressed in terms of a ratio of the metric items executed or evaluated at least once to the total number of metric items. This is usually expressed as a percentage. A selection of structural coverage metrics which are based on control flow analysis

A metric should also be achievable. It should be possible and practical to achieve 100% coverage (or very close to 100% coverage) of a metric. Any value less than 100% requires investigation to determine why less than 100% has been achieved. – If it is the result of a problem in the code, the problem should be fixed and tests run again. – If it is the result of a problem in the test data, the problem should be fixed and tests run again. – If it is because 100% coverage is infeasible, then the reasons for infeasibility must be ascertained and justified.

Test data required to achieve 100% coverage therefore has to be maintainable. An ideal criteria against which a coverage metric should be assessed is its effectiveness at detecting faults in software. The effectiveness is assumed to be a function ofthoroughness. The thoroughness with which test data designed to fulfill a metric actually exercises the code is assessed.

Statement Coverage Decision/Branch Coverage Condition Coverage Decision/Condition Coverage Path Coverage

Statement Coverage = s/S where: – s = Number of statements executed at least once. – S = Total number of executable statements.

Decision coverage = d/D where: – d = Number of decision outcomes evaluated at least once. – D = Total number of decision outcomes.

Path Coverage = p/P where: – p = Number of paths executed at least once. – P = Total number of paths.

Condition Operand Coverage = c/C where: – c = Number of condition operand values evaluated at least once. – C = Total number of condition operand values.