“Assertions Are Strongly Correlated With Test Suite Effectiveness”, Yucheng Zhang, and Ali Mesbah.
In Proceedings of the joint meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESEC/FSE), 214–224, 2015
[PDF

Abstract

Code coverage is a popular test adequacy criterion in practice. Code coverage, however, remains controversial as there is a lack of coherent empirical evidence for its relation with test suite effectiveness. More recently, test suite size has been shown to be highly correlated with effectiveness. However, previous studies treat test methods as the smallest unit of interest, and ignore potential factors influencing this relationship. We propose to go beyond test suite size, by investigating test assertions inside test methods. We empirically evaluate the relationship between a test suite?s effectiveness and the (1) number of assertions, (2) assertion coverage, and (3) different types of assertions. We compose 6,700 test suites in total, using 24,000 assertions of five real-world Java projects. We find that the number of assertions in a test suite strongly correlates with its effectiveness, and this factor directly influences the relationship between test suite size and effectiveness. Our results also indicate that assertion coverage is strongly correlated with effectiveness and different types of assertions can influence the effectiveness of their containing test suites.

BibTeX

@inproceedings{fse15,
  author = {Zhang, Yucheng and Mesbah, Ali},
  title = {Assertions Are Strongly Correlated with Test Suite Effectiveness},
  booktitle = {Proceedings of the joint meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering (ESEC/FSE)},
  publisher = {ACM},
  pages = {214--224},
  year = {2015},
  url = {http://salt.ece.ubc.ca/publications/docs/fse15.pdf}
}