Test method, test device, test equipment and medium

By automatically acquiring and flashing test packages, the problem of low efficiency in functional testing of electronic devices is solved, achieving an efficient testing process and resource utilization.

CN121501642APending Publication Date: 2026-02-10BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411074546.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

In existing technologies, the functional testing of electronic devices is inefficient, requiring testers to manually download and flash test packages, resulting in low testing efficiency and an inability to detect problems in a timely manner.

Method used

The test method automatically acquires and flashes the test package, including detecting the electronic device's status information, adding it to the queue, controlling it to enter a preset mode, executing test commands in the test package environment, and obtaining test results.

Benefits of technology

It improved testing efficiency, avoided manual operations, ensured timely updates of test packages, and improved testing progress and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121501642A_ABST
    Figure CN121501642A_ABST
Patent Text Reader

Abstract

The invention relates to a testing method, a testing device, testing equipment and a medium. The test method comprises the steps of obtaining a test pack of the electronic equipment; brushing the test pack into the electronic equipment; and controlling the electronic equipment brushed in the test pack to execute the test instruction to obtain a first test result. And obtaining a test pack of the electronic equipment, and testing the function of the electronic equipment through the test pack. And the test pack is brushed into the electronic equipment, so that the electronic equipment runs in the test pack environment. And controlling the electronic equipment which is brushed into the test pack to execute the test instruction, and testing a function corresponding to the electronic equipment in the test pack environment to obtain a first test result. The first test result is obtained by automatically brushing the test pack into the electronic equipment for testing, and a tester does not need to manually test, so that the test efficiency is improved. Meanwhile, the test pack of the electronic equipment is automatically obtained for testing, so that the situation that a tester cannot download the test pack in time is avoided, and the test progress is accelerated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of testing technology, and in particular to a testing method, testing apparatus, testing equipment, and medium. Background Technology

[0002] As user demands continue to grow and electronic devices become increasingly feature-rich, it becomes necessary to use test packages to verify their functionality. However, current functional testing methods require testers to manually download and flash the test packages into the electronic devices, resulting in low testing efficiency. Summary of the Invention

[0003] To overcome the problems existing in related technologies, this disclosure provides a testing method, testing apparatus, testing equipment, and medium.

[0004] According to a first aspect of the present disclosure, a testing method is provided, the testing method comprising:

[0005] Obtain the test package for the electronic device;

[0006] Flash the test package into the electronic device;

[0007] The electronic device flashed with the test package is controlled to execute test instructions to obtain a first test result.

[0008] In some embodiments of this disclosure, before flashing the test package into the electronic device, the testing method further includes:

[0009] Detect the first state information of the plurality of said electronic devices;

[0010] The step of flashing the test package into the electronic device includes:

[0011] The test package is flashed into the electronic device whose first status information meets the test conditions.

[0012] In some embodiments of this disclosure, after detecting the first state information of the plurality of electronic devices, the testing method further includes:

[0013] Add the first identifier of the electronic device whose first state information satisfies the test conditions to the first queue;

[0014] The step of flashing the test package into the electronic device whose first status information meets the test conditions includes:

[0015] The test package is flashed into the electronic device corresponding to the first identifier in the first queue.

[0016] In some embodiments of this disclosure, flashing the test package into the electronic device corresponding to the first identifier in the first queue includes:

[0017] The electronic device corresponding to the first identifier is determined based on the first identifier in the first queue;

[0018] Control the electronic device corresponding to the first identifier to enter a preset mode;

[0019] The test package is flashed into the electronic device that is in the preset mode.

[0020] In some embodiments of this disclosure, flashing the test package into the electronic device corresponding to the first identifier in the first queue includes:

[0021] The test package is flashed into the electronic device corresponding to the first identifier located at the head of the first queue; or...

[0022] The test package is flashed into the first queue to the electronic devices corresponding to the first identifier; or...

[0023] Determine the number of tests for each electronic device corresponding to each of the first identifiers in the first queue;

[0024] The test package is flashed into at least some of the electronic devices in ascending order of the number of tests performed.

[0025] In some embodiments of this disclosure, the first state information satisfies the test conditions including the screen being off for a longer time than a preset time, the electronic device being in a charging state, and the battery power being greater than a preset power.

[0026] In some embodiments of this disclosure, before obtaining the test package of the electronic device, the testing method further includes:

[0027] Detect the test package in the cloud server;

[0028] In the event that the test package is updated, the test identifier of the test package is determined;

[0029] If the test identifier is a first preset identifier, determine the compilation status of the test package;

[0030] The test package for acquiring electronic devices includes:

[0031] If the compilation status is complete, obtain the test package.

[0032] According to a second aspect of the present disclosure, a testing apparatus is provided, the testing apparatus comprising:

[0033] An acquisition module, configured to acquire a test package for an electronic device;

[0034] An update module, configured to flash the test package into the electronic device;

[0035] A test module is configured to control the electronic device flashed with the test package to execute test instructions and obtain a first test result.

[0036] According to a third aspect of the present disclosure, a testing apparatus is provided, the testing apparatus comprising:

[0037] processor;

[0038] Memory used to store the processor's executable instructions;

[0039] The processor is configured to execute the test method described above.

[0040] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to perform the test method as described above.

[0041] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0042] The system acquires test packages for electronic devices to test their functionality. The test packages are then flashed onto the electronic devices, enabling them to run within the test package environment. The system controls the flashed electronic devices to execute test commands, testing the corresponding functions within the test package environment and obtaining initial test results. By automatically flashing the test packages onto the electronic devices and obtaining the initial test results, manual testing by testers is eliminated, thus improving testing efficiency. Furthermore, automatically acquiring the test packages for testing avoids delays in tester downloads, thereby accelerating the testing process.

[0043] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0044] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0045] Figure 1 This is a schematic diagram of the structure of a test system according to an exemplary embodiment;

[0046] Figure 2 This is a flowchart illustrating a test method according to an exemplary embodiment;

[0047] Figure 3 This is a flowchart illustrating a test method according to another exemplary embodiment;

[0048] Figure 4 This is a flowchart illustrating a test method according to another exemplary embodiment;

[0049] Figure 5 This is a flowchart illustrating a test method according to another exemplary embodiment;

[0050] Figure 6 This is a block diagram of a testing apparatus according to an exemplary embodiment;

[0051] Figure 7 This is a block diagram of an electronic device according to an exemplary embodiment.

[0052] In the picture:

[0053] 10-Test equipment; 20-Electronic equipment; 21-Processing components; 22-Memory; 23-Power supply components; 24-Multimedia components; 25-Audio components; 26-Input / output interfaces; 27-Sensor components; 28-Communication components; 29-Processor; 100-Acquisition module; 200-Update module; 300-Test module. Detailed Implementation

[0054] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims. It should also be understood that the term “and / or” as used in this disclosure refers to and includes any or all possible combinations of one or more of the associated listed items.

[0055] During the production of electronic devices, functional testing using test packages is required before they can be shipped. After shipping, newly added functions may have issues, or some functions may still have problems. Testers need to use test packages to perform functional testing to fix these issues. During functional testing, developers release test packages for testing the electronic devices' functions to a cloud server at irregular intervals each day. Testers manually download the test packages from the cloud server to the test device, then flash the test packages onto the electronic device for testing. After testing, testers need to manually record the problems solved and introduced by each test package and report this information to the developers. If a test package reveals a problem, the testers must repeat the entire testing process, leading to low testing efficiency. Furthermore, because testers need to manually download test packages, they may not be able to detect issues promptly after the packages are released to the cloud server, impacting the testing schedule.

[0056] To address the aforementioned technical issues, this disclosure provides a testing method that automatically acquires and flashes test packages into electronic devices for testing. This eliminates the need for testers to manually perform tests and record issues associated with each test package, thereby improving testing efficiency. Furthermore, by automatically acquiring test packages from electronic devices, the test packages can be used for testing promptly, thus accelerating the testing process.

[0057] To facilitate understanding, the testing system disclosed herein will first be described. For example... Figure 1 As shown, the testing system includes a testing device 10 and multiple electronic devices 20. The multiple electronic devices 20 are electrically connected to the testing device 10 via data cables. The models of the electronic devices 20 electrically connected to each testing device 10 can be completely identical, partially identical, or completely different. When functional testing is required, the testing device 10 retrieves a test package from a cloud server and flashes the test package into the electronic device 20 for testing, obtaining a first test result. The testing device 10 sends the first test result to the target device so that testers and / or developers can perform subsequent testing and / or development processes based on the first test result. The testing device 10 may include multiple modules running in parallel, each used to detect the first state information of each electronic device 20, retrieve the test package from the cloud server, and flash the test package into the electronic device 20 for testing to obtain the first test result.

[0058] This disclosure provides a testing method, such as... Figure 2 As shown, the method includes:

[0059] S100, Obtain the test package of the electronic device.

[0060] S200, flash the test package into the electronic device.

[0061] S300 controls the electronic device flashed with the test package to execute the test instructions and obtain the first test result.

[0062] In this embodiment, a test package for an electronic device is acquired to test the device's functionality. The test package is then flashed onto the electronic device, allowing it to run within the test package environment. The electronic device, now equipped with the test package, is controlled to execute test commands, testing the corresponding functions within the test package environment to obtain a first test result. By automatically flashing the test package onto the electronic device to obtain the first test result, manual testing by testers is eliminated, thus improving testing efficiency. Furthermore, automatically acquiring the test package for testing avoids delays in testers downloading the test package, thereby accelerating the testing process.

[0063] For example, the step S200 of flashing the test package into the electronic device can be flashing the test package into some electronic devices or flashing the test package into multiple electronic devices.

[0064] For example, test instructions can be located in the test package, obtained from a cloud server, or configured by the tester as needed. During testing, the probability of new problems occurring in the corresponding function can be tested, as well as the probability of known problems occurring in the corresponding function.

[0065] In one embodiment, before flashing the test package into the electronic device in step S200, the test method further includes:

[0066] Detect the initial state information of multiple electronic devices.

[0067] The step S200 of flashing the test package into the electronic device can be determined in the following way:

[0068] The test package is flashed onto electronic devices whose first state information meets the test conditions.

[0069] In this embodiment, first state information of multiple electronic devices is detected to determine the state of the multiple electronic devices. Since electronic devices are idle and can be used for testing when the first state information meets the test conditions, the test package is flashed into the electronic devices whose first state information meets the test conditions, so that functional testing can be performed through the electronic devices that can be used for testing. By selecting electronic devices that can be used for testing, idle electronic devices are avoided, thereby improving the utilization rate of test resources.

[0070] In one embodiment, the first state information satisfies the test conditions including the screen being off for a longer time than a preset time, the electronic device being in a charging state, and the battery level in the electronic device being greater than a preset level.

[0071] In this embodiment, since the screen of the electronic device being tested is on and may intermittently turn off, if the test package is applied to an electronic device with a short screen-off time, misjudgment may occur, interrupting the test. If the battery power is low and / or the electronic device is not charging, the test may be interrupted due to insufficient battery power. By combining the screen-off time, whether it is charging, and the battery power to determine whether the test conditions are met, the interruption of the test package during the test is avoided, thereby improving the reliability of the test.

[0072] For example, the preset time can range from 10 minutes to 50 minutes. Alternatively, the preset time can be 20 minutes, 30 minutes, 40 minutes, etc. The preset battery level can range from 20% to 60%. Alternatively, the preset battery level can be 30%, 40%, 50%, etc.

[0073] Understandably, due to the different structures of testing systems, besides detecting the first state information of multiple electronic devices and flashing test packages onto electronic devices whose first state information meets the test conditions to test their functionality, it's also possible to directly select electronic devices that are not currently under testing to test their functionality without detection. For example, if the electronic devices in the testing system are always in a charging state, electronic devices that are not currently under testing can be directly selected to test their functionality. Whether an electronic device is currently under testing can be determined by combining the historical flashing time of the test package.

[0074] In one embodiment, after detecting the first state information of multiple electronic devices in the above steps, the testing method further includes:

[0075] Add the first identifier of the electronic device whose first state information meets the test conditions to the first queue.

[0076] The electronic devices whose first state information meets the test conditions, as described in the above steps, are determined in the following way:

[0077] The test package is flashed into the electronic device corresponding to the first identifier in the first queue.

[0078] In this embodiment, the first identifier of an electronic device whose first state information meets the test conditions is added to a first queue, so as to find an electronic device that can be used for testing through the first queue. The test package is flashed into the electronic device corresponding to the first identifier in the first queue, so as to flash the test package into the electronic device that can be used for testing. By finding an electronic device that can be used for testing through the first queue, the electronic device that can be used for testing can be located quickly and accurately, thereby improving the testing efficiency.

[0079] For example, the first identifier can be an identifier (ID).

[0080] In one embodiment, such as Figure 3 As shown, the electronic device corresponding to the first identifier in the first queue, which is flashed into the test package in the above steps, can be determined in the following way:

[0081] S210. Determine the electronic device corresponding to the first identifier based on the first identifier in the first queue.

[0082] S220, Control the electronic device corresponding to the first identifier to enter the preset mode.

[0083] S230: Flash the test package into the electronic device that is in preset mode.

[0084] In this embodiment, an electronic device corresponding to a first identifier in a first queue is determined, allowing for the search of available electronic devices for testing. The electronic device corresponding to the first identifier is controlled to enter a preset mode, enabling it to be flashed. The test package is then flashed onto the electronic device in the preset mode, allowing it to run within the test package environment. By controlling the electronic device to enter the preset mode before flashing the test package, interruptions during the flashing process are avoided, thus improving test reliability.

[0085] For example, the default mode can be fastboot mode.

[0086] In one embodiment, the control of the electronic device corresponding to the first identifier in step S220 to enter a preset mode is determined in the following way:

[0087] Detect the second state information of the electronic device corresponding to the first identifier.

[0088] Electronic devices whose second state information meets the test conditions are controlled to enter a preset mode.

[0089] In this embodiment, since the first state information of the electronic device meets the test conditions, the tester may accidentally touch the electronic device, causing the state information of the electronic device to change and potentially no longer meet the test conditions. The second state information of the electronic device corresponding to the first identifier is detected to determine whether the state information of the electronic device has changed due to accidental touch. Electronic devices whose second state information meets the test conditions are controlled to enter a preset mode so that they can be tested through the electronic devices in the first queue that have not been accidentally touched. By re-detecting the state information of the electronic device corresponding to the first identifier, interruptions during the test are avoided, thereby improving the reliability of the test.

[0090] For example, the second state information satisfies the test conditions including the screen being off for a longer time than a preset time, the electronic device being in a charging state, and the battery level in the electronic device being greater than a preset level.

[0091] In one embodiment, after detecting the second state information of the electronic device corresponding to the first identifier in the above steps, the testing method further includes:

[0092] Remove the first identifier of the electronic device whose second state information does not meet the test conditions from the first queue.

[0093] In this embodiment, by removing the first identifier of an electronic device whose second state information does not meet the test conditions from the first queue, interference from electronic devices that cannot be used for testing is avoided, thereby improving the reliability of the test.

[0094] In one embodiment, at least some of the electronic devices have different model numbers. The first identifiers of electronic devices of different models are located in different first queues, while the first identifiers of electronic devices of the same model are located in the same first queue.

[0095] In this embodiment, since there are multiple electronic devices used for testing, to improve testing efficiency, some electronic devices are of different models to allow for simultaneous testing with multiple test packages. The first identifiers of different models of electronic devices are set in different first queues, while the first identifiers of electronic devices of the same model are set in the same first queue, so as to distinguish different models of electronic devices through the first queues. By adding the first identifiers of different models of electronic devices to different first queues, only the first queue needs to be used as a reference during the acquisition and flashing of test packages, thereby improving testing efficiency.

[0096] In one embodiment, different models of electronic devices use different test packages. For example... Figure 4 As shown, the electronic device corresponding to the first identifier in the first queue, which is flashed into the test package in the above steps, can also be determined in the following way:

[0097] S240. Determine the first queue corresponding to the test package.

[0098] S250, flash the test package into the electronic device corresponding to the first identifier in the first queue.

[0099] In this embodiment, since different models of electronic devices correspond to different test packages, and each first queue corresponds to one model of electronic device, the first queue corresponding to the test package is determined to associate the test package with the model of the electronic device. The test package is flashed into the electronic device corresponding to the first identifier in the corresponding first queue, thus flashing the test package into the corresponding model of electronic device. By associating the test package with the first queue, the test package can be flashed into the corresponding model of electronic device to avoid accidental flashing, thereby improving the reliability of the test.

[0100] In one embodiment, the electronic device corresponding to the first identifier in the first queue, as described above, can also be determined in the following way:

[0101] The test packet is flashed into the electronic device corresponding to the first identifier at the head of the first queue.

[0102] In this embodiment, since the order in which the first identifier is added to the first queue is the same as the order in which the first state information is detected, the electronic device corresponding to the first identifier at the head of the first queue has a relatively long idle time. Therefore, the test package is flashed into the electronic device corresponding to the first identifier at the head of the first queue. By selecting the electronic device to which the test package is flashed according to the first-in-first-out principle, the idle time of the electronic device is avoided, thereby improving the utilization rate of test resources.

[0103] For example, the step of flashing the test package into the electronic device corresponding to the first identifier at the head of the first queue in the above steps can be either flashing the test package into only one electronic device corresponding to the first identifier at the head of the first queue, or flashing the test package into the electronic devices corresponding to the first identifiers at the head of the first queue sequentially. That is, after flashing the test package into the electronic device corresponding to the first identifier at the head of the first queue, the first identifier at the head of the queue is deleted from the first queue, thus changing the first identifier at the head of the queue. The test package is flashed into multiple electronic devices corresponding to the first identifiers in the first queue in a sequential flashing manner.

[0104] In one embodiment, the electronic device corresponding to the first identifier in the first queue, as described above, can also be determined in the following way:

[0105] The test package is flashed into the electronic devices corresponding to the first identifier in the first queue.

[0106] In this embodiment, due to potential differences in the manufacturing process of electronic devices, electronic devices of the same model may produce different results when testing the same test package. Therefore, testing needs to be performed using multiple electronic devices. The test package is flashed into multiple electronic devices corresponding to a first identifier in a first queue, allowing the same test package to be tested using multiple electronic devices. By flashing the test package into the electronic devices in batches and performing parallel testing, testers are spared the need to flash the test package onto each electronic device individually, thus improving testing efficiency. Furthermore, since each test package is tested using multiple electronic devices, functional problems that might not be detected due to differences between different electronic devices are avoided, thereby improving the reliability of the test.

[0107] In one embodiment, the electronic device corresponding to the first identifier in the first queue, as described above, can also be determined in the following way:

[0108] Determine the number of tests for each electronic device corresponding to the first identifier in the first queue.

[0109] The test package is flashed into at least some electronic devices in ascending order of the number of tests performed.

[0110] In this embodiment, because the uneven number of tests performed on electronic devices during testing affects their lifespan, it is necessary to select electronic devices for testing based on the number of tests performed. The number of tests performed on each electronic device corresponding to a first identifier in the first queue is determined to ascertain the number of times each electronic device in the first queue has been tested. Test packages are flashed into at least some electronic devices in ascending order of the number of tests performed. This prioritizes flashing test packages into devices with fewer test performances to balance the number of tests performed on each electronic device. By prioritizing flashing test packages into devices with fewer test performances, the significant difference in the number of tests performed on each electronic device is avoided, which could affect the lifespan of the electronic devices, thereby improving the reliability of the test.

[0111] In one embodiment, the electronic device that controls the flashing of the test package in step S300 executes the test instructions to obtain the first test result, which is determined in the following manner:

[0112] If the test package is successfully flashed onto the electronic device, the electronic device with the flashed test package is controlled to execute test commands to obtain the first test result.

[0113] The testing methods also include:

[0114] The second test result was obtained when the test package failed to be flashed onto the electronic device.

[0115] In this embodiment, if the test package is successfully flashed onto the electronic device, the corresponding functions of the electronic device can be tested within the test package environment. The electronic device flashed with the test package is controlled to execute test instructions to obtain a first test result. If the test package flashing fails, the test package or the electronic device may have a problem, resulting in a second test result. By obtaining the first or second test result under different conditions, it is possible to reflect whether there are problems with the functionality of the electronic device and the different problems that may exist, thereby improving the reliability of the test.

[0116] In one embodiment, before obtaining the test package of the electronic device in step S100, the test method further includes:

[0117] Detect test packages on the cloud server.

[0118] In the event of a test package update, determine the test identifier for the test package.

[0119] If the test identifier is the first preset identifier, determine the compilation status of the test package.

[0120] The test package for acquiring the electronic device in step S100 is determined as follows:

[0121] Obtain the test package if the compilation status is complete.

[0122] In this embodiment, the test package on the cloud server is detected to determine whether the developer has released a new test package that requires testing. If the test package is updated, the developer releases the new test package to the cloud server, and the test package's test identifier is determined. If the test identifier is a first preset identifier, functional testing is performed automatically to determine the test package's compilation status. If the compilation status is complete, the test package can be flashed onto the electronic device to obtain the test package. By obtaining the test package only after it has been updated, the inability to obtain the test package in a timely manner and the repeated acquisition of the test package are avoided, thereby accelerating the testing process.

[0123] For example, test package updates can include updating the test package's release time, updating the test package's name, updating the test package's type, etc.

[0124] For example, when at least some electronic devices have different models, the step of obtaining the test package can obtain the test package corresponding to each model of electronic device used for testing.

[0125] For example, the first preset identifier can be 0 or 1. The second preset identifier can be 1 or 0. If the test identifier is the second preset identifier, the test package corresponding to that test identifier is not obtained.

[0126] In one embodiment, after obtaining the test package of the electronic device in step S100, the testing method further includes:

[0127] Add the second identifier of the test package to the second queue.

[0128] The step of flashing the test package into the electronic device in step S200 can also be determined in the following way:

[0129] Based on the second identifier in the second queue, determine the test package corresponding to the second identifier.

[0130] The test package corresponding to the second identifier is flashed into the electronic device.

[0131] In this embodiment, a second identifier of the test package is added to a second queue to locate the acquired test package. Based on the second identifier in the second queue, the test package corresponding to the second identifier is determined, thus identifying the test package that needs to be tested. The test package corresponding to the second identifier is flashed into the electronic device to perform functional testing. Using the second queue to locate the test package allows for quick and accurate positioning of the test package, thereby improving testing efficiency.

[0132] For example, the second identifier can be an identifier (ID).

[0133] For example, the first test result and the second test result may include log information. The log information includes the function that erred, the probability of each error, a first identifier of the tested electronic device, and / or a second identifier of the test package that erred, etc.

[0134] For example, the testing method also includes:

[0135] Send the first test result and / or the second test result to the target device so that developers and / or testers can know the first test result and / or the second test result through the target device.

[0136] This disclosure provides a testing method, such as... Figure 5 As shown, the method includes:

[0137] S400 detects the first status information of multiple electronic devices.

[0138] S410. Add the first identifier of the electronic device whose first state information meets the test conditions to the first queue.

[0139] S420, a test package for detecting electronic devices in a cloud server.

[0140] S430. In the case of test package updates, determine the test identifier of the test package.

[0141] S440. If the test identifier is the first preset identifier, determine the compilation status of the test package.

[0142] S450. If the compilation status is complete, obtain the test package.

[0143] S460. Add the second identifier of the test package to the second queue.

[0144] S470. Based on the first identifier in the first queue, determine the electronic device corresponding to the first identifier located at the head of the first queue in sequence.

[0145] S480, Detect the second state information of the electronic device corresponding to the first identifier located at the head of the first queue.

[0146] S490: Control the electronic device whose second state information meets the test conditions to enter the preset mode.

[0147] S500. Determine the test package corresponding to the second identifier based on the second identifier in the second queue.

[0148] S510: Flash the test package corresponding to the second identifier into the electronic device that has entered the preset mode.

[0149] S520: If the test package is successfully flashed into the electronic device, control each electronic device flashed with the test package to execute the test command and obtain the first test result.

[0150] S530: In the event that the test package fails to be flashed onto the electronic device, a second test result is obtained.

[0151] S540: Send the first test result and the second test result to the target device.

[0152] In this embodiment, first state information of multiple electronic devices is detected to determine which electronic devices can be used for testing. The first identifier of electronic devices whose first state information meets the testing conditions is added to a first queue to locate electronic devices suitable for testing. Test packages of electronic devices in a cloud server are detected to determine if the developers have uploaded the test packages to the cloud server. If the test package is updated, the updated test package needs to be tested to determine its test identifier. If the test identifier is a first preset identifier, the test package needs to be automatically tested to determine its compilation status. If the compilation status is complete, the test package can be flashed onto the electronic device, the test package is obtained, and the second identifier of the test package is added to a second queue. Based on the first identifier in the first queue, the electronic devices corresponding to the first identifier at the head of the first queue are sequentially determined to locate multiple electronic devices suitable for testing. The second state information of the electronic devices corresponding to the first identifier at the head of the first queue is detected, and electronic devices whose second state information meets the testing conditions are controlled to enter a preset mode. Based on the second identifier in the second queue, the test package corresponding to the second identifier is determined to locate the test package to be tested. The test package corresponding to the second identifier is flashed onto the electronic device that has entered the preset mode, so that the electronic device runs in the test package environment. If the test package is successfully flashed onto an electronic device, the system controls each device to execute test commands, obtaining a first test result. If flashing the test package fails, a second test result is obtained. Both the first and second test results are sent to the target device so that developers and / or testers can verify the test results via the target device. By automatically flashing the test package onto usable electronic devices to obtain the first test result, manual testing by testers is eliminated, thus improving testing efficiency. Simultaneously, performing functional testing on usable electronic devices avoids idle devices, thereby improving the utilization of testing resources. Furthermore, automatically acquiring the test package from electronic devices prevents testers from being unable to download the test package in a timely manner, thus accelerating the testing process.

[0153] In one exemplary embodiment, a testing apparatus is provided for implementing the method described above. (Reference) Figure 6 As shown, the testing apparatus may include an acquisition module 100, an update module 200, and a testing module 300. During the implementation of the above method,

[0154] Acquisition module 100 is configured to acquire test packages for electronic devices.

[0155] Update module 200 is configured to flash test packages onto electronic devices.

[0156] Test module 300 is configured to control an electronic device flashed with a test package to execute test instructions and obtain the first test result.

[0157] In one exemplary embodiment, a testing apparatus is provided, the apparatus further comprising:

[0158] The detection module is configured to detect the first state information of multiple electronic devices.

[0159] In one exemplary embodiment, a testing apparatus is provided, wherein an update module 200 is configured to:

[0160] The test package is flashed onto electronic devices whose first state information meets the test conditions.

[0161] In one exemplary embodiment, a testing apparatus is provided, wherein a detection module is configured to:

[0162] Add the first identifier of the electronic device whose first state information meets the test conditions to the first queue.

[0163] In one exemplary embodiment, a testing apparatus is provided, wherein an update module 200 is configured to:

[0164] The test package is flashed into the electronic device corresponding to the first identifier in the first queue.

[0165] In one exemplary embodiment, a testing apparatus is provided, wherein an update module 200 is configured to:

[0166] Based on the first identifier in the first queue, determine the electronic device corresponding to the first identifier.

[0167] Control the electronic device corresponding to the first identifier to enter the preset mode.

[0168] Flash the test package onto the electronic device that is in preset mode.

[0169] In one exemplary embodiment, a testing apparatus is provided, wherein an update module 200 is configured to:

[0170] Detect the second state information of the electronic device corresponding to the first identifier.

[0171] Electronic devices whose second state information meets the test conditions are controlled to enter a preset mode.

[0172] In one exemplary embodiment, a testing apparatus is provided, wherein an update module 200 is configured to:

[0173] Determine the first queue corresponding to the test package.

[0174] The test package is flashed into the electronic device corresponding to the first identifier in the first queue.

[0175] In one exemplary embodiment, a testing apparatus is provided, wherein an update module 200 is configured to:

[0176] The test packet is flashed into the electronic device corresponding to the first identifier at the head of the first queue.

[0177] In one exemplary embodiment, a testing apparatus is provided, wherein an update module 200 is configured to:

[0178] The test package is flashed into the electronic devices corresponding to the first identifier in the first queue.

[0179] In one exemplary embodiment, a testing apparatus is provided, wherein an update module 200 is configured to:

[0180] Determine the number of tests for each electronic device corresponding to the first identifier in the first queue.

[0181] The test package is flashed into at least some electronic devices in ascending order of the number of tests performed.

[0182] In one exemplary embodiment, a testing apparatus is provided, wherein an update module 200 is configured to:

[0183] If the test package is successfully flashed onto the electronic device, the electronic device with the flashed test package is controlled to execute test commands to obtain the first test result.

[0184] The second test result was obtained when the test package failed to be flashed onto the electronic device.

[0185] In one exemplary embodiment, a testing apparatus is provided, wherein a detection module is configured to:

[0186] Detect test packages on the cloud server.

[0187] In the event of a test package update, determine the test identifier for the test package.

[0188] If the test identifier is the first preset identifier, determine the compilation status of the test package.

[0189] In one exemplary embodiment, a testing apparatus is provided, wherein an acquisition module 100 is configured to:

[0190] Obtain the test package if the compilation status is complete.

[0191] In one exemplary embodiment, a testing apparatus is provided, wherein an acquisition module 100 is configured to:

[0192] Add the second identifier of the test package to the second queue.

[0193] In one exemplary embodiment, a testing apparatus is provided, wherein an update module 200 is configured to:

[0194] Based on the second identifier in the second queue, determine the test package corresponding to the second identifier.

[0195] The test package corresponding to the second identifier is flashed into the electronic device.

[0196] In one exemplary embodiment, a test apparatus is provided, comprising a processor and a memory for storing processor-executable instructions. The processor is configured to execute the test method described above.

[0197] In one exemplary embodiment, an electronic device is provided, such as a mobile phone, a laptop computer, a tablet computer, and a wearable device.

[0198] refer to Figure 7 As shown, the electronic device 20 may include one or more of the following components: processing component 21, memory 22, power supply component 23, multimedia component 24, audio component 25, input / output (I / O) interface 26, sensor component 27, and communication component 28.

[0199] Processing component 21 typically controls the overall operation of electronic device 20, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 21 may include one or more processors 29 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 21 may include one or more modules to facilitate interaction between processing component 21 and other components. For example, processing component 21 may include a multimedia module to facilitate interaction between multimedia component 24 and processing component 21.

[0200] Memory 22 is configured to store various types of data to support the operation of electronic device 20. Examples of such data include instructions for any application or method operating on electronic device 20, contact data, phonebook data, messages, pictures, videos, etc. Memory 22 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0201] Power supply component 23 provides power to various components of electronic device 20. Power supply component 23 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 20.

[0202] Multimedia component 24 includes a screen that provides an output interface between electronic device 20 and user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 24 includes a front-facing camera module and / or a rear-facing camera module. When electronic device 20 is in an operating mode, such as shooting mode or video mode, the front-facing camera module and / or rear-facing camera module may receive external multimedia data. Each front-facing camera module and rear-facing camera module may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0203] Audio component 25 is configured to output and / or input audio signals. For example, audio component 25 includes a microphone (MIC) configured to receive external audio signals when electronic device 20 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 22 or transmitted via communication component 28. In some embodiments, audio component 25 also includes a speaker for outputting audio signals.

[0204] I / O interface 26 provides an interface between processing component 21 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0205] Sensor assembly 27 includes one or more sensors for providing state assessments of various aspects of electronic device 20. For example, sensor assembly 27 can detect the on / off state of electronic device 20, the relative positioning of components such as the display and keypad of electronic device 20, changes in position of electronic device 20 or a component of electronic device 20, the presence or absence of user contact with electronic device 20, orientation or acceleration / deceleration of electronic device 20, and temperature changes of electronic device 20. Sensor assembly 27 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 27 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 27 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0206] Communication component 28 is configured to facilitate wired or wireless communication between electronic device 20 and other terminals. Electronic device 20 can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 28 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 28 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0207] In an exemplary embodiment, the electronic device 20 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing terminals (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods shown in the above embodiments or combinations thereof.

[0208] In one exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 22 including instructions that can be executed by a processor 29 of an electronic device 20 to perform the methods shown in the embodiments or combinations thereof. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage terminal, etc. When the instructions in the storage medium are executed by the processor of the terminal, the terminal is able to perform the methods shown in the embodiments or combinations thereof.

[0209] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0210] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0211] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0212] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0213] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A testing method, characterized in that, The testing method includes: Obtain the test package for the electronic device; The test package is flashed into the electronic device; The electronic device flashed with the test package is controlled to execute test instructions to obtain a first test result.

2. The test method according to claim 1, characterized in that, Before flashing the test package into the electronic device, the test method further includes: Detect the first state information of the plurality of said electronic devices; The step of flashing the test package into the electronic device includes: The test package is flashed into the electronic device whose first status information meets the test conditions.

3. The test method according to claim 2, characterized in that, After detecting the first state information of multiple electronic devices, the test method further includes: Add the first identifier of the electronic device whose first state information satisfies the test conditions to the first queue; The step of flashing the test package into the electronic device whose first status information meets the test conditions includes: The test package is flashed into the electronic device corresponding to the first identifier in the first queue.

4. The test method according to claim 3, characterized in that, The step of flashing the test package into the electronic device corresponding to the first identifier in the first queue includes: The electronic device corresponding to the first identifier is determined based on the first identifier in the first queue; Control the electronic device corresponding to the first identifier to enter a preset mode; The test package is flashed into the electronic device that is in the preset mode.

5. The test method according to claim 3, characterized in that, The step of flashing the test package into the electronic device corresponding to the first identifier in the first queue includes: The test package is flashed into the electronic device corresponding to the first identifier located at the head of the first queue; or... The test package is flashed into the first queue to the electronic devices corresponding to the first identifier; or... Determine the number of tests for each electronic device corresponding to each of the first identifiers in the first queue; The test package is flashed into at least some of the electronic devices in ascending order of the number of tests performed.

6. The test method according to claim 2, characterized in that, The first state information satisfies the test conditions, including the screen being off for a longer time than a preset time, the electronic device being in a charging state, and the battery level being greater than a preset level.

7. The test method according to any one of claims 1 to 6, characterized in that, Before acquiring the test package of the electronic device, the testing method further includes: Detect the test package in the cloud server; In the event that the test package is updated, the test identifier of the test package is determined; If the test identifier is a first preset identifier, determine the compilation status of the test package; The test package for acquiring electronic devices includes: If the compilation status is complete, obtain the test package.

8. A testing apparatus, characterized in that, The testing apparatus includes: An acquisition module, configured to acquire a test package for an electronic device; An update module, configured to flash the test package into the electronic device; A test module is configured to control the electronic device flashed with the test package to execute test instructions and obtain a first test result.

9. A testing device, characterized in that, The testing equipment includes: processor; Memory used to store the processor's executable instructions; The processor is configured to perform the test method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the terminal, the terminal is able to perform the test method as described in any one of claims 1 to 7.