ABSTRACT
Model-Based Testing and Property-Based Testing are two testing methodologies that usually facilitate the automation of the generation of test cases, using either models or properties as basis to derive complete test suites. In doing so, they also contribute to reduce both the source code needed for testing purposes and the time spent on writing those tests, hence saving effort and increasing maintainability.
In this paper, we describe how to generate complete property-based test suites automatically translated from a model that describes the system under test, specifically a UML model with OCL constraints. The proposed approach can be applied to both stateless and stateful components.
We have used QuickCheck, an automatic property-based testing tool for test case generation, execution and diagnosis, as support tool. Our method produces QuickCheck executable test models as output, so we use the same tool to run and evaluate them. As part of our work, we analyze and discuss the advantages and disadvantages of our approach in contrast to writing test suites manually.
- S. Ali, M. Z. Iqbal, A. Arcuri, and L. Briand. A search-based ocl constraint solver for model-based test data generation. In 11th International Conference on Quality Software, QSIC '11, pages 41--50. IEEE Computer Society, 2011. Google ScholarDigital Library
- T. Arts, L. M. Castro, and J. Hughes. Testing erlang data types with quviq quickcheck. In ACM SIGPLAN Workshop on Erlang, 2008. Google ScholarDigital Library
- T. Arts, J. Hughes, J. Johansson, and U. Wiger. Testing telecoms software with quviq quickcheck. In ACM SIGPLAN workshop on Erlang (ERLANG'06), New York, NY, USA, 2006. ACM Press. Google ScholarDigital Library
- P. Baker, Z. R. Dai, J. Grabowski, O. Haugen, I. Schieferdecker, and C. Williams. Model-Driven Testing: Using the UML Testing Profile. Springer-Verlag New York, Inc., Secaucus, NJ, USA, 2007. Google ScholarDigital Library
- M. Barnett, K. Leino, and W. Schulte. The spec# programming system: An overview. pages 49--69. Springer, 2004. Google ScholarDigital Library
- M. Benattou, J. M. Bruel, and N. Hameurlain. Generating test data from ocl specification. In ECOOP Workshop on Integration and Transformation of UML models, 2002.Google Scholar
- A. D. Brucker, M. P. Krieger, D. Longuet, and B. Wolff. A specification-based test case generation method for uml/ocl. In International Conference on Models in Software Engineering, MODELS'10, pages 334--348, Berlin, Heidelberg, 2011. Springer-Verlag. Google ScholarDigital Library
- L. M. Castro and T. Arts. Testing data consistency of data-intensive applications using quickcheck. Electronic Notes in Theoretical Computer Science, 271:41--62, 2011. Proceedings of the 10th Spanish Conference on Programming and Languages (PROLE 2010). Google ScholarDigital Library
- Y. Cheon and G. T. Leavens. A simple and practical approach to unit testing: The jml and junit way. In 16th European Conference on Object-Oriented Programming, ECOOP'02, pages 231--255, London, UK, 2002. Springer-Verlag. Google ScholarDigital Library
- I. Ciupa and A. Leitner. Automatic testing based on design by contract. In 6th Annual International Conference on Object-Oriented and Internet-based Technologies, Concepts, and Applications for a Networked World (Net. ObjectDays 2005), pages 545--557, 2005.Google Scholar
- K. Claessen and J. Hughes. Quickcheck: a lightweight tool for random testing of haskell programs. In 5th ACM SIGPLAN International Conference on Functional Programming, ICFP '00, pages 268--279, New York, NY, USA, 2000. ACM. Google ScholarDigital Library
- K. Claessen and J. Hughes. Quickcheck: a lightweight tool for random testing of haskell programs. In International Conference on Functional Programming, pages 268--279, 2000. Google ScholarDigital Library
- B. Demuth. The dresden ocl toolkit and its role in information systems development. In 13th International Conference on Information Systems Development: Methods and Tools, Theory and Practice Conference, Advances in Theory, Practice and Education, 9--11 September, 2004.Google Scholar
- B. Demuth, S. Loecher, and S. Zschaler. Structure of the dresden ocl toolkit extended abstract. In 2nd International Fujaba Days "MDA with UML and Rule-based Object Manipulation", September 15--17, 2004.Google Scholar
- J. Derrick, N. Walkinshaw, T. Arts, C. B. Earle, F. Cesarini, L.-A. Fredlund, V. Gulías, J. Hughes, and S. Thompson. Property-based testing - the protest project. Lecture Notes in Computer Science, 6286 LNCS:250--271, 2010. Google ScholarDigital Library
- A. C. Dias Neto, R. Subramanyan, M. Vieira, and G. H. Travassos. A survey on model-based testing approaches: a systematic review. In 1st ACM international Workshop on Empirical assessment of Software Engineering Languages and Technologies (WEASELTech '07), pages 31--36, New York, NY, USA, 2007. ACM. Google ScholarDigital Library
- Jinterface. http://www.erlang.org/doc/apps/jinterface/index.html, 2012.Google Scholar
- M. Karaorman, U. Hölzle, and J. L. Bruno. jcontractor: A reflective java library to support design by contract. In 2nd International Conference on Meta-Level Architectures and Reflection, Reflection '99, pages 175--196, London, UK, UK, 1999. Springer-Verlag. Google ScholarDigital Library
- R. Kramer. icontract - the java(tm) design by contract(tm) tool. In Technology of Object-Oriented Languages and Systems (TOOLS '98), pages 295--307, 1998. Google ScholarDigital Library
- G. T. Leavens and Y. Cheon. Design by contract with jml. www.jmlspecs.org, 2006.Google Scholar
- P. Madsen. Testing by contract - combining unit testing and design by contract. Proceedings of the Nordic workshop on Software Development Tools and Techniques, 2002.Google Scholar
- B. Meyer. Applying "design by contract". Computer, 25(10):40--51, Oct. 1992. Google ScholarDigital Library
- B. Meyer. Object-Oriented Software Construction. Prentice-Hall, Inc., second edition, 1997. Google ScholarDigital Library
- R. Moiseev, S. Hayashi, and M. Saeki. Generating assertion code from ocl: A transformational approach based on similarities of implementation languages. In 12th International Conference on Model Driven Engineering Languages and Systems, MODELS '09, pages 650--664, Berlin, Heidelberg, 2009. Springer-Verlag. Google ScholarDigital Library
- Parasoft corporation. http://www.parasoft.com/, 2012.Google Scholar
- J. Rumbaugh, I. Jacobson, and G. Booch. Unified Modeling Language Reference Manual, The (2nd Edition). Pearson Higher Education, 2004. Google ScholarDigital Library
- P. A. Salas and B. K. Aichernig. Automatic Test Case Generation for OCL: a Mutation Approach. Technical report, 2005.Google Scholar
- M. Utting and B. Legeard. Practical Model-Based Testing: A Tools Approach. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2007. Google ScholarDigital Library
- M. Utting, A. Pretschner, and B. Legeard. A taxonomy of model-based testing. Technical report, April 2006.Google Scholar
- J. Warmer and A. Kleppe. The Object Constraint Language: Getting Your Models Ready for MDA. Addison-Wesley Longman Publishing Co., Inc., 2 edition, 2003. Google ScholarDigital Library
- Y. Wu, M. Chen, and J. Offutt. Uml-based integration testing for component-based software. In International Conference on COTS-Based Software Systems, pages 251--260, 2003. Google ScholarDigital Library
- A. Zeller and R. Hildebrandt. Simplifying and isolating failure-inducing input. IEEE Transactions on Software Engineering, 28:2002, 2002. Google ScholarDigital Library
Index Terms
- Automatic generation of test models and properties from UML models with OCL constraints
Recommendations
Turning web services descriptions into quickcheck models for automatic testing
Erlang '13: Proceedings of the twelfth ACM SIGPLAN workshop on ErlangIn this work, we face the problem of generating good quality test suites and test cases for web services. We present a framework to test web services based on their formal description, following a black-box approach and using Property-Based Testing.
Web ...
A subset of precise UML for model-based testing
A-MOST '07: Proceedings of the 3rd international workshop on Advances in model-based testingThis paper presents an original model-based testing approach that takes a UML behavioural view of the system under test and automatically generates test cases and executable test scripts according to model coverage criteria. This approach is embedded in ...
A test generation solution to automate software testing
AST '08: Proceedings of the 3rd international workshop on Automation of software testThis paper describes the LEIRIOS Smart Testing™ approach to the functional validation of a subpart of the StarUML case study. This model-based testing process for test automation is shown from start to end: from functional requirements to the ...
Comments