Automatic function test method and device based on peripheral simulation system, electronic equipment and storage medium

By using a peripheral simulation system in electronic equipment to simulate user information interaction operations and generate simulation data, the problem of low functional testing efficiency in the existing technology is solved, and automated testing and efficient functional testing are realized.

CN118779245AInactive Publication Date: 2024-10-15BEIJING PACTERA JINXIN TECH LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411053435.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-10-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing electronic device functional testing methods rely on manual operation, resulting in low testing efficiency, especially due to the diverse and limited number of peripheral models, resulting in low testing efficiency.

Method used

The automated functional testing method based on the peripheral simulation system is adopted, and the virtual interface is called by the peripheral simulation system to simulate user information interaction operations and generate simulation data, thereby reducing dependence on peripherals and improving testing efficiency.

Benefits of technology

It realizes automated functional testing, reduces dependence on peripherals, improves testing efficiency, and can quickly obtain test response information and functional test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779245A_ABST
    Figure CN118779245A_ABST
Patent Text Reader

Abstract

The invention provides an automatic function test method and device based on a peripheral simulation system, electronic equipment and a storage medium, and the method comprises the steps: obtaining test response information under the condition that a target test case is executed, the test response information is determined according to peripheral return information, the peripheral return information is obtained by calling a virtual interface through a peripheral simulation system to simulate information interaction operation of a user using a peripheral and generating simulation data; and obtaining a function test result according to the test response information. The method can reduce the dependence of function testing on peripherals and improve the testing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automatic testing technology, and in particular to an automatic function testing method, device, electronic equipment and storage medium based on a peripheral simulation system. Background Art

[0002] The functional testing method of existing electronic devices is mainly manually dominated. When the tester operates in the electronic device according to a test case, the electronic device will respond and pop up certain business windows. At this time, the tester needs to perform information interaction operations with the help of peripherals according to the text prompts in the business window, such as inserting and reading cards, typing data, entering fingerprints, etc. Only after completing all information interaction operations can the functional test results be obtained.

[0003] The existing testing methods are highly dependent on peripherals, and the efficiency of functional testing is low due to the variety and limited number of peripheral models. Summary of the invention

[0004] The present invention provides an automated functional testing method, device, electronic device and storage medium based on a peripheral simulation system, which are used to solve the defect of low test efficiency of functional testing in the prior art. Test response information is obtained through peripheral return information. The peripheral return information is obtained by the peripheral simulation system calling a virtual interface to simulate the information interaction operation of a user using a peripheral and generating simulation data. This can reduce the dependence of the functional test on the peripheral and improve the test efficiency.

[0005] The present invention provides an automated function testing method based on a peripheral simulation system, which is applied to electronic equipment and comprises the following steps: When executing the target test case, obtaining test response information, wherein the test response information is determined according to the peripheral return information, wherein the peripheral return information is obtained by simulating the information interaction operation of the user using the peripheral by the peripheral simulation system calling the virtual interface and generating simulation data; A functional test result is obtained according to the test response information.

[0006] According to an automated functional testing method based on a peripheral simulation system provided by the present invention, the obtaining of test response information includes: Sending the peripheral request information in the target test case to the peripheral simulation system, wherein the peripheral request information is used to indicate the information interaction operation; Receiving peripheral return information, wherein the peripheral return information is information generated by the peripheral simulation system simulating the information interaction operation according to the peripheral request information; The test response information is obtained according to the information returned by the peripheral device.

[0007] According to an automated functional testing method based on a peripheral simulation system provided by the present invention, obtaining the test response information according to the peripheral return information includes: Sending the peripheral device return information to the background system of the electronic device; The test response information is received, where the test response information is response information generated by the background system according to the information returned by the peripheral device.

[0008] According to an automated functional testing method based on a peripheral simulation system provided by the present invention, in the case of executing the target test case, before obtaining the test response information, the method further includes: Receive and execute the target test case, wherein the target test case is generated by a target test platform and sent to the electronic device in the form of a message, wherein the target test case is generated by the target test platform based on a preset test case and target test parameters sent by the electronic device, wherein the target test parameters include at least one of device identification information and test process information corresponding to the electronic device.

[0009] According to an automated functional testing method based on a peripheral simulation system provided by the present invention, the target test case includes a plurality of initial test cases, the target test case is a test case obtained by the target test platform after the plurality of initial test cases are numbered and serially arranged, and the execution of the target test case includes: In response to the target test platform sequentially traversing each initial test case in the target test case, each initial test case in the multiple initial test cases is executed sequentially.

[0010] According to an automated functional testing method based on a peripheral simulation system provided by the present invention, obtaining a functional test result according to the test response information includes: Sending the test response information to the target test platform so that the target test platform compares the test response information with a preset test result to obtain a target defect result, wherein the target defect result is obtained by analyzing the abnormal result obtained by the comparison; Receiving a target defect result sent by the target test platform; The functional test result is determined according to the target defect result.

[0011] The present invention also provides an automated functional testing device based on a peripheral simulation system, comprising the following modules: An information acquisition module is used to acquire test response information when executing a target test case, wherein the test response information is determined according to the peripheral return information, wherein the peripheral return information is obtained by simulating the information interaction operation of a user using the peripheral by calling a virtual interface through a peripheral simulation system and generating simulation data; The result acquisition module is used to obtain the function test result according to the test response information.

[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the processor implements any of the above-described automated functional testing methods based on a peripheral simulation system.

[0013] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the automatic functional testing method based on the peripheral simulation system as described in any one of the above is implemented.

[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned automated functional testing methods based on the peripheral simulation system.

[0015] The automated functional testing method, device, electronic device and storage medium based on the peripheral simulation system provided by the present invention obtain test response information through peripheral return information. The peripheral return information is obtained by the peripheral simulation system calling a virtual interface to simulate the information interaction operation of the user using the peripheral and generating simulation data. This can reduce the dependence of the functional test on the peripheral and improve the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 This is one of the flow charts of the automated functional testing method based on the peripheral simulation system provided by the present invention.

[0018] Figure 2 It is a flowchart of the method for obtaining test response information provided by the present invention.

[0019] Figure 3 It is a flow chart of the method for obtaining test response information provided by the present invention.

[0020] Figure 4 This is the second flow chart of the automated functional testing method based on the peripheral simulation system provided by the present invention.

[0021] Figure 5 The present invention provides an overall flow chart of an automated functional testing method based on a peripheral simulation system according to an embodiment of the present invention.

[0022] Figure 6 A schematic diagram of the structure of an automated functional testing device based on a peripheral simulation system provided in an embodiment of the present invention.

[0023] Figure 7 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] The existing electronic equipment's automated functional testing method based on the peripheral simulation system is mainly manually led. Testers manage test cases through the Notes system / documents. The test cases here refer to the test methods and step processes in the electronic equipment. When the testers operate in the electronic equipment according to a certain test case, the electronic equipment will respond and pop up certain business windows. At this time, the testers need to use the peripherals to perform information interaction operations according to the text reminders in the business window, such as inserting and reading cards, typing data, fingerprint entry, etc. After completing all information interaction operations, the electronic equipment obtains the response results according to the information of the information interaction operations. Finally, the testers test the relevant functions of the electronic equipment according to the response results of the electronic equipment and analyze the defects of the abnormal response results.

[0026] The existing testing methods are highly dependent on peripherals. Since peripheral models are diverse and limited in number, the efficiency of functional testing is seriously affected, resulting in low testing efficiency of functional testing.

[0027] In view of this, an embodiment of the present invention provides an automated functional testing method based on a peripheral simulation system, by obtaining test response information when executing a target test case, the test response information is determined according to the peripheral return information, the peripheral return information is obtained by the peripheral simulation system calling a virtual interface to simulate the user's information interaction operation using the peripheral, and generating simulation data; according to the test response information, a functional test result is obtained. This method can reduce the dependence of functional testing on peripherals and improve test efficiency.

[0028] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0029] Figure 1 This is one of the flow charts of the automated functional testing method based on the peripheral simulation system provided by the present invention. The automated functional testing method based on the peripheral simulation system can be applied to electronic devices, which can be various types of devices with information processing capabilities during implementation. For example, the electronic device can include a personal computer, a laptop, a PDA or a server, etc.; the electronic device can also be a mobile terminal, for example, the mobile terminal can include a mobile phone, a car computer, a tablet computer or a projector, etc. Figure 1 As shown, the method may include the following steps 101 to 102: Step 101: When executing a target test case, obtain test response information, wherein the test response information is determined based on peripheral return information, wherein the peripheral return information is obtained by the peripheral simulation system calling a virtual interface to simulate a user's information interaction operation using a peripheral and generating simulation data.

[0030] It should be noted that, when executing a target test case, it is necessary to obtain test response information corresponding to the target test case. The test response information is determined based on the peripheral return information, and the peripheral return information is obtained through a peripheral simulation system. The peripheral simulation system calls a virtual interface to simulate a user using a peripheral to perform information interaction operations to obtain the peripheral return information, and the electronic device can obtain the peripheral return information generated by the peripheral simulation system.

[0031] It should be noted that the peripheral simulation system can be implemented by the principle of mock technology. Mock technology can call a virtual interface and simulate the data returned by the interface. Therefore, when the external dependency is a hardware device, the principle of mock technology can help complete the functional test. Mock technology is generally used to interact with external devices multiple times in different scenarios. In the process of software testing, for some objects that are not easy to construct and obtain, a virtual mock object is used to replace it to achieve the same effect.

[0032] It is understandable that the application of peripheral simulation technology in the functional testing of electronic equipment can reduce the dependence of functional testing on peripherals and improve the efficiency of functional testing by simulating multiple peripherals through the peripheral simulation system for testing.

[0033] Exemplarily, the peripheral device simulation system can simulate information interaction operations such as card insertion and reading, data input, fingerprint entry, etc., and obtain peripheral device return information corresponding to the information interaction operation.

[0034] Step 102: Obtain a functional test result according to the test response information.

[0035] It should be noted that there are many methods for obtaining test response information and obtaining functional test results based on the test response information. For example, the test response information can be sent to a test platform for analysis, or the test response information can be analyzed through a local test program. The present invention does not limit the method for obtaining functional test results based on the test response information.

[0036] The automated function testing method based on the peripheral simulation system provided by the present invention adopts the peripheral simulation technology to simulate multiple peripherals in the peripheral simulation system, thereby reducing the dependence of the function test on the peripherals and improving the function test efficiency.

[0037] In some embodiments, the electronic device can obtain the peripheral return information by interacting with the peripheral simulation system.

[0038] Figure 2 FIG. 1 is a flow chart of the method for obtaining test response information provided by the present invention. Figure 2 As shown, the obtaining of test response information may include: Step 201: Send the peripheral request information in the target test case to the peripheral simulation system, wherein the peripheral request information is used to indicate the information interaction operation.

[0039] It should be noted that the target test case includes request information for the electronic device, the request information includes peripheral request information, and the peripheral request information is used to indicate the information interaction operation. The electronic device sends the peripheral request information to the peripheral simulation system so that the peripheral simulation system generates response information corresponding to the information interaction operation according to the peripheral request information.

[0040] Exemplarily, the electronic device may automatically interact with the peripheral simulation system and send the generated request message to the peripheral simulation system.

[0041] Step 202: receiving peripheral return information, wherein the peripheral return information is information generated by the peripheral simulation system simulating the information interaction operation according to the peripheral request information; It should be noted that the peripheral simulation system can automatically simulate card insertion and reading, data input, fingerprint entry and other behaviors according to the peripheral request information sent by the electronic device, and return the data generated by the behavior to the electronic device.

[0042] Step 203: Obtain the test response information according to the information returned by the peripheral device.

[0043] It should be noted that after the electronic device obtains the information returned by the peripheral device, there are many ways to obtain the test response information based on the information returned by the peripheral device. For example, the test response information can be obtained by processing the information returned by the peripheral device through a background system, or the test response information can be obtained by processing the information returned by the peripheral device through a preset program, etc. The present invention does not limit the method of obtaining the test response information based on the information returned by the peripheral device.

[0044] In some embodiments, the test response information obtained according to the information returned by the peripheral device may be obtained by processing through a background system of the electronic device.

[0045] Figure 3 FIG. 1 is a flow chart of a method for obtaining test response information provided by the present invention. Figure 3 As shown, obtaining the test response information according to the information returned by the peripheral device may include: Step 301: Send the peripheral device return information to the background system of the electronic device.

[0046] It should be noted that, after obtaining the information returned by the peripheral device, the electronic device can generate a request message according to the information returned by the peripheral device and send the request message to the background system for data interaction.

[0047] Exemplarily, after receiving the return information from the peripheral device, the electronic device may generate a group of messages, wherein the messages contain the relevant information entered in the above interactive operation, and the electronic device may automatically send the messages to the background system.

[0048] Step 302: Receive the test response information, where the test response information is response information generated by the background system according to the information returned by the peripheral device.

[0049] Exemplarily, after completing all information interaction operations, the electronic device interacts with the background system for data. The process may include: the electronic device sends a message request to the background system, the message contains relevant information entered by the above-mentioned personnel interaction operations, the background system processes the message, and returns a response result to the electronic device.

[0050] It is understandable that by processing the message containing the return information of the peripheral device through the background system of the electronic device, the functional test can be carried out conveniently and quickly, thereby improving the test efficiency of the functional test.

[0051] In some embodiments, the target test case may be acquired through a target test platform.

[0052] Figure 4 FIG. 2 is a flow chart of the automated functional testing method based on the peripheral simulation system provided by the present invention. Figure 4 As shown, the automated functional testing method based on the peripheral simulation system may include: Step 401: Receive and execute the target test case, which is generated by a target test platform and sent to the electronic device in the form of a message. The target test case is generated by the target test platform based on a preset test case and target test parameters sent by the electronic device, and the target test parameters include at least one of device identification information and test process information corresponding to the electronic device.

[0053] It should be noted that the target test case executed by the electronic device may be obtained through a target test platform, and the target test platform may be an automated test platform. The automated test platform may preset automated test cases.

[0054] Exemplarily, the automated testing platform can receive test parameters, such as device identification information of the target electronic device performing the test, such as the Internet Protocol address IP, and / or test process information such as execution action code, etc., and then the automated testing platform can generate a request message in the platform according to the received test parameters, and finally form an automated test case in combination with other information of the test case.

[0055] Exemplarily, when the automated testing platform triggers an instruction to execute a test case, it can request an electronic device (such as a tablet computer, a visual smart counter, etc.) through the network and send a request message related to the test case to the electronic device so that the electronic device executes the automated testing case.

[0056] Step 402: When executing the target test case, obtain test response information, which is determined based on the peripheral return information. The peripheral return information is obtained by the peripheral simulation system calling a virtual interface to simulate the user's information interaction operation using the peripheral and generating simulation data.

[0057] It should be noted that the description of step 402 may refer to the description of step 101 in the aforementioned embodiment, and will not be repeated here.

[0058] Step 403: Obtain a functional test result according to the test response information.

[0059] It should be noted that the description of step 403 may refer to the description of step 102 in the aforementioned embodiment, and will not be repeated here.

[0060] It is understandable that in the functional testing of electronic devices, automated test platform management is applied to process test cases in a message-based manner. When executing the target test case, the electronic device is automatically requested through the network, and the corresponding test operations are performed according to the message information. There is no need for manual requests on the electronic device, which improves the efficiency of functional testing.

[0061] In some embodiments, obtaining the functional test result based on the test response information may include: sending the test response information to the target test platform so that the target test platform compares the test response information with a preset test result to obtain a target defect result, wherein the target defect result is obtained by analyzing the abnormal result obtained by the comparison; receiving the target defect result sent by the target test platform; and determining the functional test result based on the target defect result.

[0062] Exemplarily, after the execution of the automation case is completed, the test results can be returned to the automation testing platform, and the platform analyzes the defects of the abnormal results based on the returned results.

[0063] It is understandable that the efficiency of functional testing can be improved by analyzing test results using a target test platform.

[0064] In some embodiments, the target test case includes multiple initial test cases, and the target test case is a test case obtained by the target test platform after numbering the multiple initial test cases and arranging them in series. The execution of the target test case may include: in response to the target test platform traversing each initial test case in the target test case in turn, executing each initial test case in the multiple initial test cases in turn.

[0065] It should be noted that when there are multiple test cases in the target test platform, the target test platform can automatically number the multiple automated test cases and arrange them in series. When a trigger test instruction is received, all the arranged cases can be automatically traversed and executed in sequence, and the electronic device executes each of the multiple initial test cases in turn.

[0066] It is understandable that in the prior art, test cases can often only be executed manually individually, and serial execution is difficult, resulting in low test efficiency. The present invention performs functional testing through an automated test platform, and performs multiple test cases in an automated serial execution manner, which does not require manual settings and improves the efficiency of functional testing.

[0067] The following describes an exemplary application of an embodiment of the present invention in a practical application scenario.

[0068] Figure 5 The overall flow chart of the automated functional testing method based on the peripheral simulation system provided by the embodiment of the present invention is as follows. Figure 5 As shown, the method includes the following steps 501 to 506: Step 501: The automated testing platform presets automated testing cases.

[0069] The automated test platform receives test parameters, such as the IP address of the target electronic device, the execution action code, etc., and then the platform can generate a request message in the platform according to the received test parameters, and finally form an automated test case in combination with other information of the test case. When there are multiple test cases in the platform, the platform can automatically number multiple automated test cases and arrange them in series. When a trigger instruction is received, it can automatically traverse and execute all arranged cases in sequence.

[0070] Step 502: Execute the automated test case.

[0071] When the automated testing platform triggers the execution of a test case instruction, it can request an electronic device (such as a tablet computer, a visual smart counter, etc.) through the network and send a request message related to the test case to the electronic device.

[0072] Step 503: The electronic device responds to the automated test case.

[0073] Among them, the electronic device will respond according to the message information in the case and pop up certain business windows.

[0074] Step 504: The electronic device interacts with the peripheral simulation system to generate a request message.

[0075] Among them, when the business window pops up in step 503, the electronic device will automatically interact with the peripheral simulation system. The peripheral simulation system will automatically simulate card insertion and reading, data typing, fingerprint entry and other behaviors according to the request of the electronic device, and return the data generated by the behavior to the electronic device.

[0076] It should be noted that peripheral simulation can be achieved by the Mock technology principle. Mock technology can call a virtual interface and simulate the data returned by the interface. Therefore, when the external dependency is hardware, the Mock technology principle can help complete functional testing, which is generally used for multiple external interactions in different scenarios. In the software testing process, for some objects that are not easy to construct and obtain, a virtual Mock object is used to replace it to achieve the same effect.

[0077] Step 505: The electronic device sends a request message to the background system for data interaction.

[0078] After completing step 504, the electronic device will generate a group of messages containing the relevant information of the above interactive operation input. The electronic device will automatically send the message to the background system, and the background system will return a response result to the electronic device after processing the message.

[0079] Step 506: After the automated case is executed, the test results are returned to the automated testing platform, and the platform analyzes the defects of the abnormal results based on the returned results.

[0080] It should be noted that the present invention, by platformizing the automated testing technology and peripheral simulation technology, breaks away from hardware limitations, solves the problem of relatively insufficient equipment capabilities and peripherals, and solves the problem that special data cannot be quickly simulated due to the lack of special testing media. It also greatly reduces manual operations, reduces the dependence of functional testing on peripherals, and improves the efficiency of functional testing.

[0081] In addition, the present invention applies platform management and scripts the test cases. When executing the test script, it will automatically request the electronic device through the network without the need for manual operation on the electronic device to make the request. Multiple test cases can be automatically executed in series to improve the efficiency of functional testing.

[0082] The innovative points of the technical solution provided by the present invention include: 1. Applying platform management in the testing of electronic devices, reporting and processing test cases, and automatically requesting electronic devices through the network when executing test cases, and performing corresponding simulation operations according to the message information, without the need for manual operation on the electronic device, and multiple test cases can be automatically executed in series to improve the efficiency of functional testing. 2. Applying peripheral simulation technology in the testing of electronic devices, simulating multiple peripherals in the peripheral simulation system, reducing the dependence of functional testing on peripherals, and improving the efficiency of functional testing.

[0083] Based on the foregoing embodiments, an embodiment of the present invention provides an automated functional testing device based on a peripheral simulation system. The modules included in the device and the units included in each module can be implemented by a processor; of course, they can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0084] The following is a description of the automated functional testing device based on the peripheral simulation system provided by the present invention. The automated functional testing device based on the peripheral simulation system described below and the automated functional testing method based on the peripheral simulation system described above can be referenced to each other.

[0085] Figure 6 The structure diagram of the automatic function test device based on the peripheral simulation system provided by the embodiment of the present invention is as follows. Figure 6 As shown, the device 600 includes an information acquisition module 601 and a result acquisition module 602, wherein: The information acquisition module 601 is used to acquire test response information when executing the target test case, wherein the test response information is determined according to the peripheral return information, and the peripheral return information is obtained by simulating the information interaction operation of the user using the peripheral by the peripheral simulation system calling the virtual interface and generating simulation data; The result acquisition module 602 is used to obtain the function test result according to the test response information.

[0086] In some embodiments, the information acquisition module 601 includes an information sending unit, an information receiving unit and an information processing unit, wherein:

[0087] The information sending unit is used to send the peripheral request information in the target test case to the peripheral simulation system, wherein the peripheral request information is used to indicate the information interaction operation; The information receiving unit is used to receive the peripheral return information, where the peripheral return information is the information generated by the peripheral simulation system simulating the information interaction operation according to the peripheral request information; The information processing unit is used to obtain the test response information according to the information returned by the peripheral device.

[0088] In some embodiments, the information processing unit is specifically used to: send the peripheral return information to the background system of the electronic device; receive the test response information, where the test response information is response information generated by the background system according to the peripheral return information.

[0089] In some embodiments, the device also includes a case execution module, which is used to receive and execute the target test case, and the target test case is generated by a target test platform and sent to the electronic device in the form of a message. The target test case is generated by the target test platform based on a preset test case and a target test parameter sent by the electronic device, and the target test parameters include at least one of device identification information and test process information corresponding to the electronic device.

[0090] In some embodiments, the target test case includes multiple initial test cases, and the target test case is a test case obtained by the target test platform after numbering the multiple initial test cases and arranging them in series. The case execution module is specifically used to: in response to the target test platform traversing each initial test case in the target test case in turn, execute each initial test case in the multiple initial test cases in turn.

[0091] In some embodiments, the result acquisition module is specifically used to: send the test response information to the target test platform so that the target test platform compares the test response information with the preset test results to obtain a target defect result, wherein the target defect result is obtained by analyzing the abnormal result obtained by the comparison; receive the target defect result sent by the target test platform; and determine the functional test result based on the target defect result.

[0092] In the embodiments of the present invention, the dependence of functional testing on peripherals can be reduced, thereby improving testing efficiency.

[0093] Figure 7 is a schematic diagram of the physical structure of the electronic device provided by the present invention, such as Figure 7 As shown, the electronic device may include: a processor (processor) 701, a communication interface (Communications Interface) 702, a memory (memory) 703 and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704. The processor 701 may call the logic instructions in the memory 703 to execute an automated functional testing method based on a peripheral simulation system, the method comprising: obtaining test response information when executing a target test case, the test response information being determined according to the peripheral return information, the peripheral return information being obtained by the peripheral simulation system calling a virtual interface to simulate the user's information interaction operation using the peripheral, and generating simulation data; and obtaining a functional test result according to the test response information.

[0094] In addition, the logic instructions in the above-mentioned memory 703 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk.

[0095] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the automated functional testing method based on the peripheral simulation system provided by the above-mentioned methods, and the method includes: when executing a target test case, obtaining test response information, the test response information is determined based on the peripheral return information, and the peripheral return information is obtained by the peripheral simulation system calling a virtual interface to simulate the user's information interaction operation using the peripheral and generating simulation data; according to the test response information, obtaining the functional test result.

[0096] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0097] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the automated functional testing method based on the peripheral simulation system provided by the above-mentioned methods. The method includes: when executing a target test case, obtaining test response information, the test response information is determined based on the peripheral return information, and the peripheral return information is obtained by the peripheral simulation system calling a virtual interface to simulate the user's information interaction operation using the peripheral and generating simulation data; according to the test response information, obtaining the functional test result.

[0098] The above-mentioned computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0099] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0100] The program code embodied on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0101] Computer program code for performing the operations of the present specification may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0102] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0103] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An automated functional testing method based on a peripheral simulation system, characterized in that: Used in electronic equipment, including: When executing the target test case, obtaining test response information, wherein the test response information is determined according to the peripheral return information, wherein the peripheral return information is obtained by simulating the information interaction operation of the user using the peripheral by the peripheral simulation system calling the virtual interface and generating simulation data; A functional test result is obtained according to the test response information.

2. The automated functional testing method based on the peripheral simulation system according to claim 1, characterized in that: The obtaining of test response information includes: Sending the peripheral request information in the target test case to the peripheral simulation system, wherein the peripheral request information is used to indicate the information interaction operation; Receiving peripheral return information, wherein the peripheral return information is information generated by the peripheral simulation system calling the virtual interface to simulate the information interaction operation according to the peripheral request information; The test response information is obtained according to the information returned by the peripheral device.

3. The automated functional testing method based on the peripheral simulation system according to claim 2, characterized in that: The step of obtaining the test response information according to the information returned by the peripheral device includes: Sending the peripheral device return information to the background system of the electronic device; The test response information is received, where the test response information is response information generated by the background system according to the information returned by the peripheral device.

4. The automated functional testing method based on the peripheral simulation system according to claim 1, characterized in that: In the case of executing the target test case, before obtaining the test response information, the method further includes: Receive and execute the target test case, wherein the target test case is generated by a target test platform and sent to the electronic device in the form of a message, wherein the target test case is generated by the target test platform based on a preset test case and target test parameters sent by the electronic device, wherein the target test parameters include at least one of device identification information and test process information corresponding to the electronic device.

5. The automated functional testing method based on the peripheral simulation system according to claim 4, characterized in that: The target test case includes a plurality of initial test cases, and the target test case is a test case obtained by the target test platform by serially arranging the plurality of initial test cases after numbering them. The executing the target test case includes: In response to the target test platform sequentially traversing each initial test case in the target test case, each initial test case in the multiple initial test cases is executed sequentially.

6. The automated functional testing method based on the peripheral simulation system according to claim 4, wherein obtaining the functional testing result according to the test response information comprises: Sending the test response information to the target test platform so that the target test platform compares the test response information with a preset test result to obtain a target defect result, wherein the target defect result is obtained by analyzing the abnormal result obtained by the comparison; Receiving a target defect result sent by the target test platform; The functional test result is determined according to the target defect result.

7. An automated functional testing device based on a peripheral simulation system, characterized in that: Used in electronic equipment, including: An information acquisition module is used to acquire test response information when executing a target test case, wherein the test response information is determined according to the peripheral return information, wherein the peripheral return information is obtained by simulating the information interaction operation of a user using the peripheral by calling a virtual interface through a peripheral simulation system and generating simulation data; The result acquisition module is used to obtain the function test result according to the test response information.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the automated functional testing method based on the peripheral simulation system as claimed in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the automated functional testing method based on a peripheral simulation system as claimed in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the automated functional testing method based on a peripheral simulation system as claimed in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Equipment function test method and device and readable storage medium

    CN108228407A

  • Application full-link automatic testing method and device, electronic equipment and storage medium

    CN113535538A

  • Program testing method and device and readable storage medium

    CN115237807A

  • Internet of vehicles simulation test method and device, electronic equipment and storage medium

    CN116300833A

  • Automatic testing method and apparatus, storage medium and electronic device

    WO2019144680A1