Mutode: generic JavaScript and Node.js mutation testing tool

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.

[1]  Alex Denisov,et al.  Mull It Over: Mutation Testing Based on LLVM , 2018, 2018 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW).

[2]  Anna Derezinska,et al.  Mutation Testing Process Combined with Test-Driven Development in .NET Environment , 2015, DepCoS-RELCOMEX.

[3]  Karthik Pattabiraman,et al.  JavaScript Errors in the Wild: An Empirical Study , 2011, 2011 IEEE 22nd International Symposium on Software Reliability Engineering.

[4]  Ali Mesbah,et al.  Discovering bug patterns in JavaScript , 2016, SIGSOFT FSE.

[5]  A. Jefferson Offutt,et al.  MuJava: an automated class mutation system , 2005, Softw. Test. Verification Reliab..

[6]  Amin Milani Fard,et al.  JavaScript: The (Un)Covered Parts , 2017, 2017 IEEE International Conference on Software Testing, Verification and Validation (ICST).

[7]  Reyhaneh Jabbarvand,et al.  µDroid: an energy-aware mutation testing framework for Android , 2017, ESEC/SIGSOFT FSE.

[8]  Mark Harman,et al.  An Analysis and Survey of the Development of Mutation Testing , 2011, IEEE Transactions on Software Engineering.

[9]  Ali Mesbah,et al.  Efficient JavaScript Mutation Testing , 2013, 2013 IEEE Sixth International Conference on Software Testing, Verification and Validation.

[10]  Gabriele Bavota,et al.  Enabling mutation testing for Android apps , 2017, ESEC/SIGSOFT FSE.

[11]  Ali Mesbah,et al.  An Empirical Study of Client-Side JavaScript Bugs , 2013, 2013 ACM / IEEE International Symposium on Empirical Software Engineering and Measurement.

[12]  A. Jefferson Offutt,et al.  An Experimental Evaluation of Data Flow and Mutation Testing , 1996, Softw. Pract. Exp..

[13]  Michael D. Ernst,et al.  Are mutants a valid substitute for real faults in software testing? , 2014, SIGSOFT FSE.

[14]  Lionel C. Briand,et al.  Using Mutation Analysis for Assessing and Comparing Testing Coverage Criteria , 2006, IEEE Transactions on Software Engineering.

[15]  René Just,et al.  The major mutation framework: efficient and scalable mutation analysis for Java , 2014, ISSTA 2014.

[16]  Yue Jia,et al.  MILU: A Customizable, Runtime-Optimized Higher Order Mutation Testing Tool for the Full C Language , 2008, Testing: Academic & Industrial Conference - Practice and Research Techniques (taic part 2008).

[17]  MaYu-Seung,et al.  MuJava: an automated class mutation system , 2005 .