CN113923443A - Network video recorder testing method and device and computer readable storage medium - Google Patents
Network video recorder testing method and device and computer readable storage medium Download PDFInfo
- Publication number
- CN113923443A CN113923443A CN202111133440.0A CN202111133440A CN113923443A CN 113923443 A CN113923443 A CN 113923443A CN 202111133440 A CN202111133440 A CN 202111133440A CN 113923443 A CN113923443 A CN 113923443A
- Authority
- CN
- China
- Prior art keywords
- test
- information
- video recorder
- network video
- parameter
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 285
- 238000000034 method Methods 0.000 claims description 33
- 230000004048 modification Effects 0.000 claims description 21
- 238000012986 modification Methods 0.000 claims description 21
- 238000012545 processing Methods 0.000 claims description 9
- 238000010998 test method Methods 0.000 claims description 5
- 238000004590 computer program Methods 0.000 claims description 3
- 230000006870 function Effects 0.000 description 19
- 230000008569 process Effects 0.000 description 19
- 230000005540 biological transmission Effects 0.000 description 4
- 238000011990 functional testing Methods 0.000 description 3
- 238000013522 software testing Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000003252 repetitive effect Effects 0.000 description 2
- 230000003466 anti-cipated effect Effects 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013100 final test Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
- 238000012384 transportation and delivery Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
- H04N5/78—Television signal recording using magnetic recording
- H04N5/781—Television signal recording using magnetic recording on disks or drums
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
Abstract
The application discloses a network video recorder testing method and device and a computer readable storage medium. The network video recorder testing method provided by the application comprises the following steps: acquiring a script file; mounting the script file on a network video recorder through a network file system; running the script file mounted on the network video recorder to obtain the test information of the network video recorder; and obtaining a test result according to preset expected information and the test information. The network video recorder testing method provided by the application improves the testing efficiency of the network video recorder.
Description
Technical Field
The present application relates to, but not limited to, the field of computers, and in particular, to a method and an apparatus for testing a network video recorder, and a computer-readable storage medium.
Background
The NVR (Network Video Recorder) has various types and models, and in order to ensure the normal operation of the Network Video Recorder, various functions of the Network Video Recorder need to be tested to ensure the normal operation of the equipment. At present, the mode of carrying out the function test to the network video recorder is manual test, and in the testing process, the tester needs to carry out a large amount of repetitive operations, and efficiency of software testing is lower.
Disclosure of Invention
The present application is directed to solving at least one of the problems in the prior art. Therefore, the application provides a network video recorder testing method, a network video recorder testing device and a computer readable storage medium, which can improve the testing efficiency of the network video recorder.
An embodiment of a first aspect of the present application provides a network video recorder testing method, including: acquiring a script file; mounting the script file on a network video recorder through a network file system; running the script file mounted on the network video recorder to obtain the test information of the network video recorder; and obtaining a test result according to preset expected information and the test information.
The network video recorder testing method according to the embodiment of the application has at least the following technical effects: according to the network video recorder testing method, the script file is mounted on the network video recorder through the network file system, the script file is operated to obtain the testing information, then the testing result is obtained according to the expected information, the function testing of the network video recorder is achieved, and compared with a manual testing mode, the testing efficiency of the network video recorder is greatly improved.
According to some embodiments of the application, the obtaining the script file comprises: acquiring a configuration parameter file; and obtaining the script file according to a preset test program code, the configuration parameter file and preset test coordinate information.
According to some embodiments of the present application, the obtaining the configuration parameter file includes: acquiring a configuration parameter program code; running the configuration parameter program code to obtain a parameter input window; collecting test target information according to the parameter input window; and generating the configuration parameter file according to the test target information.
According to some embodiments of the application, the running the script file mounted on the network video recorder to obtain the test information of the network video recorder includes: carrying out parameter modification processing on the network video recorder according to the preset test coordinate information; acquiring current information of the network video recorder after the parameter modification processing; and obtaining the test information according to the current information.
According to some embodiments of the application, the expected information comprises expected parameter information, expected protocol information; the test information comprises test parameter information and test protocol information; the obtaining of the test result according to the preset expected information and the test information includes: and if the expected protocol information and the test protocol information are the same, obtaining the test result according to the expected parameter information and the test parameter information.
According to some embodiments of the present application, the obtaining the test result according to the expected parameter information and the test parameter information includes: comparing the expected parameter information with the test parameter information to obtain a comparison result; acquiring test time information and test version information; and generating the test result according to the comparison result, the test time information and the test version information.
According to some embodiments of the application, the method further comprises: and sending the test result to a test terminal in a mail mode.
An embodiment of a second aspect of the present application provides a network video recorder testing apparatus, including: the acquisition module is used for acquiring the script file; the mounting module is used for mounting the script file on the network video recorder through a network file system; the running module is used for running the script file mounted on the network video recorder to obtain the test information of the network video recorder; and the test module is used for obtaining a test result according to preset expected information and the test information.
An embodiment of a third aspect of the present application provides a network video recorder testing apparatus, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor when executing the program implementing: the application provides a network video recorder testing method in the above first aspect embodiment.
A computer-readable storage medium according to an embodiment of the fourth aspect of the present application, having stored thereon computer-executable instructions for: the network video recorder testing method described in the embodiment of the first aspect is implemented.
Additional aspects and advantages of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application.
Drawings
The present application is further described with reference to the following figures and examples, in which:
FIG. 1 is a flow chart of a network video recorder testing method according to some embodiments of the present application;
fig. 2 is a flowchart of step S110 in fig. 1;
FIG. 3 is a flowchart of step S210 in FIG. 2;
FIG. 4 is a flowchart of step S130 in FIG. 1;
FIG. 5 is a flowchart of step S140 in FIG. 1;
FIG. 6 is a flowchart of step S530 in FIG. 5;
FIG. 7 is a flow chart of a network video recorder testing method according to further embodiments of the present application;
FIG. 8 is a schematic diagram of a network video recorder test system according to some embodiments of the present application;
fig. 9 is a flowchart of a network video recorder testing method according to still other embodiments of the present application.
Reference numerals: computer 810, network video recorder 820, acquisition card 830, packet capturing switch 840 and network video camera 850
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In the description of the present application, the meaning of a plurality is one or more, the meaning of a plurality is two or more, and the above, below, exceeding, etc. are understood as excluding the present number, and the above, below, within, etc. are understood as including the present number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present application, unless otherwise expressly limited, terms such as set, mounted, connected and the like should be construed broadly, and those skilled in the art can reasonably determine the specific meaning of the terms in the present application by combining the detailed contents of the technical solutions.
In the description of the present application, reference to the description of the terms "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The network video recorder has a plurality of types, and in order to ensure the normal work of the network video recorder, various functions of the network video recorder need to be tested so as to ensure the normal operation of equipment.
The mode that carries out functional test to network video recorder at present is artifical test, and the tester can spend a large amount of time to carry out basic functional test to the network video recorder of different models when testing it, and what artifical test mode exists is not enough: a large number of repetitive operations can cause fatigue of the tester and the product quality cannot be guaranteed; moreover, the network video recorder has too many models, once serious problems are tested, the product needs to be sent to developers again for modification, the testers can only test again, and the testing efficiency is very low.
The current manual test reaches the bottleneck period of improvement, and only the optimization improvement can be carried out on a test case and a test method so as to improve the efficiency and shorten the test time.
In view of this, in order to solve the problems of long time consumption and low efficiency in manual testing of the network video recorder, embodiments of the present application provide a network video recorder testing method, which is used for realizing automatic testing of functions of the network video recorder and improving testing efficiency of the network video recorder.
The embodiment of the application provides a network video recorder testing method, which comprises the following steps: acquiring a script file; mounting the script file on a network video recorder through a network file system; running the script file mounted on the network video recorder to obtain the test information of the network video recorder; and obtaining a test result according to preset expected information and test information.
As shown in fig. 1, fig. 1 is a flowchart of a network video recorder testing method provided in some embodiments, where the network video recorder testing method includes, but is not limited to, steps S110 to S140, and specifically includes:
s110, acquiring a script file;
s120, mounting the script file on the network video recorder through a network file system;
s130, running the script file mounted on the network video recorder to obtain the test information of the network video recorder;
and S140, obtaining a test result according to preset expected information and test information.
In step S110, the script file is a program file for performing a function test on the network video recorder, in a specific embodiment, the script file includes but is not limited to a Python script, and the difficulty of writing the Python is relatively low, so that the efficiency is relatively high when writing the test case. It should be noted that the script file also adopts a shell script.
The model of present network video recorder is various, in current test method, need carry out the mount operation to script file when testing at every turn to the network video recorder of being convenient for calls the file, if the object of testing at every turn is the network video recorder of different models, then need carry out the mount again when changing the test object at every turn, and the mount order diverse that the network video recorder of different grade type corresponds, this at to a great extent has reduced network video recorder's efficiency of software testing.
In step S120, the File required for testing is mounted on the NVR through the NFS (Network File System), so that the mounting can be directly realized according to the general mounting command, thereby shielding the influence of different NVR models on the test and improving the test efficiency. In a specific embodiment, the NVR system is developed based on a linux system, and the general mount command is the linux mount command.
In steps S130 to S140, after the mounting step is completed, the script file is run to perform a function test on the network video recorder to obtain test information, and then the test information is compared with expected information to obtain a test result.
According to the network video recorder testing method, the script file is mounted on the network video recorder through the network file system, the script file is operated to obtain the testing information, the testing result is obtained according to the expected information, the function testing of the network video recorder is achieved, and compared with a manual testing mode, the testing efficiency of the network video recorder is greatly improved.
According to some embodiments of the present application, obtaining a script file comprises: acquiring a configuration parameter file; and obtaining a script file according to a preset test program code, a configuration parameter file and preset test coordinate information.
Fig. 2 is a flow chart of step S110 in some embodiments, and step S110 illustrated in fig. 2 includes, but is not limited to, steps S210 to S220:
s210, acquiring a configuration parameter file;
and S220, obtaining a script file according to the preset test program code, the configuration parameter file and the preset test coordinate information.
In step S210, the configuration parameter file is used to characterize a specific test object, for example, when a specific network video recorder is tested, the configuration parameter file is a configuration file generated by using the device number of the network video recorder to be tested; for another example, in the process of testing a network video recorder, an IPC (IP Camera) connected to the network video recorder needs to be selected as a specific test target, and video data acquired by the network Camera is called to perform a function test, at this time, the configuration parameter file is the device number of the network Camera.
In step S220, the test program code includes, but is not limited to, program code required by the test procedure, and a program file library, such as Python code, Python library, and the like. The test coordinate information is used for representing the specific position of mouse clicking during testing, and a mouse event can be initiated according to the test coordinate position in the running process of the script, namely, the mouse is simulated to move and click, for example, a to-be-tested control in the to-be-tested interface is clicked, so that the parameter modification of the target control is realized.
In step S220, the generation process of the script file includes: and importing the target information in the configuration parameter file into a test program code, determining a test target of the test, generating a pre-script file, importing the test coordinate information into the pre-script file, determining the coordinates of the control in the test item of the test, and generating the script file.
And obtaining a script file according to a preset test program code, a configuration parameter file and preset test coordinate information.
According to some embodiments of the present application, obtaining a configuration parameter file comprises: acquiring a configuration parameter program code; running a configuration parameter program code to obtain a parameter input window; collecting test target information according to the parameter input window; and generating a configuration parameter file according to the test target information.
Fig. 3 is a flow chart of step S210 in some embodiments, and step S210 illustrated in fig. 3 includes, but is not limited to, step S310 to step S340:
s310, acquiring a configuration parameter program code;
s320, operating a configuration parameter program code to obtain a parameter input window;
s330, collecting test target information according to the parameter input window;
and S340, generating a configuration parameter file according to the test target information.
In step S310, the configuration parameter program code is program code for generating a configuration parameter file;
in steps S320 to S330, by running the configuration parameter program code, a parameter input window is popped up in the display device of the computer running the program, for the tester to input the target information according to the object of the current test; the target information includes but is not limited to: the equipment number of the network video recorder to be tested and the equipment number of the network video camera used by the network video recorder to be tested for collecting images.
In step S340, a configuration parameter file is generated according to the target information in step S330, where the configuration parameter file is used to generate a script file for testing the network video recorder, and is used to lock the target of the current test, so that the test process can be smoothly performed.
According to some embodiments of the present application, running a script file mounted on a network video recorder to obtain test information of the network video recorder includes: carrying out parameter modification processing on the network video recorder according to preset test coordinate information; acquiring current information of the network video recorder after parameter modification processing; and obtaining test information according to the current information.
Fig. 4 is a flowchart of step S130 in some embodiments, and step S130 illustrated in fig. 4 includes, but is not limited to, step S410 to step S430:
s410, modifying parameters of the network video recorder according to preset test coordinate information;
s420, acquiring the current information of the network video recorder after the parameter modification processing;
and S430, obtaining test information according to the current information.
In step S410, the preset test coordinate information is the preset test coordinate information in step S220, the test coordinate information is used to represent a specific position clicked by the mouse during the test, and a mouse event is initiated according to the test coordinate position in the running process of the script, that is, the mouse is simulated to move and click, for example, a to-be-tested control in the to-be-tested interface is clicked, so that parameter modification of the target control is realized.
It should be noted that the interface to be tested is a test interface corresponding to the item to be tested, and the interface includes at least one control to be tested.
In step S410, it is important for the network video recorder to perform parameter modification processing, and after the parameter modification, the real-time change condition of the network video is observed and compared with the expected theoretical change condition, so as to verify whether the function of the to-be-tested control of the to-be-tested project is normal, thereby achieving the testing effect.
Specifically, the parameter modification process includes, but is not limited to, channel name modification, light mode modification, and rate-frame rate coding parameter modification of IPC, where the rate-frame rate coding parameter modification includes: modifying the encoding mode from H264 to H265 specifically includes: and (4) using a linux event, moving a mouse to enter an IPC parameter setting interface, and changing the IPC code from H264 to H265 by moving the mouse.
It should be noted that the test coordinate is obtained manually, that is, before the test is performed, the tester manually clicks the position of the control in the test window of the item to be tested, so as to implement manual modification of the parameters of the network video recorder corresponding to the control, and the computer for testing records the coordinate manually clicked by the tester this time, and records the coordinate as the test coordinate information, and is used for subsequent automated test of the test item.
In step S420, after the parameter modification process is performed, current information of the network video recorder is collected, and in a specific embodiment, the current information includes, but is not limited to, real-time audio and video information, log information, network information, and the like of the network video recorder during operation.
In step S430, the computer for testing collates and stores the real-time audio/video information, the log information, and the network information to obtain test information, where the test information represents information of the network video recorder collected after parameter modification, and is used to compare subsequent information with expected information to verify whether the function of the network video recorder is normal.
According to some embodiments of the application, the expected information comprises expected parameter information, expected protocol information; the test information comprises test parameter information and test protocol information; obtaining a test result according to preset expected information and test information, wherein the test result comprises the following steps: and if the expected protocol information and the test protocol information are the same, obtaining a test result according to the expected parameter information and the test parameter information.
Fig. 5 is a flowchart of step S140 in some embodiments, and step S140 illustrated in fig. 5 includes, but is not limited to, step S510 to step S530:
s510, acquiring test protocol information;
s520, judging whether the test protocol information is the same as the expected protocol information; if yes, go to step S530; if the determination result is negative, continue to execute step S510;
and S530, obtaining a test result according to the expected parameter information and the test parameter information.
In particular embodiments, the expected information includes, but is not limited to: expected parameter information and expected protocol information; the test information comprises but is not limited to test parameter information and test protocol information, wherein the expected parameter information and the test parameter information are used for comparing the expected condition and the real-time condition after the parameters are modified so as to show whether the function of the network video recorder is normal or not; the expected protocol information and the test protocol information are data transmission protocols followed by the tested data in the transmission process, each protocol corresponds to a series of data transmission formats and rules, and therefore, the items to be tested need to be tested according to specific protocols.
In steps S510 to S530, extracting test Protocol information from the collected test information, taking a Protocol of Video data as an example, the test Protocol information includes but is not limited to RTSP (Real Time Streaming Protocol), TPS (Transmission Parameter signaling), ONVIF (Open Network Video Interface Forum); the protocol of the test data is identified in the test process so as to realize the targeted test of the target protocol, thereby improving the test accuracy.
In a specific embodiment, when the same test item is tested, data of different protocols are respectively captured, whether the test item changes according to expected conditions is respectively verified, and then the corresponding test results under each protocol are summarized and analyzed to obtain the final test result aiming at the test item, so that the accuracy and the scientificity of the function test of the network video recorder are improved.
According to some embodiments of the present application, obtaining the test result according to the expected parameter information and the test parameter information includes: comparing the expected parameter information with the test parameter information to obtain a comparison result; acquiring test time information and test version information; and generating a test result according to the comparison result, the test time information and the test version information.
Fig. 6 is a flowchart of step S530 in some embodiments, and step S530 illustrated in fig. 6 includes, but is not limited to, step S610 to step S630:
s610, comparing the expected parameter information with the test parameter information to obtain a comparison result;
s620, acquiring test time information and test version information;
and S630, generating a test result according to the comparison result, the test time information and the test version information.
In step S610, the expected parameter information and the test parameter information are compared, and whether the expected result is consistent with the actual result is determined, so as to generate a comparison result.
Specifically, the modification operations corresponding to different test items are different, and the comparison processes of the expected parameter information and the test parameter information are also different, and the comparison process is described in the following specific embodiment:
(1) when the modified content is: when the IPC parameter IP is changed to 192.111.12.5, the comparison process comprises the following steps: firstly, whether network message data is preset protocol content is analyzed through packet capturing, and then broadcast searching equipment compares whether equipment IP is successfully modified.
(2) When the modified content is: when the brightness and the saturation of the IPC are both changed to 200, the comparison process comprises the following steps: firstly, setting up an IPC equipment environment as a white board picture, capturing a packet after configuration to analyze whether network message data is the content of a preset protocol, and then capturing an IPC real-time picture and comparing the IPC real-time picture with a preset white board to judge whether the set picture changes.
(3) When the modified content is: the code stream is changed into an encoding format H265 and the image resolution is 448P, and the comparison process comprises the following steps: and the packet capturing analysis is carried out on whether the network message data is the preset protocol content or not, whether 265 data are normally decoded by a decoding channel corresponding to the local equipment or not is inquired, and whether the decoding width and the decoding height are 800 × 448 or not is inquired.
(4) When the modified content is: the NVR local output parameters are configured, and the comparison process comprises the following steps: the method comprises the steps of firstly obtaining information of an NVR local configuration file, secondly obtaining whether actual parameter information of equipment is consistent with preset information through a system interface, and finally comparing the information obtained through a collecting card with the preset information.
In steps S620 to S630, the comparison result obtained in step S610, the test time information, and the test version information are summarized to generate a test result.
In a specific embodiment, the content of the test result includes: "the current test model is: TS 8232C; the current automated test version number is: v4.5.9.1, respectively; automated test item pass number: 31; number of failed automation test items: 79; volume setting module results: 2021/7/74: 48: 2821-: is that; whether normal audition can be performed: if not; 2021/7/74: 48: 2821-: is that; whether normal audition can be performed: if not; video management module results … … system configuration-time module results … … system configuration-channel management-codestream configuration module results … … system configuration-advanced settings module results … … ".
According to some embodiments of the application, the method further comprises: and sending the test result to the test terminal in a mail mode.
As shown in fig. 7, fig. 7 is a flowchart of a network video recorder testing method according to another embodiment, where the network video recorder testing method further includes:
s710, obtaining a test result;
and S720, sending the test result to the test terminal in a mail mode.
In steps S710 to S720, after the test result is obtained, since the network video recorder belongs to the embedded system and the data storage, management, and query capabilities of the network video recorder are insufficient, the test result is conveniently stored and checked at any time and sent to the test terminal in an email manner, so that a tester can maintain and use the data conveniently.
Referring to fig. 8, a network video recorder testing method is described in detail in a specific embodiment. It is to be understood that the following description is illustrative only and is not intended to be in any way limiting.
In a specific embodiment, the network video recorder testing method is used in a network video recorder testing system, as shown in fig. 8, fig. 8 is a schematic diagram of a network video recorder testing system, which includes, but is not limited to, a computer 810, a network video recorder 820, an acquisition card 830, a packet capturing switch 840, and a network video camera 850. Wherein, the computer 810 is respectively connected with the network video recorder 820, the acquisition card 830 and the packet capturing switch 840; the network video recorder 820 is respectively connected with the acquisition card 830 and the packet capturing switch 840; the packet capture switch 840 is connected to a network camera 850.
In a specific embodiment, the network video recorder is a test object and is used for being tested, Python script running, Linux mouse moving operation and the like; the acquisition card is used for acquiring information such as pictures, audio and the like of the network video recorder; the network video camera is a main source of video acquisition and is used as an auxiliary test object for assisting in completing the related configuration test of the network video recorder; the computer is connected with the network video recorder through a serial port to generate a configuration parameter file, is used for assisting in mounting a python operation library, capturing test signals and network data in real time, analyzing acquisition card data and comparing data test information; the packet capturing switch is used for connecting all the devices in series under the same network and facilitating a computer to perform packet capturing operation on the network video recorder, the network camera and other devices.
It should be noted that, the packet capture switch may use a common packet capture switch, and perform packet capture analysis on the NVR end by using a tcpdump tool in cooperation.
Referring to fig. 9, a network video recorder testing method is described in detail in a specific embodiment. It is to be understood that the following description is illustrative only and is not intended to be in any way limiting.
As shown in fig. 9, fig. 9 is a flowchart of a network video recorder testing method according to still other embodiments, where the network video recorder testing method further includes:
s910, acquiring a configuration parameter file and test coordinate information;
s920, mounting a python script file on the NVR through the NFS, wherein the script file comprises a cross-compiled python library, a python code, test coordinate information and a configuration parameter file;
s930, connecting the acquisition card to acquire real-time image and audio information of the NVR;
s940, running a script file, and simulating manual movement and mouse clicking through coordinates of each control on different interfaces;
s950, the python script file captures and stores parameter information such as logs, system information, acquisition card image audio and the like output in the moving process of the mouse in real time;
s960, comparing the actually modified parameters with expected parameters through the python script to generate an automatic test result.
In step S910, the configuration parameter file is used to characterize a specific test object, for example, when a specific network video recorder is tested, the configuration parameter file is a configuration file generated by using the device number of the network video recorder to be tested; for another example, in the process of testing the network video recorder, the IPC connected to the network video recorder needs to be selected as a specific test target, and the video data acquired by the network video camera is called to perform a function test, at this time, the configuration parameter file is the device number of the network video camera.
In step S910, the test coordinate information is used to represent a specific position clicked by the mouse during the test, and a mouse event is initiated according to the test coordinate position during the script running process, that is, the mouse is simulated to move and click, for example, a to-be-tested control in the to-be-tested interface is clicked, so as to modify parameters of the target control.
In step S930, the acquisition card is used to acquire the image acquired by the NVR through IPC in real time, so as to be used for the computer to analyze.
In step S960, the current information includes, but is not limited to, the actual modified parameters, and the expected information includes, but is not limited to, the expected parameters; after the actual modified parameters are obtained, the parameters are compared with the expected parameters, if the parameters are the same as the expected parameters, the corresponding function of the test item is normal, and if the parameters are different from the expected parameters, the corresponding function of the test item is abnormal, and further the normal or abnormal conditions of the specific functions of the test item are summarized to generate a test result.
In a specific embodiment, a network video recorder testing method realizes the simulation of manually moving and clicking a mouse by recording coordinate information of each control on different interfaces through a Linux mouse event, simultaneously captures the mouse in real time through a python script, collects current information through a collection card according to log information output in the moving process of the mouse, and compares the current information with expected information, thereby realizing the automatic function testing of the network video recorder.
The embodiment of the application provides a network video recorder testing arrangement, includes: the acquisition module is used for acquiring the script file; the mounting module is used for mounting the script file on the network video recorder through the network file system; the operation module is used for operating the script file mounted on the network video recorder so as to obtain the test information of the network video recorder; and the test module is used for obtaining a test result according to preset expected information and test information.
The application provides a network video recorder testing arrangement has realized a network video recorder test method, with the script file through network file system mount on network video recorder, the script file is in order to obtain test information, and then obtains the test result according to anticipated information, has realized carrying out the functional test to network video recorder, compares with artifical test mode, has promoted network video recorder's efficiency of software testing by a wide margin.
The embodiment of the application provides a network video recorder testing arrangement, includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor when executing the program implementing: the application provides a network video recorder testing method of any one of the above embodiments.
A computer-readable storage medium according to an embodiment of the present application stores computer-executable instructions for: a network video recorder testing method implementing any of the above embodiments.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
It will be understood by those of ordinary skill in the art that all or some of the steps, means, and methods disclosed above may be implemented as software, firmware, hardware, or suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
The embodiments of the present application have been described in detail with reference to the drawings, but the present application is not limited to the embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present application. Furthermore, the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
Claims (10)
1. A network video recorder test method is characterized by comprising the following steps:
acquiring a script file;
mounting the script file on a network video recorder through a network file system;
running the script file mounted on the network video recorder to obtain the test information of the network video recorder;
and obtaining a test result according to preset expected information and the test information.
2. The method of claim 1, wherein obtaining the script file comprises:
acquiring a configuration parameter file;
and obtaining the script file according to a preset test program code, the configuration parameter file and preset test coordinate information.
3. The method of claim 2, wherein obtaining the configuration parameter file comprises:
acquiring a configuration parameter program code;
running the configuration parameter program code to obtain a parameter input window;
collecting test target information according to the parameter input window;
and generating the configuration parameter file according to the test target information.
4. The method according to claim 2, wherein the running the script file mounted on the network video recorder to obtain the test information of the network video recorder comprises:
carrying out parameter modification processing on the network video recorder according to the preset test coordinate information;
acquiring current information of the network video recorder after the parameter modification processing;
and obtaining the test information according to the current information.
5. The method of claim 1, wherein the expected information comprises expected parameter information, expected protocol information; the test information comprises test parameter information and test protocol information; the obtaining of the test result according to the preset expected information and the test information includes:
and if the expected protocol information and the test protocol information are the same, obtaining the test result according to the expected parameter information and the test parameter information.
6. The method of claim 5, wherein obtaining the test result according to the expected parameter information and the test parameter information comprises:
comparing the expected parameter information with the test parameter information to obtain a comparison result;
acquiring test time information and test version information;
and generating the test result according to the comparison result, the test time information and the test version information.
7. The method of any one of claims 1 to 6, further comprising:
and sending the test result to a test terminal in a mail mode.
8. Network video recorder testing arrangement, its characterized in that includes:
the acquisition module is used for acquiring the script file;
the mounting module is used for mounting the script file on the network video recorder through a network file system;
the running module is used for running the script file mounted on the network video recorder to obtain the test information of the network video recorder;
and the test module is used for obtaining a test result according to preset expected information and the test information.
9. Network video recorder testing arrangement, its characterized in that includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor when executing the program implementing:
the method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon computer-executable instructions for:
performing the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111133440.0A CN113923443A (en) | 2021-09-27 | 2021-09-27 | Network video recorder testing method and device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111133440.0A CN113923443A (en) | 2021-09-27 | 2021-09-27 | Network video recorder testing method and device and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113923443A true CN113923443A (en) | 2022-01-11 |
Family
ID=79236209
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111133440.0A Pending CN113923443A (en) | 2021-09-27 | 2021-09-27 | Network video recorder testing method and device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113923443A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115601799A (en) * | 2022-09-09 | 2023-01-13 | 广州市盛通建设工程质量检测有限公司(Cn) | Evaluation method, system, equipment and storage medium based on face recognition |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101241466A (en) * | 2007-02-08 | 2008-08-13 | 深圳迈瑞生物医疗电子股份有限公司 | Embedded software test method and system |
CN102622234A (en) * | 2012-03-07 | 2012-08-01 | 迈普通信技术股份有限公司 | Development system and method for automatic test case |
CN102636704A (en) * | 2012-03-05 | 2012-08-15 | 深圳市英威腾电气股份有限公司 | Testing method, device and system for electronic product |
CN107943636A (en) * | 2017-12-07 | 2018-04-20 | 郑州云海信息技术有限公司 | It is a kind of that the method tested is performed based on more machine batches under Linux |
CN110601915A (en) * | 2019-08-12 | 2019-12-20 | 深圳市同维通信技术有限公司 | Method and device for testing gateway device |
CN110928775A (en) * | 2019-11-12 | 2020-03-27 | 许继集团有限公司 | Test script configuration method and device for IEC61850 consistency test |
CN112612699A (en) * | 2020-12-21 | 2021-04-06 | 上海金途信息科技有限公司 | General automatic test equipment for HID (high intensity discharge) human-computer interaction scene use case |
JP2021060854A (en) * | 2019-10-08 | 2021-04-15 | コニカミノルタ株式会社 | Program and method for automating device test, and script generation apparatus |
-
2021
- 2021-09-27 CN CN202111133440.0A patent/CN113923443A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101241466A (en) * | 2007-02-08 | 2008-08-13 | 深圳迈瑞生物医疗电子股份有限公司 | Embedded software test method and system |
CN102636704A (en) * | 2012-03-05 | 2012-08-15 | 深圳市英威腾电气股份有限公司 | Testing method, device and system for electronic product |
CN102622234A (en) * | 2012-03-07 | 2012-08-01 | 迈普通信技术股份有限公司 | Development system and method for automatic test case |
CN107943636A (en) * | 2017-12-07 | 2018-04-20 | 郑州云海信息技术有限公司 | It is a kind of that the method tested is performed based on more machine batches under Linux |
CN110601915A (en) * | 2019-08-12 | 2019-12-20 | 深圳市同维通信技术有限公司 | Method and device for testing gateway device |
JP2021060854A (en) * | 2019-10-08 | 2021-04-15 | コニカミノルタ株式会社 | Program and method for automating device test, and script generation apparatus |
CN110928775A (en) * | 2019-11-12 | 2020-03-27 | 许继集团有限公司 | Test script configuration method and device for IEC61850 consistency test |
CN112612699A (en) * | 2020-12-21 | 2021-04-06 | 上海金途信息科技有限公司 | General automatic test equipment for HID (high intensity discharge) human-computer interaction scene use case |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115601799A (en) * | 2022-09-09 | 2023-01-13 | 广州市盛通建设工程质量检测有限公司(Cn) | Evaluation method, system, equipment and storage medium based on face recognition |
CN115601799B (en) * | 2022-09-09 | 2023-06-30 | 广州市盛通建设工程质量检测有限公司 | Evaluation method, system, equipment and storage medium based on face recognition |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107948640B (en) | Video playing test method and device, electronic equipment and storage medium | |
CN108920380A (en) | Test method, device, server, equipment and the storage medium of the software compatibility | |
CN109413417B (en) | System and method for detecting interactive television service quality | |
CN104956339A (en) | Generating software test script from video | |
CN105472417A (en) | Method of acquiring video player abnormity and apparatus thereof | |
CN106303515A (en) | A kind of online live video quality detecting method and device | |
CN112055237B (en) | Method, system, apparatus, device and storage medium for determining screen-to-screen delay | |
CN111143213A (en) | Software automation test method and device and electronic equipment | |
CN111309632A (en) | Application program testing method and device, computer equipment and storage medium | |
CN110113598A (en) | A kind of Network Personal Video Recorder test method and system | |
CN113824987B (en) | Method, medium, device and computing equipment for determining time consumption of first frame of live broadcasting room | |
CN113923443A (en) | Network video recorder testing method and device and computer readable storage medium | |
CN115396705A (en) | Screen projection operation verification method, platform and system | |
CN116527879A (en) | Set top box testing method, device, medium and computer device | |
CN114419502A (en) | Data analysis method and device and storage medium | |
CN112837640A (en) | Screen dynamic picture testing method, system, electronic equipment and storage medium | |
EP3273689A1 (en) | Method of testing the operation of a video player embedded in an electronic display device | |
CN110198480A (en) | A kind of code stream test method and device | |
CN111817916B (en) | Test method, device, equipment and storage medium based on mobile terminal cluster | |
CN110113630B (en) | Video detection method and device, electronic equipment and storage medium | |
CN115550638A (en) | Camera state detection system and method | |
CN115017174B (en) | Display content monitoring method and system of passenger information system and electronic equipment | |
CN115426534A (en) | Video stream quality detection method, device, equipment and storage medium | |
CN111553497A (en) | Equipment working state detection method and device of multimedia terminal | |
CN112769645A (en) | Terminal testing method and device, terminal equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |