Font Size: a A A

Research And Optimization Of JQuery Mutation Test

Posted on:2020-03-04Degree:MasterType:Thesis
Country:ChinaCandidate:C Z LiFull Text:PDF
GTID:2438330572999551Subject:Computer technology
Abstract/Summary:PDF Full Text Request
As an important part of Web engineering,Web testing is inseparable from Web application development phase to the final maintenance phase.JQuery is a fast and concise JavaScript framework following Prototype,and one line of JQuery code can do a few lines of JavaScript code.JQuery is a dynamic language that makes it more error-prone.At the same time,because JQuery's operation on page elements or styles is encapsulated,it is difficult to judge the execution result in the process of automated testing,so JQuery can't be tested well at this stage.The mutation test is a fault-based test technique.A set of mutants are generated by applying a well-defined set of mutation operators on the code under test,and the sufficiency of the test suite is measured by determining whether the mutant is killed by the test case.A mutation score is generated for evaluating the test suites and improve its quality.Although mutation testing has been widely used in various languages,some approaches are needed to reduce the generation of mutants because of the large number of mutants generated by the mutation of the program,which leads to unnecessary computational overhead.In view of the test problems of JQuery function and interaction,this paper proposes the method and optimization of JQuery mutation test,based on the mutation test.Firstly,based on the proposed three kinds of mutation operators for JQuery,some JQuery mutation operators are added and three new kind of mutation operators are proposed.Next,to reduce the computational cost required for JQuery mutation analysis,13 JQuery-specific mutation operators are summarized and the redundancy in these 13 mutation operators are tested and studied.For redundant mutation operators,the same level of fault detection capability can be eliminated during testing.Then,based on the genetic algorithm,a mutant reduction method for JQuery mutation test is proposed.The reduction method generates mutant as needed,which effectively reduces the number of mutants those equivalent mutants and those hard to kill mutants.Mutants generated using this method can be considered as a "strong mutant" that can help to improve the overall quality of the test suite.Finally,in order to prove the validity of the method,13 mutation operators were used for verification in the web application of the four projects.The two mutation operators(O3 and O4)proved to be redundant and could be excluded.After applying the remaining 11 mutation operators to generate mutants,we found "strong mutants" by using the variant reduction method of JQuery mutation test,which effectively reduced the cost of mutation test and analysis,have minimal impact on error detection capabilities.
Keywords/Search Tags:JQuery, Mutation testing, Mutation operator, Operator redundancy, Mutants reduction
PDF Full Text Request
Related items