Full-automatic end-to-end touch screen testing method and device, electronic equipment and storage medium
By combining touch event recording and playback and screen snapshot methods in Linux systems, the end-to-end fully automated testing of the touch screen is realized, solving the problem that fully automated testing and standardized customized testing cannot be achieved in the existing technology, and improving testing efficiency and accuracy.
Patent Information
- Application Number
- CN202311169584.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-12
- Publication Date
- 2025-03-14
AI Technical Summary
In Linux systems, touch screen application products cannot achieve end-to-end fully automated testing of touch operations and screen display, and touch screen testing cannot be standardized and customized.
By sending a series of touch operation information to the test touch screen and receiving screenshots of its response, these screenshots are compared with pre-stored screenshots, and if the same is marked as qualified. This method combines touch event recording and playback with screenshots to achieve end-to-end automated testing.
It realizes end-to-end fully automated testing of touch screens in Linux systems, reduces human participation, improves testing efficiency, supports standardized and customized testing, and avoids the impact of human intervention and subjective factors on test coverage and accuracy.
Smart Images

Figure CN119619690A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of touch control, and in particular to a fully automatic end-to-end touch screen testing method, device, electronic equipment and storage medium. Background Art
[0002] In Linux systems, end-to-end fully automated testing of touch screen application products as well as standardized and customized touch screen testing has always been a challenging problem. The widespread application of touch screen technology makes testing its performance and reliability essential, however, due to the complexity and diversity of Linux systems, these tests face some difficulties.
[0003] First of all, end-to-end fully automated testing of touch screen application products is a complex task. In Linux systems, touch screen testing requires the collaboration of hardware and software. On the hardware side, it is necessary to ensure the physical connection of the touch screen and the normal operation of the sensor. On the software side, it is necessary to write test scripts and develop automated test tools to simulate user touch operations and verify the correctness of the screen display. However, due to the diversity of Linux systems, different hardware and drivers may have compatibility issues, which increases the complexity of testing.
[0004] Secondly, the standardization and customization of touch screen testing in Linux systems is also a challenge. Standardized testing methods can ensure the consistency and repeatability of testing, thereby improving test efficiency and accuracy. However, in Linux systems, due to the existence of different hardware and drivers, it is difficult to formulate unified testing standards for all devices. In addition, different application scenarios and requirements may require customized testing solutions to meet specific functional and performance requirements. Therefore, how to achieve standardization and customization of touch screen testing in Linux systems has become a problem that needs to be solved. Summary of the invention
[0005] The purpose of the present invention is to provide a fully automatic end-to-end touch screen testing method, device, electronic device and storage medium to solve the problems in the prior art that touch screen application products in Linux systems cannot achieve end-to-end fully automatic testing of touch operation and screen display, and touch screen testing in Linux systems cannot be standardized and customized.
[0006] To achieve one of the above-mentioned purposes of the invention, an embodiment of the present invention provides a fully automatic end-to-end touch screen testing method, the method comprising:
[0007] Sending a series of touch operation information to the test touch screen, and receiving a series of screen snapshots of the test touch screen in response to the touch operation information in sequence;
[0008] comparing the screenshot with pre-stored screenshots corresponding to the same series of touch operation information,
[0009] If all the screenshots and the pre-stored screenshots are identical, the current tested touch screen is marked as qualified.
[0010] As a further improvement of an embodiment of the present invention, the method further includes: the “series of touch operation information” includes at least one set of touch operation information, and the touch operation information includes touch point coordinate information and touch gesture information;
[0011] The “sending a series of touch operation information to the test touch screen” includes:
[0012] Sending a set of the series of touch operation information to the test touch screen each time according to the test sequence, and obtaining a screen display result of the test touch screen;
[0013] When a set of touch operation information tests is completed, it is necessary to determine whether to proceed to the next set of tests.
[0014] If yes, continue to send the next set of touch operation information for testing;
[0015] If not, the display result of the test touch screen is evaluated.
[0016] As a further improvement of an embodiment of the present invention, the method further includes: the “receiving a series of screen snapshots of the test touch screen in response to the touch operation information in sequence” includes:
[0017] The display result of the test touch screen is parsed, and the frame buffer data of each group of the touch operation target time is converted into a picture format according to the display screen parameters of the test touch screen, and saved as a screen snapshot.
[0018] As a further improvement of an embodiment of the present invention, the method further includes: the pre-stored screenshot includes:
[0019] Before performing the touch test on the test touch screen, the same series of touch operation information is input to a touch screen of the same model as the test touch screen, and a display result is obtained and saved as the pre-stored screen snapshot.
[0020] As a further improvement of an embodiment of the present invention, the method further includes: archiving and arranging corresponding touch operation information and screen snapshot files for use in multiple test operations.
[0021] As a further improvement of an embodiment of the present invention, the method further includes: comparing the screenshot with the pre-stored screenshot by a hash algorithm, including:
[0022] Compare the hash feature values of the screenshot and the pre-stored screenshot to determine whether the screen display result is qualified.
[0023] As a further improvement of an embodiment of the present invention, the method further includes: the “determining whether the screen display result is qualified” includes:
[0024] When the characteristic values are the same, it means that the snapshots are the same, the screen display results are the same, and the touch test of this group is qualified;
[0025] When the characteristic values are different, it means that the snapshots are different, the screen display results are different, and the touch test group fails;
[0026] Only when all touch tests pass, the currently tested touch screen is marked as passed.
[0027] To achieve one of the above-mentioned purposes, an embodiment of the present invention provides a fully automatic end-to-end touch screen testing device, including a testing module and a comparison module.
[0028] The test module is used to send a series of touch operation information to the test touch screen, and receive a series of screen snapshots of the test touch screen in response to the touch operation information in sequence;
[0029] The comparison module is used to compare the screen snapshot with pre-stored screen snapshots corresponding to the same series of touch operation information, and if all the screen snapshots and pre-stored screen snapshots are the same, the current tested touch screen is marked as qualified.
[0030] To achieve one of the above-mentioned purposes of the invention, an embodiment of the present invention provides an electronic device, including a memory and a processor, characterized in that the memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps in the above-mentioned fully automatic end-to-end touch screen testing method are implemented.
[0031] To achieve one of the above-mentioned objects of the invention, an embodiment of the present invention provides a storage medium, wherein the storage medium stores a computer program, characterized in that when the computer program is executed by a processor, the steps in the above-mentioned fully automatic end-to-end touch screen testing method are implemented.
[0032] Compared with the prior art, the fully automatic end-to-end touch screen test method, device, electronic device and storage medium provided by the present invention are all realized by software by utilizing the software characteristics of the native Linux system, without the need for other software and hardware tools, and are convenient for controlling and calibrating the accuracy of the test. The present invention combines touch event recording and playback with screen snapshots to achieve end-to-end automated testing of touch operations and screen displays, reduces human participation, improves test efficiency, and the granularity of recording touch events and screen snapshots can be controlled, supports recording and playback of single events and sequence events, and achieves standardization of touch screen testing through one recording and snapshot, multiple playbacks and comparisons, supports large-scale testing, and avoids the influence of human intervention and subjective factors on test coverage and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is an overall flow chart of a fully automatic end-to-end touch screen testing method in one embodiment of the present invention.
[0034] Figure 2 It is a specific flow chart of a fully automatic end-to-end touch screen testing method in one embodiment of the present invention.
[0035] Figure 3 It is a structural schematic diagram of a fully automatic end-to-end touch screen testing device in one embodiment of the present invention. DETAILED DESCRIPTION
[0036] The present invention will be described in detail below in conjunction with the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional changes made by a person skilled in the art based on these embodiments are all within the scope of protection of the present invention.
[0037] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0038] In a Linux system equipped with a touch screen, it generally has features such as a frame buffer mechanism, an input event mechanism, and an input event device. In the Linux runtime system, it should be ensured that there are device files / dev / fbN corresponding to the display screen and device files / dev / input / eventN corresponding to the touch screen. Frame buffer is a concept in computer graphics. It is a memory area used to store and manage image data. In the graphics rendering process, the frame buffer is used to store the color value and other related information of each pixel so that the image can be finally presented on the display device. The frame buffer is usually composed of a two-dimensional array, and each array element corresponds to a pixel on the screen. The color value of each pixel can be represented in different ways, such as RGB (red, green, and blue) or RGBA (red, green, and blue transparency). In addition to color information, the frame buffer can also store other pixel-related data, such as depth value (used to implement depth testing and occlusion culling) and template value (used to implement template testing). In the present invention, the frame buffer mechanism is used for snapshot capture.
[0039] In the first embodiment of the present invention, the present invention provides a fully automatic end-to-end touch screen testing method, such as Figure 1 and 2 As shown, the method includes,
[0040] S1: sending a series of touch operation information to a test touch screen, and receiving a series of screen snapshots of the test touch screen in response to the touch operation information in sequence;
[0041] S2: comparing the screenshot with pre-stored screenshots corresponding to the same series of touch operation information,
[0042] If all the screenshots and the pre-stored screenshots are identical, the current tested touch screen is marked as qualified.
[0043] In a specific embodiment of the present invention, a series of touch operation information is sent to the test touch screen, specifically,
[0044] In Linux system, the data file containing touch operation information is opened and read by using inherent software tools. This data file contains a series of touch operation information arranged in chronological order.
[0045] The touch operation information involved in the present invention includes but is not limited to touch point coordinate information and touch gesture information. The touch operation information involved in the present invention also includes testing the accuracy of the touch screen, that is, the difference between the touch point and the actual touch position, and testing the accuracy of the touch screen by constructing coordinates, drawing straight lines, circles or other shapes; testing whether the touch screen can recognize and process specific gestures, such as double-clicking, long pressing, two-finger zooming, etc., and testing the gesture recognition function by performing various gesture operations; testing the response time of the touch screen, that is, the time required from the user touching the screen to the screen responding to the touch event, and testing the response time by fast clicking, sliding or gesture operation; testing whether the touch screen supports multi-touch, that is, simultaneously recognizing and processing multiple touch points, and testing the multi-touch function by simultaneously touching, zooming or rotating gestures; testing the smoothness and response speed of the touch screen during sliding operations, and testing the sliding smoothness by fast sliding, inertial scrolling or long page scrolling; testing whether the touch screen supports pressure sensing, that is, being able to recognize touches of different pressure levels, and testing the pressure sensing function by drawing thicker or thinner lines; testing the performance of the touch screen under external interference (such as water drops, palms, etc.), and testing the anti-interference performance by simulating external interference and observing the reaction of the touch screen.
[0046] The test touch screen is tested by using the playback software that comes with the system. During the playback process, the playback software reads the touch operation information one by one and writes each touch operation information into the input device file corresponding to the test screen. The playback software will play back the events in the time sequence of the data file to ensure that the events are simulated in the correct time sequence. The playback software will parse each touch operation information in the data file and simulate the occurrence of the corresponding touch operation on the test screen according to the type, location and other information of the event, so as to achieve accurate playback and simulation of the touch operation.
[0047] Preferably, when the playback of a touch operation information is completed, the system automatically determines whether the playback operation is ended. If so, the snapshot capture process is performed; if not, the next touch operation information is continuously played back.
[0048] In a specific embodiment of the present invention, receiving a series of screen snapshots of the test touch screen in response to the touch operation information in sequence, specifically,
[0049] After the touch operation information is input into the test touch screen, the display effect of the touch operation is expressed by the device file applied to the display screen. These events can include user operations such as touch, slide, click, etc. When each touch operation occurs, the target moment frame buffer data of the test touch screen is obtained. These data contain the content currently displayed on the screen. The target moment frame buffer data is converted according to the display parameters of the test touch screen, and converted into a picture format, including operations such as adjusting the resolution and color space conversion. Finally, the converted picture is saved as a screenshot, which can be used for subsequent analysis, comparison or recording of the response of the touch operation.
[0050] In a specific embodiment of the present invention, the pre-stored screenshots are specifically:
[0051] Use the system's built-in recording software to record the operation information generated by manually touching the screen. This operation information may include the accuracy of the touch, touch gestures, and the timestamps corresponding to each operation as described above. Arrange the recorded touch operation information in the order in which they occurred to ensure that the touch operations can be restored in the correct time order during the playback test. Finally, input the recorded touch operation information into a touch screen of the same model as the test screen, obtain the display results, and save them as pre-stored screen snapshots.
[0052] In a specific embodiment of the present invention, the corresponding touch operation information and screen snapshot files are archived and arranged for multiple test operations, specifically,
[0053] For testing a single touch event, we can record specific operations or interactions. For testing a set of touch sequences, we can record a series of touch operation information arranged in chronological order to simulate complex user operation processes.
[0054] The recorded touch operation information and corresponding screen snapshot files are archived and organized and stored in a unified directory structure to facilitate subsequent test operations and management of the same model of touch screen.
[0055] The archived and edited touch event files and corresponding screenshot files can be used for multiple test operations. In each test, by selecting the appropriate touch event files and corresponding screenshot files for playback and comparison, the recorded touch events and screenshots can be reused for multiple test verification, debugging and analysis.
[0056] In a specific embodiment of the present invention, the screenshot and the pre-stored screenshot are compared by a hash algorithm, specifically,
[0057] The screenshot and the pre-stored screenshot are processed using a hash algorithm to generate their respective hash feature values (md5 / sha1 feature values). Specifically, the hash feature value is a fixed-length string of numbers that represents the characteristics of the input data. By comparing the two hash feature values, it is possible to quickly determine whether the two snapshots are the same.
[0058] In a specific embodiment of the present invention, whether the screen display result is qualified is determined by:
[0059] If the hash feature values of the screenshot and the pre-stored screenshot are exactly the same, then it can be determined that the response and display content of the screen they represent are consistent. This means that the test results are consistent with expectations and the content displayed on the display during playback is consistent with expectations.
[0060] If the hash feature values of the screenshot and the pre-stored screenshot are different, it can be determined that the responses or displayed contents of the screens they represent are different. This means that the test results are inconsistent with expectations, and the contents displayed on the display screen during playback are not consistent with expectations. At this time, it is necessary to determine what display problems exist on the test screen, solve them, and replay the test after the problems are solved to determine whether the problems are solved.
[0061] The test screen can be marked as qualified only when the hash feature values of all screenshots and pre-stored screenshots are exactly the same.
[0062] In the second embodiment of the present invention, the present invention provides a fully automatic end-to-end touch screen testing device, such as Figure 2 As shown, it includes a test module 1 and a comparison module 2.
[0063] A test module 1 is used to send a series of touch operation information to a test touch screen, and receive a series of screen snapshots of the test touch screen in response to the touch operation information in sequence;
[0064] The comparison module 2 is used to compare the screen snapshot with the pre-stored screen snapshots corresponding to the same series of touch operation information. If all the screen snapshots and the pre-stored screen snapshots are the same, the current tested touch screen is marked as qualified.
[0065] In a third embodiment of the present invention, the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps in the fully automatic end-to-end touch screen testing method as described above are implemented.
[0066] In a fourth embodiment of the present invention, the present invention provides a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps in the above-mentioned fully automatic end-to-end touch screen testing method.
[0067] In summary, the automatic end-to-end touch screen test method, device, electronic device and storage medium provided by the present invention are all implemented by software by utilizing the software characteristics of the native Linux system, without the need for other software and hardware tools, and are convenient for controlling and calibrating the accuracy of the test. The present invention combines touch event recording and playback with screen snapshots to achieve end-to-end automated testing of touch operations and screen displays, reduces human participation, improves test efficiency, and the granularity of recording touch events and screen snapshots can be controlled, supports recording and playback of single events and sequence events, and achieves standardization of touch screen testing through one recording and snapshot, multiple playbacks and comparisons, supports large-scale testing, and avoids the influence of human intervention and subjective factors on test coverage and accuracy.
[0068] It should be understood that although this specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each implementation mode may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
[0069] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the modules described above can refer to the corresponding process in the aforementioned method implementation, and will not be repeated here.
[0070] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present implementation scheme.
[0071] In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0072] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for a computer system (which can be a personal computer, a server, or a network system, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0073] Finally, it should be noted that the above implementation modes are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned implementation modes, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned implementation modes, 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 various implementation modes of the present application.
Claims
1. A fully automatic end-to-end touch screen testing method, characterized in that: include, Sending a series of touch operation information to the test touch screen, and receiving a series of screen snapshots of the test touch screen in response to the touch operation information in sequence; comparing the screenshot with pre-stored screenshots corresponding to the same series of touch operation information, If all the screenshots and the pre-stored screenshots are identical, the current tested touch screen is marked as qualified.
2. The fully automatic end-to-end touch screen testing method according to claim 1, characterized in that: The “sending a series of touch operation information to the test touch screen” includes: The “series of touch operation information” includes at least one set of touch operation information, and the touch operation information includes touch point coordinate information and touch gesture information; Sending a set of the series of touch operation information to the test touch screen each time according to the test sequence, and obtaining a screen display result of the test touch screen; When a set of touch operation information tests is completed, it is necessary to determine whether to proceed to the next set of tests. If yes, continue to send the next set of touch operation information for testing; If not, the display result of the test touch screen is evaluated.
3. The fully automatic end-to-end touch screen testing method according to claim 2, characterized in that: The “receiving a series of screen snapshots of the test touch screen in response to the touch operation information in sequence” includes: The display result of the test touch screen is parsed, and the frame buffer data of each group of the touch operation target time is converted into a picture format according to the display screen parameters of the test touch screen, and saved as a screen snapshot.
4. The fully automatic end-to-end touch screen testing method according to claim 3, characterized in that: The pre-stored screenshots include: Before performing the touch test on the test touch screen, the same series of touch operation information is input to a touch screen of the same model as the test touch screen, and a display result is obtained and saved as the pre-stored screen snapshot.
5. The fully automatic end-to-end touch screen testing method according to claim 4, characterized in that: The corresponding touch operation information and screen snapshot files are archived and organized for multiple test operations.
6. The fully automatic end-to-end touch screen testing method according to claim 1, characterized in that: Comparing the screenshot with the pre-stored screenshot by a hash algorithm includes: Compare the hash feature values of the screenshot and the pre-stored screenshot to determine whether the screen display result is qualified.
7. The fully automatic end-to-end touch screen testing method according to claim 6, characterized in that: The "judgment of whether the screen display result is qualified" includes: When the characteristic values are the same, it means that the snapshots are the same, the screen display results are the same, and the touch test of this group is qualified; When the characteristic values are different, it means that the snapshots are different, the screen display results are different, and the touch test of this group fails; Only when all touch tests pass, the currently tested touch screen is marked as passed.
8. A fully automatic end-to-end touch screen testing device, comprising a testing module and a comparison module, characterized in that: The test module is used to send a series of touch operation information to the test touch screen, and receive a series of screen snapshots of the test touch screen in response to the touch operation information in sequence; The comparison module is used to compare the screen snapshot with pre-stored screen snapshots corresponding to the same series of touch operation information, and if all the screen snapshots and pre-stored screen snapshots are the same, the current tested touch screen is marked as qualified.
9. An electronic device, comprising a memory and a processor, characterized in that: The memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps in the fully automatic end-to-end touch screen testing method as described in any one of claims 1 to 7 are implemented.
10. A storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the steps in the fully automatic end-to-end touch screen testing method according to any one of claims 1 to 7 are implemented.