Abstract
Modern Web applications offer a rich and unique user experience by taking advantages of the so called Web 2.0 technologies, among which Ajax. Ajax supports the intensive use of asynchronous communication between client-pages and the Web server and it allows on-the-fly manipulations of client-pages content and structure to realize a rich, dynamic and interactive user interface. Correspondingly, new types of faults that cannot be easily revealed by existing Web testing techniques are associated with modern Ajax-based applications. In our previous investigations, we used state-based testing for event sequence generation and it proved to be quite effective in exposing Ajax specific faults. However, the search space of the semantically interacting event sequences is huge, as it can grow exponentially with the event sequence length. In this paper, we apply search-based algorithms, namely hill climbing and simulated annealing, to the problem of generating maximally diverse event sequences of various lengths. In this way, we control the size of the generated test suites, while keeping the included test cases as diverse as possible. We evaluate the performance of the algorithms on two open source Ajax applications.
Similar content being viewed by others
Notes
Document Object Model, see http://www.w3.org/DOM.
The tool and additional information on its usage can be found at http://selab.fbk.eu/marchetto/tools/ajax/reAJAX.
The tool, additional information about the experimentation, and raw data are available at: http://selab.fbk.eu/marchetto/tools/ajax/testing1/experimentData.zip.
The computation time for all the algorithms has been computed on a desktop PC with an Intel(R) Core(TM) 2 Duo CPU working at 2.66 GHz and with 3GB of RAM memory.
References
Andrews A, Offutt J, Alexander R (2005) Testing web applications by modeling with FSMs. Softw Syst Model 4(3):326–345
Bozdag E, Mesbah A, van Deursen A (2009) Performance testing of data delivery techniques for ajax applications. J Web Eng 8(4):477–492
Cheon Y, Kim MY, Perumandla A (2005) A complete automation of unit testing for Java programs. In: Proc. of the international conference on software engineering research and practice (SERP05), USA, pp 290–295
Dallmeier V, Lindig C, Wasylkowski A, Zeller A (2006) Mining object behavior with ADABU. In: Proc. of the international workshop on dynamic analysis (WODA), Shangai, China, pp 17–24
Elbaum S, Rothermel G, Karre S, Fisher M (2005) Leveraging user session data to support web application testing. IEEE Trans Softw Eng 31(3):187–202
Gatlin KS (2004) Trials and tribulations of debugging concurrency. ACM Queue 2(7):67–73
Kirkpatrick S, Gelatt CD, Vecchi MP (1983) Optimization by simulated annealing. Science 220(4598):671–680
Marchetto A, Tonella P (2009) Search-based testing of ajax web applications. In: Proc. of IEEE international symposium on search based software engineering (SSBSE). IEEE Computer Society, Windsor, pp 3–13
Marchetto A, Tonella P, Ricca F (2008a) A case study-based comparison of web testing techniques applied to ajax web applications. Int J Softw Tools Technol Transf (STTT) 10(6):477–492
Marchetto A, Tonella P, Ricca F (2008b) State-based testing of ajax web applications. In: Proc. of IEEE international conference on software testing (ICST), Lillehammer, Norway, pp 121–131
Marchetto A, Tonella P, Ricca F (2010) Under and over approximation of state models for ajax applications. In Proc. of IEEE European conference on software maintenance and reengineering (CSMR), Madrid, Spain, pp 241–245
McMinn P (2004) Seach-based software test data generation: a survey. Software testing, verification and reliability, Wiley
Mesbah A, van Deursen A (2009) Invariant-based automatic testing of ajax user interfaces. In: Proc. of the international conference on software engineering (ICSE). IEEE Computer Society, Vancouver, pp 210–220
Nikolik B (2006) Test diversity. Inf Softw Technol 48:1083–1094
Pargas R, Harrold MJ, Peck R (1999) Test-data generation using genetic algorithms. Softw Test Verif Reliab 9:263–282
Patton RM, Wu AS, Walton GH (2003) A genetic algorithm approach to focused software usage testing. Software engineering with computational intelligence, Kluwer Academic
Ricca F, Tonella P (2001) Analysis and testing of Web applications. In: Proc. of the international conference on software engineering (ICSE), Toronto, Canada, pp 25–34
Russell SJ, Norvig P (2003). Artificial intelligence: a modern approach. Prentice Hall, NJ
Suman B, Kumar P (2006) A survey of simulated annealing as tool for single and multiobjective optimization. J Oper Res Soc 57:1143–1160
Turner CD, Robson DJ (1993) The state-based testing of object-oriented programs. In: Proc. of the international conference on software maintenance (ICSM), pp 302–310
Xiong J, Williams M, Price J (2006) Testing Ajax applications with Selenium. InfoQ magazine. http://www.infoq.com/articles/testing-ajax-selenium (last visit: 2010)
Yuan X, Memon A (2008) Alternating gui test generation and execution. In: Proc. of IEEE testing: academic and industrial conference (TAIC PART). IEEE Computer Society, Washington, pp 23–33
Yuan X, Memon AM (2007) Using GUI run-time state as feedback to generate test cases. In: Proc. the international conference on software engineering (ICSE), 23–25 May 2007. IEEE Computer Society, Washington, pp 396–405
Author information
Authors and Affiliations
Corresponding author
Additional information
Editors: Massimiliano Di Penta and Simon Poulding
Appendix
Appendix
In this section we provide additional data computed during the case study for both applications, but not included in the main sections of the paper for space reasons.
Rights and permissions
About this article
Cite this article
Marchetto, A., Tonella, P. Using search-based algorithms for Ajax event sequence generation during testing. Empir Software Eng 16, 103–140 (2011). https://doi.org/10.1007/s10664-010-9149-1
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10664-010-9149-1