| JavaScript plays an important role in modern Web applications.As a dynamic lan-guage,it can dynamically add and remove properties of an object,which benefits de-velopers to make Web applications go live quickly.However,its dynamic nature causes JavaScript Web applications error prone.At present,there are some problems in Web applications testing such as redundant test cases,low code coverage and low efficiency.The main contributions of this paper are as follows:Combined static and dynamic model construction:In this paper,dynamic ex-ecution and static analysis are combined to construct model dynamically.Two event selection strategies:To improve the model quality,this paper pro-poses two event selection strategies during model construction.One is random selection,and the other is weighted selection.Two test case generation algorithms:This paper proposes depth-first random generation and depth-first generation with reduction algorithms,leveraging the resulting model,which increases code coverage significantly.Automated testing tool:Based on the former work,we have developed an auto-mated testing tool,named LongJS.We tested 21 benchmarks for evaluation.Experimental results show that LongJS achieves higher code coverage in the same time budget and the same coverage with less time than the state-of-the-art tool Artemis+JSdep. |