Skip to main content

Part of the book series: Advances in Intelligent Systems and Computing ((AISC,volume 286))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Python Programming Language, http://python.org

  2. TIOBE Programming Community Index, http://www.tiobe.com (visited January 2014)

  3. Jia, Y., Harman, M.: An Analysis and Survey of the Development of Mutation Testing. IEEE Transactions on Software Engineering 37(5), 649–678 (2011)

    Article  Google Scholar 

  4. King, K.N., Offutt, A.J.: A Fortran Language System for Mutation-based Software Testing. Software - Practice and Experience 21(7), 685–718 (1991)

    Article  Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

  7. Ma, Y.-S., Offutt, J., Kwon, Y.-R.: MuJava: an Automated Class Mutation System. Software Testing, Verification and Reliability 15(2), 97–133 (2005)

    Article  Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

  16. MutPy, https://bitbucket.org/khalas/mutpy

  17. Jester - the JUnit test tester, http://jester.sourceforge.net/

  18. PyMutester, http://miketeo.net/wp/index.php/projects/python-mutant-testing-pymutester

  19. Mutant, http://github.com/mikejs/mutant

  20. Elcap, http://githup.com/sk-/elcap

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

    Chapter  Google Scholar 

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

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Anna Derezińska .

Editor information

Editors and Affiliations

Rights and permissions

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

Publish with us

Policies and ethics