Android application automatic test method and system based on reinforcement learning

A technology of automatic testing and reinforcement learning, applied in machine learning, software testing/debugging, error detection/correction, etc., can solve problems such as limitations, and achieve the effect of avoiding inconsistencies in real behavior

Active Publication Date: 2020-04-14
NANJING UNIV
View PDF5 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This type of method is limited by techniques such as symbolic execution, and performs well in scenarios where specific code is covered, but is not suitable for scenarios that require overall code coverage

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Android application automatic test method and system based on reinforcement learning
  • Android application automatic test method and system based on reinforcement learning
  • Android application automatic test method and system based on reinforcement learning

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0041] The present invention will be described in further detail below in conjunction with the accompanying drawings and specific embodiments.

[0042] Such as image 3 As shown, the flow diagram of the method for automatic testing of Android applications based on reinforcement learning in this embodiment includes the following steps:

[0043] S1: Automatically run the APK on the Android virtual machine or physical machine;

[0044] S2: Obtain the current control layout of the Android application;

[0045] S3: Speculate on executable user interaction events;

[0046] S4: Select the action with the highest value in the current state to execute;

[0047] S5: Use the neural network to compare the new state with the previous partial state, and give a reward based on this;

[0048] S6: Use the Q-learning algorithm to update the value of the executed event;

[0049]S7: Determine whether the current interface jumps to a state other than the application under test;

[0050] S8: ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses an Android application automatic test method and system based on reinforcement learning. The method comprises the steps of: in the testing process, automatically operating an Android APK by the automatic test tool, and obtaining a current interface control layout situation and speculating an executable interaction event; and adopting a Q-learning algorithm, when the interaction event is explored for the first time, obtaining an initial value, and selecting and executing the interaction event by the automatic test tool according to the value of the interaction event. A reward is generated after the interaction event is executed each time to update the value of the interaction event. The reward giving mainly takes the difference between the new state and the past state as a judgment standard. The neural network is introduced to compare the states, and whether the two states are in the same functional scene or not can be judged. Based on the reward given by the neural network judgment result, the automatic test tool can be guided to explore each scene in the Android application preferentially, so that the test efficiency is improved, and meanwhile, more defectsexisting in codes are discovered.

Description

technical field [0001] The invention relates to Android application automatic testing, in particular to an Android application automatic testing method and system based on reinforcement learning. Background technique [0002] With the popularity of smartphones, mobile applications have brought great changes to our lives. However, due to problems such as a large state space, it takes a lot of manpower and time to conduct a relatively comprehensive test on mobile applications. This demand is difficult to meet when major Internet companies are rapidly launching rapid version iterations of applications. Therefore, automated testing tools for mobile, especially efficient automated testing tools, are of great value. Among them, the Android system accounts for more than 70% of the mobile operating systems, so it is particularly important to automatically test Android applications. [0003] At present, there are some automatic testing methods for Android applications, but practice...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36G06N20/00
CPCG06F11/3688G06N20/00
Inventor 潘敏学黄安张天李宣东
Owner NANJING UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products