Disclosure of Invention
The technical problem to be solved by the application is to provide a set top box testing system and a set top box testing method, so that the set top box can be remotely tested, the testing cost is reduced, and the testing efficiency is improved.
In order to achieve the above object, the present application provides the following technical solutions:
a set top box testing system, comprising:
the system comprises a local server, a public network server and a controller;
the local server is connected with the set top box to be tested through the public network server and the controller;
the local server is used for sending a preset test script to the set top box to be tested through the public network server and the controller;
and the set top box to be tested is used for executing the test script after receiving the test script so as to realize the remote test of the set top box to be tested.
The above system, optionally, the controller includes:
an execution machine and an image collector;
the execution machine is respectively connected with the public network server, the set top box to be tested and the image collector;
the image collector is connected with the set top box to be tested;
the executive machine is used for receiving the test script sent by the public network server and sending the test script to the set top box to be tested;
the image collector is used for collecting the process image generated by the set top box to be tested executing the test script in real time and sending the process image collected in real time to the execution machine for storage.
Optionally, in the system described above, the set top box under test is further configured to:
and after the test script is executed, sending the execution process data and the execution result data of the test script to the execution machine.
The above system, optionally, the execution machine is further configured to:
receiving the execution process data and the execution result data sent by the set top box to be tested;
and sending the execution process data, the execution result data and the pre-stored process image to the local server through the public network server.
Optionally, in the system described above, the execution machine is configured to send the execution process data, the execution result data, and the pre-stored process image to the local server through the public network server, and includes:
the execution machine is specifically configured to:
forming the execution data, the execution result data and the pre-stored process image into test result data;
compressing the test result data to obtain compressed result data;
performing information abstract calculation on the compression result data to obtain a first information abstract of the compression result data;
and sending the compression result data and the first information abstract to the local server through the public network server.
Optionally, in the system described above, the local server is further configured to:
after receiving the compression result data and the first information abstract, performing information abstract calculation on the compression result data to obtain a second information abstract of the compression result data;
the local server compares the first information abstract with the second information abstract; and if the first information abstract and the second information abstract are in consistent comparison, generating a test report of the set top box to be tested based on the compressed result data.
Optionally, in the system described above, the local server is configured to generate a test report of the set top box to be tested based on the compressed result data, and includes:
the local server is specifically configured to:
decompressing the compressed result data to obtain decompressed result data;
acquiring a preset test report template;
determining each attribute item contained in the test report template;
analyzing the decompression result data to obtain data corresponding to each attribute item in the decompression result data;
and correspondingly writing the data corresponding to each attribute item in the compressed result data into the test report template to obtain the test report of the set top box to be tested.
A set top box testing method comprises the following steps: the set-top box testing method is applicable to the set-top box testing system of any one of the above items, and the method comprises the following steps:
receiving a preset test script sent by the local server through the public network server;
and sending the test script to the set top box to be tested, triggering the set top box to be tested to execute the test script after receiving the test script, so as to realize the remote test of the set top box to be tested.
Optionally, in the method, after the sending the test script to the set top box to be tested, the method further includes:
acquiring a process image generated by the set top box to be tested executing the test script in real time, and storing the process image;
after the set top box to be tested finishes executing the script to be tested, receiving execution process data and execution result data of the set top box to be tested for executing the script to be tested;
and sending the execution process data, the execution result data and the pre-stored process image to the local server through the public network server.
Optionally, the method for sending the execution process data, the execution result data, and the pre-stored process image to the local server through the public network server includes:
forming the execution data, the execution result data and the pre-stored process image into test result data;
compressing the test result data to obtain compressed result data;
performing information abstract calculation on the compression result data to obtain a first information abstract of the compression result data;
and sending the compression result data and the first information abstract to the local server through the public network server.
A storage medium comprises stored instructions, wherein when the instructions are executed, the storage medium is controlled to be located in equipment to execute the set top box testing method.
An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the set-top box testing method described above.
Compared with the prior art, the method has the following advantages:
the application provides a set top box test system and a method, wherein the system comprises: the system comprises a local server, a public network server and a controller; the local server is connected with the set top box to be tested through the public network server and the controller; the local server is used for sending a preset test script to the set top box to be tested through the public network server and the controller; and the set top box to be tested is used for executing the test script after receiving the test script so as to realize the remote test of the set top box to be tested. Therefore, according to the technical scheme provided by the application, the test script is preset, and the public network server and the controller are deployed, so that the local server can send the test script to the set top box to be tested, the test set top box is triggered to execute the test script, the set top box is remotely tested, the set top box does not need to be tested on the spot on business, the test cost is reduced, and the test efficiency is improved.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a top box testing system disclosed in an embodiment of the present application, which specifically includes:
a local server 101, a public network server 102, and a controller 103.
The local server 101 is connected with the set-top box to be tested through the public network server 102 and the controller 103;
the local server 101 is used for sending a preset test script to the set top box to be tested through the public network server 102 and the controller 103;
and the set top box to be tested is used for executing the test script after receiving the test script so as to realize the remote test of the set top box to be tested.
In the system provided by the embodiment of the application, the local server 101 is deployed in a local intranet, the public network server 102 is deployed in a public network, and the local server 101 and the public network server 102 communicate through the public network.
According to the system provided by the embodiment of the application, the local server obtains the preset test script when receiving the test instruction, and determines the set top box to be tested, the local server sends the preset test script to the public network server through the public network, the public network server sends the test script to the controller after receiving the test script, the controller sends the test script to the set top box to be tested through the wireless network after receiving the test script, and the set top box to be tested executes the test script, so that the set top box to be tested is remotely tested.
It should be noted that the local server and the public network server perform timed communication through heartbeat.
In the system provided by the embodiment of the application, the test script is preset, optionally, the preset test script can be stored in the local server in advance, and the local server acquires the pre-stored test script when receiving the test instruction.
The set top box test system provided by the embodiment of the application presets the test script and deploys the public network server and the controller, so that the local server can send the test script to the set top box to be tested, the test set top box is triggered to execute the test script, the remote test of the set top box is realized, the set top box is not required to be tested on site on business, the test cost is reduced, and the test efficiency is improved.
Alternatively, referring to fig. 2, in another embodiment of the present application, the controller 103 includes:
anexecution engine 1031 and animage collector 1032;
theexecution machine 1031 is respectively connected with the public network server 101, the set-top box to be tested and theimage collector 1032;
theimage collector 1032 is connected with the set top box to be tested;
theexecution machine 1031 is used for receiving the test script sent by the public network server 101 and sending the test script to the set top box to be tested;
theimage collector 1032 is configured to collect, in real time, a process image generated by the set top box to be tested executing the test script, and send the process image collected in real time to theexecution machine 1031 for storage.
In the system that this application embodiment provided, the controller includes executor and image collector, and the executor passes through the IP port with public network server and is connected, and the executor passes through wireless wifi with the STB that awaits measuring to be connected, and image collector all is connected through the HDMI connecting wire with the executor and the STB that awaits measuring.
In the system provided by the embodiment of the application, the executive machine receives the test script sent by the public network server through the IP port, the test script is sent to the set top box to be tested through wireless wifi, the set top box to be tested executes the test script, the image collector collects the process image of the set top box to be tested executing the test script through HDMI, and the process image is sent to the executive machine for storage. The process image is an image displayed by the set top box to be tested in the process of executing the test script by the set top box to be tested.
In the system provided by the embodiment of the application, the set top box to be tested is further configured to obtain execution process data for executing the test script and execution result data for executing the test script after the test script is executed, and send the execution process data and the execution result data to the execution machine.
In the system provided by the embodiment of the application, the execution machine is further used for receiving execution process data and execution result data sent by the set top box to be tested; and sending the execution process data, the execution result data and the pre-stored process image to a local server through a public network server. The execution machine sends the execution process data, the execution result data and the pre-stored process image to the local server through the public network server, and is specifically used for:
composing the execution data, the execution result data and the pre-stored process image into test result data;
compressing the test result data to obtain compressed result data;
performing information abstract calculation on the compression result data to obtain a first information abstract of the compression result data;
and sending the compression result data and the first information abstract to a local server through a public network server.
In the system provided by the embodiment of the application, after receiving execution process data and execution result data sent by a set top box to be tested, an execution machine forms the execution process data and the result data and a pre-stored process image into test result data, compresses the test result data to obtain compressed result data, performs information summary calculation on the compressed result data to obtain a first information summary of the compressed result data, optionally performs information summary calculation on the compressed result data based on an MD5 algorithm to obtain a first information summary, sends the compressed result data and the first information summary to a public network server, and sends the compressed result data and the first information summary to a local server through the public network server.
Optionally, the execution machine may further receive a process image acquisition request sent by the local server through the public network server, and send a process image pre-stored by the execution machine to the local server.
According to the set top box test system, the process image, the execution process data and the execution result data of the set top box to be tested are compressed and sent, so that the loss of network resources is reduced, the process image is sent to the local server, and the fault position of the set top box to be tested is accurately positioned when the set top box to be tested breaks down.
In the system provided in the embodiment of the present application, the local server is further configured to:
after receiving the compression result data and the first information abstract, performing information abstract calculation on the compression result data to obtain a second information abstract of the compression result data;
the local server compares the first information abstract with the second information abstract; and if the first information abstract and the second information abstract are in consistent comparison, generating a test report of the set top box to be tested based on the compressed result data.
In the set top box test system provided by the embodiment of the application, after receiving the compression result data and the first information abstract, the local server performs information abstract calculation on the compression result data to obtain a second information abstract. It should be noted that, the algorithm used for calculating the information summary of the compressed result data by the local server is the same algorithm as the algorithm used for calculating the information summary of the compressed result data by the execution machine; comparing the first information abstract with the second information abstract, if the comparison result is consistent, generating a test report of the set top box to be tested based on the compressed result data, if the comparison result is inconsistent, sending a test result acquisition request to the executive machine to request to acquire the test result, and sending the compressed result data and the first information abstract to the local server again by the executive machine until the comparison result is consistent. According to the method and the device, the first information abstract is sent to the local server, the local server obtains the second information abstract through calculation based on the first information abstract, and the second information abstract is compared with the first information abstract, so that the problem of data loss caused by instability of a remote network is solved.
The local server is used for generating a test report of the set top box to be tested based on the compression result data, and the test report comprises:
the local server is specifically configured to:
decompressing the compression result data to obtain decompressed result data;
acquiring a preset test report template;
determining each attribute item contained in the test report template;
analyzing the decompression result data to obtain data corresponding to each attribute item in the decompression result data;
and correspondingly writing the data corresponding to each attribute item in the compressed result data into the test report template to obtain the test report of the set top box to be tested.
In the set top box test system provided in the embodiment of the application, the local server decompresses the compression result data to obtain the decompression result data corresponding to the compression result data, analyzes the decompression result data for each attribute item included in the template included in the test determined to be preset to obtain the data corresponding to each attribute item included in the decompression result data, and writes the data corresponding to each data item into the test report to obtain the test report of the set top box to be tested. In the system provided by the embodiment of the application, by generating the test report of the set top box to be tested, technicians can conveniently obtain the test result of the set top box to be tested.
In the set top box test system provided by the embodiment of the application, a technician can also send a set top box control instruction to a local server, the local server sends the set top box control instruction to an executive machine through a public network server after receiving the set top box control instruction, the executive machine triggers an image collector to collect the current image of a set top box to be tested and transmits the collected image back to the local server through the public network server, the local server displays the image after receiving the image and receives a set top box test instruction sent by the technician, the set top box test instruction is sent to the executive machine through the public network server, the executive machine sends the set top box test instruction to the set top box to be tested, the set top box to be tested executes the set top box test instruction, and the executive machine receives a process image which is sent by the image collector and used for executing the set top box test, and feeding back the process image to a local server, and returning back the step of executing and receiving the set top box test instruction sent by the technician by the local server until the local server receives the ending instruction, and ending the remote test process of the set top box to be tested.
The embodiment of the invention provides a set top box testing method, which can be applied to a set top box testing system, wherein an execution main body of the method can be a controller in the set top box testing system, and a method flow chart of the method is shown in fig. 3 and specifically comprises the following steps:
s301, receiving a preset test script sent by a local server through a public network server.
The local server obtains a preset test script after receiving the test instruction, and sends the test script to the public network server, and the public network server sends the test script to the controller after receiving the test script.
The controller receives a test script sent by a public network.
S302, the test script is sent to the set top box to be tested, the set top box to be tested is triggered to execute the test script after receiving the test script, and therefore remote testing of the set top box to be tested is achieved.
The controller sends the test script to the set top box to be tested, and the set top box to be tested is triggered to execute the test script after receiving the test script, namely, the test script is operated, so that the remote test of the machine type of the set top box to be tested is realized.
According to the set top box testing method provided by the embodiment of the application, the controller receives the testing script sent by the local server through the public network server, sends the testing script to the set top box to be tested, and triggers the set top box to be tested to execute the testing script, so that the set top box is remotely tested without going on a business trip to test the set top box on site, the testing cost is reduced, and the testing efficiency is improved.
Referring to fig. 4, after the step S302 in fig. 3 of the embodiment of the present application mentioned above sends the test script to the set top box to be tested, the method may further include:
s401, acquiring a process image generated by the set top box to be tested executing the test script in real time, and storing the process image.
The controller collects a process image generated in the process of executing the test script by the set top box to be tested in real time and stores the process image.
Optionally, in the process of executing the test script by the set-top box to be tested, the public network server may most actively request to acquire the process image generated by the set-top box to be tested executing the test script, that is, send the process image acquisition request to the controller, and when receiving the process image acquisition request sent by the local server through the public network server, the controller acquires the process image pre-stored by the controller and sends the process image to the local server.
S402, after the set top box to be tested finishes executing the script to be tested, receiving the execution process data and the execution result data of the set top box to be tested executing the script to be tested.
And after the set top box to be tested finishes executing the test script, acquiring execution process data and execution result data of the execution test script, and sending the execution process data and the execution result data to the controller.
And the controller receives execution process data and execution result data sent by the set top box to be tested.
And S403, sending the execution process data, the execution result data and the pre-stored process image to a local server through the public network server.
The controller sends the execution process data, the execution result data and the pre-stored process image to the local server through the public network server. Specifically, the execution process data, the execution result data and the process image form test result data, the test result data is compressed to obtain compressed result data, information abstract calculation is performed on the compressed result data by using an MD5 algorithm to obtain a first information abstract of the compressed result data, and the compressed result data and the first information abstract are sent to a local server through a public network server.
In the method provided by the embodiment of the application, after receiving the compressed result data and the first information abstract data, the local server performs information abstract calculation on the compressed result data by using an MD5 algorithm to obtain a second information abstract, compares the first information abstract with the second information abstract, decompresses the compressed result data if the comparison is consistent, obtains decompressed result data, obtains a preset test report template, determines each attribute item in the test report template, obtains data corresponding to each attribute item in the decompressed result data by analyzing the decompressed result data, and writes the data corresponding to each attribute item into the test report template to obtain the test report of the set top box to be tested.
According to the set top box testing method, the process image, the execution process data and the execution result data of the set top box to be tested are compressed and sent, so that the loss of network resources is reduced, the process image is sent to the local server, the fault position of the set top box to be tested is accurately positioned when the set top box to be tested breaks down, the first information abstract is sent to the local server, the local server obtains the second information abstract through calculation based on the first information abstract, the second information abstract is compared with the first information abstract, and the problem of data loss caused by instability of a remote network is solved.
The embodiment of the application also provides a storage medium, wherein the storage medium comprises stored instructions, and when the instructions are executed, the equipment where the storage medium is located is controlled to execute the set top box test method.
The present embodiment further provides an electronic device, whose schematic structural diagram is shown in fig. 5, specifically including amemory 501 and one ormore instructions 502, where the one ormore instructions 502 are stored in thememory 501, and are configured to be executed by one ormore processors 503 to perform the following operations according to the one or more instructions 502:
receiving a preset test script sent by the local server through the public network server;
and sending the test script to the set top box to be tested, triggering the set top box to be tested to execute the test script after receiving the test script, so as to realize the remote test of the set top box to be tested.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
The above detailed description is given to a set top box testing system and method provided by the present application, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.