Skip to main content

Is There a Bug in the Program? Structural Program Testing

  • Chapter
  • First Online:
Software Verification and Analysis
  • 789 Accesses

Abstract:

As Black-Box (BB) testing (see Chap. 4), Structural (White-Box) program testing is an experiment with the program, in which the actual program results are compared with the expected ones, prescribed by the testing “oracle,” ideally the program specification. However, in structural testing, tests are synthesized on the basis of the code itself, rather than its specification. A structural testing strategy is defined in terms of Required Elements, i.e, program statements, or combinations thereof, that are to be exercised. The best known coverage criteria are expressed in terms of simple properties of the flow of control: These are statement and branch coverage. Less known, but potentially more powerful are data flow coverage criteria: Definition-Use Chains (Data Dependency in Chap. 7) and its generalization U(se)-Context. All four strategies are supported by STAD. However, due to the difficulties of test synthesis structural testing as a stand-alone method is currently out of the question. It can only be used as a measure of completeness of BB-testing. The main weakness of structural testing is the lack of sound theoretical foundations. To remedy this situation, an attempt has been made to (1) define formally the notions of program faults and errors in terms of the program verification schema and (2) formulate testing strategies in terms of program dependencies. Also, it has been suggested that besides the standard “main” objective of program testing, the detection of the fault, testing also offers a measure of fault localization and, for a passing test suite, the degree of confidence that the program is indeed correct.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 54.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    In general, the assertions A and B take as their arguments the current states and the values of the input vector X.

  2. 2.

    The post condition should involve ALL exported parameters. Otherwise, some exported parameters may be unrestricted.

References

  1. R.A. DeMillo, A.J. Offutt, Constraint-based automatic test data generation, IEEE Transactions on. Engineering, 17(9), 900-910, 1991.

    Article  Google Scholar 

  2. P.M. Herman, A data flow analysis approach to program testing. The Australian Computer Journal, 8(3), 347-354, 1976.

    Google Scholar 

  3. J. Laski, B. Korel, A data flow oriented program testing strategy, IEEE Transactions on. Engineering, SE-9(3), 347-354, 1983.

    Article  Google Scholar 

  4. J. Laski, An algorithm for the derivation of codefinitions in computer programs, Information Processing Letters, 23, 1986, 85-90.

    Article  Google Scholar 

  5. J. Laski, Path Expressions in Data Flow Program Testing, Proceedings of Compsaq 1990, The 14th International Computer Software and Applications Conference, Chicago, IL, Oct 29-Nov 2, 1990, pp.570-576.

    Google Scholar 

  6. J. Laski, Data flow testing in STAD, The Journal of Systems Software, 12(1), 1990, 3-14.

    Article  Google Scholar 

  7. J, Laski, W, Szermer, P, Luczycki, Error masking in computer programs, Journal for Software Testing, Verification and Reliability, 5(2), 1995, 81-105.

    Article  Google Scholar 

  8. J. Laski, W. Szermer, Identification of Program Modifications and its Applications in Software Maintenance, Proceedings of IEEE Conference on Software aintenance, Orlando, FL, Nov. 1992 , p. 2, IEEE Computer Society Press, Los Alamitos, CA.

    Google Scholar 

  9. K.W. Miller, , Estimating the probability of failure when testing reveals no failures, IEEE Transactions on. Engineering, 18(1), 33-43, 1992.

    Article  Google Scholar 

  10. S.C. Ntafos, On required element testing, IEEE Transactions on. Eng., SE-10(6), 795-803, 1984.

    Article  Google Scholar 

  11. S. Rapps, E. Weuyker, Selecting software test data using data flow information, IEEE Transactions on Software Engineering., SE-11(4), 367-375, 1985.

    Article  Google Scholar 

  12. J. Voas, PIE: A dynamic failure-based technique, IEEE Transactions on. Engineering, 18(8), 717-727, 1992.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag London Limited

About this chapter

Cite this chapter

Laski, J., Stanley, W. (2009). Is There a Bug in the Program? Structural Program Testing. In: Software Verification and Analysis. Springer, London. https://doi.org/10.1007/978-1-84882-240-5_8

Download citation

  • DOI: https://doi.org/10.1007/978-1-84882-240-5_8

  • Published:

  • Publisher Name: Springer, London

  • Print ISBN: 978-1-84882-239-9

  • Online ISBN: 978-1-84882-240-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics