An air conditioner applet testing method and device, electronic equipment and storage medium

By generating and classifying data snapshots, the system automatically records the air conditioner's status and quickly orchestrates test cases, solving the problems of low testing efficiency and complex status recovery in the air conditioner mini-program, thus achieving efficient testing and troubleshooting.

CN119718930BActive Publication Date: 2026-01-27GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411810706.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2026-01-27
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

Existing testing methods for air conditioner mini-programs are inefficient, fail to cover all states, are difficult to troubleshoot, and are complex to restore.

Method used

Data snapshots are generated based on user-defined control parameters and air conditioner operating parameters. The data snapshots are categorized according to the test scenario, and test cases are arranged based on the categorized data snapshots. The air conditioner status is automatically recorded through data snapshots, enabling rapid test case arrangement and anomaly detection.

Benefits of technology

The testing efficiency and scope of the air conditioner mini-program have been improved, the problem-solving capabilities have been enhanced, and the state recovery process has been simplified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718930B_ABST
    Figure CN119718930B_ABST
Patent Text Reader

Abstract

The application discloses an air conditioner applet testing method and device, electronic equipment and a storage medium, and the method comprises the steps of: generating a data snapshot based on a user-set control parameter and an operation parameter of an air conditioner; classifying the data snapshot according to a test scene, and compiling a test case based on the classified data snapshot; and performing a test operation on the air conditioner applet according to the test case. The application obtains the control parameter sent by the user and the operation parameter generated by the air conditioner in the operation process based on the data snapshot, so that the required data snapshot can be filtered according to different test scenes, and the test case compilation is quickly realized, so that the air conditioner applet can realize function testing, can quickly detect abnormal problems of the air conditioner, and can quickly recover the air conditioner from an abnormal state to a normal state, thereby improving the testing efficiency and range of the air conditioner applet, enhancing the problem troubleshooting capability, and simplifying the state recovery process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of air conditioner technology, and in particular to an air conditioner app testing method, device, electronic device, and storage medium. Background Technology

[0002] In existing technical solutions, the test case orchestration methods for air conditioner mini-programs mainly rely on manually writing and executing test scripts, or on automated testing based on predefined test scenarios. These methods typically include: manual test script writing (testers manually write test cases based on requirements documents and execute these cases in the test environment), automated testing frameworks (using automated testing tools such as Selenium and Appium to simulate user operations by writing scripts and automatically execute test cases), and scenario-based testing (designing test cases based on predefined user scenarios and business processes to ensure the system's functional correctness in different scenarios).

[0003] However, the existing test case orchestration methods described above still have certain shortcomings, such as:

[0004] (1) Low testing efficiency. Manually writing and executing test cases is time-consuming, labor-intensive, and prone to errors, especially in complex systems.

[0005] (2) Difficulty in covering all states. While automated testing frameworks improve testing efficiency, they struggle to cover the system's performance in all states, especially when the system state changes frequently.

[0006] (3) Troubleshooting is difficult. When the system malfunctions, existing testing methods are unable to quickly locate the problem because of the lack of a comprehensive record of the system's status.

[0007] (4) Complex state recovery. During testing, restoring the system to a specific state to verify functionality or troubleshoot problems is complex and error-prone. Summary of the Invention

[0008] This invention provides a method, apparatus, electronic device, and storage medium for testing air conditioner mini-programs, aiming to improve the testing efficiency and scope of air conditioner mini-programs, enhance troubleshooting capabilities, and simplify the state recovery process.

[0009] In a first aspect, embodiments of the present invention provide a method for testing an air conditioner mini-program, including:

[0010] Generate data snapshots based on user-defined control parameters and air conditioner operating parameters;

[0011] The data snapshots are categorized according to the test scenarios, and test cases are arranged based on the categorized data snapshots.

[0012] Perform test operations on the air conditioner mini-program according to the test cases.

[0013] Secondly, embodiments of the present invention provide an air conditioner mini-program testing device, comprising:

[0014] The generation unit is used to generate data snapshots based on user-defined control parameters and air conditioner operating parameters.

[0015] The orchestration unit is used to classify the data snapshots according to the test scenario and orchestrate test cases based on the classified data snapshots;

[0016] The testing unit is used to perform test operations on the air conditioner applet according to the test cases.

[0017] Thirdly, embodiments of the present invention provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the air conditioner app testing method as described in the first aspect.

[0018] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the air conditioner app testing method as described in the first aspect.

[0019] This invention provides a method, apparatus, electronic device, and storage medium for testing an air conditioner mini-program. The method includes: generating data snapshots based on user-defined control parameters and air conditioner operating parameters; classifying the data snapshots according to test scenarios and compiling test cases based on the classified data snapshots; and performing test operations on the air conditioner mini-program according to the test cases. This invention obtains user-sent control parameters and operating parameters generated by the air conditioner during operation based on data snapshots, and classifies the data snapshots according to test scenarios. This allows for the selection of data snapshots that meet the requirements based on different test scenarios, and enables rapid test case compilation. This allows the air conditioner mini-program to perform both functional testing and rapid detection of air conditioner anomalies, quickly restoring the air conditioner from an abnormal state to a normal state. This improves the testing efficiency and scope of the air conditioner mini-program, enhances troubleshooting capabilities, and simplifies the state recovery process. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 A flowchart illustrating an air conditioner mini-program testing method provided in an embodiment of the present invention;

[0022] Figure 2 This is a schematic diagram of the first sub-process in an air conditioner applet testing method provided in an embodiment of the present invention;

[0023] Figure 3 This is a schematic diagram of the second sub-process in an air conditioner applet testing method provided in an embodiment of the present invention;

[0024] Figure 4 This is a schematic diagram of the third sub-process in an air conditioner applet testing method provided in an embodiment of the present invention;

[0025] Figure 5 This is a schematic diagram of the principle architecture of an air conditioner applet testing method provided in an embodiment of the present invention;

[0026] Figure 6 This is another flowchart illustrating an air conditioner app testing method provided in an embodiment of the present invention;

[0027] Figure 7 A schematic block diagram of an air conditioner applet testing device provided in an embodiment of the present invention;

[0028] Figure 8 This is a schematic diagram of the first sub-section of an air conditioner app testing device provided in an embodiment of the present invention;

[0029] Figure 9 This is a schematic block diagram of the second sub-section of an air conditioner applet testing device provided in an embodiment of the present invention;

[0030] Figure 10 This is a schematic diagram of the third sub-section of an air conditioner applet testing device provided in an embodiment of the present invention. Detailed Implementation

[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0032] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0033] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0034] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0035] Please see below. Figure 1 This invention provides a method for testing an air conditioner via a mini-program, specifically including steps S101 to S103.

[0036] Step S101: Generate a data snapshot based on the user-defined control parameters and the air conditioner's operating parameters;

[0037] Step S102: Classify the data snapshots according to the test scenario, and arrange test cases based on the classified data snapshots;

[0038] Step S103: Perform test operations on the air conditioner applet according to the test cases.

[0039] This embodiment acquires user-sent control parameters and operating parameters generated by the air conditioner during operation based on data snapshots. The data snapshots are then categorized according to the test scenarios. This allows for the selection of data snapshots that meet the requirements based on different test scenarios, enabling rapid test case orchestration. This allows the air conditioner mini-program to perform both functional testing and rapid detection of abnormal issues in the air conditioner, quickly restoring the air conditioner from an abnormal state to a normal state. As a result, the testing efficiency and scope of the air conditioner mini-program are improved, the problem-solving capabilities are enhanced, and the state recovery process is simplified.

[0040] In practical application scenarios, the control parameters sent by the user can specifically include the set air conditioning parameters, such as temperature, mode (cooling, heating, dehumidifying, air supply), fan speed (high, medium, low, automatic), etc. The operating parameters of the air conditioner can specifically include the current status of the air conditioner, such as temperature data, humidity data, fan speed data collected by the temperature sensor, device on / off status (power on, power off), mode status (cooling, heating, etc.).

[0041] Furthermore, in some preferred embodiments, the operating parameters of other smart devices linked to the air conditioner mini-program (such as the current status and settings of smart curtains, smart lights, etc.), environmental status data (such as indoor and outdoor temperature, humidity, air quality (PM2.5, CO2 concentration, etc.), and network status data (such as the connection status between the air conditioner and the cloud, signal strength, network latency, etc.) can also be captured. By acquiring various data snapshots, including status data of smart devices linked to the air conditioner mini-program, environmental status data, and network status data, the testing effect of the air conditioner mini-program can be further improved. Specifically, these data snapshots include, but are not limited to, the operating status of smart devices, environmental parameters such as temperature and humidity, and information such as the stability and speed of network connections. By comprehensively analyzing this data, the performance of the air conditioner mini-program under different environmental and network conditions can be more comprehensively evaluated, thereby ensuring its reliability and stability in actual use. Such a testing method can not only discover potential problems but also further optimize the functionality of the mini-program and improve the user experience.

[0042] In one embodiment, the data snapshot includes a timed snapshot, and generating the data snapshot based on user-defined control parameters and air conditioner operating parameters includes:

[0043] At preset time intervals, the control parameters and operating parameters are collected using time scheduler technology, and the timed snapshots are generated accordingly.

[0044] In this embodiment, when generating data snapshots, timed snapshots can be generated at fixed time intervals. The frequency of timed snapshots can be adjusted according to testing requirements. The generation of timed snapshots can be implemented based on a time scheduler. Most programming languages ​​and frameworks have built-in time scheduler modules. Taking JavaScript as an example, real-time task scheduling can be achieved by calling the `setInterval` function.

[0045] In one embodiment, the data snapshot includes an event-triggered snapshot, and generating the data snapshot based on user-defined control parameters and air conditioner operating parameters includes:

[0046] The control parameters and operating parameters are monitored using event listening technology;

[0047] When a change in the control parameters and / or operating parameters is detected, the corresponding control parameters and operating parameters are collected, and an event-triggered snapshot is generated accordingly.

[0048] In this embodiment, when generating data snapshots, an event trigger threshold can be preset to generate event-triggered snapshots. For example, when a user adjusts the air conditioner's settings or the air conditioner's status changes, such as a change in operating mode, the event trigger threshold is considered reached, thus generating an event-triggered snapshot. Event-triggered snapshots can record the air conditioner's state during critical operations. The core technology of event-triggered snapshots is an event listener, which monitors user operations and device state changes. Using JavaScript as an example, `addEventListener` can be used to listen for events and generate event-triggered snapshots.

[0049] In one embodiment, the data snapshot includes error or abnormal snapshots, and generating the data snapshot based on user-defined control parameters and air conditioner operating parameters includes:

[0050] The operation of the air conditioner is monitored using anomaly detection technology;

[0051] When an error or abnormality is detected in the operation of the air conditioner, the corresponding control parameters and operating parameters are collected, and a snapshot of the error or abnormality is generated accordingly.

[0052] This embodiment can also generate corresponding error or anomaly snapshots when an error or anomaly is detected in the air conditioner. For example, when a network disconnection, air conditioner malfunction, or sensor malfunction is detected, a snapshot of the state at the moment of the anomaly is automatically recorded and stored as an error or anomaly snapshot. This allows for quick problem location and troubleshooting through error or anomaly snapshots. The generation of error or anomaly snapshots relies on anomaly detection technology. For example, in the JavaScript programming language, promise objects and catch methods can be used to effectively handle possible anomalies in asynchronous operations. Taking a network disconnection anomaly as an example, a simple ping command can be executed to check the current network connection status. If the detection result shows that the network connection is not smooth, an anomaly can be thrown immediately, triggering the snapshot generation operation. This snapshot operation captures the current program state and environment information for subsequent analysis and debugging. The generated error or anomaly snapshots can be further processed, such as uploaded to a cloud server or stored on a local terminal device, for further analysis and problem solving by developers or system administrators.

[0053] In summary, the data snapshots described in this embodiment can specifically include timed snapshots, event-triggered snapshots, and error or exception snapshots. By using timed snapshots, event-triggered snapshots, and error or exception snapshots, the air conditioner mini-program can gain significant advantages during testing. Specifically, it can include:

[0054] (1) Improve testing efficiency: Automatically record the status of the air conditioner through timed snapshots, event-triggered snapshots and error or exception snapshots, reducing the time and error rate of manually writing and executing test cases.

[0055] (2) Enhanced problem-finding capabilities: Timed snapshots, event-triggered snapshots, and error or abnormal snapshots record the full or incremental data of the air conditioner at a specific point in time, including user-set air conditioner parameters, device status, linked device data, environmental status data, and network status data, which helps to quickly locate and troubleshoot air conditioner abnormalities.

[0056] (3) Simplify the state recovery process: During testing and troubleshooting, state recovery tests can be performed based on different types of snapshots. The air conditioner can be restored to the state corresponding to a specific snapshot, and the mini-program can be checked to see if it can load the state correctly, which simplifies the complexity of state recovery operations.

[0057] Furthermore, after obtaining timed snapshots, event-triggered snapshots, and error or exception snapshots, these three types of data snapshots can be categorized. For example, they can be directly divided into three categories. Alternatively, they can be categorized according to different test scenarios. This way, when testing a specific scenario is required, the corresponding data snapshots can be quickly selected, and test cases can be generated.

[0058] In one embodiment, the test operation includes a state recovery test, such as... Figure 2 As shown, step S103 includes steps S201 to S202.

[0059] Step S201: Obtain the operating parameters of the air conditioner under normal conditions based on the data snapshot corresponding to the test case;

[0060] Step S202: Set the operating status of the air conditioner according to the operating parameters under normal operating conditions, and determine whether the operating status of the air conditioner has been successfully restored.

[0061] In this embodiment, test cases can cover state recovery test items. Specifically, when a state recovery test of the air conditioner mini-program is required, a data snapshot of the air conditioner under normal operating conditions can be directly selected. Then, all relevant data of the air conditioner under normal operating conditions, such as temperature, humidity, and fan speed, can be obtained from the selected data snapshot. Next, the operating parameters of the air conditioner can be reset according to the selected data snapshot, so that it runs according to the set operating parameters. After the air conditioner runs according to the set operating parameters, it is checked whether the air conditioner can successfully recover to the expected operating state. Through the above operations, it is possible to verify whether the air conditioner can smoothly recover to normal operating conditions when encountering interruptions or malfunctions, thereby achieving a comprehensive test of the state recovery function. This testing method not only ensures the accuracy of the data under normal operating conditions but also effectively evaluates its recovery capability in the face of various abnormal situations, thus providing users with a more stable and reliable air conditioner mini-program.

[0062] In one embodiment, the test operation includes functional testing, such as... Figure 3 As shown, step S103 further includes steps S301 to S303.

[0063] Step S301: Obtain functional parameters based on the data snapshot corresponding to the test case;

[0064] Step S302: Set the operating status of the air conditioner according to the aforementioned functional parameters;

[0065] Step S303: When the air conditioner is running according to the function parameters, determine whether the function corresponding to the air conditioner applet is normal.

[0066] In this embodiment, test cases can also cover functional testing items. Specifically, when functional testing of the air conditioner mini-program is required, a data snapshot of the air conditioner under normal operating conditions can be selected, and the corresponding functional parameters, such as different temperatures, different modes, and different fan speeds, can be obtained from it. Then, the air conditioner is set according to these functional parameters, causing it to operate accordingly. The system then determines whether the air conditioner can operate normally according to these parameters, thereby determining whether the air conditioner mini-program passes the functional test. For example, to test the temperature adjustment function of the air conditioner mini-program, a data snapshot containing temperature adjustment-related parameters is first obtained, and the functional parameters are extracted from it. Then, the air conditioner's temperature is set, and it is run. During the air conditioner's operation, the effect of temperature adjustment is monitored, such as determining whether the air conditioner can smoothly adjust the temperature, i.e., whether it can adjust accordingly based on the set temperature value. Furthermore, the accuracy of the temperature adjustment range can be checked, i.e., whether the actual temperature of the air conditioner can accurately reach the set target temperature value. To ensure the accuracy of the test results, the above process can be repeated multiple times, selecting different temperature values ​​for testing. In this way, the reliability of the temperature regulation function of the air conditioner's mini-program can be fully evaluated, and whether it can work normally under various temperature settings.

[0067] In one embodiment, the testing operation includes anomaly detection testing, such as... Figure 4 As shown, step S103 further includes steps S401 to S402.

[0068] Step S401: Based on the data snapshots corresponding to the test cases, obtain the outliers between different data snapshots;

[0069] Step S402: Determine whether the air conditioner has any abnormalities based on the results of obtaining the abnormal values.

[0070] In this embodiment, the test cases can also cover test items for anomaly troubleshooting. Specifically, when anomaly troubleshooting testing is required for the air conditioner mini-program, a data snapshot applicable to the test scenario can be obtained, and outliers can be extracted based on the obtained data snapshot. This is then used to determine whether the air conditioner has any anomalies, thereby completing the anomaly troubleshooting test.

[0071] For example, during troubleshooting testing, the first step is to capture a snapshot of the air conditioner's data under its current condition. This step records the air conditioner's parameters and operating status under potential abnormal conditions. Simultaneously, a snapshot of the air conditioner's data under normal operating conditions is also captured to provide a benchmark for comparison. By conducting a detailed comparative analysis of these two snapshots, it can be determined whether the air conditioner exhibits any abnormalities. If the comparison shows no significant difference between the two snapshots, it can be preliminarily determined that the air conditioner is operating normally and no abnormalities have occurred. However, if outliers are found, further analysis can be conducted to determine whether these outliers exceed a preset abnormality threshold. If these outliers do exceed the preset threshold, the air conditioner is considered to be malfunctioning and requires further inspection and repair. Conversely, if the outliers do not exceed the preset threshold, the air conditioner is determined to be operating normally and no abnormalities requiring attention have occurred.

[0072] Of course, in some scenarios, you can also directly select a data snapshot of the air conditioner in its current state, and then compare the parameter information contained in the data with the pre-set standard information to determine whether there is any abnormality.

[0073] In summary, the test cases described in this embodiment can specifically include state recovery, functional verification, and anomaly troubleshooting. Through these test items, the purpose of restoring the air conditioner's operating state and troubleshooting anomalies can be quickly achieved, thereby improving the testing effectiveness of the air conditioner mini-program.

[0074] In some optional embodiments, the state differences between different data snapshots can be calculated according to the following formula, thereby determining whether the air conditioner has encountered an error or abnormality based on the state differences:

[0075] ΔS M =S2-S1

[0076]

[0077] Where, ΔS M S1 and S2 represent the state differences of a single dimension, respectively, and represent the state data of two data snapshots (e.g., user-set air conditioning parameters such as temperature, mode, fan speed, etc.). N is the dimension of user-set air conditioning parameters. This represents the average difference between the states of two data snapshots. If it is not equal to zero, it indicates that there is a difference between the states of the two data snapshots.

[0078] Alternatively, anomaly detection can be implemented using the following formula:

[0079]

[0080] Here, Z represents the standardized data, and X represents the original data. μ represents the mean, and σ represents the standard deviation. When the absolute value of Z exceeds a certain threshold, it indicates that there are discrepancies in the task data. The original data refers to user-set air conditioning parameters, the current status of the air conditioning equipment, data from linked devices, environmental status data, and network status data, etc. The mean is calculated by averaging data from multiple snapshots of the same dimension. For example, to calculate the mean of a temperature sensor reading, it is necessary to collect temperature sensor readings from multiple data snapshots, then add these readings together and divide by the number of data snapshots.

[0081] The operation response time can also be calculated using the following formula to test the adjustment function of the air conditioner's mini-program:

[0082]

[0083] Where T represents the average response time, T end and T start These represent the start and end times of the operation, respectively. N b This indicates the number of operations. For example, if a user adjusts the air conditioner temperature from 24℃ to 26℃ at 10:00:00, and the air conditioner completes the temperature adjustment and stabilizes at 26℃ at 10:00:10, then T_start = 10:00:00, T_end = 10:00:10, and the response time is 10 seconds.

[0084] This embodiment can verify test results based on the above formulas. For example, the formula for calculating state differences can be used to calculate the state differences between different data snapshots, identifying points of change in the air conditioner's state. For instance, calculating temperature differences or mode differences between two data snapshots can determine whether the air conditioner has experienced temperature changes or switched operating modes. Another example is the use of anomaly detection formulas to determine if the air conditioner has experienced any abnormalities during operation. This involves calculating the mean of temperature sensor readings and a pre-set standard deviation to determine if outliers exist. Furthermore, the formula for calculating operation response time can be used to calculate the response time of the air conditioner's mini-program under different states, and so on.

[0085] In practical application scenarios, combined with Figure 5 and Figure 6 The air conditioner mini-program first generates timed snapshots, event-triggered snapshots, and error or exception snapshots based on user-defined parameters and air conditioner operating parameters. On the one hand, these data snapshots are stored on the cloud server, and on the other hand, test cases are generated using these data snapshots. Specifically, these include exception troubleshooting tests, functional verification tests, and state recovery tests, so that the air conditioner can perform corresponding operations according to the test cases to complete the testing of the air conditioner mini-program.

[0086] For example, suppose a user is preparing to rest at 10 PM and finds that the air conditioner has suddenly stopped working, and the indoor temperature has started to rise. The user can then open the air conditioner's mini-program to check its current status. For instance, the mini-program might show that the current indoor temperature is 25℃, the humidity is 60%, and the air quality is good, but the air conditioner's status is displayed as "offline." Upon detecting that the air conditioner is offline, the mini-program immediately initiates an anomaly detection mechanism. First, the mini-program checks the network connection status using a ping command and finds that the network connection is interrupted. Subsequently, the mini-program generates an error snapshot, recording the system state at the time of the network disconnection, including the current status of the air conditioner, environmental conditions (such as indoor and outdoor temperature, humidity, air quality, etc.), and the status of linked devices (such as smart curtains, smart lights, etc.). After the error snapshot is generated, the mini-program automatically uploads the snapshot data to a cloud server for backup, for subsequent analysis and recovery. After generating the error snapshot, the mini-program will attempt to automatically restore the system state. First, the mini-program will attempt to reconnect to the network, checking the network connection status multiple times using ping commands. If the network connection is restored, the mini-program will restore the air conditioner's status based on the most recent normal snapshot. For example, the mini-program will restore the air conditioner to cooling mode based on a snapshot of its most recent normal operation, setting the target temperature to 24℃ and the fan speed to automatic. Simultaneously, the mini-program will restore the status of linked devices, such as automatically closing smart curtains and switching smart lights to night mode. If the system restores automatically successfully, the mini-program will notify the user that the system has returned to normal and display the current air conditioner and environmental status. The user can view the restored status in the mini-program to confirm whether the air conditioner is working properly. If the system restore fails automatically, the mini-program will prompt the user to contact technical support and provide a detailed anomaly report. The anomaly report can include information such as erroneous snapshot data, network connection status, and air conditioner status to help the technical support team quickly locate the problem. Furthermore, users can submit feedback through the mini-program, attaching the anomaly report and relevant snapshot data. The technical support team will investigate the problem and optimize the system based on user feedback and snapshot data. For example, if an abnormal temperature sensor reading is found, the technical support team can locate the problem through snapshot data and perform corresponding repairs.

[0087] Figure 7 This is a schematic block diagram of an air conditioner app testing device 700 provided in an embodiment of the present invention. The device 700 includes:

[0088] The generation unit 701 is used to generate a data snapshot based on the user-defined control parameters and the air conditioner's operating parameters;

[0089] The orchestration unit 702 is used to classify the data snapshots according to the test scenario and orchestrate test cases based on the classified data snapshots;

[0090] Test unit 703 is used to perform test operations on the air conditioner applet according to the test cases.

[0091] In one embodiment, the data snapshot includes a timed snapshot, and the generation unit 701 includes:

[0092] The timing unit is used to collect the control parameters and operating parameters at preset time intervals using time scheduler technology, and generate the timing snapshot accordingly.

[0093] In one embodiment, the data snapshot includes an event-triggered snapshot, and the generation unit 701 further includes:

[0094] The monitoring unit is used to monitor the control parameters and operating parameters through event monitoring technology;

[0095] The triggering unit is used to collect the corresponding control parameters and operating parameters when a change in the control parameters and / or operating parameters is detected, and to generate the event trigger snapshot accordingly.

[0096] In one embodiment, the data snapshot includes an error or anomaly snapshot, and the generation unit 701 further includes:

[0097] The monitoring unit is used to monitor the operation of the air conditioner using anomaly detection technology;

[0098] The error unit is used to collect the corresponding control parameters and operating parameters when an error or abnormality is detected in the operation of the air conditioner, and to generate an error or abnormality snapshot.

[0099] In one embodiment, the test operation includes a state recovery test, such as... Figure 8 As shown, the test unit 703 further includes:

[0100] The first acquisition unit 801 is used to acquire the operating parameters of the air conditioner under normal conditions based on the data snapshot corresponding to the test case.

[0101] The first setting unit 802 is used to set the operating status of the air conditioner according to the operating parameters of the air conditioner under normal conditions, and to determine whether the operating status of the air conditioner has been successfully restored.

[0102] In one embodiment, the test operation includes functional testing, such as... Figure 9 As shown, the test unit 703 further includes:

[0103] The second acquisition unit 901 is used to acquire functional parameters based on the data snapshot corresponding to the test case;

[0104] The second setting unit 902 is used to set the operating status of the air conditioner according to the functional parameters;

[0105] The function judgment unit 903 is used to determine whether the function corresponding to the air conditioner applet is normal when the air conditioner is running according to the function parameters.

[0106] In one embodiment, the testing operation includes anomaly detection testing, such as... Figure 10 As shown, the test unit 703 further includes:

[0107] The third acquisition unit 1001 is used to acquire outlier values ​​between different data snapshots based on the data snapshots corresponding to the test cases.

[0108] The anomaly judgment unit 1002 is used to determine whether the air conditioner has an anomaly based on the acquisition result of the anomaly value.

[0109] Since the embodiments of the apparatus and the embodiments of the method correspond to each other, please refer to the description of the embodiments of the method for the embodiments of the apparatus, which will not be repeated here.

[0110] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed, can perform the steps provided in the above embodiments. The storage medium may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0111] This invention also provides an electronic device that may include a memory and a processor. The memory stores a computer program, and when the processor calls the computer program in the memory, it can implement the steps provided in the above embodiments. Of course, the electronic device may also include various network interfaces, power supplies, and other components.

[0112] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

[0113] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A method for testing an air conditioner mini-program, characterized in that, include: Generate a data snapshot based on the user-defined control parameters and the air conditioner's operating parameters; The data snapshots are categorized according to the test scenarios, and test cases are arranged based on the categorized data snapshots. Perform test operations on the air conditioner mini-program according to the test cases; The data snapshots include timed snapshots, event-triggered snapshots, and error or exception snapshots. Generating data snapshots based on user-defined control parameters and air conditioner operating parameters includes: Every preset time interval, the control parameters and operating parameters are collected using time scheduler technology, and the timed snapshot is generated accordingly. The control parameters and runtime parameters are monitored using the addEventListener function through event listening technology. When a change in the control parameters and / or operating parameters is detected, the corresponding control parameters and operating parameters are collected, and the event-triggered snapshot is generated accordingly. The operation of the air conditioner is monitored using anomaly detection technology; When an error or abnormality is detected in the operation of the air conditioner, the corresponding control parameters and operating parameters are collected, and a snapshot of the error or abnormality is generated accordingly.

2. The air conditioner applet testing method according to claim 1, characterized in that, The test operation includes a state recovery test, and the step of performing test operations on the air conditioner applet according to the test cases includes: Based on the data snapshot corresponding to the test case, obtain the operating parameters of the air conditioner under normal conditions; Set the air conditioner's operating status according to the operating parameters under normal conditions, and determine whether the air conditioner's operating status has been successfully restored.

3. The air conditioner applet testing method according to claim 1, characterized in that, The testing operations include functional testing. The step of performing testing operations on the air conditioner mini-program according to the test cases includes: Based on the data snapshot corresponding to the test case, obtain the functional parameters; Set the operating status of the air conditioner according to the aforementioned functional parameters; When the air conditioner is running according to the functional parameters, determine whether the function corresponding to the air conditioner applet is normal.

4. The air conditioner applet testing method according to claim 1, characterized in that, The testing operations include anomaly troubleshooting testing. The step of performing testing operations on the air conditioner mini-program according to the test cases includes: Based on the data snapshots corresponding to the test cases, obtain the outliers between different data snapshots; The air conditioner is determined to be malfunctioning based on the results of obtaining the outlier values.

5. An air conditioner mini-program testing device, characterized in that, include: The generation unit is used to generate data snapshots based on user-defined control parameters and air conditioner operating parameters. The orchestration unit is used to classify the data snapshots according to the test scenario and orchestrate test cases based on the classified data snapshots; The testing unit is used to perform test operations on the air conditioner applet according to the test cases; The data snapshots include timed snapshots, event-triggered snapshots, and error or exception snapshots; the generation unit includes: A timing unit is used to collect the control parameters and operating parameters at preset time intervals using time scheduler technology, and generate the timing snapshot accordingly. The listening unit is used to listen to the control parameters and running parameters using the addEventListener function through event listening technology; The triggering unit is used to collect the corresponding control parameters and operating parameters when a change in the control parameters and / or operating parameters is detected, and to generate the event trigger snapshot accordingly; The monitoring unit is used to monitor the operation of the air conditioner using anomaly detection technology; The error unit is used to collect the corresponding control parameters and operating parameters when an error or abnormality is detected in the operation of the air conditioner, and to generate an error or abnormality snapshot.

6. An electronic device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the air conditioner app testing method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the air conditioner applet testing method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Fan testing method, device and system

    CN107576518A

  • Software testing method, storage medium and computer equipment

    CN117873856A