Abstract
A mutation introduced into a source code of a dynamically typed program can generate an incompetent mutant. Such a mutant manifests a type-related error that cannot be detected before the mutant execution. To avoid this problem, a program mutation can be provided at run-time, or incompetent mutants should be automatically detected and eliminated. We showed that the latter solution can effectively be applied providing selected mutation operators. This paper discusses mutation operators to be used for mutation testing of Python programs. Standard and object-oriented mutation operators were applied to the Python language. Python-related operators dealing with decorators and collection slices were proposed. The operators were implemented in MutPy, the tool for mutation testing of Python programs, and experimentally evaluated.
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
Python Programming Language, http://python.org
TIOBE Programming Community Index, http://www.tiobe.com (visited January 2014)
Jia, Y., Harman, M.: An Analysis and Survey of the Development of Mutation Testing. IEEE Transactions on Software Engineering 37(5), 649–678 (2011)
King, K.N., Offutt, A.J.: A Fortran Language System for Mutation-based Software Testing. Software - Practice and Experience 21(7), 685–718 (1991)
Delamaro, M.E., Maldonado, J.C.: Proteum-A tool for the Assessment of Test Adequacy for C Programs. In: Proc. of the Conf. on Performability in Computing Systems (PCS 1996), pp. 79–95 (1996)
Ma, Y.-S., Kwon, Y.-R., Offutt, A.J.: Inter-Class Mutation Operators for Java. In: Proc. of Inter. Symp. on Soft. Reliability Eng., ISSRE 2002, pp. 352–363. IEEE (2002)
Ma, Y.-S., Offutt, J., Kwon, Y.-R.: MuJava: an Automated Class Mutation System. Software Testing, Verification and Reliability 15(2), 97–133 (2005)
Derezińska, A.: Advanced Mutation Operators Applicable in C# Programs. In: Sacha, K. (ed.) Software Engineering Techniques: Design for Quality. IFIP, vol. 227, pp. 283–288. Springer, Boston (2006)
Derezińska, A.: Quality Assessment of Mutation Operators Dedicated for C# Programs. In: Proc. of 6th Inter. Conf. on Quality Software, QSIC 2006, pp. 227–234. IEEE Computer Soc. Press, Los Alamitos (2006)
Derezińska, A., Kowalski, K.: Object-Oriented Mutation Applied in Common Intermediate Language Programs Originated from C#. In: Proc. of 4th Inter. Conf. Software Testing Verification and Validation Workshops (ICSTW), pp. 342–350. IEEE Comp. Soc. (2011)
Derezińska, A.: Analysis of Emerging Features of C# Language Towards Mutation Testing. In: Mazurkiewicz, J., Sugier, J., Walkowiak, T., Zamojski, W. (eds.). Models and Methodology of System Development, Monographs of System Dependability vol. 1, pp. 47-59. Publishing House of Wrocław University of Technology, Wrocław (2010)
Boubeta-Puig, J., Medina-Bulo, I., Garcia-Dominguez, A.: Analogies and Differences between Mutation Operators for WS-BPEL 2.0 and Other Languages. In: Proc. of 4th Inter. Conf. on Soft. Testing, Verif. and Validation Workshops, pp. 398–407. IEEE (2011)
Bottaci, L.: Type Sensitive Application of Mutation Operators for Dynamically Typed Programs. In: Proc. of 3rd International Conference on Software Testing, Verification and Validation Workshops (ICSTW), pp. 126–131. IEEE Comp. Soc. (2010)
Derezińska, A., Hałas, K.: Operators for Mutation Testing of Python Programs. Res. Rep. 2014, Inst. of Comp. Science Warsaw Univ. of Technology (2014)
Hałas, K.: Cost Reduction of Mutation Testing Process in the MutPy Tool. Master thesis, Institute of Computer Science, Warsaw University of Technology (2013) (in Polish)
Jester - the JUnit test tester, http://jester.sourceforge.net/
PyMutester, http://miketeo.net/wp/index.php/projects/python-mutant-testing-pymutester
Mutant, http://github.com/mikejs/mutant
Elcap, http://githup.com/sk-/elcap
Derezińska, A., Rudnik, M.: Quality Evaluation of Object-Oriented and Standard Mutation Operators Applied to C# Programs. In: Furia, C.A., Nanz, S. (eds.) TOOLS 2012. LNCS, vol. 7304, pp. 42–57. Springer, Heidelberg (2012)
Derezińska, A., Hałas, K.: Experimental Evaluation of Mutation Testing Approaches to Python Programs. In: Proc. of IEEE Inter. Conf. on Software Testing, Verification, and Validation Workshops. IEEE Comp. Soc. (in press, 2014)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Derezińska, A., Hałas, K. (2014). Analysis of Mutation Operators for the Python Language. In: Zamojski, W., Mazurkiewicz, J., Sugier, J., Walkowiak, T., Kacprzyk, J. (eds) Proceedings of the Ninth International Conference on Dependability and Complex Systems DepCoS-RELCOMEX. June 30 – July 4, 2014, Brunów, Poland. Advances in Intelligent Systems and Computing, vol 286. Springer, Cham. https://doi.org/10.1007/978-3-319-07013-1_15
Download citation
DOI: https://doi.org/10.1007/978-3-319-07013-1_15
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-07012-4
Online ISBN: 978-3-319-07013-1
eBook Packages: EngineeringEngineering (R0)