Skip to main content

Testing Refinements by Refining Tests

  • Conference paper
ZUM ’98: The Z Formal Specification Notation (ZUM 1998)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1493))

Included in the following conference series:

Abstract

One of the potential benefits of formal methods is that they offer the possibility of reducing the costs of testing. A specification acts as both the benchmark against which any implementation is tested, and also as the means by which tests are generated. There has therefore been interest in developing test generation techniques from formal specifications, and a number of different methods have been derived for state based languages such as Z, B and VDM. However, in addition to deriving tests from a formal specification, we might wish to refine the specification further before its implementation.

The purpose of this paper is to explore the relationship between testing and refinement. As our model for test generation we use a DNF partition analysis for operations written in Z, which produces a number of disjoint test cases for each operation. In this paper we discuss how the partition analysis of an operation alters upon refinement, and we develop techniques that allow us to refine abstract tests in order to generate test cases for a refinement. To do so we use (and extend existing) methods for calculating the weakest data refinement of a specification.

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. Brinksma, E.: A theory for the derivation of tests. In: Aggarwal, S., Sabnani, K. (eds.) Protocol Specification, Testing and Verification VIII, Atlantic City, USA, pp. 63–74. North-Holland, Amsterdam (1988)

    Google Scholar 

  3. Brinksma, E., Scollo, G., Steenbergen, C.: Process specification, their implementation and their tests. In: Sarikaya, B., van Bochmann, G. (eds.) Protocol Specification, Testing and Verification VI, Montreal, Canada, pp. 349–360. North-Holland, Amsterdam (1986)

    Google Scholar 

  4. Carrington, D., Stocks, P.: A tale of two paradigms: Formal methods and software testing. In: Bowen, J.P., Hall, J.A. (eds.) Z User Workshop, Cambridge, June 1994, pp. 51–68 (1994)

    Google Scholar 

  5. Cusack, E., Wezeman, C.: Deriving tests for objects specified in Z. In: Bowen, J.P., Nicholls, J.E. (eds.) Z User Workshop, London. Workshops in Computing 1992, pp. 180–195. Springer, Heidelberg (1993)

    Google Scholar 

  6. de Nicola, R., Hennessy, M.: Testing equivalences for processes. Theoretical Computer Science 34(3), 83–133 (1984)

    Article  MATH  MathSciNet  Google Scholar 

  7. Derrick, J., Boiten, E.A.: Calculating and verifying refinements of state based specifications. Submitted of publication (1998)

    Google Scholar 

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

  9. He, J.: Process refinement. In: McDermid, J. (ed.) The Theory and Practice of Refinement, Butterworths (1989)

    Google Scholar 

  10. Heerink, L., Tretmans, J.: Refusal testing for classes of transition systems with inputs and outputs. In: Mizuno, T., Shiratori, N., Higashino, T., Togashi, A. (eds.) FORTE/PSTV XVII 1997. Chapman and Hall, Boca Raton (1997)

    Google Scholar 

  11. Horcher, H.-M.: Improving software tests using Z specifications. In: Bowen, J.P., Hinchey, M.G. (eds.) ZUM 1995. LNCS, vol. 967, pp. 152–166. Springer, Heidelberg (1995)

    Google Scholar 

  12. Jones, C.B.: Systematic Software Development using VDM. Prentice Hall International Series in Computer Science (1989)

    Google Scholar 

  13. Josephs, M.B.: The data refinement calculator for Z specifications. Information Processing Letters 27, 29–33 (1988)

    Article  MathSciNet  Google Scholar 

  14. Scullard, G.T.: Test case selection using VDM. In: Bloomfield, R.E., Jones, R.B., Marshall, L.S. (eds.) VDM 1988. LNCS, vol. 328, pp. 178–186. Springer, Heidelberg (1988)

    Google Scholar 

  15. Singh, H., Conrad, M., Sadeghipour, S.: Test case design based on Z and the classification-tree method. In: Hinchey, M.G., Liu, S. (eds.) First IEEE International Conference on Formal Engineering Methods (ICFEM 1997), Hiroshima, Japan, pp. 81–90. IEEE Computer Society Press, Los Alamitos (1997)

    Chapter  Google Scholar 

  16. Smith, G., Derrick, J.: Refinement and verification of concurrent systems specified in Object-Z and CSP. In: Hinchey, M.G., Liu, S. (eds.) First IEEE International Conference on Formal Engineering Methods (ICFEM 1997), Hiroshima, Japan, pp. 293–302. IEEE Computer Society Press, Los Alamitos (1997)

    Chapter  Google Scholar 

  17. Spivey, J.M.: The Z Notation: A Reference Manual. International Series in Computer Science (1989)

    Google Scholar 

  18. Stepney, S.: Testing as abstraction. In: Bowen, J.P., Hinchey, M.G. (eds.) ZUM 1995. LNCS, vol. 967, Springer, Heidelberg (1995)

    Google Scholar 

  19. Stocks, P., Carrington, D.: Deriving software test cases from formal specifications. In: 6th Australian Software Engineering Conference, July 1991, pp. 327–340 (1991)

    Google Scholar 

  20. van Aertryck, L., Benveniste, M., Le Metayer, D.: Casting: A formally based software test generation method. In: Hinchey, M.G., Liu, S. (eds.) First IEEE International Conference on Formal Engineering Methods (ICFEM 1997), Hiroshima, Japan, pp. 101–110. IEEE Computer Society Press, Los Alamitos (1997)

    Chapter  Google Scholar 

  21. Wezeman, C., Judge, A.J.: Z for managed objects. In: Bowen, J.P., Hall, J.A. (eds.) Z User Workshop, Cambridge. Workshops in Computing, pp. 108–119. Springer, Heidelberg (1994)

    Google Scholar 

  22. Woodcock, J.C.P., Davies, J.: Using Z: Specification, Refinement, and Proof. Prentice Hall International Series in Computer Science (1996)

    Google Scholar 

  23. Woodcock, J.C.P., Morgan, C.C.: Refinement of state-based concurrent systems. In: Langmaack, H., Hoare, C.A.R., Bjorner, D. (eds.) VDM 1990. LNCS, vol. 428, pp. 340–351. Springer, Heidelberg (1990)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1998 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Derrick, J., Boiten, E. (1998). Testing Refinements by Refining Tests. In: Bowen, J.P., Fett, A., Hinchey, M.G. (eds) ZUM ’98: The Z Formal Specification Notation. ZUM 1998. Lecture Notes in Computer Science, vol 1493. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-49676-2_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-49676-2_19

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-65070-6

  • Online ISBN: 978-3-540-49676-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics