Skip to main content Accessibility help
×
Hostname: page-component-76fb5796d-zzh7m Total loading time: 0 Render date: 2024-04-27T16:43:23.668Z Has data issue: false hasContentIssue false

4 - Structural Testing

Published online by Cambridge University Press:  05 November 2012

Yogesh Singh
Affiliation:
Guru Gobind Singh Indraprastha University, Delhi
Get access

Summary

Structural testing is considered more technical than functional testing. It attempts to design test cases from the source code and not from the specifications. The source code becomes the base document which is examined thoroughly in order to understand the internal structure and other implementation details. It also gives insight in to the source code which may be used as an essential knowledge for the design of test cases. Structural testing techniques are also known as white box testing techniques due to consideration of internal structure and other implementation details of the program. Many structural testing techniques are available and some of them are given in this chapter like control flow testing, data flow testing, slice based testing and mutation testing.

CONTROL FLOW TESTING

This technique is very popular due to its simplicity and effectiveness. We identify paths of the program and write test cases to execute those paths. As we all know, path is a sequence of statements that begins at an entry and ends at an exit. As shown in chapter 1, there may be too many paths in a program and it may not be feasible to execute all of them. As the number of decisions increase in the program, the number of paths also increase accordingly.

Every path covers a portion of the program. We define ‘coverage’ as a ‘percentage of source code that has been tested with respect to the total source code available for testing’.

Type
Chapter
Information
Software Testing , pp. 165 - 229
Publisher: Cambridge University Press
Print publication year: 2011

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Structural Testing
  • Yogesh Singh, Guru Gobind Singh Indraprastha University, Delhi
  • Book: Software Testing
  • Online publication: 05 November 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9781139196185.005
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Structural Testing
  • Yogesh Singh, Guru Gobind Singh Indraprastha University, Delhi
  • Book: Software Testing
  • Online publication: 05 November 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9781139196185.005
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Structural Testing
  • Yogesh Singh, Guru Gobind Singh Indraprastha University, Delhi
  • Book: Software Testing
  • Online publication: 05 November 2012
  • Chapter DOI: https://doi.org/10.1017/CBO9781139196185.005
Available formats
×