Automatic testing method, testing device, terminal equipment and storage medium

Through the automated testing method, network connection and mouse operation recording functions are used to form test case scripts and conduct automated testing, solving the inefficiency and stability problems caused by human-reliant NVR product testing, and achieving a more efficient and comprehensive testing process.

CN119071477AInactive Publication Date: 2024-12-03SHENZHEN XINRUISHI TECH CO LTD

Patent Information

Application Number
CN202411105876.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-12-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The testing of NVR products mainly relies on manual testing, resulting in low testing efficiency, and the test results are greatly affected by the working status and personal abilities of the testers, which poses hidden dangers to equipment stability.

Method used

Using automated testing methods, by establishing a network connection with a network video recorder, starting the mouse operation recording function, recording mouse operation events to form a test case script, and performing automated tests based on the number of script executions, including remote control of network connections to record mouse operations Trigger time, coordinates, and events to form a complete test case script.

Benefits of technology

It effectively avoids manual repeated testing, improves testing efficiency, enhances the comprehensiveness of testing and equipment stability, reduces the burden on enterprises, and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071477A_ABST
    Figure CN119071477A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software testing, in particular to an automatic testing method, an automatic testing device, remote control terminal equipment and a computer readable storage medium, and the method comprises the steps: responding to the establishment of network connection with a network video recorder, and starting a recording function of mouse operation of the network video recorder; through the network connection, executing a to-be-tested case on the network video recorder through mouse operation, and recording all events triggered by the mouse operation so as to form a test case script; and controlling the network video recorder to execute an automatic test according to the test case script and the execution times of the test case script. According to the automatic testing, manual repeated testing of testers is effectively avoided, and the testing efficiency is greatly improved. And a tester can focus on writing of the test case, so that the comprehensiveness of the test is enhanced, and the stability of the equipment is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software testing, and in particular to an automated testing method, an automated testing device, a remote control terminal device and a computer-readable storage medium. Background Art

[0002] NVR (Network Video Recorder) is a device specially used for video recording and storage of monitoring network cameras. It can receive video streams from network cameras and record, store and manage video data. In the process of NVR product development, each round of product function iteration is accompanied by function development and testing. The stability of NVR functions depends largely on the testing of testers, and the reliability of the tests depends on the test cases developed by the testers. It can be seen that since testers not only need to write test cases but also need to execute tests, the working status and personal ability of testers will have a relatively large impact on the quality of test cases and test results, which is a hidden danger to the stability of the equipment, and the test efficiency is also low. Summary of the invention

[0003] In view of this, the present invention proposes an automated testing method, an automated testing device, a remote control terminal device and a computer-readable storage medium, aiming to solve the problem that the current testing of NVR products mainly relies on manual testing by manpower and has low testing efficiency.

[0004] In order to solve the above problems, the present invention adopts the following technical solutions:

[0005] In a first aspect, the present invention provides an automated testing method, which is applied to a network video recorder, comprising:

[0006] In response to establishing a network connection with the network video recorder, starting a recording function of a mouse operation of the network video recorder;

[0007] Through the network connection, the test case to be tested is executed on the network video recorder by mouse operation, and all events triggered by the mouse operation are recorded to form a test case script;

[0008] According to the test case script and the number of executions of the test case script, the network video recorder is controlled to perform automated testing.

[0009] Furthermore, establishing a network connection with the network video recorder includes: establishing a remote control network connection with the network video recorder in a P2P or TCP manner.

[0010] Furthermore, recording all events triggered by mouse operations includes: recording the triggering time of all mouse operations, XY coordinate values ​​of the mouse operations and the triggered mouse events.

[0011] Furthermore, the mouse events include left-button click events, right-button click events and mouse movement events;

[0012] If the left-button click event or the right-button click event occurs, record it immediately;

[0013] If the mouse movement event occurs, the mouse position is recorded once at a preset time interval when the mouse position actually changes.

[0014] Further, the test case script and the number of executions of the test case script include:

[0015] When the test case script includes a test case, according to the test case script and the number of executions of the test case script;

[0016] When the test case script includes at least two test cases, then according to the test case combination, the execution times of each test case in the test case combination and the execution times of the test case combination; wherein the test case combination is composed of at least two test cases combined in a preset execution order.

[0017] Furthermore, after controlling the network video recorder to execute the automated test, the method further includes: obtaining the test result of the automated test through at least one of log recording, result reporting and automated tool feedback.

[0018] In a second aspect, the present invention further proposes an automated testing device, including a start recording module, a script forming module and a test execution module; wherein:

[0019] The start recording module is used to start the recording function of the mouse operation of the network video recorder in response to establishing a network connection with the network video recorder;

[0020] The script forming module is used to execute the test case to be tested on the network video recorder through mouse operation via the network connection, and record all events triggered by the mouse operation to form a test case script;

[0021] The test execution module is used to control the network video recorder to execute automated testing according to the test case script and the execution times of the test case script.

[0022] Furthermore, the automated testing device also includes a result acquisition module; wherein the result acquisition module is used to obtain the test result of the automated test through at least one of log recording, result reporting and automated tool feedback.

[0023] In a third aspect, the present invention further proposes a remote control terminal device, comprising:

[0024] a memory for storing program instructions; and

[0025] The processor is used to execute the program instructions to implement the steps of the automated testing method as described above.

[0026] In a fourth aspect, the present invention further proposes a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the automated testing method described above are implemented.

[0027] Compared with the prior art, the beneficial effects of the present invention are: an automated testing method, an automated testing device, a remote control terminal device and a computer-readable storage medium, comprising: in response to establishing a network connection with the network video recorder, starting the recording function of the mouse operation of the network video recorder; through the network connection, executing the test case to be tested on the network video recorder through the mouse operation, and recording all events triggered by the mouse operation to form a test case script; according to the test case script and the number of executions of the test case script, controlling the network video recorder to perform automated testing. It can be seen that the automated testing method, the automated testing device, the remote control terminal device and the computer-readable storage medium, after establishing a network connection with the network video recorder, start the recording function of the mouse operation to record the test case, and automatically execute the recorded test case script according to the script of the recorded test case and the corresponding number of executions to complete the automated test. The automated test effectively avoids the tester's manual repetitive testing and greatly improves the test efficiency. And the tester can focus more on the writing of the test case, enhance the comprehensiveness of the test, and further improve the stability of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0029] Figure 1 It is a flowchart of the first embodiment of the automated testing method of the present invention;

[0030] Figure 2 A schematic diagram of a flow chart of a second embodiment of an automated testing method of the present invention;

[0031] Figure 3 A schematic diagram of the interface of a remote desktop client tool developed according to the automated testing method;

[0032] Figure 4 is a structural block diagram of a first embodiment of an automated testing device of the present invention;

[0033] Figure 5 is a structural block diagram of a second embodiment of an automated testing device of the present invention;

[0034] Figure 6 It is a schematic diagram of the structure of a remote control terminal device in a hardware operating environment involved in an embodiment of the present invention. DETAILED DESCRIPTION

[0035] The scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a 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.

[0036] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0037] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0038] See also Figure 1 As shown, it is a flow chart of the first embodiment of the automated testing method of the present invention.

[0039] In this embodiment, the automated testing method is applied to a network video recorder, including:

[0040] Step S100: In response to establishing a network connection with the network video recorder, starting a recording function of a mouse operation of the network video recorder.

[0041] Specifically, the recording function for mouse operation involved in the embodiment of the present invention is a process of recording the mouse operation behavior of the user on the network video recorder and converting it into a test script. This recording function captures the user's mouse movement, click, drag and other operations, and converts these operations into automated test scripts for subsequent test execution. The acquired test script is mainly used to simulate the instructions of the user's mouse operation, and then simulate the user behavior in the automated test. It can be seen that the recording function for mouse operation involved in the embodiment of the present invention is slightly different from the recording function in the general sense understood by people. The recording function in the general sense refers to various types of recording such as audio, video, and mouse operation. For example, recording audio can record sound information, recording video can record visual information, and recording mouse operation can record the user's operation behavior on the computer. This recording is usually used in various scenarios such as creating audio and video files, monitoring system operations, and recording user behavior. In general, the recording function for mouse operation is mainly to capture the user's mouse operation behavior and then convert it into a test script, while the recording function in the general sense can cover a wider range of recording content, not limited to mouse operation, and the acquired recording form may also be different.

[0042] Step S200: Through the network connection, the test case to be tested is executed on the network video recorder by mouse operation, and all events triggered by the mouse operation are recorded to form a test case script.

[0043] Specifically, remotely controlling the network video recorder to execute the test cases and record the events triggered by the mouse operation through the network connection is an efficient and convenient testing method. Through the network connection, the network video recorder can be remotely controlled to execute the test cases without on-site operation, which realizes the remote control of the network video recorder, improves the convenience and flexibility of operation, and can also remotely record all events triggered by the mouse operation, saving time and labor costs and improving efficiency. Through the network connection, the recording screen of the network video recorder can also be viewed in real time, and the operating status and recording effect of the network video recorder can be timely understood, which is convenient for testers to monitor and debug.

[0044] Specifically, a test case refers to a specific scenario or situation when testing a software system, including input data, expected results, and execution steps. Test cases are designed to verify whether the software system works as expected and detect potential defects or problems. Executing the test case to be tested on the network video recorder through mouse operation means executing a specific test case on the network video recorder through mouse operation when testing. This process includes the tester using the mouse to operate on the interface of the network video recorder through remote control, such as clicking buttons, dragging windows, etc., to verify whether the functions of the network video recorder are working properly, and recording these operation steps for subsequent test execution and analysis. When starting the automated test, by automatically executing the test case script corresponding to the test case, it is possible to check whether the various functions of the network video recorder meet the design requirements to ensure the stability and reliability of the system.

[0045] Step S300: According to the test case script and the execution times of the test case script, control the network video recorder to perform automated testing.

[0046] Specifically, the number of times a test case script is executed generally depends on the specific test requirements and test strategies, and multiple tests are usually performed. By executing the test case script multiple times, the stability and consistency of the system under different conditions can be verified. For example, some problems may only occur under specific conditions, and multiple test executions can help discover these potential problems; or some problems may be caused by random factors in the system, and multiple test executions can also help detect these random problems and ensure the reliability of the system. In addition, in performance testing, multiple test executions can help evaluate the performance of the system under long-term operation, including indicators such as response time and resource utilization. After defect repair, related test cases are usually executed multiple times to confirm whether the problem has been resolved and ensure the effectiveness of the repair. In general, multiple test case script executions can improve the comprehensiveness and depth of the test, help discover potential problems and ensure the quality and stability of the system.

[0047] Compared with the prior art, the automated testing method of the embodiment of the present invention, after establishing a network connection with the network video recorder, starts the recording function of the mouse operation to record the test case, and automatically executes the recorded test case script according to the script of the recorded test case and the corresponding number of executions to complete the automated testing. At present, the testing of NVR is basically performed manually, so the working status and personal ability of the tester will have a relatively large impact on the test results. At the same time, the test efficiency is also very low, which increases the burden on the enterprise. The automated test effectively avoids the manual repetitive testing of the tester and greatly improves the test efficiency. In addition, the tester can focus more on the writing of the test case, which enhances the comprehensiveness of the test, further improves the stability of the equipment, and reduces the burden on the enterprise.

[0048] See also Figure 2 As shown, it is a flow chart of the second embodiment of the automated testing method of the present invention.

[0049] Compared with the first embodiment of the automated testing method, this embodiment provides a detailed description of each step involved and adds a step of obtaining test results.

[0050] In this embodiment, the automated testing method is applied to a network video recorder, including:

[0051] Step S101: In response to establishing a remote control network connection with the network video recorder in a P2P or TCP manner, starting a recording function of a mouse operation of the network video recorder.

[0052] Specifically, P2P (Peer-to-Peer) is a peer-to-peer network communication mode that allows nodes (peers) in the network to communicate directly with each other without going through a central server. P2P technology is usually used to implement scenarios such as peer-to-peer file sharing and video streaming. TCP (Transmission Control Protocol) is a connection-oriented, reliable transmission control protocol that provides reliability and sequentiality of data transmission. TCP ensures reliable data transmission through steps such as establishing connections, data transmission, and connection release, and is suitable for scenarios with high requirements for data transmission quality. P2P or TCP are both reliable communication protocols that can provide lower latency and higher real-time performance, and are suitable for scenarios such as real-time monitoring and remote control of the network video recorder. In addition, establishing a remote control network connection through P2P or TCP can also achieve encrypted data transmission, improve the security of data transmission, and prevent data from being maliciously intercepted or tampered with.

[0053] Step S201: Through the remote control network connection, the test case to be tested is executed on the network video recorder through mouse operation, and all mouse operation triggering time, mouse operation XY coordinate values ​​and triggered mouse events are recorded to form a test case script.

[0054] Specifically, during the recording process, the system will record the trigger time of each mouse operation, that is, the specific time point when the user performs the mouse operation, which will help the subsequent test analysis and playback to ensure the accuracy and reproducibility of the test case. The XY coordinate value of the mouse operation refers to the position of the mouse on the screen, including the values ​​of the horizontal coordinate (X axis) and the vertical coordinate (Y axis). The system will capture the specific position of the mouse when the user performs the mouse operation in order to accurately simulate the user's operation. During the recording process, the system will also capture the triggered mouse events, including mouse clicks, double-clicks, right-clicks, drags, and other operations. Each mouse event will be recorded so that the test case script can be generated later. Based on the recorded mouse operation data, the system will integrate the trigger time, XY coordinate values, and mouse events to form a complete test case script. This script can include a sequence of various mouse operations for automated test execution and verification of system functions. This test case script can later help testers simulate user operation behaviors for automated testing and discover potential problems and defects.

[0055] In some embodiments of the present application, the mouse event includes a left-button click event, a right-button click event, and a mouse move event;

[0056] If the left-button click event or the right-button click event occurs, record it immediately;

[0057] If the mouse movement event occurs, the mouse position is recorded once at a preset time interval when the mouse position actually changes.

[0058] Specifically, when recording mouse operations, for mouse click events, the time, location and other information of the click will be recorded immediately; for mouse movement events, when the mouse position actually changes, the mouse position will be recorded at preset time intervals, rather than every moment, to reduce the amount of data, thereby efficiently generating test case scripts or performing other operations. The size of the preset time generally depends on the specific test requirements and test strategies, such as setting the preset time to 500 milliseconds.

[0059] Step S301: When the test case script includes a test case, the network video recorder is controlled to perform an automated test according to the test case script and the number of executions of the test case script.

[0060] Step S302: When the test case script includes at least two test cases, the network video recorder is controlled to perform automated testing according to the test case combination, the execution times of each test case in the test case combination, and the execution times of the test case combination.

[0061] The test case combination is composed of at least two test cases combined in a preset execution order.

[0062] Specifically, step S301 is applicable to the test requirements under a single test scenario, and only a single test case needs to be executed to verify a certain function or behavior of the system. Step S302 is applicable to the test requirements under complex test scenarios, and multiple test cases need to be executed and the combination relationship between them needs to be considered to fully verify the functions and performance of the system. In step S302, the test case combination is composed of at least two test cases in a preset execution order, which means that the system will consider the execution order and combination method between different test cases to more comprehensively cover the various functions and interactions of the system. Therefore, step S302 is applicable to automated testing under more complex test scenarios to ensure the stability and reliability of the system. Generally speaking, the execution number of each test case in the test case combination is 1, and the execution number of the test case combination is multiple times. Of course, in the actual test process, it can also be adjusted according to specific test requirements and test strategies.

[0063] It should be noted that there is no particular order between step S301 and step S302, and either one may be performed.

[0064] Specifically, the preset execution order is the preset execution time order. The system executes each event according to the time difference of the mouse event, and sends each parsed event to the NVR one by one to realize the automated testing function of the NVR. The system executes each event one by one according to the time difference according to the time sequence of the event, so that the events can be processed in the correct order to ensure the accuracy of the automated test. The parsing process of each mouse event includes operations such as identifying keywords, extracting parameters, determining the execution order, and parsing the events, actions, parameters, etc. in the test case script or test case, so that the system can understand and execute these events according to the predetermined order and rules.

[0065] Step S400: obtaining the test result of the automated test through at least one of log recording, result reporting and automated tool feedback.

[0066] Specifically, logging refers to the process of recording various key information and events during the automated testing process. Through logging, the detailed steps of test execution, error messages, warnings, and other related information can be tracked to help testers analyze problems and troubleshoot. The result report is a summary and analysis of the results of automated test execution, usually including the execution of test cases, the number of passed test cases, the number of failed test cases, error messages, execution time, and other information. The result report provides an overall understanding of the test execution and helps testers evaluate the quality and stability of the test. Automation tool feedback refers to the real-time feedback information provided by the automated testing tool during the test execution process. This feedback information may include test progress, execution status, error prompts, log output, etc., to help testers understand the test execution status in a timely manner and make adjustments. Obtaining test results is a crucial part of the automated testing process. Through test results, it can be verified whether the system is executed as expected and whether the functions meet the requirements. It can also help discover defects, errors, or performance problems in the system and repair them in a timely manner. Through test results, the coverage of test cases can be evaluated to ensure that all aspects of the system are fully tested. It can also provide data support for project management and decision-making, and help formulate the next test plan and improvement measures.

[0067] Specifically, the working principle of the automated testing method according to the embodiment of the present invention is described in detail below:

[0068] 1. Remote connection:

[0069] The remote desktop client tool of the system (the remote desktop client tool is developed according to the automated testing method provided in the embodiment of the present invention) establishes a network connection with the NVR via P2P or TCP to achieve remote control of the NVR device.

[0070] 2. Mouse operation recording:

[0071] Start the mouse operation recording function to receive mouse events from the NVR. The recording content includes the trigger time, the X and Y coordinates of the operation, and the event type (including mouse left click events, mouse right click events, mouse movement events, etc.).

[0072] Among them, for mouse click operation events (mouse left button click event and mouse right button click event), an event is triggered immediately. For mouse movement events, it is triggered every 500 milliseconds, but only when the mouse position changes.

[0073] 3. Test case execution:

[0074] 3.1 Use the mouse to operate the test case on the NVR.

[0075] 3.2 The remote desktop client tool records the entire event triggered by the mouse operation and saves it as a file (ie, a script) on the computer (remote control terminal device) where the remote desktop client tool is located.

[0076] 4. Test case management:

[0077] 4.1 Follow the above steps to record the scripts of each test case and save them.

[0078] 4.2 The remote desktop tool supports configuring the number of executions for each test case script, and supports combining all test cases for overall testing. The remote desktop tool also supports setting the number of executions for the overall test case combination.

[0079] 5. Perform frequency management:

[0080] 5.1 Execute each event based on the difference in event time.

[0081] 5.2 Each parsed event is transmitted to the NVR one by one to realize the automated testing function.

[0082] 6.Test result analysis and management.

[0083] In summary, the above working principles can be summarized as follows:

[0084] 1. Establish a connection with the NVR through the remote desktop client tool.

[0085] 2. Start the mouse operation recording function and record the test cases.

[0086] 3. Save the recorded mouse operation events as a script file (i.e. test case script).

[0087] 4. Configure the recorded test case script, including the number of executions, etc.

[0088] 5. Execute the recorded test case script and pass the events to the NVR one by one to complete the automated test.

[0089] 6. Get the results of automated testing.

[0090] See also Figure 3 As shown, it is a schematic diagram of the interface of a remote desktop client tool developed according to the automated testing method.

[0091] Specifically, the automated testing method of the embodiment of the present invention is executed on the remote control terminal device (i.e., the remote desktop client tool developed according to the automated testing method is run), and the screen of the remote control terminal device will display the following information: Figure 3 The interface shown is as follows:

[0092] 1. Click the New Combination bar and a box will pop up to set the combination name. After the name is set, a record will be displayed on the list (such as Combination 1). After selecting the combination, click the Delete Combination bar to delete the combination.

[0093] 2. After selecting a combination, click the Set Combination bar to set the number of times the combination is executed and the interval between executions of the combinations.

[0094] 3. The functions of the new script bar, delete script bar, set script bar and the new combination bar, delete combination bar and set combination bar are basically the same. Click the edit script bar to open and view the current script records. Each script record includes the time, event type, coordinate X, coordinate Y of the mouse event, and you can also edit this information.

[0095] 4. Select the script, click the Start Recording Script bar, and then perform mouse operations on the NVR according to the test case to complete the recording of the test case; then click the Stop Recording Script bar, and the selected script will record all mouse operations of this test case. If you want to run the test case again later, just select the script and click the Run Script bar. It also supports selecting a combination and then executing all scripts under the combination.

[0096] 5. The large frame on the right represents the remote control screen. The remote control screen of the NVR is displayed in real time on the remote control terminal device, which is convenient for real-time viewing and timely understanding of the status of the network video recorder, helping testers to respond quickly. Displaying the remote control screen can also help testers to discover abnormal situations in time, ensure the safety of the network video recorder, and reduce security risks.

[0097] Compared with the prior art, the automated testing method of the embodiment of the present invention has the following advantages:

[0098] 1. Reduce the testing pressure of testers: Through automated testing tools, testers only need to write and improve test cases and record test scripts to achieve self-testing.

[0099] 2. Improve test efficiency: avoid repeated testing by testers and improve test efficiency.

[0100] 3. Focus on test case writing: Testers can focus more on writing test cases and improve the comprehensiveness of testing.

[0101] 4. Reduce the impact of human factors: avoid the influence of testers’ working status and personal ability on test results and improve equipment stability.

[0102] 5. Save manpower: Companies can conduct testing with less manpower.

[0103] 6. Standardized test methods: Provides a set of standard test methods.

[0104] The following is an embodiment of the automated testing device provided by the present invention. The embodiment of the automated testing device and the embodiment of the automated testing method described above are of the same concept, and the details not described in detail in the embodiment of the automated testing device may refer to the embodiment of the automated testing method described above.

[0105] See also Figure 4 As shown, it is a structural block diagram of the first embodiment of the automatic testing device of the present invention.

[0106] In this embodiment, the automated testing device includes a start recording module 10, a script forming module 20 and a test execution module 30; wherein,

[0107] The start recording module 10 is used to start the recording function of the mouse operation of the network video recorder in response to establishing a network connection with the network video recorder;

[0108] The script forming module 20 is used to execute the test case to be tested on the network video recorder through the mouse operation through the network connection, and record all events triggered by the mouse operation to form a test case script;

[0109] The test execution module 30 is used to control the network video recorder to execute an automated test according to the test case script and the execution times of the test case script.

[0110] Compared with the prior art, the automated testing device of the embodiment of the present invention, after establishing a network connection with the network video recorder, starts the recording function of the mouse operation to record the test case, and automatically executes the recorded test case script according to the script of the recorded test case and the corresponding number of executions to complete the automated test. The automated test effectively avoids the manual repetitive testing of the tester and greatly improves the test efficiency. Moreover, the tester can focus more on the writing of the test case, which enhances the comprehensiveness of the test, further improves the stability of the equipment, and reduces the burden on the enterprise.

[0111] See also Figure 5 As shown, it is a structural block diagram of the second embodiment of the automatic testing device of the present invention.

[0112] Compared with the first embodiment of the automatic testing device, this embodiment adds a result obtaining module 40 .

[0113] In this embodiment, the automated testing device further includes a result acquisition module 40 ; wherein the result acquisition module 40 is configured to acquire the test result of the automated test through at least one of log recording, result reporting, and automated tool feedback.

[0114] The automated testing device of the embodiment of the present invention can realize automated testing with high testing efficiency, good user experience and strong product feasibility.

[0115] The following is an embodiment of the remote control terminal device provided by the present invention. The embodiment of the remote control terminal device and the embodiment of the above-mentioned automated testing method and automated testing device belong to the same concept, and the details not described in detail in the embodiment of the remote control terminal device can refer to the embodiments of the above-mentioned automated testing method and automated testing device.

[0116] See also Figure 6 As shown, it is a schematic diagram of the structure of a remote control terminal device in a hardware operating environment involved in an embodiment of the present invention.

[0117] In this embodiment, a remote control terminal device includes:

[0118] Memory 1005, used to store program instructions; and

[0119] The processor 1001 is used to execute the program instructions to implement the steps of the automated testing method as described above.

[0120] The remote control terminal device of the embodiment of the present invention can be a computing device such as a desktop computer, a notebook, a palm computer, and a server. Figure 6 As shown, the remote control terminal device may include: a processor 1001 (e.g., a CPU), a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit, such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

[0121] Those skilled in the art will understand that Figure 6The remote control terminal device structure shown in the figure does not constitute a limitation on the remote control terminal device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0122] like Figure 6 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module and a computer program.

[0123] exist Figure 6 In the remote control terminal device shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the client (user end) and communicate data with the client; and the processor 1001 can be used to call the computer program stored in the memory 1005. When the computer program is called and executed by the processor 1001, the steps of the above-mentioned automated testing method are implemented.

[0124] The following is an embodiment of the computer-readable storage medium provided by the present invention. The embodiment of the computer-readable storage medium and the embodiment of the above-mentioned automated testing method, automated testing device and remote control terminal device belong to the same concept, and the details not described in detail in the embodiment of the computer-readable storage medium can refer to the embodiments of the above-mentioned automated testing method, automated testing device and remote control terminal device.

[0125] In this embodiment, a computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the automated testing method described above are implemented.

[0126] The automated testing device, remote control terminal equipment and computer-readable storage medium of the present invention can all implement the steps of the automated testing method described above, and therefore have at least all the beneficial effects brought about by the technical solutions of the automated testing method step embodiments described above, which will not be described one by one here.

[0127] The above description is only a partial or preferred embodiment of the present invention. Neither the text nor the drawings can limit the scope of protection of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the overall concept of the present invention, or direct / indirect application in other related technical fields are included in the scope of protection of the present invention.

[0128] It should be understood by those skilled in the art that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of one or more computer-usable storage media (including but not limited to disk storage, The form of a computer program product implemented on optical storage, etc.

[0129] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0130] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0132] 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 above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. An automated testing method, applied to a network video recorder, characterized in that: include: In response to establishing a network connection with the network video recorder, starting a recording function of a mouse operation of the network video recorder; Through the network connection, the test case to be tested is executed on the network video recorder by mouse operation, and all events triggered by the mouse operation are recorded to form a test case script; According to the test case script and the number of executions of the test case script, the network video recorder is controlled to perform automated testing.

2. The automated testing method according to claim 1, characterized in that: The establishing of a network connection with the network video recorder includes: establishing a remote control network connection with the network video recorder in a P2P or TCP manner.

3. The automated testing method according to claim 1, characterized in that: The recording of all events triggered by mouse operations includes: recording the triggering time of all mouse operations, the XY coordinate values ​​of the mouse operations and the triggered mouse events.

4. The automated testing method according to claim 3, characterized in that: The mouse events include left-button click events, right-button click events and mouse movement events; If the left-button click event or the right-button click event occurs, record it immediately; If the mouse movement event occurs, the mouse position is recorded once at a preset time interval when the mouse position actually changes.

5. The automated testing method according to claim 1, characterized in that: The test case script and the number of executions of the test case script include: When the test case script includes a test case, according to the test case script and the number of executions of the test case script; When the test case script includes at least two test cases, then according to the test case combination, the execution times of each test case in the test case combination and the execution times of the test case combination; wherein the test case combination is composed of at least two test cases combined in a preset execution order.

6. The automated testing method according to claim 1, characterized in that: After controlling the network video recorder to perform the automated test, the method further includes: obtaining the test result of the automated test through at least one of log recording, result reporting, and automated tool feedback.

7. An automated testing device, characterized in that: It includes a start recording module, a script forming module and a test execution module; among which, The start recording module is used to start the recording function of the mouse operation of the network video recorder in response to establishing a network connection with the network video recorder; The script forming module is used to execute the test case to be tested on the network video recorder through mouse operation via the network connection, and record all events triggered by the mouse operation to form a test case script; The test execution module is used to control the network video recorder to execute automated testing according to the test case script and the execution times of the test case script.

8. The automated testing device according to claim 7, characterized in that: The automated testing device further comprises a result acquisition module, wherein the result acquisition module is used to acquire the test result of the automated test through at least one of log recording, result reporting and automated tool feedback.

9. A remote control terminal device, characterized in that: include: A memory for storing program instructions; as well as A processor is used to execute the program instructions to implement the steps of the automated testing method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the automated testing method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Screenshot-based test case and test script generation method and system and medium

    CN114416516A

  • Test method and device of network video equipment, electronic equipment and storage medium

    CN115474040A

  • Vehicle UI automatic test script recording method and device and electronic equipment

    CN115757168A

Cited By

  • Method and device for remotely testing vehicle machine in different places and medium

    CN120849298A