Skip to main content

Synthesis of Scenario Based Test Cases from B Models

  • Conference paper
Formal Approaches to Software Testing and Runtime Verification (FATES 2006, RV 2006)

Abstract

When models are formal, model based testing approaches usually construct a coverage graph through symbolic execution and derive test cases in the form of paths in the coverage graph. Thereafter consistency between the model and the implementation is verified in relation to the test cases. Existing approaches, especially when dealing with model oriented languages like B, partition the input space of each operation in the model to create operation instances, and then animate the model in relation to these instances. The paths or the test cases are now a sequence of operation instances. However, in this approach, there is no guarantee that we test the user scenarios. In this paper, we first define scenario based test cases in relation to the initial specification. When this specification passes through a succession of refinements, we derive scenario based test cases for each refinement and show that all these test cases are equivalent to the test cases of the original specification.

This research was carried out as part of the EU research project IST 511599 RODIN (Rigorous Open Development Environment for Complex Systems) http://rodin.cs. ncl.ac.uk.

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 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

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abrial, J.-R.: The B–Book: Assigning Programs to Meanings. Cambridge University Press, Cambridge (1996)

    Book  MATH  Google Scholar 

  2. Bernard, E., Legeard, B., Luck, X., Peureux, F.: Generation of test sequences from formal specifications: GSM 11-11 standard case study. Software Practice and Experience 34(10), 915–948 (2004)

    Article  Google Scholar 

  3. Dick, J., Faivre, A.: Automating the Generation and Sequencing of Test Cases from Model-based Specifications. In: Larsen, P.G., Woodcock, J.C.P. (eds.) FME 1993. LNCS, vol. 670, pp. 268–284. Springer, Heidelberg (1993)

    Chapter  Google Scholar 

  4. Dalal, S.R., Jain, A., Karunanithi, N., Leaton, J.M., Lott, C.M., Patton, G.C., Horowitz, B.M.: Model Based Testing in Practice. In: Proc. of ICSE 1999, Los Angeles, pp. 285–294 (1999)

    Google Scholar 

  5. Derrick, J., Boiten, E.: Testing refinements of state-based formal specifications. Software Testing, Verification and Reliability (9), 27–50 (1999)

    Article  Google Scholar 

  6. Dunne, S.: Introducing Backward Refinement into B. In: Bert, D., Bowen, J.P., King, S. (eds.) ZB 2003. LNCS, vol. 2651, pp. 178–196. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  7. Garey, M.R., Johnson, D.S.: Computers and Intractability. W. H. Freeman and Company, New York (1979)

    MATH  Google Scholar 

  8. He, J., Hoare, C.A.R., Sanders, J.W.: Data refinement refined. In: Robinet, B., Wilhelm, R. (eds.) ESOP 1986. LNCS, vol. 213, pp. 187–196. Springer, Heidelberg (1986)

    Google Scholar 

  9. Jones, C.B.: Systematic Software Development using VDM, 2nd edn. Prentice Hall, Englewood Cliffs (1990)

    MATH  Google Scholar 

  10. Leuschel, M., Butler, M.: Automatic Refinement Checking for B. In: Lau, K.-K., Banach, R. (eds.) ICFEM 2005. LNCS, vol. 3785, pp. 345–359. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  11. Metayer, C., Abrial, J.-R., Voisin, L.: Event-B Language, RODIN deliverable 3.2 (2005), http://rodin.cs.cnl.ac.uk

  12. OMG.: Unified Modeling Language (UML), Version 2.0, The Object Management Group (2005), website: http://www.omg.org

  13. Plosch, R.: Contracts, Scenarios and Prototypes. Springer, Heidelberg (2004)

    Book  Google Scholar 

  14. Richardson, D.J., Leif Aha, A., O’Malley, T.O.: Specification-based Test Oracles for Reactive Systems. In: Proc. of the 14th ICSE, Melbourne, pp. 105–118 (1992)

    Google Scholar 

  15. Satpathy, M., Leuschel, M., Butler, M.: ProTest: An Automatic Test Environment for B Specifications. ENTCS 111, 113–136 (2005)

    Google Scholar 

  16. Spivey, J.M.: Understanding Z. Cambridge University Press, Cambridge (1988)

    MATH  Google Scholar 

  17. Van Glabbeek, R.J., Weijland, W.P.: Branching Time and Abstraction in Bisimulation Semantics. Journal of the ACM 43(3), 555–600 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  18. Zhu, H., Hall, P.A.V., May, J.H.R.: Software Unit Test Coverage and Adequacy. ACM Computing Surveys 29(4), 366–427 (1997)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Satpathy, M., Malik, Q.A., Lilius, J. (2006). Synthesis of Scenario Based Test Cases from B Models. In: Havelund, K., Núñez, M., Roşu, G., Wolff, B. (eds) Formal Approaches to Software Testing and Runtime Verification. FATES RV 2006 2006. Lecture Notes in Computer Science, vol 4262. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11940197_9

Download citation

  • DOI: https://doi.org/10.1007/11940197_9

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-49699-1

  • Online ISBN: 978-3-540-49703-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics