Research Article Open Access

SCUTMA: Selecting Components for Unit Testing in Mobile Applications

Josias Gomes1, Isabel K. Villanes1, Silvia M. Ascate1, Awdren Fontão2, Eduardo Noronha de Andrade Freitas3 and Arilo Claudio Dias-Neto1
  • 1 Federal University of Amazonas, Brazil
  • 2 Federal University of Mato Grosso do Sul, Brazil
  • 3 Federal Institute of Goias, Brazil

Abstract

Context The source code of a mobile application has several components (i.e., code units) and they have a cost (e.g., test creation and execution) and benefit (e.g., find bug) value for performing unit testing. Problem Choosing in which components unit tests should be done, in order to increase the benefit (effectiveness) and decrease the cost of this activity. Proposal This study presents an approach that supports the selection of components for unit test creation in Android mobile applications. The SCUTMA approach allows the selection of components with respect to the following criteria, which can be combined: Cost of future maintenance, propensity to defects, frequency of call, risk of failure, market vulnerability and business value. Results Two empirical studies were performed to evaluate SCUTMA. The first study aimed at analyzing the correlation between the metrics that represent the criteria described above, where the result showed the possibility of using the metrics Cost of Future Maintenance (CFM), Code Smell (CS), Frequency of Calls (FC), Fault Risk (FR), Market Vulnerability (MV) and Business Value (BV) combined in a solution for component selection. The second study aimed to evaluate the effectiveness of using the SCUTMA approach. The result indicates that SCUTMA selected more components with error (58.33%) than the selection performed by specialists (40%). Conclusions The SCUTMA approach is effective in selecting components for creating unit tests in Android mobile applications.

Journal of Computer Science
Volume 16 No. 10, 2020, 1367-1392

DOI: https://doi.org/10.3844/jcssp.2020.1367.1392

Submitted On: 15 July 2020 Published On: 15 October 2020

How to Cite: Gomes, J., Villanes, I. K., Ascate, S. M., Fontão, A., Freitas, E. N. A. & Dias-Neto, A. C. (2020). SCUTMA: Selecting Components for Unit Testing in Mobile Applications. Journal of Computer Science, 16(10), 1367-1392. https://doi.org/10.3844/jcssp.2020.1367.1392

  • 3,237 Views
  • 1,291 Downloads
  • 0 Citations

Download

Keywords

  • Mobile Application Testing
  • Automated Testing
  • Unit Test
  • Component Selection
  • Metric Correlation