Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Be the clearer description embodiment of the invention; Sketch protocol anomaly method of testing of the prior art earlier, as shown in Figure 1, the message method for detecting abnormality process sketch map that Fig. 1 adopts for prior art based on message negotiation; As shown in the figure; With based on Point-to-Point Protocol over Ethernet (Point to Point Protocolover Ethernet PPPoE) is example, comprising:
Step 11: drive end sends PPPoE initialization (PPPoE Active DiscoveryInitiation, PADI) message to Partner.
Step 12: Partner sends the PPPoE service to drive end (PPPoE Active DiscoveryOffer, PADO) message is provided.
Step 13: drive end sends PPPoE request (PPPoE Active DiscoveryRequest, PADR) message to Partner.
Step 14: Partner sends pppoe session (PPPoE Active DiscoverySession-Confirmation, PADS) message to drive end.
In message negotiation process shown in Figure 1, the transmission of subsequent packet and reception must be based upon on the basis of front message reception and transmission, and for example, the transmission of PADR message must receive the PADO message at local terminal (Partner), and just can carry out after successfully handling.Therefore, need set up protocol state machine, be used to judge whether the message of front is successfully handled at drive end and Partner.And it is, for example, as shown in Figure 1 in the prior art because testing equipment is just initiated message negotiation as drive end; Can only exceptional value be implanted in PADI message and the PADR message; And can not exceptional value be implanted in PADO message and the PADS message, therefore the message of test is not comprehensive, influences test mass.
To the technical scheme that the embodiment of the invention adopts be described in detail below.
Understand the embodiment of the invention for clearer, briefly set forth earlier the major technique thinking of the embodiment of the invention:
1, employing and equipment under test have the same protocol state equipment as testing equipment, testing equipment need not be developed and the maintenance state protocol machine specially.Concrete, can be with the equipment similar as testing equipment with equipment under test, for example, if equipment under test is a router, then testing equipment is the router similar with this router, the implication of " similar " is that both protocol state machine is identical here.Therefore,, need not development agreement state machine again, can reduce development cost, reduce the construction cycle owing to had the protocol state machine identical in the testing equipment with equipment under test.
2, adopt control appliance control testing equipment or equipment under test initiatively to initiate message negotiation; Make testing equipment in issuing the negotiation packet of equipment under test, to implant exceptional value; Also can in the response message of the negotiation packet that the response equipment under test sends, implant exceptional value, make test comprehensively.For example, when testing equipment during as drive end, can test PADI message and PADR message, when equipment under test during as drive end, can test PADO message and PADS message, realization can be tested 100% message.
To specifically describe the embodiment of the invention below:
The schematic flow sheet of the protocol anomaly method of testing that Fig. 2 provides for the embodiment of the invention one comprises:
Step 21: testing equipment is obtained detecting information, and said detecting information comprises message name to be measured and exception field value;
Concrete, testing equipment need be obtained detecting information to control appliance.
Step 22: testing equipment is used with corresponding message of said message name to be measured and equipment under test and is carried out message negotiation, includes said exception field value in the said message, and said equipment under test and testing equipment are same category of device;
Particularly; Testing equipment can be according to the control command of control appliance; Initiatively send and the corresponding negotiation packet of said message name to be measured to said equipment under test, and in said negotiation packet, implant said exception field value, promptly the field to be measured in message to be tested is implanted the exception field value.Same, equipment under test also can initiatively be initiated message negotiation according to the control command of control appliance, and then testing equipment can be implanted said exception field in the response message that returns to equipment under test, and said response message is corresponding with said message name to be measured.
In the embodiment of the invention, because testing equipment and equipment under test are same category of device, therefore, testing equipment can provide the protocol status identical with equipment under test easily, and need not to develop again and the maintenance state protocol machine.Concrete; Can pass through through equipment that will be similar to transform as testing equipment with equipment under test; Make this equipment have the interface of receiving control apparatus order; Thereby can make control appliance pass through command line mode information to be tested (comprising message to be measured and exception field value) is handed down to testing equipment, and can control the test of testing equipment initiation protocol.
Step 23: the operating state behind the testing equipment inquiry equipment under test message negotiation obtains test result.
Specifically comprise: testing equipment is sent Query Information to said equipment under test; When in preset time range, receiving the response message of the said Query Information that said equipment under test returns; Then said equipment under test is in proper working order; Think that promptly said equipment under test through not crashing behind the unusual protocol test, has the ability of keeping out unusual protocol massages, promptly relatively more healthy and stronger; When in preset time range, not receiving the response message of the said Query Information that said equipment under test returns; Then be regarded as said equipment under test through unusual protocol massages test back operation irregularity; The ability of promptly resisting unusual protocol massages is lower, and this equipment is healthy and strong inadequately.
The described method of testing of present embodiment; The protocol status similar with equipment under test can be provided easily, thereby carry out protocol test, and need not to obtain the protocol status similar with the maintenance agreement state machine with different equipment under tests through exploitation; Only need carry out certain transformation to equipment under test; Make between testing equipment and the control appliance and between equipment under test and the control appliance and can communicate, therefore, can reduce testing cost, reduce the construction cycle that is used to develop special test equipment.And initiatively initiate the message negotiation process of perhaps passive reception and equipment under test through testing equipment; Can and send in the response message of equipment under test at the negotiation packet that initiatively sends to equipment under test and carry unusual field value; Make the protocol test of equipment under test more comprehensively, improve test mass.
The protocol anomaly method of testing schematic flow sheet that Fig. 3 provides for the embodiment of the invention two, as shown in Figure 3, this process is to describe this test process from the control appliance end, comprising:
Step 31: control appliance sends detecting information to testing equipment, and said detecting information comprises message name to be measured and exception field value.
Concrete, control appliance can be analyzed all fields of all negotiation packets in the agreement to be measured as required, obtains detecting information.Detecting information comprises message name, field name and field value, can also comprise information such as sequence number, action type, fields offset and modification length.Certainly, it is understandable that this detecting information also can directly be obtained from extraneous (other equipment) by control appliance.
Step 32: control appliance is controlled said testing equipment and equipment under test and is used with the corresponding message of said message name to be measured and carry out message negotiation, includes said exception field value in the said message, and said testing equipment is the equipment similar with said equipment under test.
Particularly, can be that control appliance sends test command to said testing equipment, control said testing equipment and initiatively send and the corresponding message of said message name to be measured to equipment under test, comprise said exception field value in the said message; Perhaps; Also can be that control appliance sends test command to said equipment under test; Control said equipment under test and carry out message negotiation to testing equipment transmission message, said testing equipment is returned response message according to detecting information to said equipment under test, and this response message is corresponding with said message name to be measured; And in this response message, implant the exception field value, be used to test the defensive ability/resistance ability of equipment under test to this exception message.
It is understandable that; Those skilled in the art can know; For equipment that can will be similar with equipment under test as testing equipment, need make this equipment have the interface of receiving control apparatus order to carrying out certain transformation as the equipment of testing equipment; Thereby can make control appliance pass through command line mode information to be tested (comprising message to be measured and exception field value) is handed down to testing equipment, and can control the test of testing equipment initiation protocol.
Same, those skilled in the art can know, initiatively initiate message negotiation for the control command that makes equipment under test can accept control appliance, also need transform equipment under test, make it have the communication interface of receiving control apparatus control command.
Step 33: the operating state behind the control appliance inquiry equipment under test message negotiation, obtain test result.
Concrete, control appliance can send Query Information to said equipment under test; When in preset time range, receiving the response message of the said Query Information that said equipment under test returns, then said equipment under test is in proper working order; When in preset time range, not receiving the response message of the said Query Information that said equipment under test returns; Then be regarded as said equipment under test through unusual protocol massages test back operation irregularity; The ability of promptly resisting unusual protocol massages is lower, and this equipment is healthy and strong inadequately.
Perhaps, control appliance can also send to said testing equipment obtain the test result order, and the return results that control appliance is inquired about according to said testing equipment after the operating state of said equipment under test is known test result.Particularly; Testing equipment receives that control appliance sends obtain the test result order after; Send query messages to said equipment under test, when in preset time range, receiving the response message of the said Query Information that said equipment under test returns, promptly be regarded as said equipment under test through in proper working order behind the unusual protocol test; Have the ability of keeping out unusual protocol massages, relatively more healthy and stronger; When in preset time range, not receiving the response message of the said Query Information that said equipment under test returns; Then be regarded as said equipment under test operation irregularity behind the unusual protocol test of process; The ability of promptly resisting unusual protocol massages is lower, and this equipment is healthy and strong inadequately.Afterwards, testing equipment sends to control appliance with the test result that inquires.
The equipment of present embodiment through will be similar with equipment under test is as testing equipment; The agreement similar with equipment under test can be provided easily; Thereby carry out protocol test; And need not to obtain the protocol status similar with different equipment under tests through exploitation with the maintenance agreement state machine, need carry out certain transformation to equipment under test, make between testing equipment and the control appliance and can communicate between equipment under test and the control appliance; Therefore, can reduce testing cost, reduce the construction cycle be used to develop special test equipment; And initiatively initiate the message negotiation process of perhaps passive reception and equipment under test through testing equipment; Can and send in the response message of equipment under test at the negotiation packet that initiatively sends to equipment under test and carry unusual field value; Make the protocol test of equipment under test more comprehensively, improve test mass.
Be the described technical scheme of the clearer description embodiment of the invention, below will be different according to the message negotiation originating end, be described in detail from the angle of whole test system method of testing this unusual agreement.
The unusual protocol testing method schematic flow sheet that Fig. 4 provides for the embodiment of the invention three comprises:
Step 401: control appliance starts test.
Step 402: control appliance obtains configuration file, comprises detecting information in this configuration file, and configuration file can read from the external world, also can be arranged in the control appliance in advance.
Step 403: control appliance is set up effective test chart according to configuration file, and test chart comprises one or more detecting informations.Detecting information comprises message name, field name and field value, can also comprise following information: sequence number, action type, fields offset and modification length etc.
Protocol massages to be tested and field etc. can be according to the forms shown in the table 1:
Table 1
Data item name |
Content |
Default value |
Format description |
MODULE_NAME |
The agreement name |
Do not have |
Length is less than 20 arbitrary string |
OP |
Action type |
“MODIFY” |
MODIFY/ EXTEND |
PACKET_NAME |
Message name |
Do not have |
Length is less than 20 arbitrary string |
FLD_NAME |
Field name |
Do not have |
Length is less than 20 arbitrary string |
OFFSET |
Skew |
0 |
Integer more than or equal to 0 |
LENGTH |
Length |
0 |
Integer more than or equal to 0 |
FLD_VALUE |
Field value |
Null character string |
Less than 80 |
FLD_STEP |
Step-length |
1 |
Integer more than or equal to 1 |
REPEAT_NUM |
Number of repetition |
1 |
Integer more than or equal to 1 |
Step 404: control appliance judges whether to have next bar record to be measured according to test chart, and every record comprises message name and field name, if, select this record, execution in step 405 afterwards, otherwise, execution in step 419.
Step 405: control appliance judges whether to exist the next field value of noting to be measured of this selection, promptly can test a plurality of field values of a record, if, select this field value, execution in step 406 afterwards, otherwise, execution in step 419.
In when test, when field value is 1 byte, generally field value is traveled through test (from 0 to 255 all tests), when field value during, can get the centrifugal pumps such as maximum, minimum value and off-limits critical value in the agreement range of normal value greater than 1 byte.When the configuration words segment value, can adopt continuation mode, also can adopt discrete way, for example [00-FF] representes that field is carried out 0 to 255 value travels through test, [00, FF] expression is only tested 0 and 255 values.
Step 406: record that control appliance will be selected and field value (exceptional value) send to testing equipment, and send the triggering test command to testing equipment, trigger testing equipment and initiatively initiate message negotiation.
Above-mentioned message name and field name are made the as a whole loop test that carries out, it is understandable that, message name and field name are separately carried out loop test.Promptly can use following steps to substitute above-mentioned step 404-406, comprise: the first step, judge whether to have next message name to be measured, when existing, select this message name, got into for second step afterwards, otherwise, finish test; Second step judged whether to exist the next field name to be measured under the message name of this selection, when existing, selected this field name, got into for the 3rd step afterwards, otherwise, finish test; The 3rd step judged whether to exist the field name next field value to be measured down of this selection, when existing, selected this field value, got into for the 4th step afterwards, otherwise, finish to test; In the 4th step, message name, field name and the field value selected are all sent to testing equipment.
Step 407: control appliance gets into wait state, waits for certain message negotiation time.
It is understandable that this message negotiation time can be provided with according to concrete needs, this message negotiation time is the message negotiation time that testing equipment and equipment under test carry out according to detecting information.
Step 408: testing equipment triggers test according to the triggering test command of control appliance, gets into step 409.
Step 409: testing equipment is judged the detecting information the coupling whether negotiation packet of giving equipment under test to be sent and field send with control appliance, if, execution in step 410, otherwise, execution in step 411.
When matching judgment; When negotiation packet is the corresponding message of message name that control appliance sends; And when a certain field of this negotiation packet is the corresponding field of the field name that sends of control appliance, show that this negotiation packet and field and detecting information mate, otherwise for not matching.
Step 410: testing equipment is filled in the field value (exceptional value) that control appliance sends in the field of this selection, gets into step 411.
Step 411: testing equipment encapsulation negotiation packet.
Concrete, the process of step 409-411 can adopt following judgement code skeleton to carry out:
If(g_iPattMode==ENABLE&&
Strcmp (g_sPattPkg, [concrete message])==0&&
Strcmp (g_sPattField, [concrete protocol fields]==0))
{
// protocol encapsulation
// field value the g_sPattFldValue that sends over control appliance replaces
}
Wherein, g_iPattMode: protocol anomaly Test Switchboard (global variable)
G_sPattPkg: when the protocol massages sign (global variable) of Pretesting
G_sPattField: when the protocol fields sign (global variable) of Pretesting
G_sPattFldValue: when the protocol field value (global variable) of Pretesting
Step 412: the negotiation packet after testing equipment will encapsulate sends to equipment under test, and both carry out message negotiation.
Step 413: control appliance obtains the test result order to the testing equipment transmission after wait certain negotiation time (stand-by period of step 407 arrives), get into step 414.
Step 414: testing equipment is obtained the test result order according to this and is sent querying command to equipment under test;
Concrete, this querying command can be the ping order, through the operating state of ping order inquiry equipment under test.
Step 415: testing equipment is obtained test result;
For example; If equipment under test possibly intactly return the data of ping order when testing equipment adopts the ping order; Show that test result is that equipment under test is in normal condition; If the ping utility in the testing equipment is when the return data that waits less than equipment under test, during prompt timeout (timeout) information, then the test result of this moment is that equipment under test is in and restarts or abnormal state such as reset.
Step 416: testing equipment returns to control appliance with the test result that obtains.
Above-mentioned is that control appliance obtains test result through testing equipment; It is understandable that control appliance also can directly obtain test result from equipment under test, promptly can use following step to substitute above-mentioned step 413-416; Comprise: the first step; Control appliance sends sense command to equipment under test, for example, and the ping order; In second step, control appliance obtains test result, for example; When adopting the ping order; If receive the data of the complete ping order that equipment under test returns, then obtaining test result is that equipment under test is in normal condition, when the ping utility in the control appliance during at the return data that waits less than equipment under test; During prompt timeout (timeout) information, at this moment obtain test result and be equipment under test and be in and restart or abnormal state such as reset.
Step 417: control appliance is preserved test result, forms daily record or form.This step is optional.
Step 418: control appliance sends clear command to testing equipment, and the indication testing equipment is removed detecting information.Perhaps, control appliance sends display command to testing equipment, and the indication testing equipment shows detecting information etc.This step is optional.
Step 419: finish.
Present embodiment can reduce development cost through adopting the equipment similar with equipment under test as testing equipment, reduces the development time; Adopt control appliance control testing equipment to initiate message negotiation, the negotiation packet on can testing from testing equipment to the equipment under test direction.
The protocol anomaly method of testing schematic flow sheet that Fig. 5 provides for the embodiment of the invention four, this process from control appliance control equipment under test end initiatively the process of initiation protocol test comprise setting forth:
Step 501-505: identical with the step 401-405 in the previous embodiment.
Step 506: record that control appliance will be selected and field value (exceptional value) send to testing equipment.
Step 507: control appliance sends to equipment under test and triggers test command, triggers equipment under test and initiatively initiates message negotiation.
Step 508: control appliance gets into wait state, waits for certain negotiation time (configurable).
Step 509: equipment under test sends negotiation packet to testing equipment after receiving and triggering test command, initiates message negotiation.
Step 510: after testing equipment receives the negotiation packet of equipment under test transmission, start testing equipment and carry out the message processing.
Step 511: testing equipment is judged the detecting information the coupling whether response message of giving equipment under test to be sent and field send with control appliance, if, execution in step 512, otherwise, execution in step 513.
When matching judgment; When response message is the corresponding message of message name that control appliance sends; And when a certain field of this response message is the corresponding field of the field name that sends of control appliance, show that this response message and field and detecting information mate, otherwise for not matching.Specifically can adopt the judgment mode of the step 409-411 in the said enforcement of Fig. 4.
Step 512-521: identical with the step 410-419 of second embodiment.
Present embodiment can reduce development cost through adopting the equipment similar with equipment under test as testing equipment, reduces the development time; Adopt control appliance control equipment under test to initiate message negotiation, the response message of the negotiation packet on can testing from equipment under test to the testing equipment direction.
It is understandable that those skilled in the art can know that in the above-described embodiments, control appliance can pass through command line mode, perhaps,, the detecting information of selecting is sent to testing equipment through socket (socket) mode.
Concrete, when adopting command line mode, because testing equipment needs order and the detecting information of receiving control apparatus etc., therefore, testing equipment need carry out the order line transformation and have the protocol anomaly code implanting function on the basis similar with equipment under test:
1, order line transformation
Transform for the testing equipment order line, require control appliance to issue through the protocol fields that order line will be tested in the testing equipment, requiring provides to issue orders:
The order of protocol anomaly test control switch, said control switch order is used to control said testing equipment start-stop test, and specific code can be like [undo] patt enable
Protocol anomaly test field configuration clear command, said clear command be used to control said testing equipment and remove the test detecting information that obtains, and specific code can be like patt clear
Protocol anomaly test field configuration display command, said display command be used to control said testing equipment and show the test detecting information that obtains, and specific code can be like patt display
The order of concrete protocol anomaly test field configuration distributing is used to issue detecting information, specific code can as:
Patt pppoe < sequence number>< action type>< message name>< field name>< fields offset>< modification length>< field value >.
2, the protocol anomaly code is implanted
According to concrete agreement, in the encapsulation process of protocol negotiation message, implant abnormality code, need inspection protocol anomaly Test Switchboard whether to open, check then whether negotiation packet and protocol fields mate, the eligible exceptional value of carrying out encapsulates.Its basic framework can for:
If(g_iPattMode==ENABLE&&
Strcmp (g_sPattPkg, [concrete message])==0&&
Strcmp (g_sPattField, [concrete protocol fields]==0))
{
// protocol encapsulation
// field value the g_sPattFldValue that sends over control appliance replaces
}
Wherein, g_iPattMode: protocol anomaly Test Switchboard (global variable)
G_sPattPkg: when the protocol massages sign (global variable) of Pretesting
G_sPattField: when the protocol fields sign (global variable) of Pretesting
G_sPattFldValue: when the protocol field value (global variable) of Pretesting
The structural representation of the testing equipment that Fig. 6 provides for the embodiment of the invention five comprises receiver module 61, message negotiation module 62 and test result acquisition module 63.Wherein:
Receiver module 61 is used to obtain detecting information, and said detecting information comprises message name to be measured and exception field value;
Message negotiation module 62 is used to carry out message negotiation with corresponding message of said message name to be measured and equipment under test, includes said exception field value in the said message, and said equipment under test and testing equipment are same category of device;
Test result acquisition module 63, the operating state behind the inquiry equipment under test message negotiation obtains test result.
Further, receiver module 61 also is used for the test command of receiving control apparatus.Message negotiation module 62 comprises transmitting element and exception field implantation unit, wherein:
Transmitting element 621 is used for initiatively sending and the corresponding negotiation packet that comprises said exception field value of said message name to be measured to equipment under test according to the test command that said receiver module 61 receives; Perhaps, be used to return the response message of the negotiation packet that said equipment under test sends, said response message is corresponding with said message name to be measured, comprises said exception field value in the said response message;
Exception field is implanted unit 622, the exception field value of the detecting information that is used for said receiver module 61 is received implant with corresponding negotiation packet of said message name to be measured or said response message in.
The equipment of present embodiment through will be similar with equipment under test is as testing equipment; The agreement similar with equipment under test can be provided easily; Thereby carry out protocol test; And need not to obtain the protocol status similar with different equipment under tests through exploitation with the maintenance agreement state machine, need carry out certain transformation to equipment under test, make between testing equipment and the control appliance and can communicate between equipment under test and the control appliance; Therefore, can reduce testing cost, reduce the construction cycle be used to develop special test equipment; And initiatively initiate the message negotiation process of perhaps passive reception and equipment under test through testing equipment; Can and send in the response message of equipment under test at the negotiation packet that initiatively sends to equipment under test and carry unusual field value; Make the protocol test of equipment under test more comprehensively, improve test mass.
The structural representation of the control appliance that Fig. 7 provides for the embodiment of the invention six comprises sending module 71, control module 72 and acquisition module 73 as a result.Wherein:
Sending module 71 is used for sending detecting information to testing equipment, and said detecting information comprises message name to be measured and exception field value;
Control module 72 is used to control said testing equipment and equipment under test and uses with the corresponding message of said message name to be measured and carry out message negotiation, includes said exception field value in the said message, and said testing equipment is the equipment similar with said equipment under test;
Acquisition module 73 as a result, are used to inquire about the operating state behind the equipment under test message negotiation, obtain test result.
Particularly, control module 72 comprises first control unit and second control unit, wherein:
First control unit 721 is used for sending test command to said testing equipment, controls said testing equipment and initiatively sends and the corresponding message of said message name to be measured to equipment under test, comprises said exception field value in the said message;
Second control unit 722; Be used for sending test command to said equipment under test; Control said equipment under test and send message to testing equipment, said testing equipment is corresponding with said message name to be measured to the response message that said equipment under test returns, and comprises said exception field value in the said response message.
Concrete, acquisition module 73 comprises operating state query unit and test result acquiring unit as a result, wherein:
Operating state query unit 731 is used for sending Query Information to said equipment under test;
Test result acquiring unit 732 is used for when in preset time range, receiving the response message of the said Query Information that said equipment under test returns, confirming that said equipment under test is in proper working order; When in preset time range, not receiving the response message of the said Query Information that said equipment under test returns, confirm said equipment under test operation irregularity.
It is understandable that; Operating state query unit 731 can also be used for sending Query Information to said testing equipment, and the result that then this moment, test result acquiring unit 732 can directly return after said equipment under test is inquired about according to said testing equipment obtains test result.Specifically can repeat no more referring to previous embodiment here.
Present embodiment can reduce development cost through adopting the equipment similar with equipment under test as testing equipment, reduces the development time; Adopt control appliance control testing equipment or equipment under test to initiate message negotiation, can make the negotiation packet of test more comprehensive.
The structural representation of the protocol anomaly test macro that Fig. 8 provides for the embodiment of the invention seven comprises equipment under test 81, testing equipment 82 and control appliance 83.Wherein:
Control appliance 83; Be used for sending detecting information to said testing equipment 82; Control said testing equipment 82 or equipment under test 81 and initiatively initiate the message negotiation process between said testing equipment 82 and the said equipment under test 81, said detecting information comprises message name to be measured and exception field value;
Testing equipment 82; Be used to utilize message corresponding and said equipment under test 81 to carry out message negotiation with said message name to be measured; Include said exception field value in the said message; And, know the protocol anomaly test result of equipment under test through the operating state behind the inquiry equipment under test message negotiation, said testing equipment 82 is the equipment similar with said equipment under test 81.
Concrete, testing equipment 82 can comprise the order line module, said order line module is used for the detecting information that receiving control apparatus 83 sends through command line mode; Perhaps, testing equipment 82 comprises the demons module, and said demons module is used for the detecting information that receiving control apparatus 83 sends through socket (socket) mode.On communication modes, control appliance 83 can pass through serial ports, telecommunication network (Telnet) or containment, and (Secure Shell, SSH) mode perhaps is connected with equipment under test 81 with testing equipment 82.
In some cases; For example; Only be provided with the card of throwing the net in the control appliance 83,, switch need be set in order to realize communicating by letter of control appliance and two equipment (testing equipment and equipment under test); This switch is connected with said equipment under test, testing equipment and control appliance, is used to make said equipment under test to communicate by letter with control appliance with control appliance and said testing equipment.
Present embodiment can reduce development cost through adopting the equipment similar with equipment under test as testing equipment, reduces the development time; Adopt control appliance control testing equipment or equipment under test to initiate message negotiation, can make the negotiation packet of test more comprehensive.
When utilizing special test equipment to test in the prior art; Need realize complete protocol state machine according to actual needs, make testing equipment consistent, therefore with the protocol status of equipment under test; The agreement of knowing equipment under test that need be perfectly clear realizes details; And exploitation corresponding protocol state machine, can increase difficulty of test and size of code undoubtedly, will certainly increase construction cycle and development cost and personnel and drop into.And in the above-described embodiments because testing equipment is to be formed by similar equipment under test transformation, more convenient realization consistent with the equipment under test protocol status; Therefore do not need other development agreement state machine, protocol state machine safeguards that by equipment itself development difficulty reduces greatly; Only need carry out the implantation of order line transformation and protocol anomaly code gets final product; Thereby the quickening development progress shortens the construction cycle, reduces development cost.And the foregoing description can realize that testing equipment initiatively initiates message test process and the passive message test process that carries out of testing equipment, realizes negotiation packet comprehensive of test.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be accomplished through the relevant hardware of program command; Aforesaid program can be stored in the computer read/write memory medium; This program the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, FLASH, magnetic disc or CD.
What should explain at last is: above embodiment is only in order to technical scheme of the present invention to be described but not limit it; Although the present invention has been carried out detailed explanation with reference to preferred embodiment; Those of ordinary skill in the art is to be understood that: it still can make amendment or be equal to replacement technical scheme of the present invention, also can not make amended technical scheme break away from the spirit and the scope of technical scheme of the present invention and these are revised or be equal to replacement.