Skip to main content

ConSMutate: SQL Mutants for Guiding Concolic Testing of Database Applications

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7635))

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

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aichernig, B.K., Brandl, H., Jöbstl, E., Krenn, W.: Efficient mutation killers in action. In: ICST, pp. 120–129 (2011)

    Google Scholar 

  2. 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)

    Article  Google Scholar 

  3. Andrews, J.H., Briand, L.C., Labiche, Y.: Is mutation an appropriate tool for testing experiments? In: ICSE, pp. 402–411 (2005)

    Google Scholar 

  4. 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)

    Google Scholar 

  5. 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)

    Article  Google Scholar 

  6. 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)

    Google Scholar 

  7. 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)

    Article  Google Scholar 

  8. DeMillo, R.A., Offutt, A.J.: Constraint-based automatic test data generation. IEEE Trans. Software Eng. 17(9), 900–910 (1991)

    Article  Google Scholar 

  9. 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)

    Google Scholar 

  10. Howden, W.E.: Weak mutation testing and completeness of test sets. IEEE Trans. Software Eng. 8(4), 371–379 (1982)

    Article  Google Scholar 

  11. Jia, Y., Harman, M.: An analysis and survey of the development of mutation testing. IEEE Trans. Software Eng. 37(5), 649–678 (2011)

    Article  Google Scholar 

  12. 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)

    Google Scholar 

  13. Krenn, W., Aichernig, B.K.: Test case generation by contract mutation in spec#. Electr. Notes Theor. Comput. Sci. 253(2), 71–86 (2009)

    Article  Google Scholar 

  14. Li, C., Csallner, C.: Dynamic symbolic database application testing. In: Babu, S., Paulley, G.N. (eds.) DBTest. ACM (2010)

    Google Scholar 

  15. Offutt, A.J., Jin, Z., Pan, J.: The dynamic domain reduction procedure for test data generation. Softw., Pract. Exper. 29(2), 167–193 (1999)

    Article  Google Scholar 

  16. 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)

    Google Scholar 

  17. Sen, K.: Concolic testing. In: Stirewalt, R.E.K., Egyed, A., Fischer, B. (eds.) ASE, pp. 571–572. ACM (2007)

    Google Scholar 

  18. 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)

    Google Scholar 

  19. 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)

    Chapter  Google Scholar 

  20. Tuya, J., Cabal, M.J.S., de la Riva, C.: Mutating database queries. Information & Software Technology 49(4), 398–417 (2007)

    Article  Google Scholar 

  21. 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)

    Article  Google Scholar 

  22. Voas, J.: Software fault injection: Growing “safer” systems. In: IEEE Aerospace Conf., vol. 2, pp. 551–561 (February 1997)

    Google Scholar 

  23. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics