skip to main content
10.1145/3213846.3229504acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
short-paper

Mutode: generic JavaScript and Node.js mutation testing tool

Published:12 July 2018Publication History

ABSTRACT

Mutation testing is a technique in which faults (mutants) are injected into a program or application to assess its test suite effectiveness. It works by inserting mutants and running the application’s test suite to identify if the mutants are detected (killed) or not (survived) by the tests. Although computationally expensive, it has proven to be an effective method to assess application test suites. Several mutation testing frameworks and tools have been built for the various programing languages, however, very few tools have been built for the JavaScript language, more specifically, there is a lack of mutation testing tools for the Node.js runtime and npm based applications. The npm Registry is a public collection of modules of open-source code for Node.js, front-end web applications, mobile applications, robots, routers, and countless other needs of the JavaScript community. The over 700,000 packages hosted in npm are downloaded more than 5 billion times per week. More and more software is published in npm every day, representing a huge opportunity to share code and solutions, but also to share bugs and faulty software. In this paper, we briefly describe prior work for mutation operators in JavaScript and Node.js, and propose Mutode, an open source tool which leverages the npm package ecosystem to perform mutation testing for JavaScript and Node.js applications. We empirically evaluated Mutode effectiveness by running it on 12 of the top 20 npm modules that have automated test suites.

References

  1. James H Andrews, Lionel C Briand, Yvan Labiche, and Akbar Siami Namin. 2006. Using mutation analysis for assessing and comparing testing coverage criteria. TSE 32, 8 (2006), 608–624. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Babel. 2018. Babylon. https://www.npmjs.com/package/babylonGoogle ScholarGoogle Scholar
  3. Austin Bingham. 2017. Cosmic Ray: mutation testing for Python. https://github. com/sixty-north/cosmic-rayGoogle ScholarGoogle Scholar
  4. Ben Coe. 2018. Istanbul. https://istanbul.js.org/.Google ScholarGoogle Scholar
  5. Henry Coles. 2017. PIT. http://pitest.org/.Google ScholarGoogle Scholar
  6. Erik DeBill. 2018. Modulecounts. http://www.modulecounts.com/.Google ScholarGoogle Scholar
  7. Alex Denisov and Stanislav Pankevich. {n. d.}. Mull it over: mutation testing based on LLVM. https://github.com/mull-project/mull. ({n. d.}).Google ScholarGoogle Scholar
  8. Anna Derezińska and Piotr Trzpil. 2015. Mutation Testing Process Combined with Test-Driven Development in. NET Environment. In Theory and Engineering of Complex Systems and Dependability. 131–140.Google ScholarGoogle Scholar
  9. A. M. Fard and A. Mesbah. 2017. JavaScript: The (Un)Covered Parts. In ICST’17. 230–240.Google ScholarGoogle Scholar
  10. Node Foundation. 2018. ECMAScript Modules. https://nodejs.org/api/esm.html.Google ScholarGoogle Scholar
  11. Konrad Halas. 2017. MutPy: mutation testing tool for Python 3.x source code. https://github.com/mutpy/mutpyGoogle ScholarGoogle Scholar
  12. Quinn Hanam, Fernando S. de M. Brito, and Ali Mesbah. 2016. Discovering Bug Patterns in JavaScript. In ESEC/FSE’16. 144–156. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Ben Hartley. 2016. Mutant: A mutation testing framework for JavaScript. https: //github.com/benhartley/mutantGoogle ScholarGoogle Scholar
  14. TJ Holowaychuk. 2018. Mocha. https://mochajs.org/.Google ScholarGoogle Scholar
  15. Reyhaneh Jabbarvand and Sam Malek. 2017. muDroid: An Energy-aware Mutation Testing Framework for Android. In ESEC/FSE’17. 208–219. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Nico Jansen and Simon de Lang. 2018. Stryker: The JavaScript mutation testing framework. https://github.com/stryker-mutator/strykerGoogle ScholarGoogle Scholar
  17. Yue Jia and Mark Harman. 2008. MILU: A customizable, runtime-optimized higher order mutation testing tool for the full C language. In Practice and Research Techniques, 2008. TAIC PART’08. Testing: Academic & Industrial Conference. 94–98. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Yue Jia and Mark Harman. 2011. An analysis and survey of the development of mutation testing. TSE 37, 5 (2011), 649–678. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. René Just. 2014. The Major mutation framework: Efficient and scalable mutation analysis for Java. In ISSTA’14. 433–436. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. René Just, Darioush Jalali, Laura Inozemtseva, Michael D Ernst, Reid Holmes, and Gordon Fraser. 2014. Are mutants a valid substitute for real faults in software testing?. In ESEC/FSE 14. 654–665. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Vojta Jína. 2018. Karma. https://karma-runner.github.io/2.0/index.html.Google ScholarGoogle Scholar
  22. Mario Linares-Vásquez, Gabriele Bavota, Michele Tufano, Kevin Moran, Massimiliano Di Penta, Christopher Vendome, Carlos Bernal-Cárdenas, and Denys Poshyvanyk. 2017. Enabling mutation testing for Android apps. In ESEC/FSE’17. 233–244.Google ScholarGoogle Scholar
  23. Niels Lohmann. 2017. Mutate++: C++ Mutation Test Environment. https: //github.com/nlohmann/mutate_cppGoogle ScholarGoogle Scholar
  24. Yu-Seung Ma, Jeff Offutt, and Yong Rae Kwon. 2005. MuJava: An automated class mutation system. Software Testing, Verification and Reliability 15, 2 (2005), 97–133. Google ScholarGoogle ScholarCross RefCross Ref
  25. Shabnam Mirshokraie, Ali Mesbah, and Karthik Pattabiraman. 2013. Efficient JavaScript mutation testing. In ICST’13. 74–83. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Inc. npm. 2018. About npm. https://www.npmjs.com/aboutGoogle ScholarGoogle Scholar
  27. Inc. npm. 2018. Most depended upon packages. https://www.npmjs.com/browse/ dependedGoogle ScholarGoogle Scholar
  28. npm, Inc., Node.JS Foundation, and JS Foundation. 2018. Attitudes to security in the JavaScript community – npm, Inc. – Medium. https://medium.com/npm-inc/ security-in-the-js-community-4bac032e553bGoogle ScholarGoogle Scholar
  29. F. Ocariza, K. Bajaj, K. Pattabiraman, and A. Mesbah. 2013. An Empirical Study of Client-Side JavaScript Bugs. In ESEM’13. 55–64.Google ScholarGoogle Scholar
  30. Frolin S Ocariza Jr, Karthik Pattabiraman, and Benjamin Zorn. 2011. JavaScript errors in the wild: An empirical study. In ISSRE’11. 100–109. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. A Jefferson Offutt, Jie Pan, Kanupriya Tewary, and Tong Zhang. 1996. An experimental evaluation of data flow and mutation testing. Softw., Pract. Exper. 26, 2 (1996), 165–176. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Maks Rafalko. 2018. Infection: PHP Mutation Testing Framework. https: //github.com/infection/infectionGoogle ScholarGoogle Scholar
  33. RequireJS. 2018. CommonJS. http://requirejs.org/docs/commonjs.html.Google ScholarGoogle Scholar
  34. Diego Rodríguez-Baquero. 2018. mutode. https://www.npmjs.com/package/ mutodeGoogle ScholarGoogle Scholar
  35. Diego Rodríguez-Baquero. 2018. Mutode - Mutators Documentation. https: //thesoftwaredesignlab.github.io/mutode/module-Mutators.htmlGoogle ScholarGoogle Scholar
  36. Diego Rodríguez-Baquero. 2018. Mutode: Mutation testing for JavaScript and Node.js. https://github.com/TheSoftwareDesignLab/mutodeGoogle ScholarGoogle Scholar
  37. Tony Roussel. 2016. NinjaTurtlesMutation. https://github.com/criteo/ NinjaTurtlesMutationGoogle ScholarGoogle Scholar
  38. Markus Schirp. 2018. Mutant: Mutation testing for Ruby. https://github.com/ mbj/mutantGoogle ScholarGoogle Scholar
  39. Michael G Schwern and Andy Lester. 2018. TAP specification. https://testanything. org/tap-specification.html.Google ScholarGoogle Scholar
  40. Daniel Tschinder, Logan Smyth, and Henry Zhu. 2018. Babel. https://babeljs.io/.Google ScholarGoogle Scholar
  41. Laurie Voss. 2018. Rolling weekly downloads of npm packages. https://twitter. com/seldo/status/988477780441481217 Abstract 1 Introduction 2 Related work 3 Mutode 3.1 Implemented Operations 3.2 Mutode Execution 3.3 Tool Usage and Extensibility 4 Evaluation 5 Demo remarks & Future Work ReferencesGoogle ScholarGoogle Scholar

Index Terms

  1. Mutode: generic JavaScript and Node.js mutation testing tool

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ISSTA 2018: Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis
      July 2018
      379 pages
      ISBN:9781450356992
      DOI:10.1145/3213846
      • General Chair:
      • Frank Tip,
      • Program Chair:
      • Eric Bodden

      Copyright © 2018 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 12 July 2018

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • short-paper

      Acceptance Rates

      Overall Acceptance Rate58of213submissions,27%

      Upcoming Conference

      ISSTA '24

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader