WO2018171195A1 - Dependency-injection-based android application semi-automatization test method - Google Patents

Dependency-injection-based android application semi-automatization test method Download PDF

Info

Publication number
WO2018171195A1
WO2018171195A1 PCT/CN2017/108455 CN2017108455W WO2018171195A1 WO 2018171195 A1 WO2018171195 A1 WO 2018171195A1 CN 2017108455 W CN2017108455 W CN 2017108455W WO 2018171195 A1 WO2018171195 A1 WO 2018171195A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
dependency
test
injection
user
Prior art date
Application number
PCT/CN2017/108455
Other languages
French (fr)
Chinese (zh)
Inventor
曹春
余萍
孟成林
Original Assignee
南京大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 南京大学 filed Critical 南京大学
Publication of WO2018171195A1 publication Critical patent/WO2018171195A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing

Definitions

  • the invention relates to the field of mobile application testing, and particularly relates to a semi-automated test method for Android applications based on dependency injection.
  • the present invention provides a semi-automated test method for Android applications based on dependency injection, which can combine the advantages of manual testing and random testing to provide various dependencies required for the correct operation of the application during the testing process. Improve test coverage and efficiently detect bugs.
  • the technical solution of the present invention is: a semi-automated test method for Android applications based on dependency injection, the method comprising the following steps:
  • the package loaded by the Android system is continuously detected. After detecting that the package of the application to be tested is loaded, the Xdroid module starts the code insertion operation.
  • test thread is activated and starts to generate an event. If the test thread does not traverse to the new Activity for a long time, the notification module sends a notification requesting user intervention.
  • a floating window that can switch between manual and test modes at any time is provided on the device interface, and Activity coverage and defect information are collected during the test.
  • the injection module performs automatic dependency injection. Through the hook function provided by the Xposed framework, the content and result of the request are judged, and if the content is missing, the related resource is generated.
  • the notification module notifies the user to perform manual dependency injection.
  • the Xposed framework is a framework service in the Android system that can affect the running of the program (modifying the system) without modifying the APK, and the root permission of the Android system is required to install the framework.
  • the framework replaces the zygote program of Android with the file manager, performs reflection interception on the generated new process, and injects new code for the specific function.
  • the Xdroid module is a Xposed module developed according to the present invention, which can be run in the Xposed framework to provide dependency injection and automatic test functions. After installing the module, it is necessary to select the enable module in the Xposed framework and restart the mobile phone activation.
  • dependency related API in step A2 includes but is not limited to the dependency related interface identified in the list:
  • the hook function is a helper function provided by the Xposed framework to add code to a particular function:
  • className is the class name of the function
  • classLoader is the specified class loader
  • methodName is the name of the function to be replaced
  • parameterTypesAndCallback is the parameter type list and Hook callback.
  • the event generated in step B1 is a click, a button, a slide, a trackball, a navigation, a main navigation, a system, and a two-finger reduction event generated by the Monkey test tool, and the generation ratio is 20%, and the button 13 is respectively %, sliding 10%, trackball 15%, navigation 25%, primary navigation 15%, system event 1%, two fingers down 2%.
  • the floating window refers to a system window developed by using WindowsManager provided by Android, which has a switch that can switch between manual testing and automatic testing, and the window can be always present in the device interface and accessed at any time once opened.
  • the Activity coverage refers to the ratio of the number of activities traversed by the test tool to the total amount of activities during the test.
  • the traversed Activity can be collected by hooking the Android.app.Activity.onCreate function, and the total Activity can be obtained through the package manager's getPackageInfo method.
  • the defect refers to an error generated by the application during the test, including application crash and application non-response.
  • Application crashes can get crash information by hooking the com.Android.server.am.ActivityManagerService.handleApplicationCrash function.
  • Application no response can get information about non-response errors by hooking com.Android.server.am.ActivityManagerService.appNotResponding.
  • the dependencies include content, permissions, device capabilities, user intervention, and other dependencies.
  • Content refers to general data that can be stored in an Android device, including contact information, calendar events, media files, and the like.
  • Permissions refer to the system permissions that an Android app needs to apply to users before using the relevant system data and features, including all permissions that can be listed in the AndroidManifest file, such as reading contacts and information.
  • Device capabilities refer to the various device capabilities provided by Android devices, including GPS, network, camera, Bluetooth, and more.
  • User intervention refers to valuable data and operations provided by the user, including opening a WIFI switch, username and password, and the like.
  • Other dependencies refer to various special resources that the application may depend on during the running process, such as other devices to be connected.
  • the content type dependency in step C2 refers to data and media files that can be automatically generated automatically by the program, such as GPS location and music files.
  • content-based auto-injection generated data and the media files stored in Xdroid are written to the system for invocation.
  • the user intervention in step C3 refers to a dependency that must be manually injected by the user, including connecting to the network, inputting a username and password, and the like.
  • the user is informed of the user-dependent dependency and provides information related to the dependency, including the manual processing required by the dependency and the parameter information related to the dependency, such as opening a WIFI switch, a background server address, and the like.
  • the present invention combines the advantages of manual testing and random testing.
  • the user can stop the automatic testing process at any time, provide manual interaction, and exert the advantages and random tests of manual interaction to solve complex interactions and provide user dependence.
  • the present invention automatically detects dependency requests in the application test process in a lightweight manner, and automatically provides resource-dependent dependencies, provides a convenient way for manual intervention for user dependencies, and solves the problem in the automatic test process.
  • Dependence on missing issues increases the efficiency and quality of automated testing.
  • the manual participation time is gradually reduced during the test, and generally does not exceed 10% of the total test time.
  • the test automation tool of the present invention does not require any PC connection, and completely uses the processing capability of the smart phone, and can test on multiple mobile phones at any time and any place at the same time, greatly reducing the consumption of equipment, and providing The ability to test in parallel.
  • the semi-automated test method of the Android application based on dependency injection of the present invention can combine the advantages of manual test and random test, and obtain the system dependency request related to the application call by using the Xposed framework, and provide the application to run correctly during the test process.
  • Figure 1 is a flow chart of an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of a system architecture of the present invention.
  • Figure 3 is a life cycle diagram of the test tool of the present invention.
  • Figure 4 is a schematic view of a suspension window of the present invention.
  • the invention provides an Android semi-automatic test method based on dependency injection, which enables the application to automatically detect relevant dependencies and provide resources during the test, so that the test program can better explore application functions and improve test efficiency.
  • the Xposed framework is a framework service that can affect the running of a program without modifying the Android installation package (APK).
  • the basic principle is to modify the system to affect the running of the program.
  • the Xdroid is a dependency injection and automatic test module based on the Xposed framework developed according to the method provided by the present invention.
  • the Xdroid module (202) includes a method hook, an injection module and a notification module.
  • the semi-automatic test method based on dependency injection comprises a target program code insertion process, a random test process and a dependency injection process, and the specific steps are as follows:
  • A1 Continuously detect the package loaded by the Android system, and start the code insertion operation after detecting that the package of the application to be tested is loaded.
  • the corresponding type of dependency processing function registration is performed to prevent unnecessary processing and consumption.
  • the registered dependent processing function types include device content, Bluetooth, location, network, and the like.
  • the present embodiment uses a floating window as a switching mode.
  • the floating window refers to the system window developed by WindowsManager provided by Android, and once opened, it can be always present in the device interface and can be accessed at any time.
  • the floating window In the default mode (Fig. 401), the floating window can be dragged and docked on the border of the device.
  • the floating window expands into a system window (Fig. 402), where the user can turn the test mode on or off.
  • the random events generated in this embodiment are clicks, buttons, slides, trackballs, navigation, main navigation, system and two-finger reduction events generated by the Monkey test tool.
  • the generation ratios are 20%, 13%, and sliding. 10%, trackball 15%, navigation 25%, main navigation 15%, system event 1%, two fingers down 2%.
  • test thread's start condition consists of two switches.
  • the test thread generates an event only if the application is in the foreground and the user turns on the test switch. This avoids meaningless performance consumption and improves test efficiency.
  • the function called by the application to request the device content is ContentResolver.query.
  • the processing method is to obtain the uri when the function is called, determine the type of the content requested, and the result list of the request, and generate related resources if the content is missing.
  • Figure 101 shows specific content types such as pictures, contacts, music, videos, text messages, calls, etc.
  • the notification module notifies the user to perform manual dependency injection.
  • the function called when the application requests a Bluetooth device is BluetoothAdapter.getDefaultAdapter.
  • the processing method is to obtain the result returned by the function, that is, the Bluetooth adapter. If the result is empty, the notification module notifies the user that the device has no Bluetooth. If the device is not turned on, the user is notified to turn on the Bluetooth switch.
  • the function called when the application requests the current physical location is WifiManager.getScanResults, TelephonyManager.getCellLocation, LocationManager.requestLocationUpdates.
  • the processing method is to judge the returned result list, and if the result is empty, the user is notified to open the corresponding switch, such as WIFI, 4G network, GPS switch, and the like. If the user allows the generation of fake location information, the randomly generated longitude and latitude information is returned.
  • the functions called when the application requests network access are URL.Constructor, HttpURLConnection.getResponseCode, AndroidHttpClient.execute, WebView.loadUrl.
  • the processing mode is to determine whether the network is open when the application accesses the network and whether the return code of the returned result is 400. If yes, the network request fails, and the user is notified to connect to the network.
  • the notification module when it is detected that the GPS information cannot be read, the network cannot be accessed, and the photo cannot be automatically taken, such as a photo that cannot be automatically completed by the program, the notification module sends a ringtone notification and corresponding information (toast). ) to the user, let the user help the program to complete the dependency injection.
  • the program cannot help the user to authorize, and the user needs to manually open the permission switch in the device.
  • User data dependencies such as username and password cannot be used in the program Automatically fill in during the running process, notify the user when the application is not explored for a long time, and the user data dependency is not given when viewing.
  • we set 500 event lengths and no new Activity Send a notification when you explore.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A dependency-injection Android application semi-automatization test method, wherein same can acquire, in combination with the advantages of a manual test and a random test, an application call-related system dependency request by using an Xposed frame, provide various dependencies required for the proper running of an application during testing, and improve a test coverage rate; and can efficiently detect bugs. The method comprises: an Android phone preprocessing process, a target program code insertion process, a random test process, and a dependency injection process. By using the method, a dependency request, during an application testing process, can be automatically detected in a lightweight manner, and a resource-type dependency is automatically provided to solve the problem of a missing dependency during an automatic testing process. Moreover, proposed is a method for performing semi-automatization testing, wherein complex interactions can be solved in combination with a manual method, and the features of unexpected defects can be discovered by providing user-dependent advantages and a random test, thus improving the efficiency and quality of an automatization test.

Description

一种基于依赖注入的安卓应用半自动化测试方法A Semi-automated Test Method for Android Application Based on Dependency Injection 技术领域Technical field
本发明涉及移动应用测试领域,具体涉及的是一种基于依赖注入的安卓应用半自动化测试方法。The invention relates to the field of mobile application testing, and particularly relates to a semi-automated test method for Android applications based on dependency injection.
背景技术Background technique
随着智能手机的流行,移动App逐渐成为我们日常生活的一部分,安卓***由于其***和设备的碎片化,导致目前很多App无法做到充分测试,我们可以从安卓市场的差评中看出很多应用存在缺陷。目前移动测试技术主要分为人工测试和自动测试,通常认为人工测试耗时耗力且容易出错,不过人类是智能的,能够产生有价值的测试用例,提升测试效果。安卓由于其开源特性以及巨大的市场份额吸引了一批研究者们研究并开发出了很多自动化测试工具,其中Monkey是安卓框架实现的随机测试工具,通过大量随机事件进行尝试,擅长发现普通操作下无法发现的错误,但效率不高,需要大量运行。With the popularity of smart phones, mobile apps have gradually become a part of our daily life. Due to the fragmentation of its systems and devices, many Android apps cannot be fully tested. We can see a lot from the bad reviews in the Android market. There are defects in the application. At present, mobile testing technology is mainly divided into manual testing and automatic testing. It is generally considered that manual testing is time-consuming and error-prone, but human beings are intelligent and can generate valuable test cases and improve test results. Due to its open source features and huge market share, Android has attracted a group of researchers to research and develop many automated testing tools. Among them, Monkey is a random testing tool implemented by Android framework. It tries to find out through ordinary random operations through a large number of random events. Undetectable errors, but not efficient, require a lot of running.
目前已有的测试工具主要聚焦于通过不同的测试策略探索应用功能并产生测试事件,但我们发现这些测试工具在一些特定的安卓应用下效果不尽如人意,其主要原因在于没有将测试依赖的问题考虑进去。安卓应用要正确运行需要很多的外部依赖,比如音乐播放器需要音乐文件才能播放,邮件客户端需要用户提供可用的邮箱账户才能访问其主要功能,如果不提供这些依赖,自动测试工具很难通过产生事件的方式到达真实用户可以轻易到达的应用状态,因而测试这些应用的主要功能也变得几乎不可能。Currently, the existing testing tools focus on exploring application functions and generating test events through different test strategies, but we find that these test tools are not satisfactory under some specific Android applications. The main reason is that there is no test dependency. The problem is considered. Android applications need a lot of external dependencies to run correctly. For example, music players need music files to play. Mail clients need users to provide available email accounts to access their main functions. If these dependencies are not provided, automatic test tools are difficult to generate. The way the events arrive reaches the state of the application that real users can easily reach, so testing the main functions of these applications becomes almost impossible.
发明内容Summary of the invention
针对现有技术存在的问题,本发明提供了一种基于依赖注入的安卓应用半自动化测试方法,能够结合人工测试和随机测试的优点,在测试的过程中提供应用正确运行所需要的各种依赖,提高测试覆盖率以及高效检测bug。In view of the problems existing in the prior art, the present invention provides a semi-automated test method for Android applications based on dependency injection, which can combine the advantages of manual testing and random testing to provide various dependencies required for the correct operation of the application during the testing process. Improve test coverage and efficiently detect bugs.
本发明的技术解决方案是:一种基于依赖注入的安卓应用半自动化测试方法,所述方法包括以下步骤:The technical solution of the present invention is: a semi-automated test method for Android applications based on dependency injection, the method comprising the following steps:
A.首先对目标应用进行插装,在对目标程序代码插装时,执行如下操作:A. First insert the target application. When inserting the target program code, do the following:
A1.通过Xposed框架持续对Android***载入的包进行检测,在检测到待测试应用程序的包被加载后,Xdroid模块开始进行代码插装操作。A1. Through the Xposed framework, the package loaded by the Android system is continuously detected. After detecting that the package of the application to be tested is loaded, the Xdroid module starts the code insertion operation.
A2.根据应用被批准的权限列表,使用Xposed提供的钩子函数进行依赖相关API的 处理函数注册,防止不必要的处理消耗。A2. According to the approved permission list of the application, use the hook function provided by Xposed to rely on the related API. Process function registration to prevent unnecessary processing overhead.
A3.在应用的Application.onCreate方法被调用后,创建随机测试线程XMonkey。A3. After the application's Application.onCreate method is called, create a random test thread XMonkey.
B.在对应用进行随机测试过程时,执行如下操作:B. When performing a random test on the application, do the following:
B1.在Activity.onResume方法被调用后,测试线程被激活,开始产生事件,若测试线程长时间没有遍历到新的Activity则由通知模块发出通知,请求用户干预。在设备界面上提供可以随时切换人工和测试模式的悬浮窗,并在测试过程中收集Activity覆盖率和缺陷信息。B1. After the Activity.onResume method is called, the test thread is activated and starts to generate an event. If the test thread does not traverse to the new Activity for a long time, the notification module sends a notification requesting user intervention. A floating window that can switch between manual and test modes at any time is provided on the device interface, and Activity coverage and defect information are collected during the test.
B2.在Activity.onPause方法被调用后,应用界面暂停,测试线程停止产生事件,等待下一次App处于前台的时刻。B2. After the Activity.onPause method is called, the application interface is paused, the test thread stops generating events, and waits for the next time the App is in the foreground.
B3.在应用被销毁后,应用进程被销毁,则处于应用进程中的测试线程也随之销毁。B3. After the application is destroyed and the application process is destroyed, the test thread in the application process is also destroyed.
C.当应用执行依赖相关函数时,执行依赖注入。在依赖注入过程中,执行如下操作:C. Perform dependency injection when the application executes dependency dependent functions. In the dependency injection process, do the following:
C1.如果依赖没有缺失,则不做任何操作。C1. If the dependency is not missing, no action is taken.
C2.如果被调用函数为内容型依赖,由注入模块进行自动依赖注入。通过Xposed框架提供的钩子函数,判断其请求的内容和结果,如果内容缺失则生成相关资源。C2. If the called function is a content-dependent dependency, the injection module performs automatic dependency injection. Through the hook function provided by the Xposed framework, the content and result of the request are judged, and if the content is missing, the related resource is generated.
C3.如果被调用函数依赖需要用户进行干预,由通知模块通知用户进行手动依赖注入。C3. If the called function dependency requires user intervention, the notification module notifies the user to perform manual dependency injection.
进一步的,步骤A1中,所述Xposed框架为安卓***中一款可以在不修改APK的情况下影响程序运行(修改***)的框架服务,安装该框架需要取得安卓***的root权限。该框架通过文件管理器将安卓***的zygote程序进行替换,对生成的新进程进行反射拦截,为特定的函数注入新的代码。Further, in step A1, the Xposed framework is a framework service in the Android system that can affect the running of the program (modifying the system) without modifying the APK, and the root permission of the Android system is required to install the framework. The framework replaces the zygote program of Android with the file manager, performs reflection interception on the generated new process, and injects new code for the specific function.
所述Xdroid模块为根据本发明所开发的Xposed模块,可运行在Xposed框架中,提供依赖注入以及自动化测试的功能,安装该模块后需要在Xposed框架中选中启用该模块并重启手机激活。The Xdroid module is a Xposed module developed according to the present invention, which can be run in the Xposed framework to provide dependency injection and automatic test functions. After installing the module, it is necessary to select the enable module in the Xposed framework and restart the mobile phone activation.
进一步的,步骤A2中所述依赖相关API包括但不限于列表中标识出的依赖相关接口:Further, the dependency related API in step A2 includes but is not limited to the dependency related interface identified in the list:
Figure PCTCN2017108455-appb-000001
Figure PCTCN2017108455-appb-000001
Figure PCTCN2017108455-appb-000002
Figure PCTCN2017108455-appb-000002
所述钩子函数为Xposed框架提供的用于对特定函数添加代码的辅助函数:The hook function is a helper function provided by the Xposed framework to add code to a particular function:
public findAndHookMethod(String className,ClassLoader classLoader,String methodName,Object...parameterTypesAndCallback);Public findAndHookMethod(String className, ClassLoader classLoader, String methodName, Object...parameterTypesAndCallback);
其中className为函数所在类名,classLoader为指定的类加载器,methodName为待替换函数名,parameterTypesAndCallback为参数类型列表和Hook回调。Where className is the class name of the function, classLoader is the specified class loader, methodName is the name of the function to be replaced, and parameterTypesAndCallback is the parameter type list and Hook callback.
进一步的,步骤B1中所述产生的事件为仿照Monkey测试工具生成的点击,按键,滑动,跟踪球,导航,主要导航,***以及两指缩小事件,其生成比率分别是点击20%,按键13%,滑动10%,跟踪球15%,导航25%,主要导航15%,***事件1%,两指缩小2%。Further, the event generated in step B1 is a click, a button, a slide, a trackball, a navigation, a main navigation, a system, and a two-finger reduction event generated by the Monkey test tool, and the generation ratio is 20%, and the button 13 is respectively %, sliding 10%, trackball 15%, navigation 25%, primary navigation 15%, system event 1%, two fingers down 2%.
所述悬浮窗是指使用Android提供的WindowsManager开发的***窗口,该窗口中含有可以切换人工测试和自动测试的开关,并且该窗口一经打开可以在设备界面中一直存在并且随时访问。The floating window refers to a system window developed by using WindowsManager provided by Android, which has a switch that can switch between manual testing and automatic testing, and the window can be always present in the device interface and accessed at any time once opened.
所述Activity覆盖率是指测试工具在测试期间遍历到的Activity的数量对Activity总量之间的比率。遍历到的Activity可以通过勾住Android.app.Activity.onCreate函数进行收集,总的Activity可以通过PackageManager的getPackageInfo方法获取。 The Activity coverage refers to the ratio of the number of activities traversed by the test tool to the total amount of activities during the test. The traversed Activity can be collected by hooking the Android.app.Activity.onCreate function, and the total Activity can be obtained through the package manager's getPackageInfo method.
所述缺陷是指应用在被测试过程中产生的错误,包括应用崩溃和应用无响应两种情况。应用崩溃可以通过勾住com.Android.server.am.ActivityManagerService.handleApplicationCrash函数获取崩溃信息。应用无响应可以通过勾住com.Android.server.am.ActivityManagerService.appNotResponding获取无响应错误的相关信息。The defect refers to an error generated by the application during the test, including application crash and application non-response. Application crashes can get crash information by hooking the com.Android.server.am.ActivityManagerService.handleApplicationCrash function. Application no response can get information about non-response errors by hooking com.Android.server.am.ActivityManagerService.appNotResponding.
进一步的,步骤C中,所述依赖包括内容,权限,设备能力,用户干预和其他依赖。内容是指Android设备中可以存储的通用数据,包括联系人信息,日程事件,媒体文件等。权限是指安卓应用在使用相关***数据和特性前需要向用户申请的***权限,包括所有在AndroidManifest文件中可以列出来的所有权限,比如读取联系人和信息等权限。设备能力是指安卓设备提供的各种设备能力,包括GPS,网络,摄像头,蓝牙等。用户干预是指用户提供的有价值的数据和操作,包括打开WIFI开关,用户名密码等。其他的依赖是指应用在运行过程中可能依赖的各种特殊资源,比如其他要连接的设备等。Further, in step C, the dependencies include content, permissions, device capabilities, user intervention, and other dependencies. Content refers to general data that can be stored in an Android device, including contact information, calendar events, media files, and the like. Permissions refer to the system permissions that an Android app needs to apply to users before using the relevant system data and features, including all permissions that can be listed in the AndroidManifest file, such as reading contacts and information. Device capabilities refer to the various device capabilities provided by Android devices, including GPS, network, camera, Bluetooth, and more. User intervention refers to valuable data and operations provided by the user, including opening a WIFI switch, username and password, and the like. Other dependencies refer to various special resources that the application may depend on during the running process, such as other devices to be connected.
进一步的,步骤C2中内容型依赖是指可以通过程序自动自动产生的数据以及媒体文件,比如GPS位置和音乐文件等。对于内容型依赖自动注入生成的数据以及将存储在Xdroid中的媒体文件写入到***中供调用。Further, the content type dependency in step C2 refers to data and media files that can be automatically generated automatically by the program, such as GPS location and music files. For content-based auto-injection generated data and the media files stored in Xdroid are written to the system for invocation.
进一步的,步骤C3中用户进行干预是指必须通过用户手动注入的依赖,包括连接网络,输入用户名密码等。对对于用户型依赖通知用户进行介入并提供与依赖相关的信息,包括该依赖所要求的人工处理方式以及与该依赖相关的参数信息,如需要打开WIFI开关,后台服务器地址等。Further, the user intervention in step C3 refers to a dependency that must be manually injected by the user, including connecting to the network, inputting a username and password, and the like. The user is informed of the user-dependent dependency and provides information related to the dependency, including the manual processing required by the dependency and the parameter information related to the dependency, such as opening a WIFI switch, a background server address, and the like.
有益效果:与现有技术相比,本发明具有以下优点:Advantageous Effects: Compared with the prior art, the present invention has the following advantages:
(1)本发明结合了人工测试和随机测试的优点,在应用测试的过程中用户能随时停止自动测试过程,提供人工交互,发挥了人工方式能够解决复杂交互和提供用户依赖的优势和随机测试能够发现意想不到的缺陷的特点,提高了代码的覆盖率以及有效寻找到应用的bug。(1) The present invention combines the advantages of manual testing and random testing. In the process of application testing, the user can stop the automatic testing process at any time, provide manual interaction, and exert the advantages and random tests of manual interaction to solve complex interactions and provide user dependence. Ability to spot unexpected defects, improve code coverage, and effectively find bugs in your application.
(2)本发明以一种轻量的方式自动检测在应用测试过程中的依赖请求,并自动提供资源型依赖,对于用户依赖,提供了方便的方式进行人工干预,解决了在自动测试过程中依赖缺失的问题,提高了自动化测试的效率和质量。在测试过程中人工参与时间逐渐减少,一般不超过总测试时间的10%。 (2) The present invention automatically detects dependency requests in the application test process in a lightweight manner, and automatically provides resource-dependent dependencies, provides a convenient way for manual intervention for user dependencies, and solves the problem in the automatic test process. Dependence on missing issues increases the efficiency and quality of automated testing. The manual participation time is gradually reduced during the test, and generally does not exceed 10% of the total test time.
(3)本发明中的测试自动化工具不需要任何PC机连接,完全使用智能手机的处理能力,可以在任何时间任何地点同时在多台手机上进行测试,大大减少了器材的消耗,并提供了并行测试的能力。(3) The test automation tool of the present invention does not require any PC connection, and completely uses the processing capability of the smart phone, and can test on multiple mobile phones at any time and any place at the same time, greatly reducing the consumption of equipment, and providing The ability to test in parallel.
(4)本发明的基于依赖注入的安卓应用半自动化测试方法,能够结合人工测试和随机测试的优点,通过利用Xposed框架,获取应用调用相关的***依赖请求,在测试的过程中提供应用正确运行所需要的各种依赖,提高测试覆盖率以及高效检测bug。(4) The semi-automated test method of the Android application based on dependency injection of the present invention can combine the advantages of manual test and random test, and obtain the system dependency request related to the application call by using the Xposed framework, and provide the application to run correctly during the test process. The various dependencies required to improve test coverage and efficiently detect bugs.
附图说明DRAWINGS
图1为本发明的实施例流程图。Figure 1 is a flow chart of an embodiment of the present invention.
图2为本发明的***架构示意图。2 is a schematic diagram of a system architecture of the present invention.
图3为本发明的测试工具生命周期图。Figure 3 is a life cycle diagram of the test tool of the present invention.
图4为本发明的悬浮窗示意图。Figure 4 is a schematic view of a suspension window of the present invention.
具体实施方式detailed description
下面对本发明技术方案结合附图进行详细说明,但是本发明的保护范围不局限于所述实施例。The technical solutions of the present invention will be described in detail below with reference to the accompanying drawings, but the scope of protection of the present invention is not limited to the embodiments.
本发明提供一种基于依赖注入的安卓半自动化测试方法,使得应用在被测试期间能够自动检测相关依赖并提供资源,使得测试程序能够更好的探索应用功能,提高测试效率。The invention provides an Android semi-automatic test method based on dependency injection, which enables the application to automatically detect relevant dependencies and provide resources during the test, so that the test program can better explore application functions and improve test efficiency.
在Android测试技术中,由于被测试应用没有被提供所依赖的资源,导致一些用户很容易进入的状态在自动化测试过程无法被覆盖。In the Android test technology, since the tested application is not provided with the resources it depends on, the state that some users can easily enter cannot be overwritten in the automated test process.
Xposed框架是一款可以在不修改Android安装包(APK)的情况下影响程序运行的框架服务,基本原理是通过修改***来影响程序运行。Xdroid是根据本发明提供的方法开发的基于Xposed框架的依赖注入以及自动测试模块,Xdroid模块(202)中包括方法钩子,注入模块以及通知模块。The Xposed framework is a framework service that can affect the running of a program without modifying the Android installation package (APK). The basic principle is to modify the system to affect the running of the program. The Xdroid is a dependency injection and automatic test module based on the Xposed framework developed according to the method provided by the present invention. The Xdroid module (202) includes a method hook, an injection module and a notification module.
本发明所提供的基于依赖注入的半自动测试方法包括目标程序代码插装过程,随机测试过程,依赖注入过程,具体步骤如下:The semi-automatic test method based on dependency injection provided by the invention comprises a target program code insertion process, a random test process and a dependency injection process, and the specific steps are as follows:
A.在安卓设备上运行选定要测试的应用,该Android程序作为待测试的目标程序,通过Xposed框架进行依赖相关代码(203)的插装,添加钩子函数;对目标程序进行插装时,执行如下操作:A. Run the selected application to be tested on the Android device. The Android program is used as the target program to be tested, and the Xposed framework is used to insert the dependency code (203), and the hook function is added; when the target program is inserted, Do the following:
A1.持续对Android***载入的包进行检测,在检测到待测试应用程序的包被加载后,开始代码插装操作。 A1. Continuously detect the package loaded by the Android system, and start the code insertion operation after detecting that the package of the application to be tested is loaded.
A2.根据应用被批准的权限列表进行相应类型的依赖处理函数注册,防止不必要的处理消耗,被注册的依赖处理函数类型包括设备内容,蓝牙,位置,网络等。A2. According to the approved permission list of the application, the corresponding type of dependency processing function registration is performed to prevent unnecessary processing and consumption. The registered dependent processing function types include device content, Bluetooth, location, network, and the like.
A3.在应用的Application.onCreate方法被调用后,创建随机测试线程XMonkey,我们处于应用进程内部,此时应用已经加载完毕并处于可用状态,此时我们创建随机测试线程,该测试线程通过获得的应用上下文对象获取应用信息。A3. After the application's Application.onCreate method is called, create a random test thread XMonkey. We are inside the application process. At this point, the application has been loaded and is available. At this point, we create a random test thread, which is obtained by the test thread. Apply context objects to get application information.
B.被测应用打开时,在应用进程内部创建随机测试线程(201),开始生成各种随机事件进行测试,在设备界面上提供可以随时切换人工和测试模式的悬浮窗,并在测试过程中收集Activity覆盖率和缺陷信息;具体执行如下操作(如图3所示):B. When the application under test is opened, a random test thread (201) is created inside the application process, and various random events are started to be tested, and a floating window that can switch between the manual and the test mode at any time is provided on the device interface, and during the test. Collect Activity coverage and defect information; perform the following operations (as shown in Figure 3):
B1.在Activity.onResume方法被调用后,应用处于前台,测试线程被激活,如果用户打开了悬浮窗中的测试开关,则开始产生事件。B1. After the Activity.onResume method is called, the application is in the foreground, the test thread is activated, and if the user opens the test switch in the floating window, an event is generated.
为了提供给用户最快捷的切换人工模式和测试模式的方式,本实施例使用悬浮窗作为切换方式。悬浮窗是指使用Android提供的WindowsManager开发的***窗口,并且该窗口一经打开可以在设备界面中一直存在并且随时访问。在默认模式下(图401)悬浮窗可以被拖动并停靠在设备的边框,当用户点击后悬浮窗展开为一个***窗口(图402),用户可以在这里开启或关闭测试模式。In order to provide the user with the quickest way to switch between the manual mode and the test mode, the present embodiment uses a floating window as a switching mode. The floating window refers to the system window developed by WindowsManager provided by Android, and once opened, it can be always present in the device interface and can be accessed at any time. In the default mode (Fig. 401), the floating window can be dragged and docked on the border of the device. When the user clicks, the floating window expands into a system window (Fig. 402), where the user can turn the test mode on or off.
本实施例中产生的随机事件为仿照Monkey测试工具生成的点击,按键,滑动,跟踪球,导航,主要导航,***以及两指缩小事件,其生成比率分别是点击20%,按键13%,滑动10%,跟踪球15%,导航25%,主要导航15%,***事件1%,两指缩小2%。The random events generated in this embodiment are clicks, buttons, slides, trackballs, navigation, main navigation, system and two-finger reduction events generated by the Monkey test tool. The generation ratios are 20%, 13%, and sliding. 10%, trackball 15%, navigation 25%, main navigation 15%, system event 1%, two fingers down 2%.
在原Monkey的实现中,其使用IWindowManager和IActivityManager实例来注入事件,但这两个实例都是***对象,在普通应用中无法使用。因此在本实施例中我们使用Instrumentation测试框架来替换注入事件的方法,例如使用sendKeyDownUpSync方法来发送按键事件。In the original implementation of Monkey, it uses IWindowManager and IActivityManager instances to inject events, but these two instances are system objects, which cannot be used in normal applications. So in this embodiment we use the Instrumentation test framework to replace the method of injecting events, such as using the sendKeyDownUpSync method to send key events.
B2.在Activity.onPause方法被调用后,应用界面暂停,测试线程停止产生事件,等待下一次App处于前台的时刻。B2. After the Activity.onPause method is called, the application interface is paused, the test thread stops generating events, and waits for the next time the App is in the foreground.
注意测试线程的启动条件由两个开关组成,只有在应用处于前台并且用户打开了测试开关的情况下测试线程才会产生事件,这样可以避免无意义的性能消耗,提高测试效率。Note that the test thread's start condition consists of two switches. The test thread generates an event only if the application is in the foreground and the user turns on the test switch. This avoids meaningless performance consumption and improves test efficiency.
B3.在应用被销毁后,应用进程被销毁,则处于应用进程中的测试线程也随之销毁。B3. After the application is destroyed and the application process is destroyed, the test thread in the application process is also destroyed.
C.在随机测试过程中,当应用执行依赖相关函数时,进行依赖请求的检测与注入;具体执行如下操作(如图1所示): C. During the random test process, when the application executes the dependency-dependent function, the detection and injection of the dependency request is performed; the specific operation is as follows (as shown in Figure 1):
C1.如果依赖没有缺失,则不做任何操作。C1. If the dependency is not missing, no action is taken.
C2.对于101中内容型依赖缺失,由注入模块进行自动依赖注入。C2. For the content type dependency in 101, automatic dependency injection is performed by the injection module.
应用请求设备内容的依赖所调用的函数为ContentResolver.query。处理方式为获取该函数调用时的uri,判断其请求的内容的类型,以及请求的结果列表,如果内容缺失则生成相关资源。图101部分为具体的内容类型,如图片,联系人,音乐,视频,短信,电话等。The function called by the application to request the device content is ContentResolver.query. The processing method is to obtain the uri when the function is called, determine the type of the content requested, and the result list of the request, and generate related resources if the content is missing. Figure 101 shows specific content types such as pictures, contacts, music, videos, text messages, calls, etc.
在本实施例中,如102所示,当检测到应用请求图片时,将存储在Xdroid中的3张JPG图像和3张PNG图像添加到***的图库中去。当检测到应用读取联系人时,生成10个预先设置的联系人信息并***到***联系人列表中。当检测到应用读取音乐文件时,将存储在Xdroid中的3个MP3文件添加到***的音乐库中。当检测到应用读取视频文件时,将存储在Xdroid的1个MP4文件添加到***的媒体库中。当检测到应用读取短信息时,生成随机的10条短信息并***到***的信息列表中。当检测到应用读取电话记录时,生成随机的10条通话记录并***到***的通话记录列表中。In the present embodiment, as shown in 102, when an application request picture is detected, three JPG images and three PNG images stored in the Xdroid are added to the library of the system. When it is detected that the application reads the contact, 10 preset contact information is generated and inserted into the system contact list. When it is detected that the application reads the music file, the three MP3 files stored in the Xdroid are added to the system's music library. When it is detected that the application reads the video file, one MP4 file stored in Xdroid is added to the media library of the system. When the application reads the short message, it generates 10 random short messages and inserts them into the system's information list. When the application detects the phone record, a random 10 call records are generated and inserted into the system's call record list.
C3.对于103中的用户型依赖缺失,由通知模块通知用户进行手动依赖注入。C3. For the user-type dependency deletion in 103, the notification module notifies the user to perform manual dependency injection.
应用请求蓝牙设备时调用的函数为BluetoothAdapter.getDefaultAdapter。处理方式为获取该函数返回的结果即蓝牙适配器,如果该结果为空,则通知模块通知用户设备无蓝牙。如果设备没有被打开,则通知用户打开蓝牙开关。The function called when the application requests a Bluetooth device is BluetoothAdapter.getDefaultAdapter. The processing method is to obtain the result returned by the function, that is, the Bluetooth adapter. If the result is empty, the notification module notifies the user that the device has no Bluetooth. If the device is not turned on, the user is notified to turn on the Bluetooth switch.
应用请求当前物理位置时调用的函数为WifiManager.getScanResults,TelephonyManager.getCellLocation,LocationManager.requestLocationUpdates。处理方式为判断返回的结果列表,如果结果为空则通知用户打开对应的开关,比如WIFI,4G网络,GPS开关等。如果用户允许生成假的位置信息,则返回随机生成的经度和纬度信息。The function called when the application requests the current physical location is WifiManager.getScanResults, TelephonyManager.getCellLocation, LocationManager.requestLocationUpdates. The processing method is to judge the returned result list, and if the result is empty, the user is notified to open the corresponding switch, such as WIFI, 4G network, GPS switch, and the like. If the user allows the generation of fake location information, the randomly generated longitude and latitude information is returned.
应用请求网络访问时调用的函数为URL.Constructor,HttpURLConnection.getResponseCode,AndroidHttpClient.execute,WebView.loadUrl。处理方式为在应用访问网络的时候判断网络是否打开以及判断放回结果的返回码是否为400,如果是的话则网络请求失败,通知用户连接网络。The functions called when the application requests network access are URL.Constructor, HttpURLConnection.getResponseCode, AndroidHttpClient.execute, WebView.loadUrl. The processing mode is to determine whether the network is open when the application accesses the network and whether the return code of the returned result is 400. If yes, the network request fails, and the user is notified to connect to the network.
在本实施例中,如104所示,当检测到无法读取GPS信息,无法访问网络,无法自动拍摄照片等无法通过程序自动完成的依赖时,通知模块会发送铃声通知以及相应的信息(toast)给用户,让用户帮助程序完成依赖注入。对于权限的赋予,程序无法帮助用户进行授权,需要用户手工打开设备中的权限开关。对于用户名密码等用户数据依赖无法在程序 运行过程中自动填入,在应用很长时间后没有探索到新的应用状态时通知用户查看时候有用户数据依赖没有被赋予,在本实施例中我们设定500个事件长度仍无新的Activity探索到则发送通知。In this embodiment, as shown in FIG. 104, when it is detected that the GPS information cannot be read, the network cannot be accessed, and the photo cannot be automatically taken, such as a photo that cannot be automatically completed by the program, the notification module sends a ringtone notification and corresponding information (toast). ) to the user, let the user help the program to complete the dependency injection. For the grant of permissions, the program cannot help the user to authorize, and the user needs to manually open the permission switch in the device. User data dependencies such as username and password cannot be used in the program Automatically fill in during the running process, notify the user when the application is not explored for a long time, and the user data dependency is not given when viewing. In this embodiment, we set 500 event lengths and no new Activity. Send a notification when you explore.
需要注意的是,公布实施例的目的在于帮助进一步理解本发明,但是本领域的技术人员可以理解:在不脱离本发明及所附权利要求的精神和范围内,各种替换和修改都是可能的。因此,本发明不应局限于实施例所公开的内容,本发明要求保护的范围以权利要求书界定的范围为准。 It is to be noted that the embodiments are disclosed to facilitate a further understanding of the invention, but those skilled in the art can understand that various alternatives and modifications are possible without departing from the spirit and scope of the invention and the appended claims. of. Therefore, the invention should not be limited by the scope of the invention, and the scope of the invention is defined by the scope of the claims.

Claims (10)

  1. 一种基于依赖注入的安卓应用半自动化测试方法,通过利用Xposed框架,获取应用调用相关的***依赖请求,在测试的过程中提供应用正确运行所需要的各种依赖,提高测试覆盖率以及高效检测bug,其特征在于:包括目标程序代码插装过程,随机测试过程,依赖注入过程;具体步骤为:A semi-automated test method for Android applications based on dependency injection. By using the Xposed framework to obtain system dependencies related to application calls, it provides various dependencies required for the correct operation of the application during the test process, improving test coverage and efficient detection. The bug is characterized by: a target program code insertion process, a random test process, and a dependency injection process; the specific steps are:
    A.首先对目标应用进行插装,在对目标程序代码插装时,执行如下操作:A. First insert the target application. When inserting the target program code, do the following:
    A1.持续对Android***载入的包进行检测,在检测到待测试应用程序的包被加载后,开始代码插装操作;A1. Continuously detecting the package loaded by the Android system, and starting the code insertion operation after detecting that the package of the application to be tested is loaded;
    A2.根据应用被批准的权限列表进行依赖相关API的处理函数注册,防止不必要的处理消耗;A2. Register the processing function dependent on the relevant API according to the approved permission list of the application to prevent unnecessary processing and consumption;
    A3.在应用的Application.onCreate方法被调用后,创建随机测试线程XMonkey;A3. After the application's Application.onCreate method is called, create a random test thread XMonkey;
    B.在对应用进行随机测试过程时,执行如下操作:B. When performing a random test on the application, do the following:
    B1.在Activity.onResume方法被调用后,测试线程被激活,开始产生事件,若测试线程长时间没有遍历到新的Activity则由通知模块发出通知,请求用户干预;B1. After the Activity.onResume method is called, the test thread is activated and starts to generate an event. If the test thread does not traverse to the new Activity for a long time, the notification module sends a notification requesting user intervention;
    B2.在Activity.onPause方法被调用后,应用界面暂停,测试线程停止产生事件,等待下一次App处于前台的时刻;B2. After the Activity.onPause method is called, the application interface is paused, the test thread stops generating events, and waits for the next time the App is in the foreground;
    B3.在应用被销毁后,应用进程被销毁,则处于应用进程中的测试线程也随之销毁;B3. After the application is destroyed, the application process is destroyed, and the test thread in the application process is also destroyed;
    C.当应用执行依赖相关函数时,执行依赖注入;在依赖注入过程中,执行如下操作:C. When the application executes the dependency-dependent function, perform dependency injection; in the dependency injection process, do the following:
    C1.如果依赖没有缺失,则不做任何操作;C1. If the dependency is not missing, do nothing;
    C2.如果被调用函数为内容型依赖,由注入模块进行自动依赖注入;通过Xposed框架提供的钩子函数,判断其请求的内容和结果,如果内容缺失则生成相关资源;C2. If the called function is a content-type dependency, the injection module performs automatic dependency injection; through the hook function provided by the Xposed framework, the content and result of the request are judged, and if the content is missing, the related resource is generated;
    C3.如果被调用函数依赖需要用户进行干预,由通知模块通知用户进行手动依赖注入。C3. If the called function dependency requires user intervention, the notification module notifies the user to perform manual dependency injection.
  2. 如权利要求1所述基于依赖注入的安卓应用半自动化测试方法,其特征在于:步骤A1中待测试应用的包名通过用户从软件界面中选取,并存储到共享偏好SharedPreference中,该存储文件设置为全局可读的,由Xdroid在运行时读取。The method for testing a semi-automated Android application based on dependency injection according to claim 1, wherein the package name of the application to be tested in step A1 is selected by the user from the software interface and stored in the sharing preference SharedPreference, and the storage file is set. Ready globally, read by Xdroid at runtime.
  3. 如权利要求1所述基于依赖注入的安卓应用半自动化测试方法,其特征在于:步骤A2中被注册的依赖处理函数类型包括设备内容,蓝牙,位置,网络;对于ANR和崩溃相关的处理函数在“android”包被加载之后进行注册。A method for testing a semi-automated Android application based on dependency injection according to claim 1, wherein the type of dependent processing function registered in step A2 comprises device content, Bluetooth, location, network; for ANR and crash related processing functions The "android" package is loaded after it is loaded.
  4. 如权利要求1所述基于依赖注入的安卓应用半自动化测试方法,其特征在于:步骤A3中所创建的随机测试线程XMonkey在待测Android应用的进程内部创建,创建时间节点为应用已经加载完毕并处于可用状态。The semi-automated test method for Android application based on dependency injection according to claim 1, wherein the random test thread XMonkey created in step A3 is created inside the process of the Android application to be tested, and the creation time node is that the application has been loaded and Available.
  5. 如权利要求1所述基于依赖注入的安卓应用半自动化测试方法,其特征在于:步骤B1中需要应用处于前台,并且用户打开了悬浮窗中的测试开关才能产生事件;The method of claim 1, wherein the application is in the foreground and the user opens the test switch in the floating window to generate an event;
    步骤B1中产生的事件包括点击,按键,滑动,跟踪球,导航,主要导航,***以及两指缩小事件,其生成比率分别是点击20%,按键13%,滑动10%,跟踪球15%,导航25%,主要导航15%,***事件1%,两指缩小2%。The events generated in step B1 include click, button, slide, trackball, navigation, main navigation, system and two-finger reduction events, and the generation ratios are 20% of the click, 13% of the button, 10% of the slide, 15% of the trackball, Navigation 25%, primary navigation 15%, system event 1%, two fingers down 2%.
  6. 如权利要求1所述基于依赖注入的安卓应用半自动化测试方法,其特征在于:步骤B2中测试线程每隔500ms检测一次应用是否处于前台且处于测试模式。 The semi-automated test method for Android application based on dependency injection according to claim 1, wherein in step B2, the test thread detects whether the application is in the foreground and in the test mode every 500 ms.
  7. 如权利要求1所述基于依赖注入的安卓应用半自动化测试方法,其特征在于:步骤C2中内容型依赖缺失后注入模块进行的注入方式为程序自动注入;自动注入方式包括将Xdroid中的媒体资源写入到***的媒体库中以及生成生成伪造的数据***到***的内容提供者中;The semi-automated test method for Android application based on dependency injection according to claim 1, wherein the injection method performed by the injection module after the content type dependency is missing in step C2 is automatic injection of the program; and the automatic injection method includes the media resource in the Xdroid. Write to the system's media library and generate generated forged data into the content provider of the system;
    步骤C2中设备内容依赖具体的内容类型包括图片,联系人,音乐,视频,短信,电话。The content of the device in step C2 depends on the specific content type including picture, contact, music, video, SMS, and phone.
  8. 如权利要求1所述基于依赖注入的安卓应用半自动化测试方法,其特征在于:步骤C3中用户型依赖缺失后通知模块进行的注入方式为通知用户,让用户手动帮助程序完成依赖注入。The immersive injection-based Android application semi-automated test method according to claim 1, wherein the injection mode of the notification module after the user-type dependency is missing in step C3 is to notify the user, and the user manually assists the program to complete the dependency injection.
  9. 如权利要求1至8之一所述基于依赖注入的安卓应用半自动化测试方法,其特征在于:步骤B1、C3中通知模块发出的通知包括一条包含依赖相关信息的Toast提示,并且伴随着一个简短的***以提示用户。A semi-automated test method for Android application based on dependency injection according to any one of claims 1 to 8, characterized in that the notification sent by the notification module in steps B1 and C3 includes a Toast prompt containing dependency information, accompanied by a brief The phone ringtones to alert the user.
  10. 如权利要求1至8之一所述基于依赖注入的安卓应用半自动化测试方法,其特征在于:步骤C3中应用请求蓝牙设备相关的函数时,判断返回的结果,若为空通知用户进行处理;应用请求当前物理位置相关的函数时,判断返回的结果列表,若结果为空则通知用户打开对应的开关;如果用户允许生成假的位置信息,则返回随机生成的经度和纬度信息;应用请求网络访问相关的函数时,判断网络是否打开以及判断放回结果的返回码是否为400,如果是的话则网络请求失败,通知用户连接网络。 The method for testing a semi-automated Android application based on dependency injection according to any one of claims 1 to 8, wherein when the application requesting the Bluetooth device-related function is used in step C3, the returned result is judged, and if the user is empty, the user is notified to perform processing; When the application requests the function related to the current physical location, the returned result list is judged, and if the result is empty, the user is notified to open the corresponding switch; if the user allows the generation of the fake location information, the randomly generated longitude and latitude information is returned; the application request network When accessing the related function, it is judged whether the network is open and whether the return code of the returned result is 400. If yes, the network request fails, and the user is notified to connect to the network.
PCT/CN2017/108455 2017-03-20 2017-10-31 Dependency-injection-based android application semi-automatization test method WO2018171195A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710166567.XA CN106951371B (en) 2017-03-20 2017-03-20 A kind of semi-automatic test method of Android application based on dependence injection
CN201710166567.X 2017-03-20

Publications (1)

Publication Number Publication Date
WO2018171195A1 true WO2018171195A1 (en) 2018-09-27

Family

ID=59473298

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/108455 WO2018171195A1 (en) 2017-03-20 2017-10-31 Dependency-injection-based android application semi-automatization test method

Country Status (2)

Country Link
CN (1) CN106951371B (en)
WO (1) WO2018171195A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106951371B (en) * 2017-03-20 2019-07-09 南京大学 A kind of semi-automatic test method of Android application based on dependence injection
CN108762815B (en) * 2018-05-16 2021-01-01 北京麟卓信息科技有限公司 Method for realizing Android running environment based on non-virtualization system architecture
CN108984407A (en) * 2018-07-13 2018-12-11 南京大学 A kind of validity test frame based on Android application-level modifications
CN111523097B (en) * 2020-04-09 2023-08-29 北京智慧章鱼科技有限公司 App brush user identification method, device and storage medium based on Android system
CN111782196A (en) * 2020-07-08 2020-10-16 上海乾臻信息科技有限公司 MVP architecture-based development method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102419727A (en) * 2011-09-30 2012-04-18 宇龙计算机通信科技(深圳)有限公司 Automatic test method and device
US20150058826A1 (en) * 2013-08-26 2015-02-26 The Trustees Of Columbia University In The City Of New York Systems and methods for efficiently and effectively detecting mobile app bugs
CN104850498A (en) * 2015-06-05 2015-08-19 上海斐讯数据通信技术有限公司 Filling information testing method and filling information testing system
CN105468529A (en) * 2015-12-15 2016-04-06 北京奇虎科技有限公司 Accurate traversal method and apparatus for UI controls of android application
CN106951371A (en) * 2017-03-20 2017-07-14 南京大学 A kind of semi-automatic method of testing of Android application based on dependence injection

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251796A (en) * 2008-03-31 2008-08-27 中国船舶重工集团公司第七〇九研究所 Distributed element dependent relationship managing method based on dependent injection
CN102708042A (en) * 2011-08-12 2012-10-03 华南理工大学 Service-oriented embedded software test system
CN105320540A (en) * 2015-10-28 2016-02-10 深圳市创维电器科技有限公司 Batch installation method and system for Android applications

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102419727A (en) * 2011-09-30 2012-04-18 宇龙计算机通信科技(深圳)有限公司 Automatic test method and device
US20150058826A1 (en) * 2013-08-26 2015-02-26 The Trustees Of Columbia University In The City Of New York Systems and methods for efficiently and effectively detecting mobile app bugs
CN104850498A (en) * 2015-06-05 2015-08-19 上海斐讯数据通信技术有限公司 Filling information testing method and filling information testing system
CN105468529A (en) * 2015-12-15 2016-04-06 北京奇虎科技有限公司 Accurate traversal method and apparatus for UI controls of android application
CN106951371A (en) * 2017-03-20 2017-07-14 南京大学 A kind of semi-automatic method of testing of Android application based on dependence injection

Also Published As

Publication number Publication date
CN106951371A (en) 2017-07-14
CN106951371B (en) 2019-07-09

Similar Documents

Publication Publication Date Title
WO2018171195A1 (en) Dependency-injection-based android application semi-automatization test method
US11513942B2 (en) Debug session management
US10983896B2 (en) Debug event handling
US9129058B2 (en) Application monitoring through continuous record and replay
US10545775B2 (en) Hook framework
WO2016095554A1 (en) Test method, device and system for application
CN109074278B (en) Validating stateful dynamic links in mobile applications
WO2021208512A1 (en) Method and apparatus for acquiring control information of user interface, terminal and storage medium
CN110879781B (en) Program debugging method, device, electronic equipment and computer readable storage medium
WO2020177519A1 (en) Debugging method executed on smart terminal and software debugging device
WO2022242281A1 (en) File storage method and apparatus, and electronic device and storage medium
CN110688245B (en) Information acquisition method, device, storage medium and equipment
CN110046100B (en) Packet testing method, electronic device and medium
CN109614271A (en) Control method, device, equipment and the storage medium of multiple company-data consistency
CN109710474A (en) A kind of hard disk fault detection method, device, terminal and readable storage medium storing program for executing
US8010950B1 (en) Method and apparatus for testing a binding application programming interface
CN112241373A (en) Automatic test method, test device, processor and test system
WO2014067368A1 (en) Method, apparatus and device for obtaining resource preview image
CN108563578A (en) SDK compatibility detection method, device, equipment and readable storage medium storing program for executing
CN114610239A (en) Method and device for operating file in portable memory by mobile terminal
CN114238021A (en) SDK interface positioning method, device, equipment and computer storage medium
CN113986679A (en) Performance analysis method and device based on configuration information hot loading
CN113535143A (en) Stack information processing method and device, electronic equipment and storage medium
US20120042100A1 (en) Systems and methods for managing memory using multi-state buffer representations
US12020039B2 (en) Compute instance warmup operations

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17901896

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17901896

Country of ref document: EP

Kind code of ref document: A1