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测试套件具有很高的脆弱性,实际上用户界面的修改或重新设计通常是频繁的,并且经常使测试无效。这导致,对于基于DOM和基于可视化的技术,都需要频繁地仔细维护测试套件,这既昂贵又耗时。这项工作的目标是提供一组指导方针,以编写更干净、更健壮的测试代码,减少维护成本,并生成更易于理解的代码。基于所提供的建议,开发了一个静态测试套件分析器和代码筛选器。通过进行半系统的文献回顾,对实践的状态进行了专门的灰色文献研究。作者的经验被编码成一组建议,通过应用扎根理论的方法。基于这些结果,我们以Visual Studio Code插件的形式开发了一个过滤器,实现了所提供的17条指导原则。该插件突出显示了Java和Javascript语言中的测试气味。最后,我们针对真实GitHub项目的测试套件对该工具进行了初步验证。初步评估旨在尝试将该插件应用到实际的测试套件中,它检测到三个主要问题,即使用全局变量、未采用Page Object设计模式以及使用脆弱的定位器(如XPath)。