2020
Conference article  Restricted

What is the Vocabulary of Flaky Tests?

Pinto G., Miranda B., Dissanayake S., D'Amorim M., Treude C., Bertolino A.

Test flakiness  Regression testing  Text classification 

Flaky tests are tests whose outcomes are non-deterministic. Despite the recent research activity on this topic, no effort has been made on understanding the vocabulary of flaky tests. This work proposes to automatically classify tests as flaky or not based on their vocabulary. Static classification of flaky tests is important, for example, to detect the introduction of flaky tests and to search for flaky tests after they are introduced in regression test suites. We evaluated performance of various machine learning algorithms to solve this problem. We constructed a data set of flaky and non-flaky tests by running every test case, in a set of 64k tests, 100 times (6.4 million test executions). We then used machine learning techniques on the resulting data set to predict which tests are flaky from their source code. Based on features, such as counting stemmed tokens extracted from source code identifiers, we achieved an F-measure of 0.95 for the identification of flaky tests. The best prediction performance was obtained when using Random Forest and Support Vector Machines. In terms of the code identifiers that are most strongly associated with test flakiness, we noted that job, action, and services are commonly associated with flaky tests. Overall, our results provides initial yet strong evidence that static detection of flaky tests is effective.

Source: 2020 IEEE/ACM 17th International Conference on Mining Software Repositories (MSR), pp. 492–502, 29-30/06/2020


Metrics



Back to previous page
BibTeX entry
@inproceedings{oai:it.cnr:prodotti:435436,
	title = {What is the Vocabulary of Flaky Tests?},
	author = {Pinto G. and Miranda B. and Dissanayake S. and D'Amorim M. and Treude C. and Bertolino A.},
	doi = {10.1145/3379597.3387482},
	booktitle = {2020 IEEE/ACM 17th International Conference on Mining Software Repositories (MSR), pp. 492–502, 29-30/06/2020},
	year = {2020}
}