TEST GENERATION FROM BOUNDED ALGEBRAIC SPECIFICATIONS USING ALLOY

Francisco Rebello de Andrade, João Pascoal Faria, Ana C. R. Paiva

Abstract

Algebraic specification languages have been successfully used for the formal specification of abstract data types (ADTs) and software components, and there are several approaches to automatically derive test cases that check the conformity between the implementation and the algebraic specification of a software component. However, existing approaches do not assure the coverage of conditional axioms and conditions embedded in complex axioms. In this paper, we present a novel approach and a tool to automatically derive test cases from bounded algebraic specifications of ADTs, assuring axiom coverage and of all minterms in its full disjunctive normal form (FDNF). The algebraic specification is first translated into the Alloy modelling language, and the Alloy Analyzer tool is used to find model instances for each test goal (axiom and minterm to cover), from which test cases in JUnit are extracted.

References

  1. Abreu, J., Caldeira, A., Lopes, A., Nunes, I., Reis, L. S. & Vasconcelos, V. T. 2007a. Congu, Checking Java Classes Against Property-Driven Algebraic Specifications.
  2. Abreu, J., Vasconcelos, V. T., Nunes, I., Lopes, A., REIS, L. S. & Caldeira, A. 2007b. ConGu v.1.50 The Specification and the Refinement Languages.
  3. Anastasakis, K., Behzadbordbar & Kuster, J. M. 2008. Analysis of model transformations via Alloy.
  4. Bernot, G., Gaudel, M. C. & Marre, B. 1991. Software testing based on formal specifications: a theory and a tool. Softw. Eng. J.: Michael Faraday House.
  5. Bo, Y., Liang, K., Yufeng, Z. & Hong, Z. Year. Testing Java Components based on Algebraic Specifications. In: International Conference on Software Testing, Verification, and Validation, 2008 Washington, DC, USA. IEEE Computer Society, 190-199.
  6. Chen, H. Y., Tse, T. H., Chan, F. T. & Chen, T. Y. 1998. In black and white: an integrated approach to classlevel testing of object-oriented programs. ACM Trans. Softw. Eng. Methodol.: ACM.
  7. Chen, H. Y., Tse, T. H. & Chen, T. Y. 2001. TACCLE: a methodology for object-oriented software testing at the class and cluster levels. ACM Trans. Softw. Eng. Methodol.: ACM.
  8. Cunha, A. 2009. 'An introduction to Alloy' slides.
  9. Dan, L. & Aichernig, B. K. 2005. Combining Algebraic and Model-Based Test Case Generation.
  10. Doong, R.-K. & Frankl, P. G. 1994. The ASTOOT approach to testing object-oriented programs. ACM Trans. Softw. Eng. Methodol.: ACM.
  11. Eclipse Foundation, I. 2010. Eclipse's website, http://www.eclipse.org/ [Online]. Available: http://www.eclipse.org/ [Accessed].
  12. FCT 2009. A Quest for Reliability in Generic Software Components.
  13. Guttag, J. V. 2002. Abstract data types, then and now. Software pioneers: contributions to software engineering. Springer-Verlag New York, Inc.
  14. Hughes, M. & Stotts, D. 1996. Daistish: systematic algebraic testing for OO programs in the presence of side-effects. Proceedings of the 1996 ACM SIGSOFT international symposium on Software testing and analysis. San Diego, California, United States: ACM.
  15. Jackson, D. 2011a. Alloy Analyzer's API, http://alloy.mit.edu/alloy4/public/ [Online]. Available: http://alloy.mit.edu/alloy4/public/ [Accessed].
  16. Jackson, D. 2011b. Alloy Analyzer's website, http://alloy.mit.edu/ [Online]. Available: http://alloy.mit.edu/ [Accessed 11-06-2010].
  17. Khurshid, S. & Marinov, D. 2003. TestEra: A Novel Framework for Testing Java Programs.
  18. Khurshid, S. & Marinov, D. 2004. TestEra: Specificationbased Testing of Java Programs Using SAT.
  19. Kong, L., Zhu, H. & Zhou, B. 2007. Automated Testing EJB Components Based on Algebraic Specifications. Proceedings of the 31st Annual International Computer Software and Applications Conference - Volume 02. IEEE Computer Society.
  20. Mcmullin, P. R. 1982. Daists: a system for using specifications to test implementations. University of Maryland at College Park.
  21. Nunes, I., Lopes, A. & Vasconcelos, V. 2009. Bridging the Gap between Algebraic Specification and ObjectOriented Generic Programming.
  22. Reis, L. S. 2007. ConGu v.1.50 User's Guide.
  23. Vasconcelos, V. T., Nunes, I., Lopes, A., Ramiro, N. & Crispim, P. 2008. Monitoring Java Code Using ConGu.
  24. Table 1: Translation rules from ConGu (syntax) to Alloy.
Download


Paper Citation


in Harvard Style

Rebello de Andrade F., Pascoal Faria J. and C. R. Paiva A. (2011). TEST GENERATION FROM BOUNDED ALGEBRAIC SPECIFICATIONS USING ALLOY . In Proceedings of the 6th International Conference on Software and Database Technologies - Volume 2: ICSOFT, ISBN 978-989-8425-77-5, pages 192-200. DOI: 10.5220/0003528101920200


in Bibtex Style

@conference{icsoft11,
author={Francisco Rebello de Andrade and João Pascoal Faria and Ana C. R. Paiva},
title={TEST GENERATION FROM BOUNDED ALGEBRAIC SPECIFICATIONS USING ALLOY},
booktitle={Proceedings of the 6th International Conference on Software and Database Technologies - Volume 2: ICSOFT,},
year={2011},
pages={192-200},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0003528101920200},
isbn={978-989-8425-77-5},
}


in EndNote Style

TY - CONF
JO - Proceedings of the 6th International Conference on Software and Database Technologies - Volume 2: ICSOFT,
TI - TEST GENERATION FROM BOUNDED ALGEBRAIC SPECIFICATIONS USING ALLOY
SN - 978-989-8425-77-5
AU - Rebello de Andrade F.
AU - Pascoal Faria J.
AU - C. R. Paiva A.
PY - 2011
SP - 192
EP - 200
DO - 10.5220/0003528101920200