Upgrade Testing Method, Device, Electronic Device and Computer Readable Storage Medium
Through the cyclic version upgrade and version restoration process, the performance of the smart home appliance upgrade channel is detected, which solves the problem of difficulty in effectively detecting the performance of the upgrade channel in the existing technology, and achieves high-quality product updates and user experience.
Patent Information
- Application Number
- CN202111658507.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2041-12-30
AI Technical Summary
The existing technology is difficult to effectively detect and ensure the performance of smart home appliance upgrade channels, affecting user experience and product update quality.
Through an upgrade testing method and device, the performance of the upgrade channel is detected using a cyclic version upgrade and version restoration process, including using over-the-air download technology to perform version upgrade and restore of the sample terminal until the preset stop conditions are met, and multiple upgrade detection results are obtained to determine the upgrade test results of the upgrade channel.
It realizes performance detection of smart home appliance upgrade channels, ensures the quality and user experience of product updates, reduces the testing complexity, and can be tested on a single sample terminal.
Smart Images

Figure CN114138312B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of automated testing, and in particular, to an upgrade testing method, apparatus, electronic device, and computer-readable storage medium. Background Art
[0002] With the rapid development of computer technology, smart home appliances have been rapidly popularized, and smart home appliances are also constantly being updated and upgraded as well as expanding their capabilities, making smart home appliances more and more intelligent.
[0003] Currently, the update and iteration of smart home appliances rely on corresponding upgrade channels. For example, the Over-the-Air Technology (OTA), and the update performance of the upgrade channel determines the update quality of home appliance products, which directly affects the user experience. Therefore, it is necessary to perform performance detection on the upgrade channel to ensure the quality of product updates. Summary of the Invention
[0004] The embodiments of the present application provide an upgrade testing method, apparatus, electronic device, and computer-readable storage medium, which can detect the upgrade channel to ensure the upgrade quality of the product.
[0005] In a first aspect, the embodiments of the present application provide an upgrade testing method, including:
[0006] Performing version upgrade on a sample terminal according to a target upgrade channel to obtain a target version;
[0007] Obtaining an upgrade detection result according to the target version;
[0008] When the upgrade detection result is successful and within a preset condition, performing version restoration on the target version to obtain a historical version;
[0009] Returning to execute performing version upgrade on the sample terminal according to the target upgrade channel until a preset stop condition is met;
[0010] Determining an upgrade test result of the target upgrade channel according to all obtained upgrade detection results.
[0011] In a second aspect, the embodiments of the present application further provide an upgrade testing apparatus, including:
[0012] An upgrade module, configured to perform version upgrade on a sample terminal according to a target upgrade channel to obtain a target version;
[0013] An obtaining module, configured to obtain an upgrade detection result according to the target version;
[0014] A restoration module, configured to perform version restoration on the target version within a preset condition when the upgrade detection result is successful, so as to obtain a historical version;
[0015] A loop module, configured to return and execute the version upgrade of the sample terminal according to the target upgrade channel until a preset stop condition is met;
[0016] A determination module, configured to determine the upgrade test result of the target upgrade channel according to all obtained upgrade detection results.
[0017] Wherein, in some embodiments of the present application, the target upgrade channel includes an Over-the-Air (OTA) technology channel, and the upgrade module includes:
[0018] A first determination unit, configured to determine a target version upgrade file;
[0019] A first upgrade unit, configured to send the target version upgrade file to the sample terminal according to the OTA technology channel, and perform version upgrade on the sample terminal according to the target version upgrade file to obtain the target version of the sample terminal.
[0020] Wherein, in some embodiments of the present application, the restoration module includes:
[0021] A second determination unit, configured to determine a historical version upgrade file;
[0022] A restoration unit, configured to perform version restoration on the sample terminal according to the historical version upgrade file to obtain the historical version of the sample terminal.
[0023] Wherein, in some embodiments of the present application, the restoration unit includes:
[0024] A detection subunit, configured to perform version update type detection on the sample terminal to obtain a version update type;
[0025] A first restoration subunit, configured to, when the version update type includes automatic rollback, drive the sample terminal to automatically roll back to the historical version according to the historical version upgrade file;
[0026] A second restoration subunit, configured to, when the version update type does not include the automatic rollback, burn the historical version upgrade file into the sample terminal to obtain the historical version of the sample terminal.
[0027] Wherein, in some embodiments of the present application, the determination module includes:
[0028] An acquisition unit, configured to obtain the upgrade success rate of the target upgrade channel according to all obtained upgrade detection results, and obtain the time consumed for each upgrade;
[0029] A third determination unit, configured to determine an upgrade test result of the target upgrade channel according to the upgrade success rate, a plurality of the time-consuming durations, and a preset time-consuming threshold.
[0030] Wherein, in some embodiments of the present application, the apparatus further includes a detection stop module, and the detection stop module includes:
[0031] A fourth determination unit, configured to directly determine the upgrade detection result as the upgrade test result of the target upgrade channel when the upgrade detection result is a failure.
[0032] Wherein, in some embodiments of the present application, the upgrade module includes:
[0033] A second upgrade unit, configured to trigger and generate a version upgrade instruction of a sample terminal on an auxiliary terminal, and send the version upgrade instruction to the sample terminal, so that the sample terminal performs version upgrade according to the version upgrade instruction to obtain a target version.
[0034] In a third aspect, an embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned upgrade test method are implemented.
[0035] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned upgrade test method are implemented.
[0036] In the embodiment of the present application, the sample terminal is upgraded through an upgrade channel, and by performing version upgrade and version restoration on the sample terminal multiple times, an upgrade detection result of each version upgrade is obtained. The upgrade performance of the upgrade channel can be determined by using multiple upgrade detection results, so as to implement the detection of the upgrade performance of the upgrade channel. Among them, through the loop processing of version upgrade and version restoration, the test of the version upgrade channel can be performed on a single sample terminal, reducing the complexity of the test. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative efforts.
[0038] Figure 1 is a schematic diagram of a scenario of the upgrade test method provided by an embodiment of the present application;
[0039] Figure 2 It is a schematic flowchart of the upgrade test method provided by an embodiment of the present application;
[0040] Figure 3 It is a schematic flowchart of testing the upgrade channel in the upgrade test method provided by an embodiment of the present application;
[0041] Figure 4 It is a schematic structural diagram of the upgrade test device provided by an embodiment of the present application;
[0042] Figure 5 It is a schematic system architecture diagram of testing the upgrade channel provided by an embodiment of the present application;
[0043] Figure 6 It is a schematic structural diagram of the electronic device provided by an embodiment of the present application. Detailed implementation manners
[0044] Next, the technical solutions in the present application will be clearly and completely described in conjunction with the accompanying drawings in the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.
[0045] An embodiment of the present application provides an upgrade test method, device, electronic device, and computer-readable storage medium. Specifically, an embodiment of the present application provides an upgrade test device applicable to an electronic device, where the electronic device may include intelligent home appliance terminals such as a television, an air conditioner, a washing machine, or a refrigerator.
[0046] Among them, please refer to Figure 1 , taking an intelligent home appliance terminal executing the upgrade test method as an example, the specific execution process is as follows:
[0047] Trigger an upgrade operation on terminal 10, so that terminal 11 performs version upgrade according to the upgrade channel to obtain a target version, and obtain an upgrade detection result according to the target version. When the upgrade detection result is successful, restore the target version to obtain a historical version, and repeatedly execute the above version upgrade and version restoration until a preset stop condition is met to obtain multiple upgrade detection results. Subsequently, determine the upgrade test result of the upgrade channel according to the multiple upgrade detection results, and return the upgrade test result to terminal 10 for the user to view.
[0048] Among them, in an embodiment of the present application, the upgrade channel includes an Over-the-Air (OTA) technology channel. By repeatedly using the over-the-air technology for upgrade, the test of the upgrade performance of the over-the-air technology can be realized.
[0049] Among them, in the embodiments of the present application, an integrated module capable of connecting to the Internet, including Wi-Fi and Bluetooth, is embedded in the smart home appliance terminal. This module is also known as the smart home appliance brain. With this module, traditional home appliances can be interconnected with the cloud. Not only can the capabilities of home appliances be expanded through the cloud, but also the boundary of the capabilities of smart home appliances can be broadened by the scenario linkage of multiple home appliances. At the same time, through networking, the Wi-Fi module itself can also perform OTA (Over-the-Air Technology), just like a mobile phone operating system, which is constantly updated and iterated, making home appliances more and more intelligent. Therefore, in the embodiments of the present application, the version upgrade and version restoration of the integrated module (Wi-Fi and Bluetooth integrated module) in the smart home appliance are mainly carried out through the Over-the-Air Technology (OTA) channel, so as to test whether the upgrade performance of the upgrade channel can meet the needs of users.
[0050] Among them, in the embodiments of the present application, the upgrade requirements of users mainly include whether it will affect the use of the current product after the upgrade, whether it is likely to cause customer complaints, whether the channel for upgrade and replacement can be kept unblocked, whether new functions can be added or defects can be repaired to improve the user experience, and so on.
[0051] Among them, in the embodiments of the present application, the sample terminal is upgraded through the upgrade channel, and the upgrade detection results of each version upgrade are obtained through multiple version upgrades and version restorations of the sample terminal. The upgrade performance of the upgrade channel can be determined by using multiple upgrade detection results, so as to realize the detection of the upgrade performance of the upgrade channel. Among them, through the loop processing of version upgrade and version restoration, the test of the version upgrade channel can be carried out on a single sample terminal, reducing the complexity of the test.
[0052] The following will be described in detail respectively. It should be noted that the description order of the following embodiments does not limit the priority order of the embodiments.
[0053] Please refer to Figure 2 , Figure 2 , which is a schematic flow chart of the upgrade test method provided by the embodiments of the present application. The specific process of this upgrade test method can be as follows:
[0054] 101. Upgrade the version of the sample terminal according to the target upgrade channel to obtain the target version.
[0055] Among them, in the embodiments of the present application, the upgrade channel includes an Over-the-Air (OTA) technology channel. Over-the-Air technology is a technology for remotely managing SIM card data and applications through the air interface of mobile communication (GSM or CDMA). The air interface can adopt WAP, GPRS, CDMA lx, and the most popular short message technology. The application of OTA technology enables mobile communication to not only provide mobile voice and data services, but also provide new mobile services. Application and content service providers can develop more personalized services that meet user needs without being limited by the platform. Mobile phone users can simply operate to download various service menus provided by the network to the mobile phone using the OTA mechanism according to their personal preferences, and can also customize specific services according to their own wishes, and even repair potential faults brought by the mobile phone when it leaves the factory.
[0056] Among them, in the embodiments of the present application, the Over-the-Air technology is applied to the process of version upgrade and replacement of smart home appliances to achieve remote automatic upgrade of smart home appliances. Among them, to ensure the effective progress of the upgrade process and the stability of the upgrade process, the embodiments of the present application mainly perform performance detection on the upgrade channel to ensure the stability of the product after upgrading according to the upgrade channel.
[0057] Among them, in the embodiments of the present application, the sample terminal includes smart home appliances such as smart TVs, smart refrigerators, smart washing machines, or smart air conditioners. Among them, through the test of the upgrade channel, on the premise of ensuring the stability of the upgrade channel, the stability of the version upgrade of smart home appliances can be ensured, new functions can be expanded, defects can be repaired, and the user experience can be improved.
[0058] Among them, in the embodiments of the present application, the target version can be any new version based on the version before the upgrade. The present application does not limit the specific version and the specific content of the upgrade. The embodiments of the present application test whether the upgrade channel is stable and accurate according to the upgrade process.
[0059] Among them, in the embodiments of the present application, if the upgrade channel includes an Over-the-Air (OTA) technology channel, the sample terminal can be upgraded according to the Over-the-Air technology. That is, optionally, in some embodiments of the present application, the step of "performing version upgrade on the sample terminal according to the target upgrade channel to obtain the target version" includes:
[0060] Determine the target version upgrade file;
[0061] Send the target version upgrade file to the sample terminal according to the Over-the-Air technology channel, and perform version upgrade on the sample terminal according to the target version upgrade file to obtain the target version of the sample terminal.
[0062] Among them, by using the Over-the-Air (OTA) technology to send version upgrade files and promoting the sample terminal to be upgraded, the upgrade process of the sample terminal can be realized, and it is also convenient to determine the upgrade performance of the current upgrade channel according to the upgrade detection result.
[0063] Among them, in the embodiments of the present application, the upgrade operation of the sample terminal can also be assisted and started by an auxiliary terminal. For example, the upgrade operation of the sample terminal is started by the auxiliary terminal. That is, optionally, in some embodiments of the present application, the step "performing a version upgrade on the sample terminal according to the target upgrade channel to obtain the target version" includes:
[0064] Triggering the generation of a version upgrade instruction for the sample terminal on the auxiliary terminal and sending the version upgrade instruction to the sample terminal, so that the sample terminal performs a version upgrade according to the version upgrade instruction to obtain the target version.
[0065] Among them, in the embodiments of the present application, the auxiliary terminal includes a mobile phone. After the mobile phone is bound to the sample terminal, the version upgrade operation of the sample terminal is triggered through the mobile phone, so that the sample terminal can perform a version upgrade according to the Over-the-Air (OTA) technology.
[0066] 102. Obtaining an upgrade detection result according to the target version.
[0067] Among them, in the embodiments of the present application, the upgrade detection result of this upgrade can be obtained according to the upgrade content of the target version and the functions of the sample terminal after the upgrade. Among them, in the embodiments of the present application, the upgrade detection result includes upgrade success and upgrade failure.
[0068] 103. When the upgrade detection result is successful and within a preset condition, performing a version restoration on the target version to obtain a historical version.
[0069] Among them, in the embodiments of the present application, the preset condition may include time conditions for upgrade testing, number of upgrade times conditions, etc. Through the version restoration within the preset condition and subsequent version upgrades, multiple upgrade detection results can be obtained.
[0070] Among them, by restoring the version of the sample terminal, it is convenient to use the upgrade channel for the next upgrade to realize the utilization of the upgrade channel and facilitate determining the performance of the current upgrade channel according to the upgrade detection result.
[0071] Among them, in the embodiments of the present application, the version of the sample terminal can be restored according to the upgrade file of the historical version. That is, optionally, in some embodiments of the present application, the step "performing a version restoration on the target version to obtain a historical version" includes:
[0072] Determining the historical version upgrade file;
[0073] Restore the version of the sample terminal according to the historical version upgrade file to obtain the historical version of the sample terminal.
[0074] Among them, restoring the version of the sample terminal through the historical version upgrade file can ensure the accuracy of version restoration, facilitate subsequent re-upgrading of the sample terminal according to the upgrade channel, and improve the accuracy of upgrade channel upgrade testing.
[0075] Among them, in the embodiments of the present application, the sample terminal may include a terminal that can automatically roll back versions. Therefore, for a sample terminal that can automatically roll back, version restoration can be performed according to the automatic rollback function. That is, optionally, in some embodiments of the present application, the step of "restoring the version of the sample terminal according to the historical version upgrade file to obtain the historical version of the sample terminal" includes:
[0076] Detect the version update type of the sample terminal to obtain the version update type;
[0077] When the version update type includes automatic rollback, drive the sample terminal to automatically roll back to the historical version according to the historical version upgrade file;
[0078] When the version update type does not include the automatic rollback, burn the historical version upgrade file into the sample terminal to obtain the historical version of the sample terminal.
[0079] Among them, by determining the version update type of the sample terminal and determining that the sample terminal is of the automatically rollback type, the version restoration process of the sample terminal can be performed according to the automatic rollback function of the sample terminal, improving the efficiency of the version restoration process.
[0080] Among them, for a sample terminal that cannot be of the automatically rollback type, in the embodiments of the present application, the historical version upgrade file is directly burned into the sample terminal to restore the version of the sample terminal.
[0081] 104. Return to execute the version upgrade of the sample terminal according to the target upgrade channel until a preset stop condition is met.
[0082] Among them, by repeatedly executing the version upgrade and version restoration of the sample terminal, the upgrade channel can be utilized multiple times, facilitating obtaining an upgrade detection result according to each upgrade, so as to determine the test result of the upgrade channel according to multiple upgrade detection results subsequently.
[0083] Among them, in the embodiments of the present application, the preset stop condition may include a preset stop time condition, a preset stop number condition (upgrade times), etc. Through multiple version upgrades and version restorations within the preset conditions, the upgrade channel can be utilized multiple times, which is convenient for determining the upgrade performance of the upgrade channel according to the upgrade detection results.
[0084] Among them, in the embodiments of the present application, the preset stop condition may also include upgrade failure. When the upgrade detection result indicates upgrade failure, the cycle of version upgrade and version restoration can be stopped, and the reason for the upgrade failure can be detected.
[0085] 105. Determine the upgrade test result of the target upgrade channel according to all the obtained upgrade detection results.
[0086] Among them, the upgrade performance of the upgrade channel can be determined through multiple upgrade detection results, and the upgrade test result of the upgrade channel can be obtained. Among them, multiple upgrade detection results also improve the accuracy of the upgrade test result.
[0087] Among them, in the embodiments of the present application, the upgrade detection result may also include the time-consuming information of each upgrade. Therefore, the upgrade performance of the upgrade channel can be determined according to the time-consuming information of each upgrade. That is, optionally, in some embodiments of the present application, the step of "determining the upgrade test result of the target upgrade channel according to all the obtained upgrade detection results" includes:
[0088] Obtain the upgrade success rate of the target upgrade channel according to all the obtained upgrade detection results, and obtain the time-consuming of each upgrade;
[0089] Determine the upgrade test result of the target upgrade channel according to the upgrade success rate, several of the time-consuming and a preset time-consuming threshold.
[0090] Among them, the upgrade performance of the upgrade channel can be determined by comparing the time-consuming with the time-consuming threshold, and the upgrade test result can be obtained.
[0091] Among them, in the embodiments of the present application, the upgrade success rate of the upgrade channel can also be determined according to multiple upgrade detection results, and the upgrade performance of the upgrade channel can be determined according to the upgrade success rate. Among them, through the upgrade success rate and the upgrade time-consuming situation, the upgrade performance of the upgrade channel can be comprehensively determined, and the accuracy of the obtained upgrade test result can be improved.
[0092] Among them, in the embodiments of the present application, the upgrade detection result may also include upgrade failure. When upgrade failure occurs, the performance detection of the upgrade channel can be directly stopped, and the detection result of upgrade failure can be obtained. That is, optionally, after the step of "obtaining the upgrade detection result according to the target version" in some embodiments of the present application, the method further includes:
[0093] When the upgrade detection result is a failure, directly determine the upgrade detection result as the upgrade test result of the target upgrade channel.
[0094] Among them, in the embodiment of the present application, when the upgrade detection result is a failure, it indicates that the upgrade of the upgrade channel fails. Then, the problem troubleshooting process can be directly carried out on the upgrade channel to reduce unnecessary version upgrades and version restoration processes and reduce the complexity of detection.
[0095] Upgrade the sample terminal through the upgrade channel, and obtain the upgrade detection result of each version upgrade by performing multiple version upgrades and version restorations on the sample terminal. The upgrade performance of the upgrade channel can be determined by using multiple upgrade detection results, and the detection of the upgrade performance of the upgrade channel can be realized. Among them, through the loop processing of version upgrade and version restoration, the test of the version upgrade channel can be carried out on a single sample terminal, reducing the complexity of the test.
[0096] Among them, in the embodiment of the present application, both version upgrade and version restoration can be automatically executed according to the execution of test cases during the automated test process. For example, the version upgrade is automatically triggered based on the script of the test case, and the version restoration of the sample terminal after the upgrade is automatically triggered according to the script.
[0097] Please refer to Figure 3 , Figure 3 which is a schematic flow diagram of testing the upgrade channel provided in the embodiment of the present application. The specific process of this upgrade channel test is as follows;
[0098] 111. Prepare the OTA (Over-the-Air) test environment, mainly including the networking of the device (sample terminal), the deployment of the OTA (Over-the-Air) platform upgrade package, the preparation of the current version burn-in file, and the correct connection of the test mobile phone to the computer;
[0099] 112. Simulate the user clicking the upgrade button of the mobile phone APP according to the script to drive the device to perform OTA (Over-the-Air) upgrade;
[0100] 113. Detect the upgrade result. When the upgrade result indicates a failure, execute step 117; otherwise, execute step 114;
[0101] 114. Start running the automated burn-in module of the script to automatically perform the burn-in step of version rollback and restore the upgraded version to the current version;
[0102] 115. Continue to perform OTA (Over-the-Air) upgrade until the set number of tests or a test failure;
[0103] 116. Obtain performance indicators such as OTA upgrade time consumption and success rate according to the upgrade result after each upgrade;
[0104] 117. End the test.
[0105] Among them, through automated testing, the performance testing of the upgrade channel can be achieved by using a single device (sample terminal) and related testing tools, without relying on multiple sample terminals, improving the testing efficiency and reducing the operation difficulty of testing.
[0106] To facilitate the better implementation of the upgrade testing method of this application, this application also provides an upgrade testing device based on the above upgrade testing method. The meanings of the nouns are the same as those in the above upgrade testing method, and the specific implementation details can be referred to the description in the method embodiments.
[0107] Please refer to Figure 4 , Figure 4 , which is a schematic structural diagram of the upgrade testing device provided by this application. Among them, the upgrade testing device may include:
[0108] An upgrade module 201, configured to upgrade the version of the sample terminal according to the target upgrade channel to obtain a target version.
[0109] Among them, in some embodiments of this application, the target upgrade channel includes an Over-the-Air (OTA) technology channel, and the upgrade module includes:
[0110] A first determination unit, configured to determine a target version upgrade file;
[0111] A first upgrade unit, configured to send the target version upgrade file to the sample terminal according to the OTA technology channel, and upgrade the version of the sample terminal according to the target version upgrade file to obtain the target version of the sample terminal.
[0112] Among them, in some embodiments of this application, the upgrade module includes:
[0113] A second upgrade unit, configured to trigger and generate a version upgrade instruction for the sample terminal on an auxiliary terminal, and send the version upgrade instruction to the sample terminal, so that the sample terminal upgrades the version according to the version upgrade instruction to obtain a target version.
[0114] An acquisition module 202, configured to obtain an upgrade detection result according to the target version.
[0115] A restoration module 203, configured to restore the target version to obtain a historical version when the upgrade detection result is successful and within a preset condition.
[0116] Among them, in some embodiments of this application, the restoration module includes:
[0117] A second determination unit, configured to determine a historical version upgrade file;
[0118] A restoration unit, configured to restore the version of the sample terminal according to the historical version upgrade file, so as to obtain the historical version of the sample terminal.
[0119] Wherein, in some embodiments of the present application, the restoration unit includes:
[0120] A detection subunit, configured to detect the version update type of the sample terminal to obtain the version update type;
[0121] A first restoration subunit, configured to, when the version update type includes automatic rollback, drive the sample terminal to automatically roll back to the historical version according to the historical version upgrade file;
[0122] A second restoration subunit, configured to, when the version update type does not include the automatic rollback, burn the historical version upgrade file into the sample terminal to obtain the historical version of the sample terminal.
[0123] A loop module 204, configured to return and execute the version upgrade of the sample terminal according to the target upgrade channel until a preset stop condition is met.
[0124] A determination module 205, configured to determine the upgrade test result of the target upgrade channel according to all obtained upgrade detection results.
[0125] Wherein, in some embodiments of the present application, the determination module includes:
[0126] An acquisition unit, configured to obtain the upgrade success rate of the target upgrade channel according to all obtained upgrade detection results, and obtain the time consumption of each upgrade;
[0127] A third determination unit, configured to determine the upgrade test result of the target upgrade channel according to the upgrade success rate, several of the time consumptions, and a preset time consumption threshold.
[0128] Wherein, in some embodiments of the present application, the device further includes a detection stop module, and the detection stop module includes:
[0129] A fourth determination unit, configured to directly determine the upgrade detection result as the upgrade test result of the target upgrade channel when the upgrade detection result is a failure.
[0130] In an embodiment of the present application, the upgrade module 201 upgrades the version of the sample terminal according to the target upgrade channel to obtain the target version. Then, the acquisition module 202 obtains the upgrade detection result according to the target version. Next, when the upgrade detection result is successful, the restoration module 203 restores the version of the sample terminal to obtain the historical version. Subsequently, the loop module 204 repeatedly executes the version upgrade and version restoration of the sample terminal until the preset stop condition is met, obtaining multiple upgrade detection results. Finally, the determination module 205 obtains the upgrade test result of the target upgrade channel according to the multiple upgrade detection results.
[0131] Among them, in an embodiment of the present application, the sample terminal is upgraded through the upgrade channel, and through multiple version upgrades and version restorations of the sample terminal, the upgrade detection result of each version upgrade is obtained. The upgrade performance of the upgrade channel can be determined by using multiple upgrade detection results, realizing the detection of the upgrade performance of the upgrade channel. Among them, through the loop processing of version upgrade and version restoration, the test of the version upgrade channel can be carried out on a single sample terminal, reducing the complexity of the test.
[0132] Please refer to Figure 5 , Figure 5 which is a schematic diagram of the system architecture for testing the upgrade channel provided by an embodiment of the present application. The system includes a wifi module, a serial port tool, a router, an OTA (Over-the-Air) upgrade platform, a programmable smart socket, a PC for running the automated test program, a burning software, a windows UI automation program, a python automation program, an APP UI OTA (Over-the-Air) upgrade automation program, and an automated program running configuration interface, where:
[0133] The wifi module (such as a smart home appliance wifi module) 211: A module used for the smart home appliance to establish a connection with the IOT cloud, and it is also the core part of the IOT. As Figure 5 shown, it includes 5 general-purpose pins. Among them, GPIOA_0 is the burning pin. When VOD33 and GPIOA_0 are both connected to 3.3V, the wifi module is powered off and restarted, and the wifi module will enter the burning state. At this time, the module can be burned by operating the burning software;
[0134] The router 212: Used to provide a networking channel for the wifi module;
[0135] The serial port tool 213: A communication tool for the wifi module and the PC. The serial port tool is connected to the corresponding pins of the module (such as Figure 5 ), and the PC obtains the module log output through it. At the same time, when the wifi module enters the burning mode, the PC can burn the module through the burning software;
[0136] OTA (Over-the-Air) Upgrade Platform 214: A platform for upgrading the Wi-Fi module, which is the product function to be verified (i.e., the object to be performance-tested).
[0137] Programmable Smart Socket 215: It is used to control whether the Wi-Fi module is in the programming mode or the normal mode (e.g., Programmable Smart Socket A), or to control the power-on or power-off of the Wi-Fi module (e.g., Programmable Smart Socket B). Among them, in this system, the programmable smart socket 215 is composed of a single-chip microcomputer (Arduino) and a relay. Among them, in the embodiments of this application, the programmable smart socket 215 can also be composed of other instruments, which is not limited here.
[0138] PC 216 for Running the Automated Test Program: A Windows execution machine for running this system.
[0139] Flashing Software 217: A program for flashing the Wi-Fi module. Among them, in the embodiments of this application, the Wi-Fi module chip uses the 8720CF of Realtek Company, and the flashing software is AmebaZ2_PGTool_v1.2.3 provided by Realtek Company.
[0140] Windows UI Automation Program 218: It is used to automatically simulate human operations on the flashing software to perform automated module flashing actions. Among them, in the embodiments of this application, the Windows UI automation program 218 is implemented using pywinauto in Python.
[0141] APP UI OTA (Over-the-Air Technology) Upgrade Automation Program 219: It is used to simulate human operations on the mobile APP to click the OTA (Over-the-Air Technology) upgrade confirmation button to achieve automated OTA (Over-the-Air Technology) upgrades. Among them, in this system, airtest is used.
[0142] Python Automation Program 220: It is used to coordinate the operation of each component to achieve a complete automated flashing and upgrade process, such as controlling the power-on and power-off of the smart socket, controlling the start of the Windows UI automation program, controlling the start of the APP UI OTA (Over-the-Air Technology) upgrade automation program, obtaining the serial port output log of the module to confirm the module upgrade result, outputting the test report result, etc.
[0143] Automation Program Running Configuration Interface 221: It is used for user interaction, such as the program running entry, configuring the number of runs, the log storage directory, etc.
[0144] Among them, through comprehensive design, this system finally enables testers to achieve automated burning for WiFi modules without version rollback function, and automated testing for the entire process of automated upgrade. At the same time, this system can also confirm the status of the WiFi module through the logs output by the serial port tool, realizing more accurate testing and problem location, thereby improving the R & D efficiency of smart home appliances. And since each module of this system uses open-source software or hardware, the implementation difficulty and cost are relatively low, and this system also has high portability, further improving the detection efficiency of OTA (Over-the-Air) function performance and reducing the detection cost.
[0145] In addition, this application also provides an electronic device, as Figure 6 shown, which shows the structural schematic diagram of the electronic device involved in this application. Specifically:
[0146] This electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art can understand that Figure 6 the electronic device structure shown in
[0147] does not constitute a limitation on the electronic device, and it may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Among them:
[0148] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the electronic device. In addition, the memory 402 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 402 may further include a memory controller to provide the processor 401 with access to the memory 402.
[0149] The electronic device further includes a power supply 403 for powering each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 403 may further include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
[0150] The electronic device may further include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0151] Although not shown, the electronic device may further include a display unit, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, so as to implement the steps in any one of the upgrade test methods provided in this application.
[0152] In the embodiment of this application, the sample terminal is upgraded through an upgrade channel, and the upgrade detection results of each version upgrade are obtained by repeatedly upgrading and restoring the version of the sample terminal. The upgrade performance of the upgrade channel can be determined by using multiple upgrade detection results, so as to detect the upgrade performance of the upgrade channel. Among them, through the cyclic processing of version upgrade and version restoration, the test of the version upgrade channel can be carried out on a single sample terminal, reducing the complexity of the test.
[0153] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0154] For this reason, the present application provides a computer-readable storage medium on which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any one of the upgrade test methods provided by the present application.
[0155] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.
[0156] Since the instructions stored in the computer-readable storage medium can execute the steps in any one of the image processing provided by the present application, the beneficial effects achievable by any one of the upgrade test methods provided by the present application can be realized. See the previous embodiments for details and will not be elaborated here.
[0157] The above has introduced in detail an upgrade test method, device, electronic device, and storage medium provided by the present application. Specific examples are used in this article to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. An upgrade test method, characterized in that, it includes: Upgrading the version of the sample terminal according to the target upgrade channel to obtain the target version; Obtaining the upgrade detection result according to the target version; When the upgrade detection result is successful and within the preset conditions, restoring the target version to obtain the historical version, where the preset conditions include the time condition or the number of upgrade times condition of the upgrade test; Return to execute the version upgrade of the sample terminal according to the target upgrade channel until the preset stop condition is met; Determining the upgrade test result of the target upgrade channel according to all the obtained upgrade detection results; The upgrading the version of the sample terminal according to the target upgrade channel to obtain the target version includes: Determining the target version upgrade file; Sending the target version upgrade file to the sample terminal according to the Over-the-Air (OTA) technology channel, and upgrading the version of the sample terminal according to the target version upgrade file to obtain the target version of the sample terminal; The restoring the target version to obtain the historical version when the upgrade detection result is successful and within the preset conditions includes: When the upgrade detection result is successful and within the preset conditions, determining the historical version upgrade file, and performing a version update type detection on the sample terminal to obtain the version update type; When the version update type includes automatic rollback, driving the sample terminal to automatically roll back to the historical version according to the historical version upgrade file; When the version update type does not include the automatic rollback, burning the historical version upgrade file into the sample terminal through an automated burning script to obtain the historical version of the sample terminal.
2. The method according to claim 1, characterized in that, The determining the upgrade test result of the target upgrade channel according to all the obtained upgrade detection results includes: Obtaining the upgrade success rate of the target upgrade channel according to all the obtained upgrade detection results, and obtaining the time taken for each upgrade; Determining the upgrade test result of the target upgrade channel according to the upgrade success rate, several of the time taken, and a preset time threshold.
3. The method according to any one of claims 1-2, characterized in that, After obtaining the upgrade detection result according to the target version, the method further includes: When the upgrade detection result is a failure, directly determining the upgrade detection result as the upgrade test result of the target upgrade channel.
4. The method according to claim 1, characterized in that, The upgrading the version of the sample terminal according to the target upgrade channel to obtain the target version includes: Triggering and generating a version upgrade instruction for the sample terminal on the auxiliary terminal, and sending the version upgrade instruction to the sample terminal, so that the sample terminal upgrades the version according to the version upgrade instruction to obtain the target version.
5. An upgrade test device, characterized in that, it includes: An upgrade module for upgrading the version of the sample terminal according to the target upgrade channel to obtain the target version; An acquisition module for obtaining the upgrade detection result according to the target version; A restoration module, configured to restore the target version to obtain a historical version when the upgrade detection result is successful and within a preset condition, where the preset condition includes a time condition or a number-of-upgrade times condition for the upgrade test; A loop module, configured to return and execute the version upgrade of the sample terminal according to the target upgrade channel until a preset stop condition is met; A determination module, configured to determine the upgrade test result of the target upgrade channel according to all obtained upgrade detection results; The version upgrade of the sample terminal according to the target upgrade channel to obtain a target version includes: Determine the target version upgrade file; Send the target version upgrade file to the sample terminal according to the over-the-air download technology channel, and perform version upgrade on the sample terminal according to the target version upgrade file to obtain the target version of the sample terminal; The restoring the target version to obtain a historical version when the upgrade detection result is successful and within a preset condition includes: When the upgrade detection result is successful and within a preset condition, determine the historical version upgrade file, and perform version update type detection on the sample terminal to obtain a version update type; When the version update type includes automatic rollback, drive the sample terminal to automatically roll back to the historical version according to the historical version upgrade file; When the version update type does not include the automatic rollback, burn the historical version upgrade file into the sample terminal through an automated burning script to obtain the historical version of the sample terminal.
6. An electronic device, characterized in that, the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the upgrade test method according to any one of claims 1-4 are implemented.
7. A computer-readable storage medium, characterized in that, a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the upgrade test method according to any one of claims 1-4 are implemented.
Citation Information
Patent Citations
Version updating testing method and system based on robot
CN108089986A
Version upgrading test method and device
CN112131099A