Heating equipment test method and device, electronic equipment, readable storage medium and program product

Through automated testing methods, test scripts are generated using the host computer program and integrated script language to realize automated testing of heating equipment, solving the problems of low testing efficiency and difficult to test in complex scenarios in the existing technology, and improving testing efficiency and accuracy.

CN119396714APending Publication Date: 2025-02-07SHENZHEN GEEKVAPE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411393831.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

In the prior art, the testing of electronic devices mainly relies on manual simulation, which is inefficient and difficult to test complex scenarios.

Method used

It provides an automated testing method for heating equipment, obtains test cases through the host computer program, and obtains the identification of the equipment to be tested. It generates a test script based on the identification, sends it to the heating equipment for operation and obtains the test results.

Benefits of technology

It realizes automated testing of heating equipment, improves testing efficiency and accuracy, reduces the difficulty of testers, and facilitates automated generation and management through integrated scripting language.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396714A_ABST
    Figure CN119396714A_ABST
Patent Text Reader

Abstract

The invention relates to a test method and device of heating equipment, electronic equipment, a readable storage medium and a program product. The method comprises the following steps: obtaining a test case by an upper computer program, and performing text processing on the test case to obtain a to-be-tested equipment identifier; obtaining a test script corresponding to the test case based on the to-be-tested device identifier, wherein the test script is composed of an integrated script language; sending the test script to a heating device, so that the heating device operates the test script and outputs a corresponding test result; and receiving the test result sent by the heating equipment. By adopting the method, the automatic test of the heating equipment can be realized, so that the test efficiency and the yield of factory equipment are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of equipment detection, and in particular to a testing method, device, electronic device, computer-readable storage medium and computer program product for heating equipment. Background Art

[0002] With the development of electronic technology, electronic devices have emerged. In order to improve the yield of electronic devices, they need to be tested before they leave the factory. However, in the current method of testing electronic devices, it is usually a method of artificially simulating electronic devices by testers. This is not only inefficient, but also unable to test some complex scenarios. Summary of the invention

[0003] Based on this, it is necessary to provide a testing method, device, electronic device, computer-readable storage medium and computer program product for a heating device that can realize automated testing of electronic devices in order to solve the above technical problems.

[0004] In a first aspect, the present application provides a testing method for a heating device, comprising:

[0005] The host computer program obtains the test case, and performs text processing on the test case to obtain the identification of the device to be tested;

[0006] Obtaining a test script corresponding to the test case based on the device identification, wherein the test script is composed of an integrated scripting language;

[0007] Sending the test script to the heating device so that the heating device runs the test script and obtains corresponding test results;

[0008] The test result sent by the heating device is received to complete the test of the heating device.

[0009] In one embodiment, obtaining a test script corresponding to the test case based on the device identification includes:

[0010] Obtaining a test function corresponding to the device under test identification;

[0011] Analyze the test case to obtain specific values ​​of parameters of the test function;

[0012] A test environment script is obtained, the specific values ​​of the parameters are substituted into the test function, and the test function is written into the test environment script to generate the test script.

[0013] In one embodiment, obtaining the test function corresponding to the identification of the device under test includes:

[0014] If the device to be tested is identified as a button, a button test function and a delay function are obtained, wherein the button test function is used to control the pressing or releasing of the button, and the delay function is used to control the pressing time of the button;

[0015] The analyzing the test case to obtain specific values ​​of parameters of the test function includes:

[0016] If the test case is used to test the long press of the button, the button test function includes a first button test function and a second button test function, the first button test function is used to press the button, and the second button test function is used to release the button, then the specific value of the parameter of the first button test function is a first value, and the specific value of the parameter of the second button test function is a second value;

[0017] If the test case includes the test duration, the specific value of the parameter of the delay function is set to the test duration; if the test case does not include the test duration, the specific value of the parameter of the delay function is set to the preset duration.

[0018] In one embodiment, the step of obtaining the test function corresponding to the identification of the device under test includes:

[0019] If the device to be tested is a heating element, a resistance control function is obtained, wherein the resistance control function is used to control the resistance of the heating element;

[0020] The analyzing the test case to obtain specific values ​​of parameters of the test function includes:

[0021] If the test case analysis shows that the test case is used to test the short circuit of the heating element, the specific value of the parameter of the resistance control function is set to the short circuit value; if the test case analysis shows that the test case is used to test the open circuit of the heating element, the specific value of the parameter of the resistance control function is set to the open circuit value, and the short circuit value is smaller than the open circuit value.

[0022] In one embodiment, the step of obtaining the test function corresponding to the identification of the device under test includes:

[0023] If the device to be tested is identified as a sensor, a sensor temperature function is obtained, where the sensor temperature function is used to control the temperature of the sensor;

[0024] The analyzing the test case to obtain specific values ​​of parameters of the test function includes:

[0025] If the test case is analyzed to be used for testing the sensor temperature, an identification value of the sensor is obtained, and a test temperature is extracted from the test case. The identification value and the test temperature are set as specific values ​​of parameters of the sensor temperature function.

[0026] In a second aspect, the present application also provides a method for testing a heating device, comprising:

[0027] Receiving a test script sent by a host computer program, wherein the test script is composed of an integrated scripting language, the host computer program obtains a test case and performs text processing on the test case to obtain an identification of a device under test, and the host computer program obtains a corresponding test script based on the identification of the device under test;

[0028] Run the test script to obtain the test result of the test script;

[0029] The test results are sent to the host computer program so that the host computer program can count the test results.

[0030] In a third aspect, the present application also provides a testing device for a heating device, comprising:

[0031] An acquisition module is used to obtain a test case and perform text processing on the test case to obtain an identification of the device to be tested;

[0032] A script generation module, used for obtaining a test script corresponding to the test case based on the device identification under test, wherein the test script is composed of an integrated scripting language;

[0033] A sending module, used for sending the test script to the heating device, so that the heating device runs the test script and obtains corresponding test results;

[0034] The receiving module is used to receive the test result sent by the heating device to complete the test of the heating device.

[0035] In a fourth aspect, the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0036] The host computer program obtains the test case, and performs text processing on the test case to obtain the identification of the device to be tested;

[0037] Obtaining a test script corresponding to the test case based on the device identification, wherein the test script is composed of an integrated scripting language;

[0038] Sending the test script to the heating device so that the heating device runs the test script and obtains corresponding test results;

[0039] The test result sent by the heating device is received to complete the test of the heating device.

[0040] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0041] The host computer program obtains the test case, and performs text processing on the test case to obtain the identification of the device to be tested;

[0042] Obtaining a test script corresponding to the test case based on the device identification, wherein the test script is composed of an integrated scripting language;

[0043] Sending the test script to the heating device so that the heating device runs the test script and obtains corresponding test results;

[0044] The test result sent by the heating device is received to complete the test of the heating device.

[0045] In a sixth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0046] The host computer program obtains the test case, and performs text processing on the test case to obtain the identification of the device to be tested;

[0047] Obtaining a test script corresponding to the test case based on the device identification, wherein the test script is composed of an integrated scripting language;

[0048] Sending the test script to the heating device so that the heating device runs the test script and obtains corresponding test results;

[0049] The test result sent by the heating device is received to complete the test of the heating device.

[0050] The test method, device, computer equipment, computer-readable storage medium and computer program product of the above-mentioned heating equipment, the host computer program obtains the test case, and performs text processing on the test case to obtain the identification of the device to be tested, such as the name of the device to be tested, and then obtains the test script corresponding to the test case based on the identification of the device to be tested, and the test script is composed of an integrated scripting language, and the test script is sent to the heating equipment so that the heating equipment runs the test script and obtains the corresponding test result. The host computer program receives the test result sent by the heating equipment, thereby obtaining the test result corresponding to the test case, so that the automated testing of the heating equipment can be realized based on the test case, so as to improve the testing efficiency and testing accuracy of the heating equipment, and reduce the testing difficulty of the tester. In addition, the test script is constructed based on the integrated scripting language, which is convenient for automatically generating test scripts and facilitating the unified management of test scripts. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0052] FIG1 is an application environment diagram of a method for testing a heating device in one embodiment;

[0053] FIG2 is a schematic flow chart of a method for testing a heating device in one embodiment;

[0054] FIG3 is a schematic flow chart of a method for testing a heating device in another embodiment;

[0055] FIG4 is a flow chart of steps for generating a test script in one embodiment;

[0056] FIG5 is a schematic diagram of a test script in one embodiment;

[0057] FIG6 is a schematic flow chart of a method for testing a heating device in yet another embodiment;

[0058] FIG7 is a block diagram of a testing device for a heating device according to an embodiment;

[0059] FIG. 8 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0061] The test method of the heating device provided in the embodiment of the present application can be applied in the application environment shown in FIG1. ​​Among them, the host computer program 102 communicates with the heating device 104 through a wireless connection or a physical connection. The host computer program refers to software running on a computer, which is used to monitor, control or configure the lower computer (such as the heating device 104). For example, to perform software testing on the heating device, the host computer program 102 can first obtain a test case, and perform text processing on the test case to obtain the device identification to be tested; then obtain the test script corresponding to the test case based on the device identification to be tested, and the test script is composed of an integrated scripting language; and then send the test script to the heating device. After the heating device receives the test script, it runs the test script in the heating device and obtains the corresponding test results, and sends the test results to the host computer program. The host computer program receives the test results sent by the heating device to complete the test of the heating device. Among them, the host computer program 102 can run in a terminal, and the terminal can be but not limited to various personal computers, laptops, smart phones, and tablet computers. Heat-not-burn devices heat the aerosol-generating matrix to a certain temperature (usually between 300-500 degrees Celsius) to release nicotine and other chemicals in the aerosol-generating matrix, but do not produce the flames and smoke of traditional smoking.

[0062] In an exemplary embodiment, as shown in FIG. 2 and FIG. 3 , a method for testing a heating device is provided, which is described by taking the method applied to the host computer program in FIG. 1 as an example, and includes the following steps 202 to 208 .

[0063] Step 202: The host computer program obtains a test case and performs text processing on the test case to obtain an identification of the device to be tested.

[0064] The test case is a text description of the heating device test written by the tester. For example, "the state of the heating device when the battery is heated to 100 degrees Celsius", "the state of the heating device after the button is pressed for ten seconds". The host computer program can perform text analysis on the test case, extract the keyword information of the test from the test case, and then obtain the device identification under test based on the keyword information. The device identification under test is the identifier of the device in the heating device, such as a name. For example, if the device is a battery, the name can be "battery".

[0065] Optionally, performing text processing on the test case may be performing keyword matching processing on the test case.

[0066] Optionally, the text model can also be pre-trained to enable the host computer program to handle more complex test cases.

[0067] Step 204: obtaining a test script corresponding to the test case based on the identification of the device to be tested.

[0068] The test script is composed of an integrated script language, which may be a Lua language or a Python language, etc. A support module for running the test script is provided in the heating device.

[0069] For different devices under test, the corresponding test operations will be different. Accordingly, the corresponding test scripts will also be different. Therefore, the approximate scope of the test script can be determined based on the device under test identification. For example, for the device under test "button", the test script can be used to "test the state of the heating device after the button is pressed for 10 seconds" or "test whether the state of the heating device changes after the button is pressed", etc.

[0070] Optionally, a corresponding test function may be selected from a function library based on the identification of the device to be tested, and then the test function may be used to obtain a test script corresponding to the test case.

[0071] Optionally, a test environment script may be generated based on the identification of the device to be tested, and then a corresponding test script may be obtained based on the test environment script.

[0072] Step 206: Send the test script to the heating device so that the heating device runs the test script and obtains corresponding test results.

[0073] Among them, the heating device can be an HNB (Heat Not Burn) device. After the host computer program obtains the test script, it can send the test script to the heating device. After the heating device receives the test script, it can parse the test script. Based on the parsing result, a test instruction is sent to the corresponding device under test, and when the device under test receives the test instruction, it performs the corresponding operation. Then, the state of the heating device is obtained to obtain the corresponding test result. For example, after pressing a button, whether the state of the device is started. For example, when the heating element is short-circuited, whether the state of the device is to turn on the safety measures and stop running.

[0074] Step 208, receiving the test result sent by the heating device to complete the test of the heating device.

[0075] The host computer program receives the test results corresponding to the test cases sent by the heating device to complete the test of the heating device. After the host computer program obtains the test results, it can match the test results with the test cases. It can also count the pass rate of the test results of the test cases. And based on the failure rate, targeted improvements are made to the heating device. In addition, based on the interaction between the host computer program and the heating device, batch testing can be achieved.

[0076] In the above embodiment, the host computer program obtains a test case and performs text processing on the test case to obtain an identification of the device to be tested, such as the name of the device to be tested, and then obtains a test script corresponding to the test case based on the identification of the device to be tested. The test script is composed of an integrated scripting language. The test script is sent to the heating device so that the heating device runs the test script and obtains the corresponding test results. The host computer program receives the test results sent by the heating device, thereby obtaining the test results corresponding to the test case, and then implements automated testing of the heating device based on the test case to improve the testing efficiency and test accuracy of the heating device.

[0077] In an exemplary embodiment, as shown in FIG4 , obtaining a test script corresponding to a test case based on the identification of the device under test includes steps 402 to 406. Among them:

[0078] Step 402: Obtain the test function corresponding to the identification of the device to be tested.

[0079] A test function is a well-organized, reusable piece of code that performs a specific task. Functions can improve the modularity and reusability of code. Test functions include parameters. Different parameters will result in different implementations of the test function. For example, the parameters for pressing a button are different from those for releasing a button. The parameters for the resistance control function of the heating element are different when testing short circuits and open circuits. Therefore, after obtaining the test function, you need to determine the specific values ​​of the function's parameters.

[0080] Step 404: Analyze the test case to obtain specific values ​​of the parameters of the test function.

[0081] Based on the analysis of the test case, the specific values ​​of the parameters of the test function can be obtained. The specific values ​​of the parameters refer to the specific values ​​of the parameters of the function.

[0082] Optionally, text processing is performed on the test case to determine whether there is a numerical value in the test case. If there is no numerical value, the specific value of the parameter of the test function may be a preset parameter value of the corresponding test function.

[0083] Optionally, text processing is performed on the test case, and if there is a numerical value in the test case, the specific value of the parameter of the test function is set to the numerical value in the test case.

[0084] Optionally, text processing is performed on the test case to obtain keyword information, such as "circuit break" and "short circuit". Based on the keyword information, specific values ​​of parameters of the test function are obtained.

[0085] Step 406, obtain a test environment script, substitute specific parameter values ​​into the test function, and write the test function into the test environment script to generate a test script.

[0086] To reduce the interference between test cases, the test function corresponding to each test case can be encapsulated. Exemplarily, an instance, i.e., a test environment script, is created for each test function. For example, CTstEnv() can be seen in Figure 5. Figure 5 is a test script corresponding to a test case.

[0087] In this embodiment, by obtaining the test function corresponding to the identification of the device to be tested, and analyzing the specific values ​​of the parameters of the test function based on the test case, a corresponding test script can be generated based on the test environment script and the test function with the specific values ​​of the parameters substituted into it, so that the independence of each test case can be improved, and then the test cases can be input in batches to realize batch testing. And through different function parameter values, the scope of the test can be expanded and the accuracy of the test can be improved. For example, the resistance of the heating element is specifically determined to be a certain value, and the state of the heating device under the resistance value is judged, so that some critical values ​​can be found, and then the heating device can be improved based on these critical values.

[0088] In one embodiment, if the device to be tested is identified as a button, a button test function and a delay function are obtained, the button test function is used to control the pressing or releasing of the button, and the delay function is used to control the pressing duration of the button. If the test case is used to test a long-press button, the button test function includes a first button test function and a second button test function, the first button test function is used to press the button, and the second button test function is used to release the button, then the specific value of the parameter of the first button test function is obtained as a first value, and the specific value of the parameter of the second button test function is obtained as a second value. The specific value of the parameter of the first button test function is different from the specific value of the parameter of the second button test function, and corresponds to different states of the button respectively.

[0089] If the test case includes the test duration, the specific value of the parameter of the delay function is set to the test duration; if the test case does not include the test duration, the specific value of the parameter of the delay function is set to the preset duration. For each test function, if the function is a parameter function, a default value of the parameter can be set so that the default value is entered when the value cannot be analyzed through the test case. In this embodiment, the default value can be a preset duration. By setting the delay function, the start-up state of the heating device can be tested when the button is pressed for different times, thereby expanding the comprehensiveness of the test and testing more situations. For example, whether the heating device is not started when the button is pressed for 10 seconds.

[0090] In this embodiment, by acquiring the test function corresponding to the test function, multiple-case testing of the key can be implemented, and heating devices with unqualified keys can be eliminated.

[0091] In one embodiment, if the device to be tested is a heating element, a resistance control function is obtained, and the resistance control function is used to control the resistance of the heating element. If the test case is analyzed to find that the test case is used to test the short circuit of the heating element, the specific value of the parameter of the resistance control function is set to the short circuit value; if the test case is analyzed to find that the test case is used to test the open circuit of the heating element, the specific value of the parameter of the resistance control function is set to the open circuit value, and the short circuit value is less than the open circuit value.

[0092] Optionally, the open circuit value may be 1000, 2000, 3000, etc., and the short circuit value may be zero.

[0093] In this embodiment, by generating a test script corresponding to the heating element, a multi-condition test of the heating element is implemented, thereby ensuring the pass rate of the heating element.

[0094] In one embodiment, if the device to be tested is a sensor, a sensor temperature function is obtained, and the sensor temperature function is used to control the temperature of the sensor. If the test case is analyzed to obtain that the test case is used to test a sensor of a battery, an identification value of the sensor of the battery is obtained, and a test temperature is extracted from the test case, and the identification value and the test temperature are set as specific values ​​of parameters of the sensor temperature function.

[0095] The identification value is an identification value that can identify the device under test and is used to be passed into the test function. Optionally, the parameters of the sensor temperature function may include the identification value corresponding to the sensor identified by the device under test and the set test temperature. For example, the temperature of the circuit board, the temperature of the battery, and the temperature of the suction head.

[0096] For example, when the temperature of a battery or circuit board is too high, the state of the heating device should be a warning state, such as flashing lights, sounding alarms, etc. Therefore, the target temperature needs to be set in the test case, and whether the state of the heating device is a warning state needs to be determined.

[0097] In this embodiment, the temperature of different devices in the heating device can be controlled by utilizing the sensor temperature function, so that the heating device can be tested in parallel, that is, the state of the heating device when multiple situations occur simultaneously is tested, which can improve the accuracy of the test and further improve the safety or versatility of the heating equipment leaving the factory.

[0098] In addition to the above-mentioned devices under test, the host computer program can also generate test scripts for testing battery voltage, USB insertion and removal, charging status, etc., which are not listed here.

[0099] In an exemplary embodiment, to realize automated testing of the heating device, the heating device may be controlled by a host computer program so that the heating device executes the test content corresponding to the test case, thereby completing the testing of the heating device.

[0100] In order to enable the heating device to execute the test content corresponding to the test case, the host computer program can send the test script corresponding to the test case to the heating device. A support module can be provided in the heating device. Based on the support module, the heating device can run the test script. The heating device shipped from the factory may not be equipped with the support module. After the heating device receives the test script, the support module controls the device to be tested in the heating device based on the program logic of the test script. The device to be tested can be, for example, a heating element, a sensor, a battery, a circuit board, etc.

[0101] In order to reduce the time for testers to write test scripts and improve test efficiency, the host computer program can automatically convert test cases into test scripts, that is, after obtaining the test cases, the test cases are text-processed to obtain the identification of the device to be tested. The test case includes the identification of the device to be tested. The test case also includes the test operation of the identification of the device to be tested. When the host computer program performs text processing on the test case, the identification of the device to be tested can be extracted from the test case. Based on the identification of the device to be tested, a test script corresponding to the test case can be obtained. The test script can be composed of Lua language or lightweight languages ​​such as Python language. After that, the host computer program can send the test script to the heating device so that the heating device runs the test script and outputs the corresponding test results. After receiving the test results sent by the heating device, the host computer program can count the test results to complete the test of the heating device. Optionally, when the number of test cases is more than one, the host computer program can send multiple test scripts to the heating device, thereby realizing batch testing of the heating device.

[0102] When the host computer program analyzes the test case and obtains the corresponding test script, the test function corresponding to the device identification under test can be obtained first. Then the test case is analyzed to obtain the specific test operation, and the specific parameter values ​​of the test function are obtained based on the test operation. In order to reduce the mutual interference between test cases, a separate test environment is created for each test case. Therefore, the test script also includes a test environment script, which is a test script for encapsulating each test case. Write the test function that substitutes the specific value of the parameter in the test environment script, that is, generate the test script of the test case.

[0103] For different devices under test, the corresponding test functions are different. For example, for the start button of the heating device, the corresponding test function is used to test the button function. For example, when the button is pressed, whether the heating state of the heating device changes from heating to stopping heating, or from not starting to starting heating. Specifically, the button test function and delay function are obtained. The button test function is used to control the pressing or releasing of the button, and the delay function is used to control the pressing time of the button. When the test case is used to test the state of the heating device when the button is pressed for a long time, for example, the heating device stops heating when the button is pressed for a long time, or the heating device starts heating when the button is pressed for a long time, the upper computer program first obtains the button test function and delay function corresponding to the button. Then the test case is analyzed to determine the target test function and the specific values ​​of the parameters corresponding to the function. For example, the test case is "whether the heating device is started after the button is pressed for two seconds". After text processing of the test case, the keyword information "button", "two seconds", and "started" are obtained. It can be seen that the button needs to be pressed, held for two seconds, and released. Therefore, the first button test function set_key_val(1), the second button test function set_key_val(0), and the delay function sleep(2) are needed. Create another instance of the test environment class CTstEnv(). It is understandable that the test results need to be presented by the state of the heating device, so the test function can also include a state acquisition function getState(). Through this function, other states such as the heating element state of the heating device can be obtained, such as the current and voltage state, temperature state, etc. Write the test functions that need to be executed in this instance, and the order can be: set_key_val(1); sleep(2); set_key_val(0); getState(). In this way, the test of long pressing the key is realized.

[0104] Optionally, the test case can also be used to test the open circuit, short circuit, cold solder joint and other states of the heating element. For example, the test case can be "testing the open circuit of the heating element". After analyzing the test case, the keyword information is obtained: open circuit, heating element. Based on "heating element", the test function corresponding to the heating element is obtained. The test function corresponding to the heating element may include a resistance control function. Based on "open circuit", it is known that the specific value of the parameter of the resistance control function can be set to a preset open circuit value, such as 1000 ohms. If the test case includes a setting value of ohms, the specific value of the parameter of the resistance control function can also be set to the setting value. Similarly, it is necessary to create a test environment and obtain the state of the heating device. It is understandable that before the open circuit test is performed on the heating element, the heating device needs to be set to the start state, so the relevant test function of the button needs to be added in the test environment script. If it is short circuit, the specific value of the parameter of the resistance control function is set to a preset short circuit value, such as 0 ohms. If it is cold solder joint, the specific value of the corresponding generated parameter in the test environment script needs to be a plurality of resistance control functions with different resistance values.

[0105] Optionally, the test case can also be used to test other devices under test such as sensors, circuit boards, USB interfaces, suction ports, batteries, etc. in the heating device.

[0106] Through the above steps, a comprehensive test of the heating equipment can be achieved, and specific test values ​​can be written in the test case, so that the heating equipment can be tested accurately without consuming manpower, which can improve the test efficiency and expand the scope of the test.

[0107] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0108] In an exemplary embodiment, as shown in FIG6 , a method for testing a heating device is provided, which is described by taking the method applied to the heating device in FIG1 as an example, and includes the following steps 602 to 606. Among them:

[0109] Step 602, receiving a test script sent by the host computer program, the test script being composed of an integrated scripting language, the test script being generated based on the device identification by obtaining a test case from the host computer program and performing text processing on the test case to obtain a device identification under test;

[0110] Step 604, running the test script to obtain the test result of the test script;

[0111] Step 606, sending the test result to the host computer program so that the host computer program obtains the test result corresponding to the test case.

[0112] For the specific limitations of this embodiment, please refer to the above limitations on the testing method of the heating device used in the host computer program, which will not be repeated here.

[0113] Based on the same inventive concept, the embodiment of the present application also provides a testing device for a heating device for implementing the testing method for a heating device involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific definition in the embodiment of the testing device for one or more heating devices provided below can refer to the definition of the testing method for a heating device above, and will not be repeated here.

[0114] In an exemplary embodiment, as shown in FIG. 7 , a testing device 700 for a heating device is provided, comprising: an acquisition module 701 , a script generation module 702 , a sending module 703 and a receiving module 704 , wherein:

[0115] The acquisition module 701 is used to obtain a test case and perform text processing on the test case to obtain an identification of the device to be tested.

[0116] The script generation module 702 is used to obtain a test script corresponding to the test case based on the device identification under test, wherein the test script is composed of an integrated scripting language.

[0117] The sending module 703 is used to send the test script to the heating device, so that the heating device runs the test script and obtains the corresponding test result.

[0118] The receiving module 704 is used to receive the test result sent by the heating device to test the heating device to obtain the test result corresponding to the test case.

[0119] In one embodiment, the script generation module 702 is also used to obtain the test function corresponding to the device identifier to be tested; analyze the test case to obtain the specific parameter values ​​of the test function; obtain the test environment script, substitute the specific parameter values ​​into the test function, and write the test function into the test environment script to generate a test script.

[0120] In one embodiment, the script generation module 702 is also used to obtain a button test function and a delay function if the device to be tested is identified as a button, the button test function is used to control the pressing or releasing of the button, and the delay function is used to control the pressing duration of the button; if the test case is used to test a long press of a button, the button test function includes a first button test function and a second button test function, the first button test function is used to press the button, and the second button test function is used to release the button, then the specific value of the parameter of the first button test function is obtained as a first value, and the specific value of the parameter of the second button test function is obtained as a second value; if the test case includes a test duration, the specific value of the parameter of the delay function is set to the test duration; if the test case does not include a test duration, the specific value of the parameter of the delay function is set to a preset duration.

[0121] In one embodiment, the script generation module 702 is also used to obtain a resistance control function if the device to be tested is a heating element, and the resistance control function is used to control the resistance of the heating element; if the test case analysis shows that the test case is used to test the short circuit of the heating element, the specific value of the parameter of the resistance control function is set to the short circuit value; if the test case analysis shows that the test case is used to test the open circuit of the heating element, the specific value of the parameter of the resistance control function is set to the open circuit value, and the short circuit value is less than the open circuit value.

[0122] In one embodiment, the script generation module 702 is also used to obtain a sensor temperature function if the device to be tested is a sensor, and the sensor temperature function is used to control the temperature of the sensor; if the test case is analyzed to obtain a test case for testing the battery temperature, the identification value of the battery is obtained, and the test temperature is extracted from the test case, and the identification value and the test temperature are set as specific parameter values ​​of the sensor temperature function.

[0123] Each module in the test device of the heating device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0124] In an exemplary embodiment, an electronic device is provided, in which a host computer program runs, and its internal structure diagram can be shown in FIG8. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, an XXX method is implemented. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen may be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device may be a touch layer covered on the display screen, or a key, trackball or touch pad provided on the housing of the electronic device, or an external keyboard, touch pad or mouse, etc. The display unit of the electronic device may be used to display the test results of the test case, and the input device of the electronic device may be used to input the test case.

[0125] Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0126] In an exemplary embodiment, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0127] The host computer program obtains the test case, and performs text processing on the test case to obtain the identification of the device to be tested;

[0128] Obtaining a test script corresponding to the test case based on the device identification, wherein the test script is composed of an integrated scripting language;

[0129] Sending the test script to the heating device so that the heating device runs the test script and obtains corresponding test results;

[0130] Receive the test result sent by the heating device to obtain the test result corresponding to the test case.

[0131] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0132] The host computer program obtains the test case, and performs text processing on the test case to obtain the identification of the device to be tested;

[0133] Obtaining a test script corresponding to the test case based on the device identification, wherein the test script is composed of an integrated scripting language;

[0134] Sending the test script to the heating device so that the heating device runs the test script and obtains corresponding test results;

[0135] Receive the test result sent by the heating device to obtain the test result corresponding to the test case.

[0136] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0137] The host computer program obtains the test case, and performs text processing on the test case to obtain the identification of the device to be tested;

[0138] Obtaining a test script corresponding to the test case based on the device identification, wherein the test script is composed of an integrated scripting language;

[0139] Sending the test script to the heating device so that the heating device runs the test script and obtains corresponding test results;

[0140] Receive the test result sent by the heating device to obtain the test result corresponding to the test case.

[0141] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0142] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0143] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for testing a heating device, characterized in that: The method comprises: The host computer program obtains the test case, and performs text processing on the test case to obtain the identification of the device to be tested; Obtaining a test script corresponding to the test case based on the device identification, wherein the test script is composed of an integrated scripting language; Sending the test script to the heating device so that the heating device runs the test script and outputs a corresponding test result; The test result sent by the heating device is received to complete the test of the heating device.

2. The method according to claim 1, characterized in that The step of obtaining the test script corresponding to the test case based on the device identification includes: Obtaining a test function corresponding to the device under test identification; Analyze the test case to obtain specific values ​​of parameters of the test function; A test environment script is obtained, the specific values ​​of the parameters are substituted into the test function, and the test function is written into the test environment script to generate the test script.

3. The method according to claim 2, characterized in that The test function corresponding to the identification of the device under test includes: If the device under test identifier corresponds to a button, a button test function and a delay function are obtained, wherein the button test function is used to control the pressing or releasing of the button, and the delay function is used to control the pressing duration of the button; The analyzing the test case to obtain specific values ​​of parameters of the test function includes: If the test case is used to test the long press of the button, the button test function includes a first button test function and a second button test function, the first button test function is used to press the button, and the second button test function is used to release the button, then the specific value of the parameter of the first button test function is a first value, the specific value of the parameter of the second button test function is a second value, and the first value is different from the second value; If the test case includes the test duration, the specific value of the parameter of the delay function is set to the test duration; if the test case does not include the test duration, the specific value of the parameter of the delay function is set to the preset duration.

4. The method according to claim 2, characterized in that: The test function corresponding to the identification of the device under test includes: If the identification of the device to be tested corresponds to a heating element, a resistance control function is obtained, and the resistance control function is used to control the resistance of the heating element; The analyzing the test case to obtain specific values ​​of parameters of the test function includes: If the test case is analyzed to be used to test the short circuit of the heating element, the specific value of the parameter of the resistance control function is set to the short circuit value; if the test case is analyzed to be used to test the open circuit of the heating element, the specific value of the parameter of the resistance control function is set to the open circuit value, and the short circuit value is smaller than the open circuit value.

5. The method according to claim 2, characterized in that: The test function corresponding to the identification of the device under test includes: If the identification of the device to be tested corresponds to a sensor, a sensor temperature function is obtained, and the sensor temperature function is used to control the temperature of the sensor; The analyzing the test case to obtain specific values ​​of parameters of the test function includes: If the test case is analyzed to be used for testing the sensor temperature, an identification value of the sensor is obtained, and a test temperature is extracted from the test case. The identification value and the test temperature are set as specific values ​​of parameters of the sensor temperature function.

6. A method for testing a heating device, characterized in that: include: Receiving a test script sent by a host computer program, wherein the test script is composed of an integrated scripting language, the host computer program obtains a test case and performs text processing on the test case to obtain an identification of a device under test, and the host computer program obtains a corresponding test script based on the identification of the device under test; Run the test script to obtain the test result of the test script; The test result is sent to the host computer program so that the host computer program obtains the test result corresponding to the test case.

7. A testing device for a heating device, characterized in that: The device comprises: An acquisition module is used to obtain a test case and perform text processing on the test case to obtain an identification of the device to be tested; A script generation module, used for obtaining a test script corresponding to the test case based on the device identification under test, wherein the test script is composed of an integrated scripting language; A sending module, used for sending the test script to the heating device, so that the heating device runs the test script and obtains corresponding test results; A receiving module is used to receive the test result sent by the heating device to test the heating device to obtain the test result corresponding to the test case.

8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.