A Method of Optimizing Multi-Locators Based on Machine Learning

Due to the rapid iteration of Web applications, there are some broken test cases in regression tests. The main reason for the appearance of broken test cases is the failure of element location in the new web page. The element locators in the test cases come from various Web element locating tools, which are used to identify the elements to be convenient for testers to operate them and eventually to test the Web application. Therefore, the Web element locating tools play an essential role in web testing. At present, there are some Web element locating tools, which are supported by a single locating algorithm or multiple locating algorithms. Moreover, the Multi-Locators supported by multiple algorithms are obviously more robust than the one supported by a single algorithm. However, when synthesizing all locating algorithm to generate Multi-Locators, a better method can be selected in assigning weights to each algorithm. Based on this observation, we propose a method to optimize Multi-Locators. In assigning weight to each algorithm, it chooses a weight distribution method based on machine learning, named Learned Weights. Through experimental comparison, it is shown that the locating tool supported by algorithm based on machine learning is more robust than these existing locating tools.

[1]  Mauro Pezzè,et al.  Automatically repairing test cases for evolving method declarations , 2010, 2010 IEEE International Conference on Software Maintenance.

[2]  Alberto Pan,et al.  Automated browsing in AJAX websites , 2011, Data Knowl. Eng..

[3]  Filippo Ricca,et al.  Comparing the maintainability of selenium WebDriver test suites employing different locators: a case study , 2013, JAMAICA 2013.

[4]  Paolo Tonella,et al.  PESTO: A Tool for Migrating DOM-Based to Visual Web Tests , 2014, 2014 IEEE 14th International Working Conference on Source Code Analysis and Manipulation.

[5]  Saurabh Sinha,et al.  Efficient and change-resilient test automation: An industrial case study , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[6]  Amin Milani Fard,et al.  Leveraging existing tests in automated test generation for web applications , 2014, ASE.

[7]  Paolo Tonella,et al.  Using Multi-Locators to Increase the Robustness of Web Test Cases , 2015, 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST).

[8]  Paolo Tonella,et al.  Reducing Web Test Cases Aging by Means of Robust XPath Locators , 2014, 2014 IEEE International Symposium on Software Reliability Engineering Workshops.