Abstract
Testing is one of the most wide-spread means for quality assurance. Modelling and automated test design are two means to improve effectivity and efficiency of testing. In this paper, we present a method to generate test data from UML activity diagrams and OCL constraints by combining symbolic execution and state–of–the–art constraint solvers. Our corresponding prototype implementation is integrated in the existing test generator ParTeG and generates C++ unit tests. Our key improvement is the transparent use of multiple industry strength solvers through a common interface; this allows the user to choose between an expressive constraint language or highly optimised test data generation. We use infeasible path elimination to improve the performance of test generation and boundary value analysis to improve the quality of the generated test data. We provide an industrial case study and measure the performance of our tool using different solvers in several scenarios.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Ali, S., Iqbal, M.Z., Arcuri, A., Briand, L.: A Search-based OCL Constraint Solver for Model-based Test Data Generation. In: 11th International Conference on Quality Software, QSIC 2011, pp. 41–50. IEEE Computer Society (July 2011), http://dx.doi.org/10.1109/QSIC.2011.17
Belotti, P., Lee, J., Liberti, L., Margot, F., Wächter, A.: Branching and Bounds Tightening Techniques for Non–Convex MINLP. Optimization Methods and Software 24(4-5), 597–634 (2009), http://dx.doi.org/10.1080/10556780903087124
Berkelaar, M., Eikland, K., Notebaert, P.: lpsolve: Open source (Mixed-Integer) Linear Programming system, http://lpsolve.sourceforge.net/5.5/
Fourer, R., Gay, D.M., Kernighan, B.W.: AMPL: A Modeling Language for Mathematical Programming, 2nd edn. Duxbury Press (2002), http://ampl.com/resources/the-ampl-book/
Kosmatov, N., Legeard, B., Peureux, F., Utting, M.: Boundary coverage criteria for test generation from formal models. In: 15th International Symposium on Software Reliability Engineering, ISSRE 2004, pp. 139–150. IEEE Computer Society (November 2004), http://dx.doi.org/10.1109/ISSRE.2004.12
Krieger, M.P., Knapp, A.: Executing Underspecified OCL Operation Contracts with a SAT Solver. Electronic Communications of the EASST 15 (2008), http://journal.ub.tu-berlin.de/eceasst/article/view/176
Kurth, F.: Automated Generation of Unit Tests from UML Activity Diagrams using the AMPL Interface for Constraint Solvers. Master’s thesis, Hamburg University of Technology, Germany, Hamburg (January 2014), http://www.sts.tuhh.de/pw-and-m-theses/2014/kurth14.pdf
Laborie, P.: IBM ILOG CP Optimizer for Detailed Scheduling Illustrated on Three Problems. In: van Hoeve, W.-J., Hooker, J.N. (eds.) CPAIOR 2009. LNCS, vol. 5547, pp. 148–162. Springer, Heidelberg (2009), http://dx.doi.org/10.1007/978-3-642-01929-6_12
Linzhang, W., Jiesong, Y., Xiaofeng, Y., Jun, H., Xuandong, L., Guoliang, Z.: Generating Test Cases from UML Activity Diagram based on Gray–Box Method. In: 11th Asia-Pacific Software Engineering Conference, APSEC 2004, pp. 284–291. IEEE Computer Society, Los Alamitos (2004), http://dx.doi.org/10.1109/APSEC.2004.55
Malburg, J., Fraser, G.: Combining Search–based and Constraint–based Testing. In: 2011 26th IEEE/ACM International Conference on Automated Software Engineering, ASE 2011, pp. 436–439. IEEE Computer Society (November 2011), http://dx.doi.org/10.1109/ASE.2011.6100092
Mingsong, C., Xiaokang, Q., Xuandong, L.: Automatic Test Case Generation for UML Activity Diagrams. In: Workshop on Automation of Software Test, AST 2006, pp. 2–8. ACM, New York (2006), http://dx.doi.org/10.1145/1138929.1138931
Object Management Group (OMG): OMG Unified Modeling LanguageTM (OMG UML), Superstructure (May 2010), http://www.omg.org/spec/UML/2.3/
Rezaee, A.: A New Approach to Optimized Generation of Test Cases using UML State Machine. Master’s thesis, University of Isfahan, Iran, Isfahan (February 2014)
Tillmann, N., de Halleux, J.: Pex-White Box Test Generation for.NET. In: Beckert, B., Hähnle, R. (eds.) TAP 2008. LNCS, vol. 4966, pp. 134–153. Springer, Heidelberg (2008), http://dx.doi.org/10.1007/978-3-540-79124-9_10
Weißleder, S.: Test Models and Coverage Criteria for Automatic Model–Based Test Generation with UML State Machines. Ph.D. thesis, Humboldt University Berlin (2010), http://model-based-testing.de/data/weissleder_phd_thesis.pdf
Weißleder, S., Sokenou, D.: Automatic Test Case Generation from UML Models and OCL Expressions. In: Maalej, W., Brügge, B. (eds.) Software Engineering 2008 - Workshopband, Fachtagung des GI-Fachbereichs Softwaretechnik. Lecture Notes in Informatics, vol. 122, pp. 423–426. Gesellschaft für Informatik (February 2008), http://pdf.aminer.org/000/231/949/generating_test_sequences_from_uml_sequence_diagrams_and_state_diagrams.pdf
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Kurth, F., Schupp, S., Weißleder, S. (2014). Generating Test Data from a UML Activity Using the AMPL Interface for Constraint Solvers. In: Seidl, M., Tillmann, N. (eds) Tests and Proofs. TAP 2014. Lecture Notes in Computer Science, vol 8570. Springer, Cham. https://doi.org/10.1007/978-3-319-09099-3_14
Download citation
DOI: https://doi.org/10.1007/978-3-319-09099-3_14
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-09098-6
Online ISBN: 978-3-319-09099-3
eBook Packages: Computer ScienceComputer Science (R0)