Guidelines for GUI testing maintenance: a linter for test smell detection

Tommaso Fulcini, Giacomo Garaccione, Riccardo Coppola, Luca Ardito, Marco Torchiano
{"title":"Guidelines for GUI testing maintenance: a linter for test smell detection","authors":"Tommaso Fulcini, Giacomo Garaccione, Riccardo Coppola, Luca Ardito, Marco Torchiano","doi":"10.1145/3548659.3561306","DOIUrl":null,"url":null,"abstract":"GUI Test suites suffer from high fragility, in fact modifications or redesigns of the user interface are commonly frequent and often invalidate the tests. This leads, for both DOM- and visual-based techniques, to frequent need for careful maintenance of test suites, which can be expensive and time-consuming. The goal of this work is to present a set of guidelines to write cleaner and more robust test code, reducing the cost of maintenance and producing more understandable code. Based on the provided recommendations, a static test suite analyzer and code linter has been developed. An ad-hoc grey literature research was conducted on the state of the practice, by performing a semi-systematic literature review. Authors' experience was coded into a set of recommendations, by applying the grounded theory methodology. Based on these results, we developed a linter in the form of a plugin for Visual Studio Code, implementing 17 of the provided guidelines. The plugin highlights test smells in the Java and Javascript languages. Finally, we conducted a preliminary validation of the tool against test suites from real GitHub projects. The preliminary evaluation, meant to be an attempt of application of the plugin to real test suites, detected three main smells, namely the usage of global variables, the lack of adoption of the Page Object design pattern, and the usage of fragile locator such as the XPath.","PeriodicalId":264587,"journal":{"name":"Proceedings of the 13th International Workshop on Automating Test Case Design, Selection and Evaluation","volume":"25 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-11-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 13th International Workshop on Automating Test Case Design, Selection and Evaluation","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3548659.3561306","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

Abstract

GUI Test suites suffer from high fragility, in fact modifications or redesigns of the user interface are commonly frequent and often invalidate the tests. This leads, for both DOM- and visual-based techniques, to frequent need for careful maintenance of test suites, which can be expensive and time-consuming. The goal of this work is to present a set of guidelines to write cleaner and more robust test code, reducing the cost of maintenance and producing more understandable code. Based on the provided recommendations, a static test suite analyzer and code linter has been developed. An ad-hoc grey literature research was conducted on the state of the practice, by performing a semi-systematic literature review. Authors' experience was coded into a set of recommendations, by applying the grounded theory methodology. Based on these results, we developed a linter in the form of a plugin for Visual Studio Code, implementing 17 of the provided guidelines. The plugin highlights test smells in the Java and Javascript languages. Finally, we conducted a preliminary validation of the tool against test suites from real GitHub projects. The preliminary evaluation, meant to be an attempt of application of the plugin to real test suites, detected three main smells, namely the usage of global variables, the lack of adoption of the Page Object design pattern, and the usage of fragile locator such as the XPath.
GUI测试维护指南:用于测试气味检测的过滤器
GUI测试套件具有很高的脆弱性,实际上用户界面的修改或重新设计通常是频繁的,并且经常使测试无效。这导致,对于基于DOM和基于可视化的技术,都需要频繁地仔细维护测试套件,这既昂贵又耗时。这项工作的目标是提供一组指导方针,以编写更干净、更健壮的测试代码,减少维护成本,并生成更易于理解的代码。基于所提供的建议,开发了一个静态测试套件分析器和代码筛选器。通过进行半系统的文献回顾,对实践的状态进行了专门的灰色文献研究。作者的经验被编码成一组建议,通过应用扎根理论的方法。基于这些结果,我们以Visual Studio Code插件的形式开发了一个过滤器,实现了所提供的17条指导原则。该插件突出显示了Java和Javascript语言中的测试气味。最后,我们针对真实GitHub项目的测试套件对该工具进行了初步验证。初步评估旨在尝试将该插件应用到实际的测试套件中,它检测到三个主要问题,即使用全局变量、未采用Page Object设计模式以及使用脆弱的定位器(如XPath)。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信