Remote control test method, device, equipment and medium
Through VGA acquisition card and image analysis and recognition technology, remote control server testing is realized, solving the problem of inefficient manual operation, and achieving automation, all-weather testing and accuracy guarantee.
Patent Information
- Application Number
- CN202211449593.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-11-18
AI Technical Summary
Existing server testing technology relies on manual operations, resulting in inefficiency, prone to false detection and misoperation, and inability to test around the clock, and there are great differences in test items between different projects.
The server test interface information is obtained through the VGA acquisition card, and the text box is generated using the picture parsing recognition program, and combined with the server test option operation relationship table and the input device instruction encoding table to realize the automatic operation of remote control of the server test option.
Liberate manpower, improve testing efficiency, avoid human operation errors, realize all-weather testing, and automatically organize test logs.
Smart Images

Figure CN115712535B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of testing technology, and in particular to a remote control testing method, device, equipment and medium. Background Art
[0002] Currently, server testing is increasingly using network terminals to control test option values. When using fixed programs to perform performance tests on servers or server components, manual verification and repetitive checks are often required. This simple, repetitive operation consumes both manpower and time, and manual verification is prone to false positives and misoperations due to fatigue. Furthermore, the variability of test items across different projects poses challenges to actual testing.
[0003] That is, the existing technical solution is to manually control the test options through a wired mouse and keyboard, and execute them repeatedly. In addition, the tester must conduct the test next to the corresponding server to be tested for a long time. The simple and repetitive test operations consume a lot of manpower and time. Therefore, the existing test technical solution is not only inefficient and completely dependent on manual operation, which is prone to test vulnerabilities due to human fatigue, but also cannot test the server around the clock, resulting in low test efficiency. Summary of the Invention
[0004] In order to overcome the above technical defects, the purpose of the present invention is to provide a remote control test method, device, equipment and medium, the method of the present invention includes: receiving a test instruction for the server; obtaining the server test interface information through the VGA (video graphics array) acquisition card, obtaining the text information of the server test interface through an image analysis and recognition program, and generating a text box according to the text information of the server test interface; obtaining the range coordinates of the text box and the position coordinates of the server test option; obtaining the action code combination of the server test option operation according to the server test option operation relationship table and the input device instruction code table; the controlled end tests the server through the range coordinates of the text box, the position coordinates of the server test option, and the action code combination of the server test option operation. The remote control test method of the present invention can liberate manpower and avoid test loopholes caused by human operation errors.
[0005] The specific technical solutions provided by the embodiments of the present invention are as follows:
[0006] In a first aspect, a remote control test method is provided. The remote control test method is applied to a remote control test system, wherein the remote control test system includes a master terminal and a controlled terminal, wherein the output terminal of the master terminal is connected to the input terminal of the controlled terminal; the controlled terminal includes a server, a display device, and a VGA capture card, wherein the output terminal of the server is connected to the input terminal of the display device through the VGA capture card, and the method includes:
[0007] receiving a test instruction for the server;
[0008] Acquire the server test interface information through the VGA capture card, acquire text information of the server test interface through an image analysis and recognition program, and generate a text box according to the text information of the server test interface;
[0009] Obtaining the range coordinates of the text box and the position coordinates of the server test option;
[0010] Acquire the action code combination of the server test option operation according to the server test option operation relationship table and the input device instruction code table;
[0011] The controlled end tests the server through a combination of the range coordinates of the text box, the position coordinates of the server test option, and the action code of the server test option operation.
[0012] Furthermore, before receiving the test instruction for the server, the method further includes:
[0013] The successful sending and receiving of control instructions between the master terminal and the controlled terminal is completed.
[0014] Furthermore, the master control end includes a remote control machine, the remote control machine includes a master control module, and the server includes a controlled module; the successful sending and receiving of control instructions between the master control end and the controlled end includes:
[0015] Determine whether the main control module and the controlled module can be recognized normally;
[0016] If yes, the port number of the master control module and the ID information of the controlled module are obtained, the master control terminal sends a control instruction to the controlled terminal through the port number of the master control module and the ID information of the controlled module, and determines whether the controlled terminal successfully receives the control instruction; if not, the test process ends;
[0017] The determining whether the controlled terminal successfully receives the control instruction includes:
[0018] Determining whether the controlled terminal successfully receives the control instruction;
[0019] If so, the successful sending and receiving of control instructions between the master terminal and the controlled terminal is completed; if not, the test process ends.
[0020] Furthermore, the controlled end further includes an acquisition device; the acquiring of the server test interface information through the VGA acquisition card, the acquiring of text information on the server test interface through an image analysis and recognition program, and the generation of a text box based on the text information on the server test interface include:
[0021] Determine whether the acquisition device can be turned on normally;
[0022] If yes, then determine whether the server test interface can be displayed normally; if not, end the test process;
[0023] The determining whether the server test interface can be displayed normally includes:
[0024] Determine whether the server test interface can be displayed normally;
[0025] If so, the server test interface information is obtained through the VGA capture card, the text information of the server test interface is obtained through the image analysis and recognition program, and a text box is generated according to the text information of the server test interface; if not, the test process is ended.
[0026] Furthermore, the step of obtaining the action code combination of the server test option operation according to the server test option operation relationship table and the input device instruction code table includes:
[0027] Matching the test option value and the test option operation instruction of the test item according to the server test item name;
[0028] Match the action code combination of the server test option operation corresponding to the test option operation instruction according to the input device instruction code table.
[0029] Furthermore, the controlled end tests the server through a combination of the range coordinates of the text box, the position coordinates of the server test option, and the action code of the server test option operation, including:
[0030] Generate the server test instruction set by combining the range coordinates of the text box, the position coordinates of the server test option, the action code combination of the server test option operation, the port number of the main control module, and the ID information of the controlled module;
[0031] The master terminal sends the server test instruction set to the controlled terminal;
[0032] The controlled terminal controls the mouse to locate the test option value of the test item through the range coordinates of the text box and the position coordinates of the server test option;
[0033] The controlled terminal tests the test option of the server through the action code combination of the server test option operation.
[0034] Furthermore, after the controlled end tests the server using the range coordinates of the text box, the position coordinates of the server test option, and the action code combination of the server test option operation, the method further includes:
[0035] Determining whether the test option operation on the server is successfully executed;
[0036] If yes, then determine whether all test options of the server have been tested; if not, end the test process;
[0037] The determining whether all test options of the server have been tested includes:
[0038] Determine whether all test options of the server have been tested;
[0039] If so, the test process ends; if not, the server test interface information is obtained again through the VGA capture card, the text information of the server test interface is obtained through the image analysis and recognition program, a text box is generated according to the text information of the server test interface, and the remaining test options of the server are tested.
[0040] In a second aspect, a remote control test device is provided, the device comprising:
[0041] A receiving module, configured to receive a test instruction for the server;
[0042] a processing module, configured to obtain the server test interface information through the VGA capture card, obtain text information on the server test interface through an image analysis and recognition program, and generate a text box according to the text information on the server test interface;
[0043] an acquisition module, configured to acquire the range coordinates of the text box and the position coordinates of the server test option, and acquire an action code combination of the server test option operation according to the server test option operation relationship table and the input device instruction code table;
[0044] The testing module is used to test the server through the range coordinates of the text box, the position coordinates of the server test option, and the action code combination of the server test option operation.
[0045] According to a third aspect, a computer device is provided, comprising:
[0046] A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the remote control test method as described in any one of the first aspects.
[0047] In a fourth aspect, a computer storage medium is provided, the medium comprising:
[0048] A computer program is stored thereon, and when the computer program is executed by the memory, the steps of any one of the remote control test methods described in the first aspect are implemented.
[0049] Compared with the prior art, the technical solution provided in an embodiment of the present invention is applied to a remote control test system. The remote control test system includes a master terminal and a controlled terminal, wherein the output terminal of the master terminal is connected to the input terminal of the controlled terminal; the master terminal includes a remote control machine, which includes a main control module; the controlled terminal includes a server, a display device, and a VGA capture card, wherein the output terminal of the server is connected to the input terminal of the display device via the VGA capture card; the server includes a controlled module, and the controlled terminal includes an acquisition device. The method includes: receiving a test instruction for the server; obtaining server test interface information via the VGA capture card, obtaining text information on the server test interface via an image parsing and recognition program, and generating a text box based on the text information on the server test interface; obtaining range coordinates of the text box and position coordinates of the server test option; obtaining an action code combination of the server test option operation based on the server test option operation relationship table and the input device instruction code table; and the controlled terminal testing the server using the range coordinates of the text box, the position coordinates of the server test option, and the action code combination of the server test option operation. The remote control test method of the present invention can liberate manpower, accurately control corresponding test options, and avoid test loopholes caused by human operation errors.
[0050] The technical solution provided by the embodiment of the present invention can discard the test operations that rely on human intervention, liberate manpower, improve test efficiency, and overcome the disadvantage of being unable to perform server testing around the clock.
[0051] The technical solution provided by the embodiment of the present invention uses a remote control module to replace manual automatic control to execute mouse and keyboard operations. During this period, in order to ensure the accuracy of the execution process and to facilitate the subsequent review of text recognition results, a test log can be automatically organized and generated.
[0052] The technical solution provided by the embodiment of the present invention can obtain corresponding test option values and operation action instructions through project names based on the test option operation relationship table maintained between different test items, thereby realizing automated remote control testing of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0054] Figure 1 A first flow chart of the remote control test method provided in the first embodiment of the present invention;
[0055] Figure 2 A structural diagram of a remote control test system provided in Example 1 of the present invention;
[0056] Figure 3 A second flow chart of the remote control test method provided in the second embodiment of the present invention;
[0057] Figure 4 A specific flow chart of the remote control test method provided in the second embodiment of the present invention;
[0058] Figure 5 A structural diagram of a remote control test device provided in Embodiment 3 of the present invention;
[0059] Figure 6 The exemplary system provided for the fifth embodiment of the present invention can be used to implement various embodiments described in this application. DETAILED DESCRIPTION
[0060] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 making creative efforts shall fall within the scope of protection of the present invention.
[0061] It should be noted that, unless the context clearly requires otherwise, words such as “include” and “comprising” throughout the specification and claims should be interpreted as inclusive rather than exclusive or exhaustive; that is, as “including but not limited to”.
[0062] Furthermore, in the description of the present invention, unless otherwise specified, “plurality” means two or more.
[0063] Example 1
[0064] The embodiment of the present invention provides a remote control test method, such as Figure 1 As shown, the remote control test method is applied to a remote control test system, such as Figure 2 As shown, the remote control test system includes a master terminal and a controlled terminal, the output terminal of the master terminal is connected to the input terminal of the controlled terminal; the master terminal includes a remote control machine, and the remote control machine includes a main control module; the controlled terminal includes a server, a display device, and a VGA acquisition card, the output terminal of the server is connected to the input terminal of the display device through the VGA acquisition card, the server includes a controlled module, and the controlled terminal includes an acquisition device. The method includes:
[0065] receiving a test instruction for the server;
[0066] Acquire the server test interface information through the VGA capture card, acquire text information of the server test interface through an image analysis and recognition program, and generate a text box according to the text information of the server test interface;
[0067] Obtaining the range coordinates of the text box and the position coordinates of the server test option;
[0068] Acquire the action code combination of the server test option operation according to the server test option operation relationship table and the input device instruction code table;
[0069] The controlled end tests the server through a combination of the range coordinates of the text box, the position coordinates of the server test option, and the action code of the server test option operation.
[0070] Specifically, the present invention provides a method for remotely controlling a test server, through a control module (including a master terminal and a controlled terminal), through the VGA capture card to take a screenshot of the server test interface, and through the image text parsing and recognition program to obtain the text information of the server test interface, the coordinates of the minimum rectangle of the option to be tested on the server test interface, that is, the relative position coordinates (respectively the x, y coordinates of the lower left corner of the test interface, and the x, y coordinates of the upper right corner); the tester automatically matches the test option value and test option operation instruction of the corresponding test item through the test option operation relationship table, specifically by creating the test item name of the task; matches the action code combination of the server test option operation corresponding to the test option operation instruction according to the input device instruction code table, sends the range coordinates of the text box and the position coordinates of the server test option, and the action code combination of the server test option operation to the controlled terminal through the master terminal, and the controlled terminal operates the corresponding mouse to the option range defined by the coordinate frame, and operates the corresponding test option by operating the action code combination of the server test option operation, thereby achieving operations such as changing, inputting, and selecting the server test option. The technical solution provided by the embodiments of the present invention uses a remote control module to automatically execute mouse and keyboard operations instead of manual control. To ensure accuracy during execution and facilitate later review of text recognition results, a test log can be automatically generated. This remote control testing method or system frees up manpower, allows precise control of test options, and avoids test vulnerabilities caused by human error.
[0071] The present invention obtains an image of a test interface of a server to be tested through a VGA image capture module, i.e., a VGA acquisition card; obtains test option operations of the server test interface through an image text recognition program, and obtains the range of text corresponding to the test options and the action code combination of specific server test option operations; and realizes remote control of the server test by sending and receiving control instructions of a main control module of a remote control machine.
[0072] The technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0073] The remote control test method of the technical solution provided by the embodiment of the present invention can liberate manpower, accurately control corresponding test options, and avoid test loopholes caused by human operation errors.
[0074] The technical solution provided by the embodiment of the present invention can discard the test operations that rely on human intervention, liberate manpower, improve test efficiency, and overcome the disadvantage of being unable to perform server testing around the clock.
[0075] The technical solution provided by the embodiment of the present invention uses a remote control module to replace manual automatic control to execute mouse and keyboard operations. During this period, in order to ensure the accuracy of the execution process and to facilitate the subsequent review of text recognition results, a test log can be automatically organized and generated.
[0076] Example 2
[0077] The embodiment of the present invention provides a remote control test method, such as Figure 3 As shown, the method includes:
[0078] Step S01: successfully sending and receiving control instructions between the master terminal and the controlled terminal.
[0079] Specifically, the controlled module (instruction receiving end) is inserted into the server to be tested, and the server to be tested is connected to the display device through a VGA capture card, and the main control module (instruction sending end) is inserted into the remote control machine; after the controlled module and the main control module are normally recognized, the main control end obtains the port number / serial port number (COM ID) of the port of the main control module and the ID information of the controlled module, and realizes the sending and receiving of control instructions through the port number (COM ID) of the port of the main control module and the ID information of the controlled module, thereby realizing remote control testing.
[0080] Step S01 also includes:
[0081] Step S011, determining whether the master control module and the controlled module can recognize each other normally;
[0082] If yes, the port number of the master control module and the ID information of the controlled module are obtained, the master control terminal sends a control instruction to the controlled terminal through the port number of the master control module and the ID information of the controlled module, and determines whether the controlled terminal successfully receives the control instruction; if not, the test process ends;
[0083] The determining whether the controlled terminal successfully receives the control instruction includes:
[0084] Determining whether the controlled terminal successfully receives the control instruction;
[0085] If so, the successful sending and receiving of control instructions between the master terminal and the controlled terminal is completed; if not, the test process ends.
[0086] Step S02: receiving a test instruction for the server.
[0087] Specifically, the server test includes hardware or software testing of the server, such as BIOS generation option testing and BIOS modification parameter testing. BIOS is a basic input and output system integrated in the server.
[0088] Step S03, determining whether the acquisition device can be turned on normally;
[0089] If yes, then determine whether the server test interface can be displayed normally; if not, end the test process;
[0090] The determining whether the server test interface can be displayed normally includes:
[0091] Determine whether the server test interface can be displayed normally;
[0092] If so, the server test interface information is obtained through the VGA capture card, the text information of the server test interface is obtained through the image analysis and recognition program, and a text box is generated according to the text information of the server test interface; if not, the test process is ended.
[0093] Specifically, when the master end and the controlled end successfully send / receive instructions, the master end remotely controls the acquisition device of the display device connected to the server under test through the COM ID of the master control module to check whether the test interface of the server under test can be displayed normally; after the server test interface is displayed normally, the image information of the server test interface is captured, and the text information of the test interface is obtained through the image analysis and recognition program, a text box is generated, and saved.
[0094] The acquisition device mentioned here is a camera.
[0095] Step S04 , obtaining the server test interface information through the VGA capture card, obtaining text information of the server test interface through an image analysis and recognition program, and generating a text box according to the text information of the server test interface.
[0096] Step S05: Obtain the range coordinates of the text box and the position coordinates of the server test option.
[0097] Specifically, obtain the range coordinates of the text box rectangle (x, y coordinates of the lower left corner, x, y coordinates of the upper right corner) and the coordinates of the minimum rectangle of the server test option, that is, the relative position coordinates (x, y coordinates of the lower left corner, x, y coordinates of the upper right corner).
[0098] Step S06: Acquire the action code combination of the server test option operation according to the server test option operation relationship table and the input device instruction code table.
[0099] Here, the input device command coding table is a wireless mouse and keyboard command coding table.
[0100] Step S06 further includes:
[0101] Step S061, matching the test option value and the test option operation instruction of the test item according to the server test item name;
[0102] Match the action code combination of the server test option operation corresponding to the test option operation instruction according to the input device instruction code table.
[0103] Specifically, by maintaining the test item name, test option name and specific test option operation relationship table (as shown in Table 1 below), the test option value of the corresponding item and the specific test option operation instruction are automatically matched by creating the project name of the task; the action code or code combination of the corresponding test option operation instruction is obtained by simulating the corresponding instruction coding table through the main control module wireless mouse and keyboard.
[0104] The server test interface information is obtained through a VGA video capture card, the text information of the server test interface is obtained through an image analysis and recognition program, and through the test item name and specific test option operation relationship table maintained by the tester, when performing remote testing, the main control module simulates the wireless mouse and keyboard to achieve remote control, and the test option value and operation action steps that need to be operated in the test option operation relationship table are obtained according to the corresponding test step code.
[0105] The test actions performed include modifying values, selecting test option values, returning, pressing Enter, and other operations.
[0106] Project Name Testing option values Actions performed Project 1 Test option 1.1; Test option 1.2... Action 1.1, Action 1.2... Project 2 Test option 2.1; Test option 2.2... Action 2.1, Action 2.2...
[0107] Table 1
[0108] Step S07: the controlled terminal tests the server through the range coordinates of the text box, the position coordinates of the server test option, and the action code combination of the server test option operation.
[0109] Step S07 further includes:
[0110] Step S071, generating the server test instruction set by combining the range coordinates of the text box, the position coordinates of the server test option, the action code combination of the server test option operation, the port number of the main control module, and the ID information of the controlled module;
[0111] The master terminal sends the server test instruction set to the controlled terminal;
[0112] The controlled terminal controls the mouse to locate the test option value of the test item through the range coordinates of the text box and the position coordinates of the server test option;
[0113] The controlled terminal tests the test option of the server through the action code combination of the server test option operation.
[0114] Specifically, the text box range coordinates, the position coordinates of the option to be tested, the controlled module ID, the main control module COMID, and the action code are combined to generate the server test instruction SUM collection;
[0115] The master terminal sends the server test command SUM collection as a send command to the controlled terminal. The controlled terminal controls the mouse to locate the specific test option value based on the received coordinate information.
[0116] The controlled end performs option operations according to the action code combination of the server test option operation until all test option operations are completed.
[0117] Step S08, determining whether the test option operation on the server is successfully executed;
[0118] If yes, then determine whether all test options of the server have been tested; if not, end the test process;
[0119] The determining whether all test options of the server have been tested includes:
[0120] Determine whether all test options of the server have been tested;
[0121] If so, the test process ends; if not, the server test interface information is obtained again through the VGA capture card, the text information of the server test interface is obtained through the image analysis and recognition program, a text box is generated according to the text information of the server test interface, and the remaining test options of the server are tested.
[0122] like Figure 4The invention is a specific flow chart of a remote control test method. The technical solution of the present invention realizes image capture of a test interface through a VGA video capture card, obtains text information of a corresponding test option interface through image text recognition software, and generates a corresponding text box; through a test option operation relationship table, that is, by creating a test item name of a task to automatically match the test option value of the corresponding test item and the specific test option operation instruction, obtains the range coordinates of the text box and the position coordinates of the test option (respectively, the x, y coordinates of the lower left corner and the x, y coordinates of the upper right corner), and locates the specific test option name to be executed; and combines the text box range coordinates, the position coordinates of the option to be tested, the ID information of the controlled module, the COMID information of the main control module, and the action code to generate a test instruction SUM collection; remotely controls the server to be tested through a control module (a main control end and a controlled end) under no network conditions; the main control end controls the corresponding mouse to locate the specific test option value by sending parameter information corresponding to the test instruction SUM collection, and implements the operation execution of the test option through the action code combination.
[0123] The remote control test method provided in the embodiment of the present invention may be further improved and optimized without departing from the technical solution of the present invention, and these improvements and optimizations should also be considered as the scope of protection of the present invention.
[0124] At the same time, based on the test case steps, through remote control testing, the test steps can be executed in a jump-like manner according to the characteristics of the test project.
[0125] The technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0126] An embodiment of the present invention provides a method for remote control testing. The technical solution provided by the embodiment of the present invention includes: receiving a test instruction for the server; obtaining the server test interface information through the VGA capture card, obtaining the text information of the server test interface through an image analysis and recognition program, and generating a text box according to the text information of the server test interface; obtaining the range coordinates of the text box and the position coordinates of the server test option; obtaining the action code combination of the server test option operation according to the server test option operation relationship table and the input device instruction code table; the controlled end tests the server through the range coordinates of the text box, the position coordinates of the server test option, and the action code combination of the server test option operation. The remote control testing method of the present invention can free up manpower and avoid test vulnerabilities caused by human operation errors.
[0127] The technical solution provided by the embodiment of the present invention can discard the test operations that rely on human intervention, liberate manpower, improve test efficiency, and overcome the disadvantage of being unable to perform server testing around the clock.
[0128] The technical solution provided by the embodiment of the present invention uses a remote control module to replace manual automatic control to execute mouse and keyboard operations. During this period, in order to ensure the accuracy of the execution process and to facilitate the subsequent review of text recognition results, a test log can be automatically organized and generated.
[0129] Example 3
[0130] The present invention provides a remote control test device, such as Figure 5 As shown, the device includes a pre-processing module, a receiving module, a processing module, an acquisition module, a testing module, and a judgment module.
[0131] In this embodiment, the receiving module is used to receive a test instruction for the server;
[0132] a processing module, configured to obtain the server test interface information through the VGA capture card, obtain text information on the server test interface through an image analysis and recognition program, and generate a text box according to the text information on the server test interface;
[0133] an acquisition module, configured to acquire the range coordinates of the text box and the position coordinates of the server test option, and acquire an action code combination of the server test option operation according to the server test option operation relationship table and the input device instruction code table;
[0134] The testing module is used to test the server through the range coordinates of the text box, the position coordinates of the server test option, and the action code combination of the server test option operation.
[0135] Furthermore, the pre-processing module is used to complete the successful sending and receiving of control instructions between the master terminal and the controlled terminal.
[0136] Furthermore, the pre-processing module is further used to determine whether the main control module and the controlled module can be recognized normally;
[0137] If yes, the port number of the master control module and the ID information of the controlled module are obtained, the master control terminal sends a control instruction to the controlled terminal through the port number of the master control module and the ID information of the controlled module, and determines whether the controlled terminal successfully receives the control instruction; if not, the test process ends;
[0138] The determining whether the controlled terminal successfully receives the control instruction includes:
[0139] Determining whether the controlled terminal successfully receives the control instruction;
[0140] If so, the successful sending and receiving of control instructions between the master terminal and the controlled terminal is completed; if not, the test process ends.
[0141] Furthermore, a judgment module is used to judge whether the acquisition device can be turned on normally;
[0142] If yes, then determine whether the server test interface can be displayed normally; if not, end the test process;
[0143] The determining whether the server test interface can be displayed normally includes:
[0144] Determine whether the server test interface can be displayed normally;
[0145] If so, the server test interface information is obtained through the VGA capture card, the text information of the server test interface is obtained through the image analysis and recognition program, and a text box is generated according to the text information of the server test interface; if not, the test process is ended.
[0146] Furthermore, the acquisition module is further configured to match the test option value and the test option operation instruction of the test item according to the server test item name;
[0147] Match the action code combination of the server test option operation corresponding to the test option operation instruction according to the input device instruction code table.
[0148] Furthermore, the test module is further configured to generate the server test instruction set based on the range coordinates of the text box, the position coordinates of the server test option, the action code combination of the server test option operation, the port number of the main control module, and the ID information of the controlled module;
[0149] The master terminal sends the server test instruction set to the controlled terminal;
[0150] The controlled terminal controls the mouse to locate the test option value of the test item through the range coordinates of the text box and the position coordinates of the server test option;
[0151] The controlled terminal tests the test option of the server through the action code combination of the server test option operation.
[0152] Furthermore, a judgment module is used to judge whether the test option operation on the server is successfully executed;
[0153] If yes, then determine whether all test options of the server have been tested; if not, end the test process;
[0154] The determining whether all test options of the server have been tested includes:
[0155] Determine whether all test options of the server have been tested;
[0156] If so, the test process ends; if not, the server test interface information is obtained again through the VGA capture card, the text information of the server test interface is obtained through the image analysis and recognition program, a text box is generated according to the text information of the server test interface, and the remaining test options of the server are tested.
[0157] The technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0158] The remote control test method of the technical solution provided by the embodiment of the present invention can liberate manpower, accurately control corresponding test options, and avoid test loopholes caused by human operation errors.
[0159] The technical solution provided by the embodiment of the present invention can discard the test operations that rely on human intervention, liberate manpower, improve test efficiency, and overcome the disadvantage of being unable to perform server testing around the clock.
[0160] Example 4
[0161] The present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following remote control test method can be executed:
[0162] receiving a test instruction for the server;
[0163] Acquire the server test interface information through the VGA capture card, acquire text information of the server test interface through an image analysis and recognition program, and generate a text box according to the text information of the server test interface;
[0164] Obtaining the range coordinates of the text box and the position coordinates of the server test option;
[0165] Acquire the action code combination of the server test option operation according to the server test option operation relationship table and the input device instruction code table;
[0166] The controlled end tests the server through a combination of the range coordinates of the text box, the position coordinates of the server test option, and the action code of the server test option operation.
[0167] The technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0168] The remote control test method of the technical solution provided by the embodiment of the present invention can liberate manpower, accurately control corresponding test options, and avoid test loopholes caused by human operation errors.
[0169] The technical solution provided by the embodiment of the present invention can discard the test operations that rely on human intervention, liberate manpower, improve test efficiency, and overcome the disadvantage of being unable to perform server testing around the clock.
[0170] The technical solution provided by the embodiment of the present invention uses a remote control module to replace manual automatic control to execute mouse and keyboard operations. During this period, in order to ensure the accuracy of the execution process and to facilitate the subsequent review of text recognition results, a test log can be automatically organized and generated.
[0171] Example 5
[0172] The present invention provides a computer storage medium comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
[0173] receiving a test instruction for the server;
[0174] Acquire the server test interface information through the VGA capture card, acquire text information of the server test interface through an image analysis and recognition program, and generate a text box according to the text information of the server test interface;
[0175] Obtaining the range coordinates of the text box and the position coordinates of the server test option;
[0176] Acquire the action code combination of the server test option operation according to the server test option operation relationship table and the input device instruction code table;
[0177] The controlled end tests the server through a combination of the range coordinates of the text box, the position coordinates of the server test option, and the action code of the server test option operation.
[0178] Furthermore, before receiving the test instruction for the server, the method further includes:
[0179] The successful sending and receiving of control instructions between the master terminal and the controlled terminal is completed.
[0180] Furthermore, the successful sending and receiving of control instructions between the master terminal and the controlled terminal includes:
[0181] Determine whether the main control module and the controlled module can be recognized normally;
[0182] If yes, the port number of the master control module and the ID information of the controlled module are obtained, the master control terminal sends a control instruction to the controlled terminal through the port number of the master control module and the ID information of the controlled module, and determines whether the controlled terminal successfully receives the control instruction; if not, the test process ends;
[0183] The determining whether the controlled terminal successfully receives the control instruction includes:
[0184] Determining whether the controlled terminal successfully receives the control instruction;
[0185] If so, the successful sending and receiving of control instructions between the master terminal and the controlled terminal is completed; if not, the test process ends.
[0186] Furthermore, before acquiring the server test interface information through the VGA capture card, acquiring the text information of the server test interface through the image analysis and recognition program, and generating a text box according to the text information of the server test interface, the method includes:
[0187] Determine whether the acquisition device can be turned on normally;
[0188] If yes, then determine whether the server test interface can be displayed normally; if not, end the test process;
[0189] The determining whether the server test interface can be displayed normally includes:
[0190] Determine whether the server test interface can be displayed normally;
[0191] If so, the server test interface information is obtained through the VGA capture card, the text information of the server test interface is obtained through the image analysis and recognition program, and a text box is generated according to the text information of the server test interface; if not, the test process is ended.
[0192] Furthermore, the step of obtaining the action code combination of the server test option operation according to the server test option operation relationship table and the input device instruction code table includes:
[0193] Matching the test option value and the test option operation instruction of the test item according to the server test item name;
[0194] Match the action code combination of the server test option operation corresponding to the test option operation instruction according to the input device instruction code table.
[0195] Furthermore, the controlled end tests the server through a combination of the range coordinates of the text box, the position coordinates of the server test option, and the action code of the server test option operation, including:
[0196] Generate the server test instruction set by combining the range coordinates of the text box, the position coordinates of the server test option, the action code combination of the server test option operation, the port number of the main control module, and the ID information of the controlled module;
[0197] The master terminal sends the server test instruction set to the controlled terminal;
[0198] The controlled terminal controls the mouse to locate the test option value of the test item through the range coordinates of the text box and the position coordinates of the server test option;
[0199] The controlled terminal tests the test option of the server through the action code combination of the server test option operation.
[0200] Furthermore, after the controlled end tests the server using the range coordinates of the text box, the position coordinates of the server test option, and the action code combination of the server test option operation, the method further includes:
[0201] Determining whether the test option operation on the server is successfully executed;
[0202] If yes, then determine whether all test options of the server have been tested; if not, end the test process;
[0203] The determining whether all test options of the server have been tested includes:
[0204] Determine whether all test options of the server have been tested;
[0205] If so, the test process ends; if not, the server test interface information is obtained again through the VGA capture card, the text information of the server test interface is obtained through the image analysis and recognition program, a text box is generated according to the text information of the server test interface, and the remaining test options of the server are tested.
[0206] Figure 6 The exemplary system provided in the fifth embodiment of the present invention can be used to implement various embodiments described in this application;
[0207] like Figure 6As shown, in some embodiments, the system can be used as any of the above-mentioned devices for remotely controlling testing in each of the described embodiments. In some embodiments, the system may include one or more computer-readable media (e.g., system memory or NVM / storage device) having results and one or more processors (e.g., (one or more) processors) coupled to the one or more computer-readable media and configured to execute the results to implement the module to perform the actions described in this application.
[0208] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by computer programs and the corresponding hardware. The above-mentioned computer programs can be stored in a non-volatile computer-readable storage medium. When the computer programs are executed, they can include the processes of the above-mentioned embodiments. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0209] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0210] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.
Claims
1. A remote control test method, characterized in that: The remote control test method is applied to a remote control test system, which includes a master terminal and a controlled terminal, wherein the output terminal of the master terminal is connected to the input terminal of the controlled terminal; the controlled terminal includes a server, a display device, and a VGA acquisition card, and the output terminal of the server is connected to the input terminal of the display device through the VGA acquisition card. The method includes: receiving a test instruction for the server; Acquire server test interface information through the VGA capture card, acquire text information of the server test interface through an image analysis and recognition program, and generate a text box according to the text information of the server test interface; Obtaining the range coordinates of the text box and the position coordinates of the server test option; Match the test option value and the test option operation instruction of the test item according to the server test item name; match the action code combination of the server test option operation corresponding to the test option operation instruction according to the input device instruction code table; Generate the server test instruction set by combining the range coordinates of the text box, the position coordinates of the server test option, the action code combination of the server test option operation, the port number of the main control module, and the ID information of the controlled module; The master terminal sends the server test instruction set to the controlled terminal; The controlled terminal controls the mouse to locate the test option value of the test item through the range coordinates of the text box and the position coordinates of the server test option; The controlled terminal tests the test option of the server through the action code combination of the server test option operation.
2. The remote control test method according to claim 1, wherein: Before receiving the test instruction for the server, the method further includes: The successful sending and receiving of control instructions between the master terminal and the controlled terminal is completed.
3. The remote control test method according to claim 2, wherein: The main control end includes a remote control machine, the remote control machine includes a main control module, and the server includes a controlled module; The successful sending and receiving of control instructions between the master terminal and the controlled terminal includes: Determine whether the main control module and the controlled module can be recognized normally; If yes, the port number of the master control module and the ID information of the controlled module are obtained, the master control terminal sends a control instruction to the controlled terminal through the port number of the master control module and the ID information of the controlled module, and determines whether the controlled terminal successfully receives the control instruction; if not, the test process ends; The determining whether the controlled terminal successfully receives the control instruction includes: Determining whether the controlled terminal successfully receives the control instruction; If so, the successful sending and receiving of control instructions between the master terminal and the controlled terminal is completed; if not, the test process ends.
4. The remote control test method according to claim 1, wherein: The controlled terminal further includes an acquisition device; the server test interface information is acquired through the VGA acquisition card, the text information of the server test interface is acquired through the image analysis and recognition program, and before a text box is generated according to the text information of the server test interface, the method includes: Determine whether the acquisition device can be turned on normally; If yes, then determine whether the server test interface can be displayed normally; if not, end the test process; The determining whether the server test interface can be displayed normally includes: Determine whether the server test interface can be displayed normally; If so, the server test interface information is obtained through the VGA capture card, the text information of the server test interface is obtained through the image analysis and recognition program, and a text box is generated according to the text information of the server test interface; if not, the test process is ended.
5. The remote control test method according to claim 1, wherein: After the controlled end tests the server by using the range coordinates of the text box, the position coordinates of the server test option, and the action code combination of the server test option operation, the method further includes: Determining whether the test option operation on the server is successfully executed; If yes, then determine whether all test options of the server have been tested; if not, end the test process; The determining whether all test options of the server have been tested includes: Determine whether all test options of the server have been tested; If so, the test process ends; if not, the server test interface information is obtained again through the VGA capture card, the text information of the server test interface is obtained through the image analysis and recognition program, a text box is generated according to the text information of the server test interface, and the remaining test options of the server are tested.
6. A remote control test device, characterized in that: The remote control test device is applied to a remote control test system, which includes a master terminal and a controlled terminal, wherein the output terminal of the master terminal is connected to the input terminal of the controlled terminal; the controlled terminal includes a server, a display device, and a VGA acquisition card, wherein the output terminal of the server is connected to the input terminal of the display device via the VGA acquisition card. The device includes: A receiving module, configured to receive a test instruction to the server; A processing module is used to obtain server test interface information through a VGA capture card, obtain text information of the server test interface through an image analysis and recognition program, and generate a text box according to the text information of the server test interface; an acquisition module, configured to acquire the range coordinates of the text box and the position coordinates of the server test option, match the test option value and the test option operation instruction of the test item according to the server test item name; and match the action code combination of the server test option operation corresponding to the test option operation instruction according to the input device instruction code table; The test module is used to generate the server test instruction collection based on the range coordinates of the text box, the position coordinates of the server test option, the action code combination of the server test option operation, the port number of the main control module, and the ID information of the controlled module; the main control end sends the server test instruction collection to the controlled end; the controlled end controls the mouse to locate the test option value of the test item through the range coordinates of the text box and the position coordinates of the server test option; the controlled end tests the server test option through the action code combination of the server test option operation.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the remote control test method according to any one of claims 1 to 5.
8. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a memory, the steps of the remote control test method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Test control method, master control device, controlled device and test system
CN110858175A
Remote task processing system and method
CN111083226A