CN113452965B - Automatic test method and system for testing compatibility of switch and network camera - Google Patents

Automatic test method and system for testing compatibility of switch and network camera Download PDF

Info

Publication number
CN113452965B
CN113452965B CN202110716887.4A CN202110716887A CN113452965B CN 113452965 B CN113452965 B CN 113452965B CN 202110716887 A CN202110716887 A CN 202110716887A CN 113452965 B CN113452965 B CN 113452965B
Authority
CN
China
Prior art keywords
video
frame loss
test
network camera
testing
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.)
Active
Application number
CN202110716887.4A
Other languages
Chinese (zh)
Other versions
CN113452965A (en
Inventor
陈婷
蔡玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tenda Technology Co Ltd
Original Assignee
Shenzhen Tenda Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Tenda Technology Co Ltd filed Critical Shenzhen Tenda Technology Co Ltd
Priority to CN202110716887.4A priority Critical patent/CN113452965B/en
Publication of CN113452965A publication Critical patent/CN113452965A/en
Application granted granted Critical
Publication of CN113452965B publication Critical patent/CN113452965B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides an automatic test method and system for testing compatibility of a switch and a network camera, and belongs to the technical field of switch testing. The testing method comprises the following steps: setting address sets and running time of a plurality of network cameras connected with the network cameras; respectively controlling the network camera to record the video of the operation time period according to the sequence of the address set; after all the recordings are finished, calling a video frame loss analysis program to analyze the frame loss rate of the recorded video successively; comparing the frame loss rate of each video with the frame loss rate of each video according to the test standard; and outputting a specific analysis result set of the network camera video. The beneficial effects of the invention are as follows: a large amount of release manpower resources, reduce the human cost, improve efficiency of software testing and precision.

Description

Automatic test method and system for testing compatibility of switch and network camera
Technical Field
The present invention relates to a switch testing technology, and in particular, to an automated testing method for testing compatibility between a switch and a network camera.
Background
The switch is often used for monitoring a scene, so the switch should meet the compatibility of supporting various brands of manufacturers, i.e. ip cameras on the market. In the actual network solution scene, various different types of ipcameras of different manufacturers can appear. The existing compatibility test of the switch and the ipcamera is a purely manual test, and a tester is required to check the video fluency in NVR or PC. Moreover, the tester needs to manually establish a test record file to record the test result.
The current test suffers from the following drawbacks:
(1) the compatibility test environment of the switch and the ipcamera is unstable; moreover, a tester is required to frequently switch the ipcamera, the operation steps are repeated for a plurality of times, and the test period is too long;
(2) in the traditional test method, a test person needs to watch videos with naked eyes to obtain a test conclusion, and the naked eyes watch videos for a long time to form a fatigue test, so that the test result has inaccuracy and deviation;
(3) the test file is manually established and the test data is recorded, so that the steps are complicated, the workload is high, and the test omission phenomenon is easy to occur.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides an automatic testing method and system for testing the compatibility of a switch and a network camera.
The invention relates to an automatic testing method for testing compatibility of a switch and a network camera, which comprises the following steps:
s1: setting address sets and running time of a plurality of network cameras connected with the network cameras;
s2: respectively controlling the network camera to record the video of the operation time period according to the sequence of the address set;
s3: after all the recordings are finished, calling a video frame loss analysis program to analyze the frame loss rate of the recorded video successively;
s4: comparing the frame loss rate of each video with the frame loss rate of each video according to the test standard;
s5: and outputting a specific analysis result set of the network camera video.
The invention is further improved, and after the step S1 is executed, the method further comprises a first judging step: and judging whether the test program is called for the first time, if so, automatically generating a video recording result record document, then executing the step S2, and if not, directly executing the step S2.
The invention further improves, after the step S2 is executed, a second judging step is further included: and judging whether the video is successfully recorded, if so, recording the recorded video in a set folder, if not, recording the network camera test result in a video recording result record file as failure until each network camera in the address set runs completely, and then executing step S3.
In step S3, the method loads a setting folder, sequentially analyzes the I frame and P frame loss rate of the recorded video according to the recorded video set, and records the specific frame loss position and time of the video until all the recorded videos are analyzed.
The invention further improves, in step S5, the method also comprises the step of storing the video recording result record file.
The invention also provides a system for realizing the method, which comprises the following steps:
and (3) a configuration module: the method comprises the steps of setting an address set and running time of a plurality of network cameras connected with the address set;
and controlling a video recording module: the network camera is used for respectively controlling the network camera to record the video of the operation time period according to the sequence of the address set;
video frame loss analysis module: the method comprises the steps of calling a video frame loss analysis program to analyze the frame loss rate of recorded video successively after all the recordings are finished;
frame loss rate comparison module: the method comprises the steps of comparing the frame loss rate of each video with the frame loss rate of each video according to a test standard;
and a result output module: and the method is used for outputting a specific analysis result set of the network camera video.
The invention further improves, also includes the first judging module: and the method is used for judging whether the test program is called for the first time, and if so, automatically generating a video recording result record document.
The invention further improves, also includes the second judging module: and if not, recording the network camera test result in the video recording result record file as failure until each network camera in the address set is operated.
Compared with the prior art, the invention has the beneficial effects that: the full automation of the internet protocol camera compatibility test is realized, the manpower is reduced, and the test efficiency and the accuracy are improved.
Drawings
FIG. 1 is a schematic diagram of a test procedure according to the present invention;
FIG. 2 is a flow chart of the testing method of the present invention.
Detailed Description
The invention will be described in further detail with reference to the drawings and examples.
In order to overcome the defects of the existing manual testing technology, the automatic testing system respectively improves and improves the accuracy and efficiency of the existing testing technology from the three aspects of building a testing environment, executing testing and recording testing results. The detailed technology and design adopted by the present invention are described in detail below.
The invention tests hardware networking:
(1) Test required equipment: one PC, one NVR (network hard disk recorder), one exchanger to be tested, one video player, five kinds of network cables with N (N is more than or equal to 1) 2 meters and N (N is more than or equal to 1) auxiliary ip cameras (network cameras).
(2) Test configuration: the switch to be tested is set to be in a monitoring mode, and a testing environment is built.
(3) Networking realization:
and respectively connecting the switch to be tested with a PC, an NVR and N auxiliary ip cameras, wherein the PC is configured with a network card address of 192.168.0.100, the switch to be tested is configured with a WEB management address of 192.168.0.1, the NVR management address is 192.168.0.205, and the cameras are sequentially set to 192.168.0.10-20 (assuming that the ip cameras are 11 in the test).
An automated test program for testing compatibility between the switch and the ip camera is installed on the PC.
As shown in FIG. 1, the automatic test program of the invention is a universal platform realized based on Python language, and mainly comprises 4 test modules of an automatic control interface, test variable setting, test execution and output result.
The specific test program is designed as follows:
1. recording a real-time video ip camera test.py program: logging in an NVR management interface through a google browser at a PC end by automatically controlling a software program, sequentially opening real-time videos of the IP cameras corresponding to a preset management IP address, recording the real-time videos of the corresponding IP cameras according to test options constructed by a client, and storing the real-time videos in a project bar under a user-defined Vedio directory.
2. Video frame loss analysis main. Py program: and (3) analyzing the frame loss rate of the I frame and the P frame of the monitoring video through the Python automation script, comparing the frame loss rate with a preset result, and outputting a test conclusion.
As shown in fig. 2, the specific test method of the present invention is as follows:
1. a testing environment is built in the early stage, and a plurality of ip cameras are simultaneously connected into a switch according to networking requirements;
2. the tester runs the automation script IPCamera test.py program on the PC, and pops up the control interface of IPcamera test;
3. inputting an ip camera management address set 1,2,3, n, which is required to record a video, through a control interface, setting video recording time, and clicking a [ start ] button after setting a test variable;
4. judging whether the program is called for the first time, if so, automatically generating a video recording result record file xls by the program;
5. if the running program is not called for the first time, logging in a Web page of the NVR through a browser by the automatic program, according to the preset ip camera management address set 1,2 and 3.
6. If the video recording FAILs due to the drop of the ip camera or other reasons, recording the test result as FAIL in a video recording result record file;
7. step 5-6 is circulated until the traversal of the set ip camera 'management address set' is completed, a video frame loss analysis main. Py program is called, and the frame loss rate of the recorded video I frames and P frames is sequentially analyzed according to the recorded video set;
8. judging whether all recorded videos are traversed, if not, continuing to analyze the frame loss rate of the I frame and the P frame of the next recorded video, and recording the specific frame loss position and time of the video in a monitoring video analysis result folder;
9. if the recorded video is traversed, the I frame loss rate and the P frame loss rate analyzed by each recorded video are compared with a preset test through a standard, and finally a specific analysis result set of the ip camera video is output.
10. And (5) exiting the test program, storing the record document, and ending the test.
In the whole test process, the tester only needs to build a test environment and run an IPcamera test.py program according to the requirement, the management IP address and video recording time of the compatibility IPcamera to be executed are set in the test program, then a [ start ] button is clicked to execute the test, the program can automatically traverse all the IPcameras set by the tester, automatically record videos, save recorded videos, analyze the video frame loss rate, and automatically output the specific analysis result of the IPcamera videos for the tester to check after the test is completed, so the invention has the following outstanding beneficial effects:
(1) The full automation of the ip camera compatibility test is realized, the manpower is reduced, and the test efficiency and the accuracy are improved;
(2) The laboratory test resources are released, and the on-hook test can be carried out when idle;
(3) The execution of the test task and the derivation of the full-automatic test result can be completed only by realizing the corresponding function based on Python, so that the test period is greatly shortened.
The above embodiments are preferred embodiments of the present invention, and are not intended to limit the scope of the present invention, which includes but is not limited to the embodiments, and equivalent modifications according to the present invention are within the scope of the present invention.

Claims (8)

1. The automatic test method for testing the compatibility of the switch and the network camera is characterized by comprising the following steps:
s1: setting address sets and running time of a plurality of network cameras connected with the switch;
s2: respectively controlling the network camera to record the video of the operation time period according to the sequence of the address set;
s3: after all the recordings are finished, calling a video frame loss analysis program to analyze the frame loss rate of the recorded video successively;
s4: comparing the frame loss rate of each video with the frame loss rate of each video according to the test standard;
s5: and outputting a specific analysis result set of the network camera video.
2. The automated test method for testing the compatibility of a switch with a webcam of claim 1, wherein: after the step S1 is executed, the method further includes a first judging step: and judging whether the test program is called for the first time, if so, automatically generating a video recording result record document, then executing the step S2, and if not, directly executing the step S2.
3. The automated testing method for testing switch and web camera compatibility of claim 2, wherein: after the step S2 is executed, the method further includes a second judging step: and judging whether the video is successfully recorded, if so, recording the recorded video in a set folder, if not, recording the network camera test result in a video recording result record file as failure until each network camera in the address set runs completely, and then executing step S3.
4. The automated testing method for testing switch and web camera compatibility of claim 3, wherein: in step S3, loading a setting folder, sequentially analyzing the frame loss rate of I frames and P frames of the recorded video according to the recorded video set, and recording the specific frame loss position and time of the video until all the recorded videos are analyzed.
5. The automated test method of testing switch and web camera compatibility of claim 4, wherein: in step S5, a step of storing the video recording result record file is further included.
6. A system for implementing the automated test method for testing switch and web camera compatibility of any of claims 1-5, comprising:
and (3) a configuration module: the method comprises the steps of setting an address set and running time of a plurality of network cameras connected with a switch;
and controlling a video recording module: the network camera is used for respectively controlling the network camera to record the video of the operation time period according to the sequence of the address set;
video frame loss analysis module: the method comprises the steps of calling a video frame loss analysis program to analyze the frame loss rate of recorded video successively after all the recordings are finished;
frame loss rate comparison module: the method comprises the steps of comparing the frame loss rate of each video with the frame loss rate of each video according to a test standard;
and a result output module: and the method is used for outputting a specific analysis result set of the network camera video.
7. The system according to claim 6, wherein: the method further comprises a first judging module: and the method is used for judging whether the test program is called for the first time, and if so, automatically generating a video recording result record document.
8. The system according to claim 7, wherein: the method further comprises a second judging module: and if not, recording the network camera test result in the video recording result record file as failure until each network camera in the address set is operated.
CN202110716887.4A 2021-06-25 2021-06-25 Automatic test method and system for testing compatibility of switch and network camera Active CN113452965B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110716887.4A CN113452965B (en) 2021-06-25 2021-06-25 Automatic test method and system for testing compatibility of switch and network camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110716887.4A CN113452965B (en) 2021-06-25 2021-06-25 Automatic test method and system for testing compatibility of switch and network camera

Publications (2)

Publication Number Publication Date
CN113452965A CN113452965A (en) 2021-09-28
CN113452965B true CN113452965B (en) 2023-08-11

Family

ID=77813135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110716887.4A Active CN113452965B (en) 2021-06-25 2021-06-25 Automatic test method and system for testing compatibility of switch and network camera

Country Status (1)

Country Link
CN (1) CN113452965B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116193189A (en) * 2022-10-25 2023-05-30 展讯半导体(成都)有限公司 Frame loss rate testing method, device and system, electronic equipment and storage medium
CN115941573A (en) * 2022-12-07 2023-04-07 四川天邑康和通信股份有限公司 Method for analyzing monitoring video frame loss and judging switch performance

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104918018A (en) * 2015-06-12 2015-09-16 广州朗华汽车电子科技有限公司 Video monitoring system for internet of things
CN106330621A (en) * 2016-09-30 2017-01-11 深圳市吉祥腾达科技有限公司 Testing method for interchanger transmission signal performance and testing system
CN107566788A (en) * 2017-08-15 2018-01-09 深圳市天视通电子科技有限公司 Port and the mapping method and system of Network Personal Video Recorder passage based on interchanger
CN110113598A (en) * 2019-04-17 2019-08-09 深圳市天视通电子科技有限公司 A kind of Network Personal Video Recorder test method and system
CN212305356U (en) * 2020-05-21 2021-01-05 深圳市吉祥腾达科技有限公司 Test system of core switch IPC tape unit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104918018A (en) * 2015-06-12 2015-09-16 广州朗华汽车电子科技有限公司 Video monitoring system for internet of things
CN106330621A (en) * 2016-09-30 2017-01-11 深圳市吉祥腾达科技有限公司 Testing method for interchanger transmission signal performance and testing system
CN107566788A (en) * 2017-08-15 2018-01-09 深圳市天视通电子科技有限公司 Port and the mapping method and system of Network Personal Video Recorder passage based on interchanger
CN110113598A (en) * 2019-04-17 2019-08-09 深圳市天视通电子科技有限公司 A kind of Network Personal Video Recorder test method and system
CN212305356U (en) * 2020-05-21 2021-01-05 深圳市吉祥腾达科技有限公司 Test system of core switch IPC tape unit

Also Published As

Publication number Publication date
CN113452965A (en) 2021-09-28

Similar Documents

Publication Publication Date Title
CN113452965B (en) Automatic test method and system for testing compatibility of switch and network camera
CN108399114B (en) System performance testing method and device and storage medium
CN106844204B (en) Method and system for generating defect report by using mobile terminal
CN106445811B (en) A kind of automatization test system and method based on SecureCRT
CN104717337A (en) Method for testing mobile application in batch and equipment used in method
CN105760296B (en) Automatic test control method, device and terminal
CN109324975B (en) Continuous integration method based on mobile cloud measurement platform
CN111258881B (en) Intelligent test system for workflow test
WO2007061241A1 (en) Error test method for mobile communication terminals
CN111294652A (en) Intelligent television fault online diagnosis method and device and controller
CN108910642A (en) Elevator debugging information processing method, system, readable storage medium storing program for executing and commissioning device
US8458664B2 (en) Command line interface permutation executor
CN113626306A (en) Jenkins-based BMC automatic testing method and device
CN116166536A (en) Test method, test device, electronic equipment and storage medium
CN110087066B (en) One-key automatic inspection method applied to online inspection
CN107704379A (en) A kind of video recording system and application method suitable for automatic test course
CN114281615B (en) Automatic testing system and method for consistency of stored data
CN110838951A (en) Network equipment testing method and system
CN110674036A (en) Cross-platform cooperative function interface test system based on CSG II system
CN117743061B (en) FTTR-based FPGA key wireless static test method, FTTR-based FPGA key wireless static test device, FTTR-based FPGA key wireless static test equipment and medium
Yan et al. Performance Testing of Open Laboratory Management System Based on LoadRunner
CN107491391A (en) A kind of software testing system and method
CN116185879B (en) Python-based intelligent cabin instrument automatic test method and system
CN115982000B (en) Full-scene voice robot testing system, method and storage medium
CN115658464A (en) Automatic testing method, device, equipment and computer readable 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
GR01 Patent grant
GR01 Patent grant