Many companies, including Ericsson, experience increased software verification costs. Agile cross-functional teams find it easy to make new additions of test cases for every change and fix. The consequence of this phenomenon is duplications of test code. In this paper, we perform an industrial case study that aims at better understanding such duplicated test fragments or as we call them, clones. In our study, 49% (LOC) of the entire test code are clones. The reported results include figures about clone frequencies, types, similarity, fragments, and size distributions, and the number of line differences in cloned test cases. It is challenging to keep clones consistent and remove unnecessary clones during the entire testing process of large-scale commercial software.

Additional Metadata
Keywords Clone detection, Code duplications, Industrial case study, Refactoring test code, Test code, Test smell
Persistent URL dx.doi.org/10.1109/QRS.2018.00061
Conference 18th IEEE International Conference on Software Quality, Reliability, and Security, QRS 2018
Citation
Hasanain, W. (Wafa), Labiche, Y, & Eldh, S. (Sigrid). (2018). An analysis of complex industrial test code using clone analysis. In Proceedings - 2018 IEEE 18th International Conference on Software Quality, Reliability, and Security, QRS 2018 (pp. 482–489). doi:10.1109/QRS.2018.00061