Abstract
Database applications are built using two different programming language constructs: one that controls the behavior of the application, also referred to as the host language; and the other that allows the application to access/retrieve information from the backend database, also referred to as the query language. The interplay between these two languages makes testing of database applications a challenging process. Independent approaches have been developed to evaluate test case quality for host languages and query languages. Typically, the quality of test cases for the host language (e.g., Java) is evaluated on the basis of the number of lines, statements and blocks covered by the test cases. High quality test cases for host languages can be automatically generated using recently developed concolic testing techniques, which rely on manipulating and guiding the search of test cases based on carefully comparing the concrete and symbolic execution of the program written in the host language. Query language test case quality (e.g., SQL), on the other hand, is evaluated using mutation analysis, which is considered to be a stronger criterion for assessing quality. In this case, several mutants or variants of the original SQL query are generated and the quality is measured using a metric called mutation score. Higher mutation score indicates higher quality for the test cases. In this paper we present a framework, called ConSMutate, which guides concolic testing using mutation analysis for test case generation for database applications. The novelty of the framework is that it ensures that the test cases are of high quality not only in terms of coverage of code written in the host language, but also in terms of mutant detection of the queries written in the query language. We present a prototype implementation of our technique and show its advantages using two non-trivial case studies.
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., Brandl, H., Jöbstl, E., Krenn, W.: Efficient mutation killers in action. In: ICST, pp. 120–129 (2011)
Andrade, H., Kurc, T., Sussman, A., Saltz, J.: Optimizing the execution of multiple data analysis queries on parallel and distributed environments. IEEE Trans. Parallel Distrib. Syst. 15(6), 520–532 (2004)
Andrews, J.H., Briand, L.C., Labiche, Y.: Is mutation an appropriate tool for testing experiments? In: ICSE, pp. 402–411 (2005)
Binnig, C., Kossmann, D., Lo, E.: Reverse query processing. In: Chirkova, R., Dogac, A., Özsu, M.T., Sellis, T.K. (eds.) ICDE, pp. 506–515. IEEE (2007)
Chays, D., Deng, Y., Frankl, P.G., Dan, S., Vokolos, F.I., Weyuker, E.J.: An AGENDA for testing relational database applications. Softw. Test., Verif. Reliab. 14(1), 17–44 (2004)
Chays, D., Shahid, J., Frankl, P.G.: Query-based test generation for database applications. In: Giakoumakis, L., Kossmann, D. (eds.) DBTest, p. 6. ACM (2008)
DeMillo, R.A., Lipton, R.J., Sayward, F.G.: Hints on test data selection: Help for the practicing programmer. Computer 11(4), 34–41 (1978)
DeMillo, R.A., Offutt, A.J.: Constraint-based automatic test data generation. IEEE Trans. Software Eng. 17(9), 900–910 (1991)
Emmi, M., Majumdar, R., Sen, K.: Dynamic test input generation for database applications. In: Rosenblum, D.S., Elbaum, S.G. (eds.) ISSTA, pp. 151–162. ACM (2007)
Howden, W.E.: Weak mutation testing and completeness of test sets. IEEE Trans. Software Eng. 8(4), 371–379 (1982)
Jia, Y., Harman, M.: An analysis and survey of the development of mutation testing. IEEE Trans. Software Eng. 37(5), 649–678 (2011)
Khalek, S.A., Elkarablieh, B., Laleye, Y.O., Khurshid, S.: Query-aware test generation using a relational constraint solver. In: ASE, pp. 238–247. IEEE (2008)
Krenn, W., Aichernig, B.K.: Test case generation by contract mutation in spec#. Electr. Notes Theor. Comput. Sci. 253(2), 71–86 (2009)
Li, C., Csallner, C.: Dynamic symbolic database application testing. In: Babu, S., Paulley, G.N. (eds.) DBTest. ACM (2010)
Offutt, A.J., Jin, Z., Pan, J.: The dynamic domain reduction procedure for test data generation. Softw., Pract. Exper. 29(2), 167–193 (1999)
Offutt, A.J., Rothermel, G., Zapf, C.: An experimental evaluation of selective mutation. In: Basili, V.R., DeMillo, R.A., Katayama, T. (eds.) ICSE, pp. 100–107. IEEE Computer Society/ACM Press (1993)
Sen, K.: Concolic testing. In: Stirewalt, R.E.K., Egyed, A., Fischer, B. (eds.) ASE, pp. 571–572. ACM (2007)
Taneja, K., Zhang, Y., Xie, T.: MODA: Automated test generation for database applications via mock objects. In: Pecheur, C., Andrews, J., Nitto, E.D. (eds.) ASE, pp. 289–292. ACM (2010)
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)
Tuya, J., Cabal, M.J.S., de la Riva, C.: Mutating database queries. Information & Software Technology 49(4), 398–417 (2007)
Tuya, J., Cabal, M.J.S., de la Riva, C.: Full predicate coverage for testing sql database queries. Softw. Test., Verif. Reliab. 20(3), 237–288 (2010)
Voas, J.: Software fault injection: Growing “safer” systems. In: IEEE Aerospace Conf., vol. 2, pp. 551–561 (February 1997)
Weng, L., Çatalyürek, Ü.V., Kurç, T.M., Agrawal, G., Saltz, J.H.: Optimizing multiple queries on scientific datasets with partial replicas. In: GRID, pp. 259–266. IEEE (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Sarkar, T., Basu, S., Wong, J.S. (2012). ConSMutate: SQL Mutants for Guiding Concolic Testing of Database Applications. In: Aoki, T., Taguchi, K. (eds) Formal Methods and Software Engineering. ICFEM 2012. Lecture Notes in Computer Science, vol 7635. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-34281-3_32
Download citation
DOI: https://doi.org/10.1007/978-3-642-34281-3_32
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-34280-6
Online ISBN: 978-3-642-34281-3
eBook Packages: Computer ScienceComputer Science (R0)