@article{Toure_Badri_Lamontagne_2014, title={A metrics suite for JUnit test code: a multiple case study on open source software}, volume={2}, url={https://sol.sbc.org.br/journals/index.php/jserd/article/view/398}, abstractNote={<section id="Abs1" class="Abstract Section1 RenderAsSection1 c-section" lang="en"> <div id="Abstract" class="c-section__content"> <div id="ASec1" class="AbstractSection"> <h3 class="Heading"><strong>Background</strong></h3> <p class="Para">The code of JUnit test cases is commonly used to characterize software testing effort. Different metrics have been proposed in literature to measure various perspectives of the size of JUnit test cases. Unfortunately, there is little understanding of the empirical application of these metrics, particularly which metrics are more useful in terms of provided information.</; <h3 class="Heading"><strong>Methods</strong></h3> <p class="Para">This paper aims at proposing a unified metrics suite that can be used to quantify the unit testing effort. We addressed the unit testing effort from the perspective of unit test case construction, and particularly the effort involved in writing the code of JUnit test cases. We used in our study five unit test case metrics, two of which were introduced in a previous work. We conducted an empirical study in three main stages. We collected data from six open source Java software systems, of different sizes and from different domains, for which JUnit test cases exist. We performed in a first stage a Principal Component Analysis to find whether the analyzed unit test case metrics are independent or are measuring similar structural aspects of the code of JUnit test cases. We used in a second stage clustering techniques to determine the unit test case metrics that are the less volatile, i.e. the least affected by the style adopted by developers while writing the code of test cases. We used in a third stage correlation and linear regression analysis to evaluate the relationships between the internal software class attributes and the test case metrics.</; <h3 class="Heading"><strong>Results and Conclusions</strong></h3> <p class="Para">The main goal of this study was to identify a subset of unit test case metrics: (1) providing useful information on the effort involved to write the code of JUnit test cases, (2) that are independent from each other, and (3) that are the less volatile. Results confirm the conclusions of our previous work and show, in addition, that: (1) the set of analyzed unit test case metrics could be reduced to a subset of two independent metrics maximizing the whole set of provided information, (2) these metrics are the less volatile, and (3) are also the most correlated to the internal software class attributes.</; </div> </div> </section> <section class="KeywordGroup Section1 RenderAsSection1 c-section" lang="en"> <h2 class="Heading js-ToggleCollapseSection c-section__heading" data-sticky-update="true"> </h2> </section>}, journal={Journal of Software Engineering Research and Development}, author={Toure, Fadel and Badri, Mourad and Lamontagne, Luc}, year={2014}, month={Nov.}, pages={14:1 – 14:32} }