Testing React Native Mobile Apps: Pruning GUI Model Approach
- 1 Department of Information Technology, Birzeit University, Birzeit, Palestinian Authority
- 2 Department of Computer Science, Birzeit University, Birzeit, Palestinian Authority
Abstract
The mobile app market is still in continual growth. People are migrating to smartphone mobile devices to accomplish their daily activities while working, playing, and communicating with others. From the developers' perspective, there exists a wide variety of platforms, technologies, and architecture choices for developing and testing mobile apps. However, because of the constant changes in software applications and the great technological development, developers are supposed to speed up the development process to satisfy the customer's needs and provide robust applications within a short period of time. Cross-platform mobile app development technology, such as react Native, aims to overcome these difficulties, where instead of building separate applications for each platform, a single code base that can be run on multiple platforms is developed, which accelerates the development process. Model-based testing is one of the techniques that are used to test cross-platform applications and identify and find defects and bugs. This study proposes a React Native Abstract Syntax Tree pruning (RN-AST pruning) framework, which aims to facilitate the mobile app testing process by pruning the original GUI model of the application and reducing the number of test cases by keeping only the test cases that cover the impacted regions from internal code changes. The pruning process to keep the GUI elements is applied to the abstract syntax tree, which is the result of doing the static analysis on the last two versions of the source code. After that the two pruned AST will be compared to keep only the affected and updated GUI elements. The affected files will be listed as paths to prevent any other file from being tested, consequently reducing the number of test cases. According to our knowledge, no comprehensive work was dedicated to use the static analysis approach in keeping only the impacted GUI elements by the internal code changes in cross-platform software, thus reducing the run test cases and increasing productivity by accelerating the development life cycle. Preliminary experimentation was done on our framework with the help of six developers and test engineers in cross-platform development. The experiment was carried out in a systematic process with clear steps on a proof of concept mobile application. Results show that the RN-AST Pruning framework is useful and provides test engineers with affected files and paths that need to be tested, thus reducing the test cases and minimizing the testing time and effort. Moreover, it identifies exactly the changes that occurred in each file and categorizes them into updates, placements, and deletions based on the differences between the original version and the updated version of the source code. The authors confirm that this study is original and its contents are unpublished. Moreover, no specific grant from any funding agency was received.
DOI: https://doi.org/10.3844/jcssp.2024.594.601
Copyright: © 2024 Rand Marwan Khalil Ibrahim and Samer Zein. This is an open access article distributed under the terms of the
Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
- 1,211 Views
- 610 Downloads
- 0 Citations
Download
Keywords
- React Native
- GUI Model
- Pruning
- Testing Process