Recent years have witnessed the widespread adoption of mobile applications(apps for short).For quality-of-service and commercial competitiveness,sufficient Graphical User Interface(GUI)testing is required to verify th...Recent years have witnessed the widespread adoption of mobile applications(apps for short).For quality-of-service and commercial competitiveness,sufficient Graphical User Interface(GUI)testing is required to verify the robustness of the apps.Given that testing with manual efforts is time-consuming and error-prone,automated GUI testing has been widely studied.However,existing approaches mostly focus on GUI exploration while lacking attention to complex interactions with apps,especially generating appropriate text inputs like real users.In this paper,we introduce CamDroid,a lightweight context-aware automated GUI testing tool,which can efficiently explore app activities through(1)a model-based UI-guided testing strategy informed by the context of previous event-activity transitions and(2)a data-driven text input generation approach regarding the GUI context.We evaluate CamDroid on 20 widely-used apps.The results show that CamDroid outperforms non-trivial baselines in activity coverage,crash detection,and test efficiency.展开更多
In software development process, the last step is usually the Graphic User In- terface(GUI) test, which is part of the final user experience (UE) test. Traditionally, there exist some GUI test tools in the market,...In software development process, the last step is usually the Graphic User In- terface(GUI) test, which is part of the final user experience (UE) test. Traditionally, there exist some GUI test tools in the market, such as Abbot Java GUI Test Framework and Pounder, in which testers pre-configure in the script all desired actions and instructions for the computer, nonetheless requiring too much of invariance of GUI environment; and they require reconfiguration in case of GUI changes, therefore still to be done mostly manually and hard for non-programmer testers to. Consequently, we proposed GUI tests by image recognition to automate the last process; we managed to innovate upon current algorithms such as SIFT and Random Fern, from which we develop the new algorithm scheme retrieving most efficient feature and dispelling inefficient part of each algorithm. Computers then apply the algorithm, to search for target patterns themselves and take subsequent actions such as manual mouse, keyboard and screen I/O automatically to test the GUI without any manual instructions. Test results showed that the proposed approach can accelerate GU! test largely compared to current benchmarks.展开更多
HarmonyOS is a new all-scenario operating system for smart devices.As its software ecosystem expands rapidly,how to conduct automated testing of HarmonyOS apps for quality assurance has become a crucial task.This pape...HarmonyOS is a new all-scenario operating system for smart devices.As its software ecosystem expands rapidly,how to conduct automated testing of HarmonyOS apps for quality assurance has become a crucial task.This paper presents HmTest,an automated testing framework for HarmonyOS apps,which consists of two complementary modules:targeted exploration and reinforcement learning(RL)-based exploration.Targeted exploration performs white-box testing,leveraging static analysis to construct a page transition graph(PTG).By systematically traversing PTGs to guide testing,HmTest can quickly achieve high page coverages.On the other hand,RL-based exploration performs black-box testing,utilizing reinforcement learning to achieve a comprehensive exploration of app states.Additionally,an automaton-based mechanism is employed to efficiently recover and restart the testing process when reinforcement learning encounters stagnation.We have evaluated HmTest on nine HarmonyOS NEXT apps and compared it with two official HarmonyOS app testing tools.The experimental results demonstrate that targeted exploration can generate highly-precise PTGs and help achieve high page coverages within a few minutes.RL-based exploration can significantly outperform other methods in terms of finer-grained statement coverage on the majority of the tested apps and benefits from the recovery mechanism.To facilitate future research,we have made HmTest open-source at https://github.com/sqlab-sustech/hmtest and provided a video demo at https://jcst.ict.ac.cn/news/361.展开更多
基金supported by the National Key R&D Program of China(No.2022YFB4500703)the National Natural Science Foundation of China(Nos.61902211 and 62202266)+1 种基金the China Postdoctoral Science Foundation(No.2022M721831)Microsoft Research Asia(No.100336949).
文摘Recent years have witnessed the widespread adoption of mobile applications(apps for short).For quality-of-service and commercial competitiveness,sufficient Graphical User Interface(GUI)testing is required to verify the robustness of the apps.Given that testing with manual efforts is time-consuming and error-prone,automated GUI testing has been widely studied.However,existing approaches mostly focus on GUI exploration while lacking attention to complex interactions with apps,especially generating appropriate text inputs like real users.In this paper,we introduce CamDroid,a lightweight context-aware automated GUI testing tool,which can efficiently explore app activities through(1)a model-based UI-guided testing strategy informed by the context of previous event-activity transitions and(2)a data-driven text input generation approach regarding the GUI context.We evaluate CamDroid on 20 widely-used apps.The results show that CamDroid outperforms non-trivial baselines in activity coverage,crash detection,and test efficiency.
基金supported by the National Natural Science Foundation of China(Nos.61572316,61133009)National Hightech R&D Program of China(863 Program)(Grant No.2015AA015904)+3 种基金the Science and Technology Commission of Shanghai Municipality Program(No.13511505000)the Interdisciplinary Program of Shanghai Jiao Tong University(No.14JCY10)a grant from the Research Grants Council of Hong Kong(Project No.:28200215)a grant from The Education University of Hong Kong(Project No:FLASS/DRF/ECR-7)
文摘In software development process, the last step is usually the Graphic User In- terface(GUI) test, which is part of the final user experience (UE) test. Traditionally, there exist some GUI test tools in the market, such as Abbot Java GUI Test Framework and Pounder, in which testers pre-configure in the script all desired actions and instructions for the computer, nonetheless requiring too much of invariance of GUI environment; and they require reconfiguration in case of GUI changes, therefore still to be done mostly manually and hard for non-programmer testers to. Consequently, we proposed GUI tests by image recognition to automate the last process; we managed to innovate upon current algorithms such as SIFT and Random Fern, from which we develop the new algorithm scheme retrieving most efficient feature and dispelling inefficient part of each algorithm. Computers then apply the algorithm, to search for target patterns themselves and take subsequent actions such as manual mouse, keyboard and screen I/O automatically to test the GUI without any manual instructions. Test results showed that the proposed approach can accelerate GU! test largely compared to current benchmarks.
基金supported by the National Natural Science Foundation of China under Grant Nos.62202213 and 62372219.
文摘HarmonyOS is a new all-scenario operating system for smart devices.As its software ecosystem expands rapidly,how to conduct automated testing of HarmonyOS apps for quality assurance has become a crucial task.This paper presents HmTest,an automated testing framework for HarmonyOS apps,which consists of two complementary modules:targeted exploration and reinforcement learning(RL)-based exploration.Targeted exploration performs white-box testing,leveraging static analysis to construct a page transition graph(PTG).By systematically traversing PTGs to guide testing,HmTest can quickly achieve high page coverages.On the other hand,RL-based exploration performs black-box testing,utilizing reinforcement learning to achieve a comprehensive exploration of app states.Additionally,an automaton-based mechanism is employed to efficiently recover and restart the testing process when reinforcement learning encounters stagnation.We have evaluated HmTest on nine HarmonyOS NEXT apps and compared it with two official HarmonyOS app testing tools.The experimental results demonstrate that targeted exploration can generate highly-precise PTGs and help achieve high page coverages within a few minutes.RL-based exploration can significantly outperform other methods in terms of finer-grained statement coverage on the majority of the tested apps and benefits from the recovery mechanism.To facilitate future research,we have made HmTest open-source at https://github.com/sqlab-sustech/hmtest and provided a video demo at https://jcst.ict.ac.cn/news/361.