The bottom of communications protocol converges method of testing and system
Technical field
The present invention relates to computer and telecom communication testing protocol consistency, the bottom in particularly a kind of communication protocal conformance test converges method of testing and system.
Background technology
Testing protocol consistency is a kind of " functional test ", and it is tested certain realization of agreement according to the description of an agreement, and whether the realization of differentiating an agreement is consistent with pairing consensus standard.It only according to the explanation of agreement, is determined the function that agreement realizes by the external behavior of observing the agreement realization, and is not related to the internal structure that agreement realizes.
For the description protocol conformance test method, provide following basic conception.
1. entity (Entity): OSI is called entity with element active in each layer, and entity both can be a hardware entities (such as chip piece), also can be software entity (such as a process).On different machines, be called peer entity or peer entity with the entity in one deck.
2. service access point SAP (Service Access Point): in the procotol architecture of layering, each layer all will provide certain service for last layer, and be these services that the details how to realize is shielded last layer, service offers the upper strata at service access point SAP.
3. PCO PCO (Points of Control and Observation): the communication point between test macro and the IUT.Test macro is visited IUT by PCO, and by PCO, test macro both can carry out initialization to communication, also can observe result of communication.The PCO General Definition is on service access point SAP.
4. protocol Data Unit PDU (Protocol Data Unit): the layer of protocol stack with layer between interface on, the n+1 layer entity passes to the n layer entity to an Interface Data Unit IDU (InterfaceData Unit) by SAP.IDU is made up of service data unit SDU (Service DataUnit) and some control informations.SDU will stride across network delivery to give peer-entities.Upwards give the information of n+1 layer then.Control information is used to help down one deck to finish the work, and itself is not the part of data.In order to transmit SDU, the n layer entity may be divided into several sections with SDU, and each section adds that header sends as protocol Data Unit PDU independently.
5. system under test (SUT) SUT (System Under Test): the tested system or the part of system under test (SUT).
6. tested realization IUT (Implemention Under Test): system or agreement as test target realize (Protocol Implementation), and tested realization can be used as the part of system under test (SUT), embeds in the system under test (SUT).
7. go up tester (Upper Tester): be the part of a test macro or test macro, it is at the upper strata of system under test (SUT) control PCO.It communicates by upside SAP and the IUT of IUT.
8. descend tester (Lower Tester): be the part of a test macro or test macro, it is at the low layer control PCO of system under test (SUT).It communicates by downside SAP and the IUT of IUT.Following tester is responsible for providing test judgement simultaneously.
9. test cooperating process (Test Coordination Procedure): comprise the set of cooperation rule.For example, between last tester and the following tester synchronously, different down between the testers synchronously.
10. ISP (Service Provider): be the part of test structure, suppose that system under test (SUT) is positioned at the N layer of network architecture, the ISP provides the function of N-1 layer for it.The ISP is for providing communication environment between IUT and the following tester.Testing protocol consistency uses the principle of the interlayer service primitive and the protocol Data Unit of tested realization being controlled and observing at specified point PCO (Point of Control andObservation).According to the difference of PCO, in ISO9646 (protocol conformance test method and framework), by standardized abstract test method local test method and external testing method are arranged.Local test method is suitable in the product close beta; The external testing method is suitable for long-range third party test, can be divided into distributed, cooperative type and distance type test again.A basic premise of local test method is the service access interface that all has exposure at the up-and-down boundary of IUT, and tester is controlled these access interfaces and encouraged IUT up and down, and observes the output response of IUT.The following tester of distributed test method is arranged in test macro, last tester is arranged in system under test (SUT) IUT, following tester and IUT are peer-entities, realize connecting by the underlying protocol that the service of N-1 layer is provided between them, last tester and IUT are in same system, and IUT must have the coboundary service access interface of exposure.The following tester and the IUT of coordinated test method are peer-entities, realize connecting by the underlying protocol that the service of N-1 layer is provided between them, last tester and IUT are in same system, IUT not necessarily has the coboundary service access interface of exposure, and last tester will be coordinated to finish test with following tester with the test management protocol (testingmanagement protocol) of standard and realize.Remote test method does not define tester, does not need explicit test coordination process yet
In ISO9646 by standardized abstract test method, except local test method, distributed test method, cooperative type method of testing and the distance type method of testing of peer-to-peer system, also have two kinds of method of testings that are applicable to relay system: the formula of unrolling (loop-back) method of testing and pass through formula (transverse) method of testing.Loop-back approach only needs a tester, but requires to realize winding on tested realization or internal system or peripheral link, and its power of test is too simple, thereby practical inadequately; Pass through whole relay functions that method of testing can the TSTTRK test trunk system, but need at least two test macros, the coordination between each test macro is a where the shoe pinches of realizing passing through the formula method of testing.Fig. 1 and Fig. 2 unroll and pass through the structure chart of method of testing.In the test of the relay system of reality, the third party tests general use and unrolls or pass through method of testing.
Summary of the invention
The bottom that the purpose of this invention is to provide in a kind of communication protocal conformance test converges method of testing, and whole relay functions that can either the TSTTRK test trunk system reduce again even avoid co-ordination between each test macro.
For achieving the above object, the communications protocol bottom converges method of testing and comprises step:
By aggregator tested relay system physical layer interface is converged;
When the structure test data,, realize a plurality of virtual test devices with a tester simulation by formulating different identification informations;
All virtual test devices all pass through same link and are connected with system under test (SUT);
Tester carries out communication by a plurality of lower interfaces of aggregator and tested realization;
Tester encourages/response test tested realization by a plurality of physical layer interfaces.
The bottom that another object of the present invention provides in a kind of communication protocal conformance test converges test macro.
For achieving the above object, a kind of communication protocol bottom converges test macro, comprise tester, N-1 layer ISP and system under test (SUT), it is characterized in that aggregator is connected between system under test (SUT) and the N-1 layer ISP by Ethernet interface, a plurality of interfaces of described aggregator are connected, have in addition an interface to be connected with an interface of tester with a plurality of interfaces of system under test (SUT) respectively.
The present invention has realized the test of passing through to tested relay system on a tester, can fully test the real behavior of tested relay system.Not needing has any specific (special) requirements to tested relay system.Only can realize uniformity test, avoid passing through in the method for testing test coordination process complicated between each tester tested relay system with a tester.Need not consider the stationary problem between each tester, eliminate the asynchronous error that causes of tester, make test more reliable, more accurate.
Description of drawings
Fig. 1 is conventional wrap test method structure chart;
Fig. 2 is that routine is passed through the method for testing structure chart;
Fig. 3 is that bottom of the present invention converges the method for testing structure chart;
Fig. 4 is the logic testing topological structure that IPv6 describes the test of agreement router substantially;
Fig. 5 is that IPv6 describes agreement router cycle tests figure substantially;
Fig. 6 is that the RUT physical layer interface converges schematic diagram.
Embodiment
Below in conjunction with accompanying drawing the present invention is described.
As shown in Figure 3, bottom converges method of testing and realizes a plurality of virtual test devices with a tester simulation, and all virtual test devices all pass through same link and are connected with system under test (SUT), have avoided the coordination problem between a plurality of physical testing devices.Aggregator can be a hub, play the effect of converging tested relay system physical layer interface, make tester carry out communication with a plurality of lower interfaces of tested realization, by a plurality of physical layer interfaces tested realization is encouraged/response test, can test the various relay functions that tested relay system is realized.Bottom converges the test that method of testing also can be used for peer-to-peer system, and aggregator at this moment works in transparent mode, and the lower interface that is equivalent to tested end system directly is connected with the bottom ISP.
Illustrate that with an example bottom converges the operation principle of method of testing below.
Substantially describe in the test of agreement router at IPv6, the test purpose that a test case is arranged is whether the checking test router is correct to the processing of route header.Its logic testing structural topology as shown in Figure 4, (TH-1/VT1, TH-2/VT2) (TR-1/VT3 TR-2/VT4) has device RUT to carry out uniformity test to tested road with two virtual test routers by two virtual test main frames.
Substantially describe in the agreement at IPv6 and to stipulate, have the IPv6 packet of route header, that node that destination address field (DAF) identified in arriving ipv6 header just detects and handles the route header.Call the route header processing module at this node, and for route-type 0, the algorithm below carrying out:
If segmentation residue=0{ continues the next header in the pack processing, its type is identified by " next header " field in the route header } else if header extension length is that odd number { sends ICMP " parameter existing problems " to source address, the message of coding 0, pointed header extension length field, and abandoning this bag } else{ calculates n, the number of addresses in the route header just, method is that header extension length { sends an ICMP " parameter existing problems " to source address divided by 2 if segmentations residue than n is big, the message of coding 0, pointed segmentation residue field, and abandon this bag } else{ segmentation residue subtracts one; Calculate i, next address that will " visit " in the address vector (address list) just, method be n subtract segmentation residue if address [i] or IPv6 destination address be multicast address abandon this bag<!--SIPO<DP n=" 5 "〉--〉<dp n=" d5 "/else{ exchange IPv6 destination address and the restriction of address [i] if IPv6 jumping figure send the ICMP message of " overtime-transmission surpasses the jumping figure restriction " smaller or equal to 1{ to source address, and abandon this bag } restriction of else{ jumping figure subtracts one; Resubmit this bag to the IPv6 module, pass to new destination node } } }
This test case, test be to go up italicized item in the algorithm.
As an example of above-mentioned algorithm, consider such a case: source node S sends a bag for destination node D, makes this bag through intermediate node I1, I2 and I3 with route header.In every section of transfer path, related words segment value and route header field value in the ipv6 header should be as described below:
When bag passes to I1 from S:
Source address=S header extension length=6
Destination address=I1 segmentation residue=3
Address [1]=I2
Address [2]=I3
Address [3]=D
When bag passes to I2 from I1:
Source address=S header extension length=6
Destination address=I2 segmentation residue=2
Address [1]=I1
Address [2]=I3
Address [3]=D
When bag passes to I3 from I2:
Source address=S header extension length=6
Destination address=I3 segmentation residue=1
Address [1]=I1
Address [2]=I2
Address [3]=D
When bag passes to D from I3:
Source address=S header extension length=6
Destination address=D segmentation residue=0
Address [1]=I1
Address [2]=I2
Address [3]=I3
In this test case, we realize source node S, destination node D, intermediate node I1 and I3 respectively with virtual test device TH-1/VT1, TH-2/VT2, TR-1/VT3, TR-2/VT4.The corresponding intermediate node I2 of RUT is a test router.
Fig. 5 is the cycle tests figure of this test case.Do not provide the test case description document here, only the cycle tests figure by Fig. 5 illustrates that bottom converges the application of method of testing in this test process.
The A bag is to be used to verify whether RUT is correct to handling to the route header of the packet of TH-2 direction from TH-1, and the B bag is to be used to verify whether correct RUT to handling from TH-2 to the route header of the packet of TH-1 direction.A from TH-1 to TR-1 bag transmits in that tester is inner, the existence of TH-1 can by TR-1 to A that RUT sends " embody in the bag.Same A bag from TR-2 to TH-2 also is to transmit in that tester is inner, the existence of TH-2 can by RUT to A that TR-2 sends " embody in the bag.Main test process is the A ' bag that TR-1 sends to RUT; Next jumping in the route header of RUT discovery A ' bag is TR-2, and RUT will send neighbor request message to find existing of TR-2 to TR-2; TR-2 replys neighbours' announcement message, and the communication between RUT and the TR-2 is set up; RTU transmits the A bag, but route header is changed, A " bag issues TR-2, as long as TR-2 is checking A " the route header content of bag, can judge whether correct RTU to handling from TH-1 to the route header of the packet of TH-2 direction.What the A ' that is sent to RUT by TR-1 wrapped thes contents are as follows:
IPv6 Header Version =6 Traffic Class =0 FlowLabel =0 PayloadLength =56 NextHeader =43(Routing Header) HopLimit =64 SourceAddress =TH-1 DestinationAddress =RUT1 Routing Header NextHeader =59(No Next Header) HeaderExtLength =6 RoutingTyPe =0 SegmentsLeft =2 Address[1] =TR-1 Address[2] =TR-2 Address[3] =TH-2
The A that sends to TR-2 by RUT " the theing contents are as follows of bag:
IPv6 Header Version =6 Traffic Class =0 FlowLabel =0 PayloadLength =56 NextHeader =43(Routing Header) HopLimit =63 SourceAddress =TH-1 DestinationAddress =TR-2 Routing Header NextHeader =59(No Next Header) <!-- SIPO <DP n="8"> --> <dp n="d8"/> HeaderExtLength =6 RoutingType =0 SegmentsLeft =1 Address[1] =TR-1 Address[2] =RUT1 Address[3] =TH-2
The A that receives by TR-2 " wrap as can be seen RUT to the processing of A ' bag; RUT at first subtracts one with the segmentation residue (SegmentsLeft) of A '; then with address and the Address[2 of DestinationAddress] the address exchange; again jumping figure is limited (HopLimit) and subtracts one, at last with A " bag issues TR-2.
The bottom method of converging is how to realize converging the RUT physical layer interface as seen from Figure 6.Two interfaces of test router RUT (being Ethernet interface here) link to each other with tester TN through aggregator.The MAC Address of two interfaces of RUT is RUT-MAC1 and RUT-MAC2, and corresponding IPv6 address is RUT1 and RUT2.The source MAC of A ' bag is TN, and target MAC (Media Access Control) address is RUT-MAC1, the A that TR-2 is obtained by aggregator " source MAC of bag is RUT-MAC2, target MAC (Media Access Control) address is TN.By aggregator and Duo Tai virtual test device, realized the test of passing through, and physically, only used a tester TN RUT.
Whether correct for checking RUT, is the inverse process of top test process, just at B ' and B to handling to the route header of the packet of TH-1 direction from TH-2 " in the IPv6 address of test router become RUT2 by RUT1.
Converge schematic diagram as can be seen by the cycle tests figure of Fig. 5 and the RUT physical layer interface of Fig. 6, the bottom method that converges has realized the test of passing through to tested relay system on a tester TN, can fully test tested relay system and realize the various relay functions of RUT, avoid passing through in the test test coordination process complicated between each tester