TY - GEN
T1 - Using multi-locators to increase the robustness of web test cases
AU - Leotta, Maurizio
AU - Stocco, Andrea
AU - Ricca, Filippo
AU - Tonella, Paolo
N1 - Publisher Copyright:
© 2015 IEEE.
PY - 2015/5/5
Y1 - 2015/5/5
N2 - The main reason for the fragility of web test cases is the inability of web element locators to work correctly when the web page DOM evolves. Web elements locators are used in web test cases to identify all the GUI objects to operate upon and eventually to retrieve web page content that is compared against some oracle in order to decide whether the test case has passed or not. Hence, web element locators play an extremely important role in web testing and when a web element locator gets broken developers have to spend substantial time and effort to repair it. While algorithms exist to produce robust web element locators to be used in web test scripts, no algorithm is perfect and different algorithms are exposed to different fragilities when the software evolves. Based on such observation, we propose a new type of locator, named multi-locator, which selects the best locator among a candidate set of locators produced by different algorithms. Such selection is based on a voting procedure that assigns different voting weights to different locator generation algorithms. Experimental results obtained on six web applications, for which a subsequent release was available, show that the multi-locator is more robust than the single locators (about -30% of broken locators w.r.t. the most robust kind of single locator) and that the execution overhead required by the multiple queries done with different locators is negligible (2-3% at most).
AB - The main reason for the fragility of web test cases is the inability of web element locators to work correctly when the web page DOM evolves. Web elements locators are used in web test cases to identify all the GUI objects to operate upon and eventually to retrieve web page content that is compared against some oracle in order to decide whether the test case has passed or not. Hence, web element locators play an extremely important role in web testing and when a web element locator gets broken developers have to spend substantial time and effort to repair it. While algorithms exist to produce robust web element locators to be used in web test scripts, no algorithm is perfect and different algorithms are exposed to different fragilities when the software evolves. Based on such observation, we propose a new type of locator, named multi-locator, which selects the best locator among a candidate set of locators produced by different algorithms. Such selection is based on a voting procedure that assigns different voting weights to different locator generation algorithms. Experimental results obtained on six web applications, for which a subsequent release was available, show that the multi-locator is more robust than the single locators (about -30% of broken locators w.r.t. the most robust kind of single locator) and that the execution overhead required by the multiple queries done with different locators is negligible (2-3% at most).
KW - Test Case Robustness
KW - Testware Evolution
KW - Web Element Locators
KW - Web Testing
KW - XPath Locators
UR - http://www.scopus.com/inward/record.url?scp=84935138341&partnerID=8YFLogxK
U2 - 10.1109/ICST.2015.7102611
DO - 10.1109/ICST.2015.7102611
M3 - Conference contribution
AN - SCOPUS:84935138341
T3 - 2015 IEEE 8th International Conference on Software Testing, Verification and Validation, ICST 2015 - Proceedings
BT - 2015 IEEE 8th International Conference on Software Testing, Verification and Validation, ICST 2015 - Proceedings
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 8th IEEE International Conference on Software Testing, Verification and Validation, ICST 2015
Y2 - 13 April 2015 through 17 April 2015
ER -