Movatterモバイル変換


[0]ホーム

URL:


CN112100012B - Android device testing method, android device and storage medium - Google Patents

Android device testing method, android device and storage medium
Download PDF

Info

Publication number
CN112100012B
CN112100012BCN202010933062.3ACN202010933062ACN112100012BCN 112100012 BCN112100012 BCN 112100012BCN 202010933062 ACN202010933062 ACN 202010933062ACN 112100012 BCN112100012 BCN 112100012B
Authority
CN
China
Prior art keywords
test
android
android device
bluetooth
application
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202010933062.3A
Other languages
Chinese (zh)
Other versions
CN112100012A (en
Inventor
公丕强
王斌斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Skyworth Digital Technology Co Ltd
Original Assignee
Shenzhen Skyworth Digital Technology Co Ltd
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 Shenzhen Skyworth Digital Technology Co LtdfiledCriticalShenzhen Skyworth Digital Technology Co Ltd
Priority to CN202010933062.3ApriorityCriticalpatent/CN112100012B/en
Publication of CN112100012ApublicationCriticalpatent/CN112100012A/en
Application grantedgrantedCritical
Publication of CN112100012BpublicationCriticalpatent/CN112100012B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The application discloses an android device testing method, android devices and a storage medium, wherein the method comprises the following steps: each test item of the android device is obtained in advance, all the test items are integrated into one application, and the application is packaged into an android system; after the android system is started, judging whether the android device is connected with a storage device, and acquiring a specific file from a root directory of the storage device when the android device is connected with the storage device; and automatically running the application and displaying a test main interface according to the specific file to complete the functional test of all test items of the android device. According to the method, the specific file is stored in the storage device, the application of the test is triggered to be started in a mode of accessing the storage device to the android device, all the items to be tested are displayed in the same interface, all the test items are operated simultaneously, the time required by the test is greatly reduced, and the complexity of the test is simplified.

Description

Translated fromChinese
一种安卓设备测试方法、安卓设备及存储介质An Android device testing method, Android device and storage medium

技术领域Technical field

本发明涉及安卓设备测试技术领域,尤其涉及一种安卓设备测试方法、安卓设备及存储介质,可应用于运行安卓系统的板卡或整机,可应用于多个场合,例如板卡生产时的物料检测、整机生产时的功能检测、售后维修时的功能检测等。The invention relates to the technical field of Android device testing, and in particular to an Android device testing method, an Android device and a storage medium, which can be applied to boards or complete machines running the Android system, and can be applied to multiple occasions, such as when producing boards. Material testing, functional testing during complete machine production, functional testing during after-sales maintenance, etc.

背景技术Background technique

安卓设备的板卡在生产时,需要进行必要的检测,以确认板卡功能正常。而安卓系统在刷入板卡后,板卡从启动到开机的时间比较长,并且为了测试板卡的各个硬件接口或外围连接设备功能是否正常可用,在原安卓系统中需要进入到各种菜单界面去进行设置,或运行多个应用来测试不同的功能,这会花费非常多的时间,不利于生产线的快速生产。When the boards of Android devices are produced, necessary testing is required to confirm that the boards are functioning properly. After the Android system is flashed into the board, it takes a long time for the board to start up. In order to test whether the various hardware interfaces or peripheral connection device functions of the board are available normally, it is necessary to enter various menu interfaces in the original Android system. It takes a lot of time to set up or run multiple applications to test different functions, which is not conducive to the rapid production of the production line.

因此,现有技术还有待于改进和发展。Therefore, the existing technology still needs to be improved and developed.

发明内容Contents of the invention

本发明的主要目的在于提供一种安卓设备测试方法、安卓设备及存储介质,旨在解决现有技术中的安卓设备功能测试花费时间多,无法提高产线生产率的问题。The main purpose of the present invention is to provide an Android device testing method, Android device and storage medium, aiming to solve the problem in the prior art that Android device function testing takes a lot of time and cannot improve production line productivity.

为实现上述目的,本发明提供一种安卓设备测试方法,所述安卓设备测试方法包括如下步骤:In order to achieve the above object, the present invention provides an Android device testing method, which includes the following steps:

预先获取安卓设备的各个测试项目,将所有测试项目集成到一个应用中,将所述应用打包到安卓系统中;Obtain various test items for Android devices in advance, integrate all test items into an application, and package the application into the Android system;

在所述安卓系统启动后,判断所述安卓设备是否连接存储设备,当是时从所述存储设备的根目录下获取特定文件;After the Android system is started, determine whether the Android device is connected to a storage device, and if so, obtain a specific file from the root directory of the storage device;

根据所述特定文件,自动运行所述应用并显示测试主界面,以完成所述安卓设备的所有测试项目的功能测试。According to the specific file, the application is automatically run and the test main interface is displayed to complete the functional testing of all test items of the Android device.

可选地,所述的安卓设备测试方法,其中,所述安卓设备测试方法还包括:Optionally, the Android device testing method further includes:

在所述安卓系统启动后,所述应用不在所述安卓系统的主页面列表中显示。After the Android system is started, the application is not displayed in the main page list of the Android system.

可选地,所述的安卓设备测试方法,其中,所述测试项目包括:WIFI测试、蓝牙测试、SD卡测试、USB接口测试、以太网测试、显示屏背光测试、录音测试、播放声音测试、红外检测模块测试、耳机端口测试以及摄像头测试。Optionally, the Android device testing method, wherein the test items include: WIFI test, Bluetooth test, SD card test, USB interface test, Ethernet test, display backlight test, recording test, sound playback test, Infrared detection module test, headphone port test and camera test.

可选地,所述的安卓设备测试方法,其中,所述SD卡测试具体包括:Optionally, the Android device testing method, wherein the SD card test specifically includes:

当进行SD卡测试时,向SD卡创建目录和文件,并写数据到文件,再读取数据进行比较,若通过比较未发现错误则测试成功;When performing SD card testing, create directories and files in the SD card, write data to the files, and then read the data for comparison. If no errors are found through comparison, the test is successful;

若未检测到所述SD卡、或者识别到所述SD卡但未读到卡容量、或者读写操作失败,则测试失败。If the SD card is not detected, or the SD card is recognized but the card capacity is not read, or the read and write operations fail, the test fails.

可选地,所述的安卓设备测试方法,其中,所述WIFI测试具体包括:Optionally, the Android device testing method, wherein the WIFI test specifically includes:

当进行WIFI测试测试时,关闭WIFI,再打开所述WIFI,扫描热点并连接开放且信号质量最好的热点,当连接热点后进行网络ping测试,并显示网络ping测试的信息,则测试成功;When performing a WIFI test test, turn off WIFI, then turn on the WIFI, scan hotspots and connect to open hotspots with the best signal quality. After connecting to the hotspot, perform a network ping test and display the network ping test information, then the test is successful;

如果未扫描到开放的热点,列出扫描到的热点信息,当扫描到热点时则认为测试成功。If no open hotspots are scanned, the scanned hotspot information is listed. When the hotspots are scanned, the test is considered successful.

可选地,所述的安卓设备测试方法,其中,所述蓝牙测试具体包括:Optionally, the Android device testing method, wherein the Bluetooth test specifically includes:

当进行蓝牙测试时,关闭蓝牙,再打开所述蓝牙,扫描蓝牙设备,并列出扫描到的蓝牙设备名称;When performing a Bluetooth test, turn off Bluetooth, then turn on the Bluetooth, scan for Bluetooth devices, and list the names of the scanned Bluetooth devices;

如果正常打开蓝牙并扫描到蓝牙设备,则认为测试成功;If Bluetooth is turned on normally and a Bluetooth device is scanned, the test is considered successful;

如果不能打开蓝牙、或者打开蓝牙后无法扫描到蓝牙设备,则认为测试失败。If Bluetooth cannot be turned on, or Bluetooth devices cannot be scanned after turning on Bluetooth, the test is deemed to have failed.

可选地,所述的安卓设备测试方法,其中,所述摄像头测试具体包括:Optionally, the Android device testing method, wherein the camera test specifically includes:

当进行摄像头测试时,如果摄像头连接正常,显示预览图像,则认为测试成功;When performing a camera test, if the camera connection is normal and a preview image is displayed, the test is considered successful;

如果未连接所述摄像头或者所述摄像头工作异常,则认为测试失败。If the camera is not connected or the camera works abnormally, the test is deemed to have failed.

可选地,所述的安卓设备测试方法,其中,所述存储设备包括U盘。Optionally, in the Android device testing method, the storage device includes a USB flash drive.

此外,为实现上述目的,本发明还提供一种安卓设备,其中,所述安卓设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的安卓设备测试程序,所述安卓设备测试程序被所述处理器执行时实现如上所述的安卓设备测试方法的步骤。In addition, to achieve the above object, the present invention also provides an Android device, wherein the Android device includes: a memory, a processor, and an Android device test program stored on the memory and capable of running on the processor, When the Android device testing program is executed by the processor, the steps of the Android device testing method as described above are implemented.

此外,为实现上述目的,本发明还提供一种存储介质,其中,所述存储介质存储有安卓设备测试程序,所述安卓设备测试程序被处理器执行时实现如上所述的安卓设备测试方法的步骤。In addition, to achieve the above object, the present invention also provides a storage medium, wherein the storage medium stores an Android device test program, and when the Android device test program is executed by the processor, the Android device test method as described above is implemented. step.

本发明通过预先获取安卓设备的各个测试项目,将所有测试项目集成到一个应用中,将所述应用打包到安卓系统中;在所述安卓系统启动后,判断所述安卓设备是否连接存储设备,当是时从所述存储设备的根目录下获取特定文件;根据所述特定文件,自动运行所述应用并显示测试主界面,以完成所述安卓设备的所有测试项目的功能测试。本发明通过在存储设备中存入特定文件,通过接入存储设备到安卓设备的方式触发测试的应用启动,并且将所有需要测试的项目在同一个界面中显示出来,快速自动测试安卓设备的各个硬件接口及外围设备是否正常工作,所有测试项目同时运行,大大减少了测试需要的时间,以及简化了测试的繁杂程度。The present invention obtains various test items of the Android device in advance, integrates all the test items into one application, and packages the application into the Android system; after the Android system is started, it determines whether the Android device is connected to a storage device, When so, a specific file is obtained from the root directory of the storage device; according to the specific file, the application is automatically run and the test main interface is displayed to complete functional testing of all test items of the Android device. The invention stores specific files in the storage device, triggers the start of the test application by connecting the storage device to the Android device, and displays all the items that need to be tested in the same interface, quickly and automatically testing each aspect of the Android device. Whether the hardware interface and peripheral devices are working properly, all test items are run at the same time, which greatly reduces the time required for testing and simplifies the complexity of testing.

附图说明Description of the drawings

图1是本发明安卓设备测试方法的较佳实施例的流程图;Figure 1 is a flow chart of a preferred embodiment of the Android device testing method of the present invention;

图2是本发明安卓设备测试方法的较佳实施例中各个功能测试的界面示意图;Figure 2 is a schematic interface diagram of each functional test in the preferred embodiment of the Android device testing method of the present invention;

图3为本发明安卓设备的较佳实施例的运行环境示意图。Figure 3 is a schematic diagram of the operating environment of the preferred embodiment of the Android device of the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案及优点更加清楚、明确,以下参照附图并举实施例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the purpose, technical solutions and advantages of the present invention clearer and clearer, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described here are only used to explain the present invention and are not intended to limit the present invention.

本发明较佳实施例所述的安卓设备测试方法,如图1所示,所述安卓设备测试方法包括以下步骤:The Android device testing method according to the preferred embodiment of the present invention is as shown in Figure 1. The Android device testing method includes the following steps:

步骤S10、预先获取安卓设备的各个测试项目,将所有测试项目集成到一个应用中,将所述应用打包到安卓系统中;Step S10: Obtain various test items of the Android device in advance, integrate all test items into an application, and package the application into the Android system;

步骤S20、在所述安卓系统启动后,判断所述安卓设备是否连接存储设备,当是时从所述存储设备的根目录下获取特定文件;Step S20: After the Android system is started, determine whether the Android device is connected to a storage device, and if so, obtain a specific file from the root directory of the storage device;

步骤S30、根据所述特定文件,自动运行所述应用并显示测试主界面,以完成所述安卓设备的所有测试项目的功能测试。Step S30: Automatically run the application and display the test main interface according to the specific file to complete functional testing of all test items of the Android device.

具体地,所述存储设备包括U盘(当然也可以是其他的存储设备),本发明优选为U盘,本发明的所述存储设备以U盘为例进行说明,当安卓系统在启动完成后,相关的硬件服务会运行,当有USB设备(例如U盘)插入所述安卓设备的USB接口后,会有相应的广播android.hardware.usb.action.USB_DEVICE_ATTACHED发出;在应用的AndroidManifest.xml清单文件中,会注册一个广播接收器,接收上面的android.hardware.usb.action.USB_DEVICE_ATTACHED广播,当U盘插入所述安卓设备后,就会触发注册好的广播接收器运行,对应的广播接收器运行的类为com.DeviceTest.USBDiskReceiver。Specifically, the storage device includes a U disk (of course it can also be other storage devices). The present invention is preferably a U disk. The storage device of the present invention takes a U disk as an example. When the Android system is started, , the relevant hardware services will run. When a USB device (such as a USB flash drive) is inserted into the USB interface of the Android device, a corresponding broadcast android.hardware.usb.action.USB_DEVICE_ATTACHED will be issued; in the application's AndroidManifest.xml list In the file, a broadcast receiver will be registered to receive the above android.hardware.usb.action.USB_DEVICE_ATTACHED broadcast. When the U disk is inserted into the Android device, the registered broadcast receiver will be triggered to run, and the corresponding broadcast receiver The class running is com.DeviceTest.USBDiskReceiver.

接着,com.DeviceTest.USBDiskReceiver运行后,会遍历所述U盘中的文件,查找是否存在名称为DeviceTestConfig.xml的文件(即特定文件)。如果所述U盘根目录下不存在DeviceTestConfig.xml文件,就不做任何操作,即不存在特定文件时不作操作,可以认为此次插入U盘的操作为用户的正常操作;如果U盘根目录下存在DeviceTestConfig.xml文件,即存在特定文件,就打开应用的自动测试的Activity(Activity是Android的四大组件之一,是用户操作的可视化界面;它为用户提供了一个完成操作指令的窗口,当创建完毕Activity之后,需要调用setContentView()方法来完成界面的显示;以此来为用户提供交互的入口,在Android App中只要能看见的几乎都要依托于Activity,所以Activity是在开发中使用最频繁的一种组件),取名为com.DeviceTest.FirstRun。Then, after com.DeviceTest.USBDiskReceiver is run, it will traverse the files in the U disk to find whether there is a file named DeviceTestConfig.xml (that is, a specific file). If the DeviceTestConfig.xml file does not exist in the root directory of the U disk, no operation will be performed, that is, no operation will be performed if there is no specific file. It can be considered that the operation of inserting the U disk this time is a normal operation of the user; if the U disk root directory If the DeviceTestConfig.xml file exists, that is, if a specific file exists, open the application's automatic testing Activity (Activity is one of the four major components of Android and is a visual interface for user operations; it provides a window for users to complete operation instructions. After the Activity is created, the setContentView() method needs to be called to complete the display of the interface; in order to provide users with an interactive entrance, almost everything that can be seen in the Android App relies on Activity, so Activity is used in development The most frequent component), named com.DeviceTest.FirstRun.

最后,根据安卓系统应用支持多任务的特点,在FirstRun这个Activity运行的时候,根据的安卓设备测试具体需求,通过多个任务的同时运行,同时进行各个设备的测试。Finally, according to the characteristics of Android system applications that support multi-tasking, when the FirstRun Activity is running, according to the specific requirements of Android device testing, multiple tasks can be run simultaneously to test each device at the same time.

通过以上流程,预先在U盘内放入一个名为DeviceTestConfig.xml的文件,当插入放有该特定文件的U盘到安卓设备上后,会触发运行应用的自动测试的Activity,这样在一般用户使用U盘时不会运行自动测试的应用;可以在设备产线生产时就刷入根据客户定制制作好的固件,其中是已经加入了测试应用的,这样不需要为了做设备的测试而单独再去安装应用,或者需要先为设备刷入专门用来做测试使用的固件,等测试完成后再去刷入可以出货使用的固件,这样就大大提高了设备刷机的效率,节约生产的时间。Through the above process, a file named DeviceTestConfig.xml is placed in the USB flash drive in advance. When the USB flash drive containing the specific file is inserted into the Android device, the Activity of running the automatic test of the application will be triggered, so that for ordinary users Automatic test applications will not run when using a USB flash drive; you can flash firmware customized according to the customer during the production of the device, which has already included the test application, so there is no need to re-install it separately in order to test the device. To install the application, you may need to first flash the firmware specifically for testing into the device, and then flash the firmware that can be used for shipment after the test is completed. This greatly improves the efficiency of flashing the device and saves production time.

本技术方案将需要进行的各个测试项目集成在一个应用中,并将此应用打包在安卓系统中,此应用并不在系统的主页面列表中显示,因此不会影响用户的使用;此应用在安卓系统启动后,会判断设备是否有连接U盘,并从U盘根目录下寻找特定文件,如果此特定文件存在,应用会自动运行并显示测试界面,进行设备的功能测试;通过以上方式,测试的进行跟进特定的约定方式会自动执行,非常方便高效。This technical solution integrates various test projects that need to be carried out into one application, and packages this application in the Android system. This application is not displayed in the system's main page list, so it will not affect the user's use; this application is in Android After the system starts, it will determine whether the device is connected to the USB flash drive and search for a specific file from the root directory of the USB flash drive. If the specific file exists, the application will automatically run and display the test interface to test the device's functionality; through the above method, the test The follow-up specific agreement will be automatically executed, which is very convenient and efficient.

进一步地,如图2所示,图2是通过上述描述的方法启动的应用的自动测试的类:com.DeviceTest.FirstRun运行的界面。Further, as shown in Figure 2, Figure 2 is an interface for running the automatic test class of the application started by the method described above: com.DeviceTest.FirstRun.

本发明中,根据安卓设备的功能以及连接的外围设备,为了确认各功能正常,所述测试项目包括:WIFI测试、蓝牙测试、SD卡测试、USB接口测试、以太网测试、显示屏背光测试、录音测试、播放声音测试、红外检测模块测试、耳机端口测试以及摄像头测试等;由于安卓设备已经能正常开机进入主界面,内存以及存储功能已经是正常的,当上述基本功能测试正常后,安卓设备的功能可以确认是正常的。In the present invention, according to the functions of the Android device and the connected peripheral devices, in order to confirm that each function is normal, the test items include: WIFI test, Bluetooth test, SD card test, USB interface test, Ethernet test, display backlight test, Recording test, playback sound test, infrared detection module test, headphone port test and camera test, etc.; since the Android device can be turned on normally and enter the main interface, the memory and storage functions are already normal. When the above basic function tests are normal, the Android device The function can be confirmed to be normal.

图2中每项标号数字(例如图2中的1-13)对应需要的测试项目,如果需要添加其他的测试项目,根据需求可以修改Activity对应的布局文件添加项目,完善相关代码加入测试。下面描述图2中序号(1-11)所在区域表示具体内容:Each number in Figure 2 (for example, 1-13 in Figure 2) corresponds to the required test item. If you need to add other test items, you can modify the layout file corresponding to the Activity to add items according to your needs, and improve the relevant code to add the test. The following describes the specific content of the area represented by the serial number (1-11) in Figure 2:

1.显示固件的版本信息;例如固件版本为:8R28-A-W-skyworth_demo-1.0.10000.20200608。1. Display the firmware version information; for example, the firmware version is: 8R28-A-W-skyworth_demo-1.0.10000.20200608.

2.显示flash容量以及内存容量;例如总存储空间为8GB,可用存储空间为3.01GB。2. Display the flash capacity and memory capacity; for example, the total storage space is 8GB and the available storage space is 3.01GB.

3.当进行SD卡测试时,向SD卡创建目录和文件,并写数据到文件,再读取数据进行比较,若通过比较未发现错误则测试成功;若未检测到所述SD卡、或者识别到所述SD卡但未读到卡容量、或者读写操作失败,则测试失败;3. When performing SD card testing, create directories and files in the SD card, write data to the files, and then read the data for comparison. If no errors are found through comparison, the test is successful; if the SD card is not detected, or If the SD card is recognized but the card capacity is not read, or the read and write operations fail, the test fails;

SD卡测试,图2是插入SD卡,且测试通过的情况,会显示发现SD卡,并且显示SD卡容量(例如容量大小为14.75GB),另外会测试向SD卡创建目录以及文件,并写数据到文件,再读回数据并做比较,都没有错误,显示测试成功,即绿色显示,如果未插卡,或识别到卡,但读不到卡容量,或做读写操作失败,会显示测试失败,即显示红色。SD card test, Figure 2 shows the situation when the SD card is inserted and the test passes. The SD card will be found and the SD card capacity will be displayed (for example, the capacity is 14.75GB). In addition, the test will create directories and files to the SD card and write Data to the file, then read the data back and compare, there are no errors, the test is successful, that is, green display. If the card is not inserted, or the card is recognized, but the card capacity cannot be read, or the read and write operations fail, it will display If the test fails, it displays red.

4.进行USB接口测试,U盘插入板上USB接口,类似SD卡测试内容,如图2示例,会列出接入的U盘信息,例如发现USB设备,容量大小为7.49GB;4. Perform USB interface test, insert the U disk into the USB interface on the board, similar to the SD card test content, as shown in Figure 2, the connected U disk information will be listed, for example, a USB device is found with a capacity of 7.49GB;

5.当进行WIFI测试测试时,关闭WIFI,再打开所述WIFI,扫描热点并连接开放且信号质量最好的热点,当连接热点后进行网络ping测试,并显示网络ping测试的信息,则测试成功;如果未扫描到开放的热点,列出扫描到的热点信息,当扫描到热点时则认为测试成功;5. When performing a WIFI test test, turn off the WIFI, then turn on the WIFI, scan for hotspots and connect to open hotspots with the best signal quality, perform a network ping test after connecting to the hotspot, and display the network ping test information, then test Success; if no open hotspots are scanned, the scanned hotspot information is listed. When the hotspots are scanned, the test is considered successful;

也就是说,WIFI测试,会先关闭WIFI,再打开WIFI,扫描热点,如果扫描到的热点有开放的,即不需要密码认证的,会自动连接信号质量好的这个热点,如果能够连接上,再进行网络ping测试,现在是ping百度网址,并显示ping测试的信息,图2显示的是可以正常ping通的信息;如果没有热点可连接,会列出扫描到的热点信息,能扫描到热点,即认为测试成功;ping测试只显示结果,如果热点不能访问网络,只是ping测试返回的信息是不能正常收发数据包;所以测试成功的标准是可以正常扫描到热点即认为测试成功;测试失败会以红色显示。In other words, the WIFI test will first turn off WIFI, then turn on WIFI, and scan hotspots. If the scanned hotspots are open, that is, those that do not require password authentication, the hotspot with good signal quality will be automatically connected. If it can be connected, Then perform the network ping test, now ping the Baidu URL, and display the ping test information. Figure 2 shows the information that can be pinged normally. If there is no hotspot to connect to, the scanned hotspot information will be listed, and the hotspot can be scanned. , that is, the test is considered successful; the ping test only displays the results. If the hotspot cannot access the network, the information returned by the ping test is that it cannot send and receive data packets normally; therefore, the test success criterion is that the hotspot can be scanned normally, which means the test is considered successful; if the test fails, Shown in red.

6.以太网测试,图2显示测试成功,有网线插入以太网口,会自动连接,连接成功,会显示连接的信息,然后做ping百度网址的测试。6. Ethernet test, Figure 2 shows that the test is successful. If a network cable is inserted into the Ethernet port, it will automatically connect. If the connection is successful, the connection information will be displayed, and then do the test of pinging the Baidu website.

7.当进行蓝牙测试时,关闭蓝牙,再打开所述蓝牙,扫描蓝牙设备,并列出扫描到的蓝牙设备名称;如果正常打开蓝牙并扫描到蓝牙设备,则认为测试成功;如果不能打开蓝牙、或者打开蓝牙后无法扫描到蓝牙设备,则认为测试失败;7. When performing a Bluetooth test, turn off Bluetooth, then turn on the Bluetooth, scan for Bluetooth devices, and list the names of the scanned Bluetooth devices; if Bluetooth is turned on normally and Bluetooth devices are scanned, the test is considered successful; if Bluetooth cannot be turned on , or the Bluetooth device cannot be scanned after turning on Bluetooth, the test is deemed to have failed;

也就是说,蓝牙测试会先关闭蓝牙,再打开,然后扫描蓝牙设备,并列出扫描到的蓝牙设备名称,如果能正常打开蓝牙,并扫描到蓝牙设备,即认为测试成功,不能打开蓝牙,或打开后扫描不到设备认为测试失败,红色显示。In other words, the Bluetooth test will first turn off Bluetooth, then turn it on, then scan for Bluetooth devices and list the names of the scanned Bluetooth devices. If Bluetooth can be turned on normally and Bluetooth devices are scanned, the test is considered successful and Bluetooth cannot be turned on. Or if no device is scanned after opening, the test is considered failed and displayed in red.

8.背光测试,背光测试运行后,会自动调节背光亮度,从最暗到最亮,然后从最亮调到最暗,需要测试人员观察屏幕判断背光调节是否正常;自动调节一次后,可以通过点击“背光测试”按钮进行手动测试。8. Backlight test. After the backlight test is run, the backlight brightness will be automatically adjusted from the darkest to the brightest, and then from the brightest to the darkest. The tester needs to observe the screen to determine whether the backlight adjustment is normal; after automatic adjustment once, you can pass Click the "Backlight Test" button to perform a manual test.

9.此部分显示耳机的接入情况,图2表示是未接入耳机的情况;会根据实际接入耳机显示“四节耳机插入”“三节耳机插入”,耳机可以在任何时候接入;红外感应状态部分,如果有红外感应设备的话,这里会根据实际状态显示0或者1。9. This part shows the connection status of the headset. Figure 2 shows the situation when the headset is not connected; "Four headphone plugged in" and "Three headphone plugged in" will be displayed according to the actual plugged headset. The headset can be connected at any time; infrared In the sensing status part, if there is an infrared sensing device, 0 or 1 will be displayed here according to the actual status.

10.录音测试,默认会自动的录音,录音时间5秒钟,录完后自动播放录音,之后循环;可以手动点击“录音测试”按钮进行手动测试,点击后不会再重复自动录音播放测试;录音和播放与耳机是否接入以及耳机是否带麦有关;遵循系统做的录音以及放音策略。10. Recording test, the default recording will be automatic, the recording time is 5 seconds, the recording will be automatically played after the recording is completed, and then loop; you can manually click the "Recording Test" button to perform a manual test. After clicking, the automatic recording and playback test will not be repeated; Recording and playback are related to whether the headset is connected and whether the headset has a microphone; follow the recording and playback strategies of the system.

11.当进行摄像头测试时,如果摄像头连接正常,显示预览图像,则认为测试成功;如果未连接所述摄像头或者所述摄像头工作异常,则认为测试失败;11. When performing a camera test, if the camera is connected normally and a preview image is displayed, the test is considered successful; if the camera is not connected or the camera works abnormally, the test is considered failed;

也就是说,在进行摄像头测试时,如果摄像头连接正常,这里会显示出预览图像,如果未连接摄像头,或摄像头工作不正常,这里会显示没有摄像头。That is to say, during the camera test, if the camera is connected normally, the preview image will be displayed here. If the camera is not connected, or the camera is not working properly, there will be no camera displayed here.

本发明中,安卓设备的测试,现有技术中由于需要测试的内容需要通过在系统的各个界面之间通过相应的菜单找到相应的功能,并手动去做操作,以及根据操作结果判断测试功能是否正常,步骤繁琐,测试时间长。另外的方法是单独定制测试的应用,但很多操作项目也需要人为手动去做操作,并且测试项目逐个进行,并不利于生产线的自动化测试。而本发明按照相关的约定,预先在U盘中放置约定名称的文件(特定文件),通过接入U盘到安卓设备的方式,触发测试的应用启动,并且根据需要将所有需要测试的项目在同一个界面中显示出来,所有的测试项目都是自动同时运行的,这样大大减少了测试需要的时间,以及简化了测试的繁杂程度。In the present invention, for the testing of Android devices, in the prior art, the content to be tested needs to be found through corresponding menus between various interfaces of the system, and the operations must be performed manually, and whether the test function must be judged based on the operation results. Normal, the steps are complicated and the test takes a long time. Another method is to customize the test application individually, but many operation items also require manual operations, and the test items are performed one by one, which is not conducive to automated testing of the production line. According to the relevant agreement, the present invention places the file (specific file) with the agreed name in the U disk in advance, triggers the startup of the test application by connecting the U disk to the Android device, and places all the items that need to be tested in the U disk as needed. All test items are displayed on the same interface and are automatically run at the same time, which greatly reduces the time required for testing and simplifies the complexity of testing.

进一步地,如图3所示,基于上述安卓设备测试方法,本发明还相应提供了一种安卓设备,所述安卓设备包括处理器10、存储器20及显示器30。图3仅示出了安卓设备的部分组件,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。Further, as shown in FIG. 3 , based on the above Android device testing method, the present invention also provides an Android device. The Android device includes a processor 10 , a memory 20 and a display 30 . FIG. 3 only shows some components of the Android device, but it should be understood that implementation of all the components shown is not required, and more or fewer components may be implemented instead.

所述存储器20在一些实施例中可以是所述安卓设备的内部存储单元,例如安卓设备的硬盘或内存。所述存储器20在另一些实施例中也可以是所述安卓设备的外部存储设备,例如所述安卓设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器20还可以既包括所述安卓设备的内部存储单元也包括外部存储设备。所述存储器20用于存储安装于所述安卓设备的应用软件及各类数据,例如所述安装安卓设备的程序代码等。所述存储器20还可以用于暂时地存储已经输出或者将要输出的数据。在一实施例中,存储器20上存储有安卓设备测试方法程序40,该安卓设备测试方法程序40可被处理器10所执行,从而实现本申请中安卓设备测试方法。In some embodiments, the memory 20 may be an internal storage unit of the Android device, such as a hard disk or memory of the Android device. In other embodiments, the memory 20 may also be an external storage device of the Android device, such as a plug-in hard disk, a Smart Media Card (SMC), or a Secure Digital (Secure Digital) device equipped on the Android device. Digital, SD) card, Flash Card, etc. Further, the memory 20 may also include both an internal storage unit of the Android device and an external storage device. The memory 20 is used to store application software and various data installed on the Android device, such as the program code for installing the Android device. The memory 20 can also be used to temporarily store data that has been output or is to be output. In one embodiment, the Android device testing method program 40 is stored on the memory 20 , and the Android device testing method program 40 can be executed by the processor 10 , thereby implementing the Android device testing method in this application.

所述处理器10在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行所述存储器20中存储的程序代码或处理数据,例如执行所述安卓设备测试方法等。In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 20, for example Execute the Android device testing methods described, etc.

所述显示器30在一些实施例中可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。所述显示器30用于显示在所述安卓设备的信息以及用于显示可视化的用户界面。所述安卓设备的部件10-30通过系统总线相互通信。In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, or the like. The display 30 is used to display information on the Android device and to display a visual user interface. The components 10-30 of the Android device communicate with each other via the system bus.

在一实施例中,当处理器10执行所述存储器20中安卓设备测试方法程序40时实现以下步骤:In one embodiment, when the processor 10 executes the Android device testing method program 40 in the memory 20, the following steps are implemented:

预先获取安卓设备的各个测试项目,将所有测试项目集成到一个应用中,将所述应用打包到安卓系统中;Obtain various test items for Android devices in advance, integrate all test items into an application, and package the application into the Android system;

在所述安卓系统启动后,判断所述安卓设备是否连接存储设备,当是时从所述存储设备的根目录下获取特定文件;After the Android system is started, determine whether the Android device is connected to a storage device, and if so, obtain a specific file from the root directory of the storage device;

根据所述特定文件,自动运行所述应用并显示测试主界面,以完成所述安卓设备的所有测试项目的功能测试。According to the specific file, the application is automatically run and the test main interface is displayed to complete the functional testing of all test items of the Android device.

其中,在所述安卓系统启动后,所述应用不在所述安卓系统的主页面列表中显示。Wherein, after the Android system is started, the application is not displayed in the main page list of the Android system.

其中,所述测试项目包括:WIFI测试、蓝牙测试、SD卡测试、USB接口测试、以太网测试、显示屏背光测试、录音测试、播放声音测试、红外检测模块测试、耳机端口测试以及摄像头测试。Among them, the test items include: WIFI test, Bluetooth test, SD card test, USB interface test, Ethernet test, display backlight test, recording test, sound playback test, infrared detection module test, headphone port test and camera test.

其中,所述SD卡测试具体包括:Among them, the SD card test specifically includes:

当进行SD卡测试时,向SD卡创建目录和文件,并写数据到文件,再读取数据进行比较,若通过比较未发现错误则测试成功;When performing SD card testing, create directories and files in the SD card, write data to the files, and then read the data for comparison. If no errors are found through comparison, the test is successful;

若未检测到所述SD卡、或者识别到所述SD卡但未读到卡容量、或者读写操作失败,则测试失败。If the SD card is not detected, or the SD card is recognized but the card capacity is not read, or the read and write operations fail, the test fails.

其中,所述WIFI测试具体包括:Among them, the WIFI test specifically includes:

当进行WIFI测试测试时,关闭WIFI,再打开所述WIFI,扫描热点并连接开放且信号质量最好的热点,当连接热点后进行网络ping测试,并显示网络ping测试的信息,则测试成功;When performing a WIFI test test, turn off WIFI, then turn on the WIFI, scan hotspots and connect to open hotspots with the best signal quality. After connecting to the hotspot, perform a network ping test and display the network ping test information, then the test is successful;

如果未扫描到开放的热点,列出扫描到的热点信息,当扫描到热点时则认为测试成功。If no open hotspots are scanned, the scanned hotspot information is listed. When the hotspots are scanned, the test is considered successful.

其中,所述蓝牙测试具体包括:Among them, the Bluetooth test specifically includes:

当进行蓝牙测试时,关闭蓝牙,再打开所述蓝牙,扫描蓝牙设备,并列出扫描到的蓝牙设备名称;When performing a Bluetooth test, turn off Bluetooth, then turn on the Bluetooth, scan for Bluetooth devices, and list the names of the scanned Bluetooth devices;

如果正常打开蓝牙并扫描到蓝牙设备,则认为测试成功;If Bluetooth is turned on normally and a Bluetooth device is scanned, the test is considered successful;

如果不能打开蓝牙、或者打开蓝牙后无法扫描到蓝牙设备,则认为测试失败。If Bluetooth cannot be turned on, or Bluetooth devices cannot be scanned after turning on Bluetooth, the test is deemed to have failed.

其中,所述摄像头测试具体包括:Among them, the camera test specifically includes:

当进行摄像头测试时,如果摄像头连接正常,显示预览图像,则认为测试成功;When performing a camera test, if the camera connection is normal and a preview image is displayed, the test is considered successful;

如果未连接所述摄像头或者所述摄像头工作异常,则认为测试失败。If the camera is not connected or the camera works abnormally, the test is deemed to have failed.

其中,所述存储设备包括U盘。Wherein, the storage device includes a USB flash drive.

本发明还提供一种存储介质,其中,所述存储介质存储有安卓设备测试程序,所述安卓设备测试程序被处理器执行时实现如上所述的安卓设备测试方法的步骤。The present invention also provides a storage medium, wherein the storage medium stores an Android device testing program. When the Android device testing program is executed by a processor, the steps of the Android device testing method as described above are implemented.

综上所述,本发明提供一种安卓设备测试方法、安卓设备及存储介质,所述方法包括:预先获取安卓设备的各个测试项目,将所有测试项目集成到一个应用中,将所述应用打包到安卓系统中;在所述安卓系统启动后,判断所述安卓设备是否连接存储设备,当是时从所述存储设备的根目录下获取特定文件;根据所述特定文件,自动运行所述应用并显示测试主界面,以完成所述安卓设备的所有测试项目的功能测试。本发明通过在存储设备中存入特定文件,通过接入存储设备到安卓设备的方式触发测试的应用启动,并且将所有需要测试的项目在同一个界面中显示出来,快速自动测试安卓设备的各个硬件接口及外围设备是否正常工作,所有测试项目同时运行,大大减少了测试需要的时间,以及简化了测试的繁杂程度。To sum up, the present invention provides an Android device testing method, Android device and storage medium. The method includes: obtaining various test items of the Android device in advance, integrating all test items into an application, and packaging the application. into the Android system; after the Android system is started, determine whether the Android device is connected to a storage device, and if so, obtain a specific file from the root directory of the storage device; automatically run the application based on the specific file And display the test main interface to complete the functional testing of all test items of the Android device. The invention stores specific files in the storage device, triggers the start of the test application by connecting the storage device to the Android device, and displays all the items that need to be tested in the same interface, quickly and automatically testing each aspect of the Android device. Whether the hardware interface and peripheral devices are working properly, all test items are run at the same time, which greatly reduces the time required for testing and simplifies the complexity of testing.

当然,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关硬件(如处理器,控制器等)来完成,所述的程序可存储于一计算机可读取的存储介质中,所述程序在执行时可包括如上述各方法实施例的流程。其中所述的存储介质可为存储器、磁碟、光盘等。Of course, those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware (such as processors, controllers, etc.) through computer programs. The programs can be stored in a computer. In a computer-readable storage medium, when executed, the program may include the processes of the above method embodiments. The storage medium may be a memory, a magnetic disk, an optical disk, etc.

应当理解的是,本发明的应用不限于上述的举例,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,所有这些改进和变换都应属于本发明所附权利要求的保护范围。It should be understood that the application of the present invention is not limited to the above examples. Those of ordinary skill in the art can make improvements or changes based on the above descriptions. All these improvements and changes should fall within the protection scope of the appended claims of the present invention.

Claims (10)

CN202010933062.3A2020-09-082020-09-08Android device testing method, android device and storage mediumActiveCN112100012B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202010933062.3ACN112100012B (en)2020-09-082020-09-08Android device testing method, android device and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202010933062.3ACN112100012B (en)2020-09-082020-09-08Android device testing method, android device and storage medium

Publications (2)

Publication NumberPublication Date
CN112100012A CN112100012A (en)2020-12-18
CN112100012Btrue CN112100012B (en)2023-10-31

Family

ID=73751003

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202010933062.3AActiveCN112100012B (en)2020-09-082020-09-08Android device testing method, android device and storage medium

Country Status (1)

CountryLink
CN (1)CN112100012B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113535554B (en)*2021-07-122024-03-12青岛中科英泰商用系统股份有限公司Automatic testing system and method for Android system equipment
CN114816998A (en)*2022-03-292022-07-29深圳市华迅光通信有限公司 An automated test method for testing the reliability of optical cats

Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103364659A (en)*2013-06-282013-10-23珠海全志科技股份有限公司Android system-based electronic equipment test system and method
CN104166610A (en)*2014-07-242014-11-26深圳天珑无线科技有限公司Mobile terminal detection method and detection system
CN104503875A (en)*2014-12-082015-04-08深圳市阿龙电子有限公司Test method and test system of Android device
CN104780407A (en)*2015-01-092015-07-15康佳集团股份有限公司Automatic testing method and automatic testing system for set top box
CN106412576A (en)*2016-09-192017-02-15广州视源电子科技股份有限公司Test method and device
CN108228407A (en)*2018-01-312018-06-29深圳市证通电子股份有限公司Apparatus function test method, apparatus and readable storage medium storing program for executing
CN109271316A (en)*2018-08-282019-01-25惠州Tcl移动通信有限公司Android device and its automated testing method, memory
CN109508276A (en)*2018-11-092019-03-22四川长虹电器股份有限公司The method for improving equipment factory detection efficiency in Android platform
CN110446028A (en)*2019-08-092019-11-12深圳市云之尚网络科技有限公司Set-top box production test method and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103364659A (en)*2013-06-282013-10-23珠海全志科技股份有限公司Android system-based electronic equipment test system and method
CN104166610A (en)*2014-07-242014-11-26深圳天珑无线科技有限公司Mobile terminal detection method and detection system
CN104503875A (en)*2014-12-082015-04-08深圳市阿龙电子有限公司Test method and test system of Android device
CN104780407A (en)*2015-01-092015-07-15康佳集团股份有限公司Automatic testing method and automatic testing system for set top box
CN106412576A (en)*2016-09-192017-02-15广州视源电子科技股份有限公司Test method and device
CN108228407A (en)*2018-01-312018-06-29深圳市证通电子股份有限公司Apparatus function test method, apparatus and readable storage medium storing program for executing
CN109271316A (en)*2018-08-282019-01-25惠州Tcl移动通信有限公司Android device and its automated testing method, memory
CN109508276A (en)*2018-11-092019-03-22四川长虹电器股份有限公司The method for improving equipment factory detection efficiency in Android platform
CN110446028A (en)*2019-08-092019-11-12深圳市云之尚网络科技有限公司Set-top box production test method and system

Also Published As

Publication numberPublication date
CN112100012A (en)2020-12-18

Similar Documents

PublicationPublication DateTitle
US10956291B2 (en)Method, computer apparatus, and user interface for performing automatic test upon storage devices
TWI510913B (en) Test device and test method thereof
US20070234127A1 (en)Methods and systems for automated testing of applications using an application independent GUI map
US20210278937A1 (en)Method for Browsing Application Folder and Electronic Device
US20190138417A1 (en)Device configuration with cached pre-assembled driver state
CN112100012B (en)Android device testing method, android device and storage medium
CN110018918B (en)Method and device for repairing terminal abnormity, mobile terminal and storage medium
TWI323843B (en)Method and device for pc component diagnostic test before executing operation system
US20170255456A1 (en)System, management device, information processing device, control method for management device, control method for information processing device, and computer-readable storage medium
CN115658529A (en)Automatic testing method for user page and related equipment
US20250225062A1 (en)System and Method for Diagnosing a Computing Device in Safe Mode
CN107704282A (en)A kind of loading method and device applied to embedded system
CN113722170B (en)PFR function test method, device, equipment and readable storage medium
CN115762625A (en)Method, system, electronic device and storage medium for verifying eMMC function
CN110046317A (en)Page info recording method, terminal and the storage medium of IOS application
US20130080751A1 (en)Method and device for updating bios program for computer system
CN109257652B (en) Configuration information switching method, device, electronic device, system and storage medium
CN107087164A (en)Method and device for starting equipment
CN109491825A (en)A kind of method, apparatus, storage medium and the terminal of positioning booting abnormal problem
CN110618908B (en)Method for quickly verifying screen and machine display interface
CN115589379B (en) Network card PXE function test method, system, electronic equipment and storage medium
TW201015296A (en)Method for auto-testing environment variable setting
CN106792193B (en)Android television-based repair system and repair method
CN118277241A (en)Graphic interface automatic test method and device, storage medium and electronic equipment
US11915013B2 (en)Operating system service for persistently executing programs

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
TA01Transfer of patent application right

Effective date of registration:20210721

Address after:14 / F, block a, Skyworth building, Gaoxin South 1st Road, Nanshan District, Shenzhen, Guangdong 518000

Applicant after:SHENZHEN SKYWORTH DIGITAL TECHNOLOGY Co.,Ltd.

Address before:No.1, Baolong Sixth Road, Baolong Industrial City, Longgang District, Shenzhen City, Guangdong Province

Applicant before:SHENZHEN SKYWORTH QUNXIN SECURITY TECHNOLOGY Co.,Ltd.

TA01Transfer of patent application right
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp