arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2108.11781cs.SEcs.LG
收藏

关于使用测试气味预测气味测试

On the use of test smells for prediction of flaky tests

Federal University of Paraná(巴拉那联邦大学);Federal University of Technology - Paraná(巴拉那联邦理工大学)

B. H. P. Camara, M. A. G. Silva, A. T. Endo, S. R. Vergilio

摘要:

回归测试是交付高质量软件的一个重要阶段。然而,重复测试妨碍了测试结果的评估,并可能增加成本。这是因为一个测试集可能通过或失败,这是不确定的,并且为了正确地识别测试的脆弱性,需要多次重新运行测试集。为了应对这一挑战,已经提出了基于预测模型和机器学习的方法。现有的方法的基础上使用的测试用例词汇可能是上下文敏感的,容易过拟合,表现出较低的性能时,在跨项目的情况下执行。为了克服这些局限性,我们调查使用测试气味作为预测的气味测试。我们进行了一项实证研究,以了解测试气味是否具有良好的性能,作为一个分类器,以预测在跨项目的情况下,片状,并分析了每个测试气味的信息增益。我们还比较了基于测试气味的方法和基于词汇的方法。因此,我们获得了一个分类器,具有合理的性能(随机森林,0.83),以预测在测试阶段的片状。该分类器在跨项目预测中表现出比基于词汇的模型更好的性能。断言轮盘赌和睡眠测试气味类型是与最佳信息增益值相关的气味类型。

英文摘要:

Regression testing is an important phase to deliver software with quality. However, flaky tests hamper the evaluation of test results and can increase costs. This is because a flaky test may pass or fail non-deterministically and to identify properly the flakiness of a test requires rerunning the test suite multiple times. To cope with this challenge, approaches have been proposed based on prediction models and machine learning. Existing approaches based on the use of the test case vocabulary may be context-sensitive and prone to overfitting, presenting low performance when executed in a cross-project scenario. To overcome these limitations, we investigate the use of test smells as predictors of flaky tests. We conducted an empirical study to understand if test smells have good performance as a classifier to predict the flakiness in the cross-project context, and analyzed the information gain of each test smell. We also compared the test smell-based approach with the vocabulary-based one. As a result, we obtained a classifier that had a reasonable performance (Random Forest, 0.83) to predict the flakiness in the testing phase. This classifier presented better performance than vocabulary-based model for cross-project prediction. The Assertion Roulette and Sleepy Test test smell types are the ones associated with the best information gain values.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑