Computer Science ›› 2023, Vol. 50 ›› Issue (7): 18-26.doi: 10.11896/jsjkx.220900143

• Computer Software • Previous Articles     Next Articles

Test Case Generation Based on Web Application Front-end Behavior Model

LIU Ziwen, YU Lijuan, SU Yixing, ZHAO Yao, SHI Zhu   

  1. School of Automation,Wuhan University of Technology,Wuhan 430070,China
  • Received:2022-09-16 Revised:2023-03-24 Online:2023-07-15 Published:2023-07-05
  • About author:LIU Ziwen,born in 1998,postgraduate.His main research interests include software test,computer control,computer software and machine learning.YU Lijuan,born in 1975,associate professor,graduate supervisor.Her main research interests include computer control,new energy system control and artificial intelligence.
  • Supported by:
    National Natural Science Foundation of China(62176193).

Abstract: Test case generation based on Web application front-end model is an important process of Web application testing,but most existing models for Web applications only focus on Web pages and their events,ignoring event triggering conditions and subsequent actions.Therefore,in order to describe the dynamic behavior of modern Web applications more accurately,this paper defines a new Web application front-end behavior model(FBM).Because there may be internal variables in the triggering conditions of transition in the model,that is,there are dependencies between transitions,which will make the generated test cases cannot be executed according to the input sequence,thus affecting the test results.Therefore,an optimized grouping genetic algorithm is proposed to automatically generate the feasible transition path(FTP).Considering the characteristics of FTP generation problem,the algorithm makes a reasonable design of chromosome initialization and fitness function,and adds a repair operator to adjust the individual length to generate FTP which satisfies the migration coverage.This paper also introduces an adaptive genetic operator and simulated annealing receiving mechanism to reduce the number of iterations,thus improving the solution speed.Experimental results show that the algorithm can effectively guarantee the feasibility and coverage of transition path on the basis of higher solution efficiency.

Key words: Web application testing, Front-end behavior model, Feasible test case generation, Grouping genetic algorithm

CLC Number: 

  • TP311.53
[1]LEBEAU F,LEGEARD B,PEUREUX F,et al.Model-based vulnerability testing for web applications[C]//2013 IEEE Sixth International Conference on Software Testing,Verification and Validation Workshops.IEEE,2013:445-452.
[2]ANDREWS A,ALHADDAD A,BOUKHRIS S.Black-boxmodel-based regression testing of fail-safe behavior in web applications[J].Journal of Systems and Software,2019,149:318-339.
[3]GAO P,XU Y,SONG F,et al.Model-based automated testing of JavaScript Web applications via longer test sequences[J].Frontiers of Computer Science,2022,16(3):1-14.
[4]JAIN N,PORWAL R.Automated test data generation applying heuristic approaches-a survey[M]//Software Engineering.Singapore:Springer,2019:699-708.
[5]SHARMA A,PATANI R,AGGARWAL A.Software testingusing genetic algorithms[J].International Journal of Computer Science & Engineering Survey,2016,7(2):21-33.
[6]PANIGRAHI S S,JENA A K.Spider Monkey Particle Swarm Optimization(SMPSO) With Coverage Criteria for Optimal Test Case Generation in Object-Oriented Systems[J].International Journal of Open Source Software and Processes(IJOSSP),2022,13(1):1-20.
[7]SHIROLE M,KUMAR R.UML behavioral model based testcase generation:a survey[J].ACM SIGSOFT Software Engineering Notes,2013,38(4):1-13.
[8]JOSHI S,AGRAWAL N,KRISHNAPURAM R,et al.A bag of paths model for measuring structural similarity in web documents[C]//Proceedings of the ninth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.2003:577-582.
[9]MIRZAAGHAEI M,MESBAH A.DOM-based test adequacycriteria for web applications[C]//Proceedings of the 2014 International Symposium on Software Testing and Analysis.2014:71-81.
[10]PRETSCHNER A,PRENNINGER W,WAGNER S,et al.One evaluation of model-based testing and its automation[C]//Proceedings of the 27th International Conference on Software Engineering.2005:392-401.
[11]MATTIELLO G R,ENDO A T.Model-based testing leveraged for automated web tests[J].Software Quality Journal,2021:1-29.
[12]PRADHAN S,RAY M,SWAIN S K.Transition coverage based test case generation from state chart diagram[J].Journal of King Saud University-Computer and Information Sciences,2019,34(3):993-1002.
[13]FALKENAUER E.A hybrid grouping genetic algorithm for bin packing[J].Journal of Heuristics,1996,2(1):5-30.
[14]FALKENAUER E.A new representation and operators for genetic algorithms applied to grouping problems[J].Evolutionary Computation,1994,2(2):123-144.
[15]GAO X D,ZHOU L J,ZHANG S D,et al.Research on test data automatic generation based on improved genetic algorithm[J].Computer Science,2017,44(3):209-214.
[16]LIN M,LIU B X,LIN X Y.Hybrid discrete cuckoo search algorithm with metropolis criterion for traveling salesman problem[J].Journal of Nanjing University(Natural Sciences),2017,53(5):972-983.
[17]MCCABE T J.A complexity measure[J].IEEE Transactions on Software Engineering,1976(4):308-320.
[18]CRUZ-LEMUS J A,MAES A,GENERO M,et al.The impact of structural complexity on the understandability of UML statechart diagrams[J].Information Sciences,2010,180(11):2209-2220.
[19]KALAJI A S,HIERONS R M,SWIFT S.An integrated search-based approach for automatic testing from extended finite state machine(EFSM) models[J].Information and Software Techno-logy,2011,53(12):1297-1318.
[20]SWAIN R,PANTHI V,BEHERA P K,et al.Automatic test case generation from UML state chart diagram[J].International Journal of Computer Applications,2012,42(7):26-36.
[21]KALAEE A,RAFE V.Model-based test suite generation forgraph transformation system using model simulation and search-based techniques[J].Information and Software Technology,2019,108:1-29.
[22]CHOI Y M,LIM D J.Automatic feasible transition path generation from UML state chart diagrams using grouping genetic algorithms[J].Information and Software Technology,2018,94:38-58.
[1] LI Zi-dong, YAO Yi-fei, WANG Wei-wei, ZHAO Rui-lian. Web Application Page Element Recognition and Visual Script Generation Based on Machine Vision [J]. Computer Science, 2022, 49(11): 65-75.
[2] LIU Yong-po,WU Ji and LIU Shuang-mei. Research of Generic Codec for Web Application Testing [J]. Computer Science, 2013, 40(8): 157-160.
[3] LU Xiao-li,DONG Yun-wei,ZHAO Hong-bin. Object-oriented Web Application Testing Model [J]. Computer Science, 2010, 37(7): 134-136.
[4] PENG Shu-shen,GU Qing,CHEN Dao-xu. Study of Test Case Generation for Web Applications [J]. Computer Science, 2010, 37(6): 159-163.
[5] LU Xiao-lil,DONG Yun-wei. Research on Structural Testing of Web Applications [J]. Computer Science, 2010, 37(12): 110-113.
[6] . [J]. Computer Science, 2006, 33(1): 175-176.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!