CN105306302A - Method and system for automatically testing Qinq function - Google Patents

Method and system for automatically testing Qinq function Download PDF

Info

Publication number
CN105306302A
CN105306302A CN201510741015.8A CN201510741015A CN105306302A CN 105306302 A CN105306302 A CN 105306302A CN 201510741015 A CN201510741015 A CN 201510741015A CN 105306302 A CN105306302 A CN 105306302A
Authority
CN
China
Prior art keywords
testing equipment
network interface
interface card
qinq
automated
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.)
Granted
Application number
CN201510741015.8A
Other languages
Chinese (zh)
Other versions
CN105306302B (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.)
Huzhou Yinglie Intellectual Property Operation Co ltd
Original Assignee
Shanghai Feixun Data Communication 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201510741015.8A priority Critical patent/CN105306302B/en
Publication of CN105306302A publication Critical patent/CN105306302A/en
Application granted granted Critical
Publication of CN105306302B publication Critical patent/CN105306302B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to the field of automatic testing, and in particular relates to a method and system for automatically testing a Qinq function. The method and system disclosed by the invention are applied to test equipment and used for testing the Qinq function of a switch port. The method comprises the following steps that: a serial interface tool of the test equipment logs in a bottom layer of tested equipment; an automatic program in the test equipment starts the Qinq function of the tested equipment; furthermore, a plurality of vlans are established; the automatic program sends a test message to the tested equipment; the automatic program receives a feedback message of the test equipment; furthermore, the automatic program matches the feedback message with a pre-set result; and whether the Qinq function is abnormal or not can be determined.

Description

The automated testing method of Qinq function and system
Technical field
The present invention relates to automatic test field, particularly relate to a kind of automated testing method and system of Qinq function.
Background technology
At present when testing Qinq function, need change to the port mode in testing equipment, by equipment arranging band vlantag, message not with vlantag, different tpid value giving out a contract for a project, receiving at receiving terminal and E-Packeting, verifying whether Qinq function comes into force by analytic message.This test needs manually repeatedly configure the port mode of equipment under test and create multiple vlanmap mapping table, sends, resolves, verifies various message.Testing procedure is similar, often changes port mode and all can send identical band vlantag, message not with vlantag, different tpid value, operate repeat loaded down with trivial details.
Summary of the invention
For problems of the prior art, the invention provides a kind of automated testing method and system of Qinq function, the test of intellectuality, automation can be carried out.
The present invention adopts following technical scheme:
An automated testing method for Qinq function, be applied to the Qinq functional test of testing equipment to switch, described automated testing method comprises:
Step S1, described testing equipment utilizes serial ports instrument to log in the bottom of switch;
Step S2, described testing equipment opens the Qinq function of described switch, and creates multiple vlan;
Step S3, described testing equipment sends test packet to described switch;
Step S4, described testing equipment receives the feedback message of described switch, and is mated with default result by described feedback message, to determine that whether the Qinq function of described switch is normal according to the result of coupling.
Preferably, in described automated testing method:
Described testing equipment sends the receiving port of test packet to described switch;
Described testing equipment feeds back message described in the forwarding port accepts of described testing equipment.
Preferably, described receiving port is set as UNI pattern, and described forwarding ports-settings is NNI or UNI pattern.
Preferably, in described automated testing method:
Described testing equipment comprises the first network interface card and the second network interface card; And
Described testing equipment sends described test packet to described switch by described first network interface card;
Described testing equipment receives by the second network interface card the described feedback message that described testing equipment sends.
Preferably, described test packet comprises: be with vlan, not with vlan and different tpid values; And
Described testing equipment by vlan and the tpid value of described feedback message with preset result and mate.
Preferably, in described automated testing method:
If when described feedback message mates with default result, then the Qinq function of described switch is normal;
Otherwise, the Qinq dysfunction of described switch.
Preferably, described automated testing method also comprises:
Step S51: after described step S4, revises the tpid value of described receiving port and/or forwarding port, continues to perform described step S3.
Preferably, described automated testing method also comprises:
Step S52, after described step S4, arranges multiple vlan at described receiving port and/or forwarding port and maps, continue to perform described step S3.
Preferably, described automated testing method also comprises:
Step S53, after described step S4, revising described receiving port is NNI pattern, and described forwarding port is NNI or UNI pattern, continues to perform described step S3.
An automatization test system for Qinq function, described automated system comprises:
Testing equipment, comprises the first network interface card and the second network interface card;
Switch, comprises receiving port and forwards port; And
First network interface card of described testing equipment is connected with the receiving port of switch, and the second network interface card of described testing equipment is connected with the forwarding port of described switch; The serial ports of described testing equipment is connected with the serial ports of described switch; Wherein
Described testing equipment sends test packet to described receiving port by the first network interface card, and the second network interface card of described testing equipment is by forwarding port accepts feedback message, by resolving described feedback message, described testing equipment determines that whether Qinq function is normal.
Preferably, testing equipment is stored in described testing equipment; And
Described testing equipment sends test packet to described receiving port by the first network interface card, second network interface card of described testing equipment is by forwarding port accepts feedback message, described feedback message mates with default result by described testing equipment, and the result according to coupling determines that whether Qinq function is normal.
The invention has the beneficial effects as follows:
Testing efficiency of the present invention is high, automated procedures can configure the combination of various port mode, configure tpid and the vlanapp information of all supports and do not need to consume manpower manual test, program is only needed automatically to run, and this test can complete on one's own time, improve testing efficiency, the test resource that the present invention simultaneously needs is few, only needs PC and two network interface card.After networking, only need click this program and automatically run, and automatically can read result:, automatically parse vlantag and the tpid value of message, and contrast with expected results, comparing result is accurately errorless.Pinpoint the problems and stop in time.
Accompanying drawing explanation
Fig. 1 is the structural representation of the automatization test system of Qinq function of the present invention;
Fig. 2 is the schematic diagram of the automated testing method of Qinq function of the present invention.
Embodiment
It should be noted that, when not conflicting, following technical proposals, can combine between technical characteristic mutually.
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is further described:
In reality test, need the test environment of two terminal equipments and equipment under test composition.Manually configure the port mode of equipment under test and multiple vlanmap mapping table, software of giving out a contract for a project is set and sends various appointment message, then whether meet Qing rule by vlantag and the tpid value in packet receiving software parses message.At present not for the automated testing method of switch ports themselves Qinq function.
Embodiment one
The present embodiment devises automated procedures, controls the automatic logging device of serial ports instrument, and control PC network interface card sends specifies message (test packet), and analyzing device E-Packets.Vlantag and the tpid value parsed and expected results contrast by this program.Do not mate with expected results if find, out of service, eject miscue.
The present embodiment provides a kind of automatization test system of Qinq function, and automated system comprises:
Testing equipment, comprises the first network interface card and the second network interface card;
Equipment under test (can be switch), comprises receiving port and forwards port; And
First network interface card of testing equipment is connected with the receiving port of equipment under test, and the second network interface card of testing equipment is connected with the forwarding port of equipment under test; The serial ports of testing equipment is connected with the serial ports of equipment under test; Wherein
Testing equipment sends message to receiving port by the first network interface card, and the second network interface card of testing equipment is by forwarding port accepts feedback message, by resolving feedback message, testing equipment determines that whether Qinq function is normal.
In the present invention's preferred embodiment, in testing equipment, store automated procedures; And
Automated procedures send message to receiving port by the first network interface card, and the second network interface card of automated procedures is by forwarding port accepts feedback message, and automated procedures will be fed back message and mate with default result, and the result according to coupling determines that whether Qinq function is normal.
In the present embodiment, need the testing equipment (can be PC) of a double netcard, network interface card 1 (the first network interface card) connects the receiving port of equipment under test, and network interface card 2 (the second network interface card) connects the forwarding port of equipment under test; The serial ports of this PC is connected the serial ports of equipment under test; Finally automated procedures are copied into this PC.
Embodiment two
The present embodiment provides a kind of automated testing method of Qinq function, and be applied to the Qinq functional test of testing equipment to switch ports themselves, automated testing method comprises:
Step S1: the serial ports instrument of testing equipment logs in the bottom of equipment under test;
Step S2: the automated procedures in testing equipment open the Qinq function of equipment under test, and create multiple vlan;
Step S3: automated procedures send message (test packet) to equipment under test;
Step S4 automated procedures receive the feedback message of testing equipment, and automated procedures will be fed back message and mate with default result, determine that whether Qinq function is normal.
In the present invention's preferred embodiment, automated testing method specifically comprises:
Automated procedures send the receiving port of message to equipment under test;
Automated procedures are from the forwarding port accepts feedback message of testing equipment.
In the present invention's preferred embodiment, receiving port is set as UNI pattern; Forwarding ports-settings is NNI or UNI pattern.
In the present invention's preferred embodiment, automated testing method specifically comprises:
Testing equipment comprises the first network interface card and the second network interface card; And
Automated procedures send message to equipment under test by the first network interface card;
Automated procedures receive the feedback message of testing equipment by the second network interface card.
In the present invention's preferred embodiment, message comprises: band vlan and not with vlan and different tpid values; And
Automated procedures by vlan and the tpid value of feedback message with preset result and mate.
In the present invention's preferred embodiment, automated testing method also comprises:
When feedback message mates with default result, then Qinq function is normal, when automated procedures can not receive feedback message or feedback message does not mate with default result, and Qinq dysfunction.
In the present invention's preferred embodiment, automated testing method also comprises:
Step S51: after step S4, the tpid value of amendment receiving port and/or forwarding port, performs step S3.
In the present invention's preferred embodiment, automated testing method also comprises:
Step S52: after step S4, arranges multiple vlan at receiving port and/or forwarding port and maps, perform step S3.
In the present invention's preferred embodiment, automated testing method also comprises:
Step S53: after step S4, amendment receiving port is set as NNI pattern, and forwarding ports-settings is NNI or UNI pattern, performs step S3.
In the present invention's preferred embodiment, automated testing method also comprises:
Automated procedures are copied in testing equipment by step S0: before step S1.
In the present embodiment, the serial ports instrument of automated procedures (hereinafter referred to as program) control PC logs in equipment under test bottom, program opening device Qinq, creates multiple vlan, the receiving port of network interface card 1 connection device, the forwarding port of network interface card 2 connection device; Programming equipment receiving port is UNI pattern, and forwarding port is NNI/UNI pattern; Program is transmit band vlantag, message not with vlantag, different tpid value respectively, and is sent to the receiving port of equipment by the network interface card 1 of PC; Program is resolved network interface card 2 and is received vlantag and the tpid value of message and contrast with expected results, if without receiving or not mating, eject miscue, and out of service.
In the present invention's preferred embodiment, the TPID value of amendment receiving port, repeated execution of steps S3;
In the present invention's preferred embodiment, amendment forwards the TPID value of port, repeated execution of steps S3;
In the present invention's preferred embodiment, various vlan is set at receiving port and maps, repeated execution of steps S3;
In the present invention's preferred embodiment, various vlan is set at forwarding port and maps, repeated execution of steps S3;
In the present invention's preferred embodiment, amendment receiving port is NNI pattern, and forwarding port is NNI/UNI pattern, repeated execution of steps S3.
In sum, the network interface card that the present invention designs a kind of method control PC sends appointment message, configured port pattern and vlanmap table, monitoring also analyzing device E-Packets, whether checking Qinq function comes into force, and adopts automated procedures to test, and real-time test results monitored.The present invention can change port mode (UNI, NNI pattern) flexibly and use automated procedures to configure various vlanmap mapping table; Use automated procedures control PC network interface card to send and specify message, use automated procedures vlantag and the tpid value parsed and expected results to be contrasted, real-time test results monitored, gets off if any exception record simultaneously, and shut-down operation.Testing efficiency of the present invention is high, automated procedures can configure the combination of various port mode, configure tpid and the vlanapp information of all supports and do not need to consume manpower manual test, program is only needed automatically to run, and this test can complete on one's own time, improve testing efficiency, the test resource that the present invention simultaneously needs is few, only needs PC and two network interface card.After networking, only need click this program and automatically run, and automatically can read result, automatically parse vlantag and the tpid value of message, and contrast with expected results, comparing result is accurately errorless.Pinpoint the problems and stop in time.
By illustrating and accompanying drawing, giving the exemplary embodiments of the ad hoc structure of embodiment, based on the present invention's spirit, also can do other conversion.Although foregoing invention proposes existing preferred embodiment, but these contents are not as limitation.
For a person skilled in the art, after reading above-mentioned explanation, various changes and modifications undoubtedly will be apparent.Therefore, appending claims should regard the whole change and correction of containing true intention of the present invention and scope as.In Claims scope, the scope of any and all equivalences and content, all should think and still belong to the intent and scope of the invention.

Claims (11)

1. an automated testing method for Qinq function, is characterized in that, be applied to the Qinq functional test of testing equipment to switch, described automated testing method comprises:
Step S1, described testing equipment utilizes serial ports instrument to log in the bottom of switch;
Step S2, described testing equipment opens the Qinq function of described switch, and creates multiple vlan;
Step S3, described testing equipment sends test packet to described switch;
Step S4, described testing equipment receives the feedback message of described switch, and is mated with default result by described feedback message, to determine that whether the Qinq function of described switch is normal according to the result of coupling.
2. the automated testing method of Qinq function according to claim 1, is characterized in that, in described automated testing method:
Described testing equipment sends the receiving port of test packet to described switch;
Described testing equipment feeds back message described in the forwarding port accepts of described testing equipment.
3. the automated testing method of Qinq function according to claim 2, is characterized in that, described receiving port is set as UNI pattern, and described forwarding ports-settings is NNI or UNI pattern.
4. the automated testing method of Qinq function according to claim 1, is characterized in that, in described automated testing method:
Described testing equipment comprises the first network interface card and the second network interface card; And
Described testing equipment sends described test packet to described switch by described first network interface card;
Described testing equipment receives by the second network interface card the described feedback message that described testing equipment sends.
5. the automated testing method of Qinq function according to claim 1, is characterized in that, described test packet comprises: be with vlan, not with vlan and different tpid values; And
Described testing equipment by vlan and the tpid value of described feedback message with preset result and mate.
6. the automated testing method of Qinq function according to claim 1, is characterized in that, in described automated testing method:
If when described feedback message mates with default result, then the Qinq function of described switch is normal;
Otherwise, the Qinq dysfunction of described switch.
7. the automated testing method of Qinq function according to claim 2, is characterized in that, described automated testing method also comprises:
Step S51: after described step S4, revises the tpid value of described receiving port and/or forwarding port, continues to perform described step S3.
8. the automated testing method of Qinq function according to claim 2, is characterized in that, described automated testing method also comprises:
Step S52, after described step S4, arranges multiple vlan at described receiving port and/or forwarding port and maps, continue to perform described step S3.
9. the automated testing method of Qinq function according to claim 2, is characterized in that, described automated testing method also comprises:
Step S53, after described step S4, revising described receiving port is NNI pattern, and described forwarding port is NNI or UNI pattern, continues to perform described step S3.
10. an automatization test system for Qinq function, is characterized in that, described automated system comprises:
Testing equipment, comprises the first network interface card and the second network interface card;
Switch, comprises receiving port and forwards port; And
First network interface card of described testing equipment is connected with the receiving port of switch, and the second network interface card of described testing equipment is connected with the forwarding port of described switch; The serial ports of described testing equipment is connected with the serial ports of described switch; Wherein
Described testing equipment sends test packet to described receiving port by the first network interface card, and the second network interface card of described testing equipment is by forwarding port accepts feedback message, by resolving described feedback message, described testing equipment determines that whether Qinq function is normal.
The automatization test system of 11. Qinq functions according to claim 10, is characterized in that, store testing equipment in described testing equipment; And
Described testing equipment sends test packet to described receiving port by the first network interface card, second network interface card of described testing equipment is by forwarding port accepts feedback message, described feedback message mates with default result by described testing equipment, and the result according to coupling determines that whether Qinq function is normal.
CN201510741015.8A 2015-11-04 2015-11-04 The automated testing method and system of Qinq functions Active CN105306302B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510741015.8A CN105306302B (en) 2015-11-04 2015-11-04 The automated testing method and system of Qinq functions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510741015.8A CN105306302B (en) 2015-11-04 2015-11-04 The automated testing method and system of Qinq functions

Publications (2)

Publication Number Publication Date
CN105306302A true CN105306302A (en) 2016-02-03
CN105306302B CN105306302B (en) 2018-07-13

Family

ID=55203082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510741015.8A Active CN105306302B (en) 2015-11-04 2015-11-04 The automated testing method and system of Qinq functions

Country Status (1)

Country Link
CN (1) CN105306302B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095459A (en) * 2016-06-21 2016-11-09 林添孝 A kind of be automatically performed embedded software storehouse select the implementation method with specialization
CN108667953A (en) * 2018-04-27 2018-10-16 四川斐讯信息技术有限公司 A kind of the lease function test method and system, test device of DHCP service

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056224A (en) * 2007-05-31 2007-10-17 杭州华三通信技术有限公司 A loop detection method and device for the network device
CN101141380A (en) * 2006-09-07 2008-03-12 华为技术有限公司 Method and system of transmitting packet
CN101217338A (en) * 2007-01-06 2008-07-09 华为技术有限公司 Detection message transmitting method, network element device
WO2009030173A1 (en) * 2007-09-03 2009-03-12 Huawei Technologies Co., Ltd. Processing method and device for qinq termination configuration
CN102055720A (en) * 2009-10-28 2011-05-11 中兴通讯股份有限公司 QinQ-based message transmission method and device
CN102170388A (en) * 2010-02-26 2011-08-31 杭州华三通信技术有限公司 Method, system and apparatus for obtaining information of opposite terminal backbone edge bridge devices

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141380A (en) * 2006-09-07 2008-03-12 华为技术有限公司 Method and system of transmitting packet
CN101217338A (en) * 2007-01-06 2008-07-09 华为技术有限公司 Detection message transmitting method, network element device
CN101056224A (en) * 2007-05-31 2007-10-17 杭州华三通信技术有限公司 A loop detection method and device for the network device
WO2009030173A1 (en) * 2007-09-03 2009-03-12 Huawei Technologies Co., Ltd. Processing method and device for qinq termination configuration
CN102055720A (en) * 2009-10-28 2011-05-11 中兴通讯股份有限公司 QinQ-based message transmission method and device
CN102170388A (en) * 2010-02-26 2011-08-31 杭州华三通信技术有限公司 Method, system and apparatus for obtaining information of opposite terminal backbone edge bridge devices

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095459A (en) * 2016-06-21 2016-11-09 林添孝 A kind of be automatically performed embedded software storehouse select the implementation method with specialization
CN108667953A (en) * 2018-04-27 2018-10-16 四川斐讯信息技术有限公司 A kind of the lease function test method and system, test device of DHCP service

Also Published As

Publication number Publication date
CN105306302B (en) 2018-07-13

Similar Documents

Publication Publication Date Title
CN109361562B (en) Automatic testing method based on associated network equipment access
US9122671B2 (en) System and method for grammar based test planning
CN106326088B (en) Method and device for realizing construction of test object and device for realizing service configuration test
CN105205003A (en) Automated testing method and device based on clustering system
CN104683797A (en) Intelligent television production test method and system
CN103973858B (en) The Auto-Test System of mobile terminal
WO2022127575A1 (en) Automatic testing method and system for wifi devices and readable storage medium
US20090036115A1 (en) System and method for testing gsm modules
CN106776346B (en) Test method and device of CCMTS (China center testing System) equipment
CN111597083B (en) Testing system of intelligent terminal
CN107592332A (en) Network system, cloud connector and the method for identifying the network equipment
CN103731663A (en) Method and device for testing smart television
CN110764036B (en) Intelligent distribution transformer terminal test method and system
CN111970166B (en) Test method, device, equipment, system and computer readable storage medium
CN105471678A (en) Method and system for detecting networking failure reason of household appliance and mobile terminal
CN110677322B (en) Python language-based industrial control safety equipment automatic test system and method
CN105306302A (en) Method and system for automatically testing Qinq function
CN105515890A (en) OpenFlow protocol consistency testing method and equipment
CN103376777B (en) The method of testing of the Modbus communication interface of controller and host computer
CN105468486A (en) Method and device for testing serial ports of servers
CN105049294A (en) Automatic testing method for port state switching of EAPS (Ethernet Automatic Protection Switching) protocol MASTER switch
CN106874162A (en) A kind of monitoring management pressure test integration method based on IPMI services
CN111541589B (en) Method, device and equipment for testing expansion module interface of intelligent terminal
CN107635247A (en) Terminal log store method in a kind of LTE automatic tests
CN110971716B (en) Address configuration method, device, system and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201204

Address after: 313028 Industrial Park, balidian Town, Huzhou City, Zhejiang Province

Patentee after: HUZHOU FENGYUAN AGRICULTURAL EQUIPMENT MANUFACTURE Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230109

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: 313028 Industrial Park, balidian Town, Huzhou City, Zhejiang Province

Patentee before: HUZHOU FENGYUAN AGRICULTURAL EQUIPMENT MANUFACTURE Co.,Ltd.

TR01 Transfer of patent right