Abstract
A tester relies on some sort of contract between the users and the implementers of a system. The contract defines the obligations of each part that are partially checked by selecting and executing test-cases. In fact, these test-cases are contracts, too, although in a rather operational form. In this article we define the general relationship between these two forms of contract and present a method how various test-selection strategies can be defined formally. More precisely, we demonstrate how test-cases can be calculated from contracts using a refinement calculus.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Aichernig, B.K., Gerstinger, A., Aster, R.: Formal specification techniques as a catalyst in validation. In: Proceedings of the 5th Conference on High-Assurance Software Engineering, Albuquerque, New Mexico, USA, November 15-17. IEEE, Los Alamitos (2000)
Aichernig, B.K.: Test-case calculation through abstraction. In: Oliveira, J.N., Zave, P. (eds.) FME 2001. LNCS, vol. 2021, p. 571. Springer, Heidelberg (2001)
Aichernig, B.K.: Test-Design through Abstraction – A Systematic Approach Based on the Refinement Calculus. Journal of Universal Computer Science 7(8), 710–735 (2001)
Aichernig, B.K.: The commuting V-diagram: On the relation of refinement and testing. Technical Report 254, The United Nations University, International Institute for Software Technology (UNU/IIST), P.O. Box 3058, Macau (May 2002)
Aichernig, B.K.: Contract-based mutation testing in the refinement calculus. In: REFINE 2002, the BCS-FACS refinement workshop, affiliated with FME 2002, Copenhagen, Denmark, July 20-21, 2002. Electronic Notes in Theoretical Computer Science (2002) (to appear)
Aichernig, B.: Systematic Black-Box Testing of Computer-Based Systems through Formal Abstraction Techniques. PhD thesis, Institute for Software Technology, TU Graz, Austria (January 2001); Supervisor: Peter Lucas
Back, R.-J., von Wright, J.: Refinement Calculus: a Systematic Introduction. Graduate Texts in Computer Science. Springer, Heidelberg (1998)
Back, R.-J., von Wright, J.: Enforcing behavior with contracts. Technical Report 373, Turku Centre for Computer Science (November 2000)
Back, R.-J., von Wright, J.: Verification and refinement of action contracts. Technical Report 374, Turku Centre for Computer Science (April 2001)
Back, R., Mikhajlova, A., von Wright, J.: Reasoning about interactive systems. In: Woodcock, J.C.P., Davies, J., Wing, J.M. (eds.) FM 1999. LNCS, vol. 1709, p. 1460. Springer, Heidelberg (1999)
Beck, K.: Extreme Programming Explained: Embrace Change. Addison-Wesley, Reading (1999)
Behnia, S., Waeselynck, H.: Test criteria definition for B models. In: Wing, J.M., Woodcock, J.C.P., Davies, J. (eds.) FM 1999. LNCS, vol. 1708, pp. 509–529. Springer, Heidelberg (1999)
Beizer, B.: Software Testing Techniques, 2nd edn. Van Nostrand Reinhold, New York (1990)
Chen, H.Y., Tse, T.H., Chan, F.T., Chen, T.Y.: In Black and White: An Integrated Approach to Class-Level Testing of Object-Oriented Programs. ACM Transactions on Software Engineering and Methodology 7(3), 250–295 (1998)
DeMillo, R., Lipton, R., Sayward, F.: Hints on test data selection: Help for the practicing programmer. IEEE Computer 11(4), 34–41 (1978)
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. Springer, Heidelberg (April 1993)
Fernandez, J.-C., Jard, C., Jéron, T., Viho, C.: An experiment in automatic generation of test suites for protocols with verification technology. Science of Computer Programming 29(1-2), 123–146 (1997)
Gaudel, M.-C., James, P.R.: Testing algebraic data types and processes: A unifying theory. Formal Aspects of Computing 10(5 & 6), 436–451 (1998)
Hamlet, R.G.: Testing programs with the aid of a compiler. IEEE Transactions on Software Engineering 3(4), 279–290 (1977)
Hörl, J., Aichernig, B.K.: Validating voice communication requirements using lightweight formal methods. In: IEEE Software, pp. 21–27 (May/June 2000)
Jarke, M., Kurki-Suoni, R. (eds). Special issue on scenario management. IEEE Transactions on Software Engineering 24(12) (1998)
Legeard, B., Peureux, F., Utting, M.: Automated boundary testing from Z and B. In: Eriksson, L.-H., Lindsay, P.A. (eds.) FME 2002. LNCS, vol. 2391, p. 21. Springer, Heidelberg (2002)
Morgan, C.C.: Programming from Specifications. Series in Computer Science. Prentice-Hall International, Englewood Cliffs (1990)
Pahl, C.: Interference Analysis for Dependable Systems using Refinement and Abstraction. In: Eriksson, L.-H., Lindsay, P.A. (eds.) FME 2002. LNCS, vol. 2391, p. 330. Springer, Heidelberg (2002)
Stepney, S.: Testing as abstraction. In: Bowen, J.P., Hinchey, M.G. (eds.) ZUM 1995. LNCS, vol. 967. Springer, Heidelberg (1995)
Stocks, P.A.: Applying formal methods to software testing. PhD thesis, The Department of computer science, The University of Queensland (1993)
Tretmans, J.: Testing concurrent systems: A formal approach. In: Baeten, J.C.M., Mauw, S. (eds.) CONCUR 1999. LNCS, vol. 1664, pp. 46–65. Springer, Heidelberg (1999)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Aichernig, B.K. (2003). Contract-Based Testing. In: Aichernig, B.K., Maibaum, T. (eds) Formal Methods at the Crossroads. From Panacea to Foundational Support. Lecture Notes in Computer Science, vol 2757. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-40007-3_3
Download citation
DOI: https://doi.org/10.1007/978-3-540-40007-3_3
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-20527-2
Online ISBN: 978-3-540-40007-3
eBook Packages: Springer Book Archive