CN101621419B - Reusable test message adapting method and system - Google Patents

Reusable test message adapting method and system Download PDF

Info

Publication number
CN101621419B
CN101621419B CN2008101160229A CN200810116022A CN101621419B CN 101621419 B CN101621419 B CN 101621419B CN 2008101160229 A CN2008101160229 A CN 2008101160229A CN 200810116022 A CN200810116022 A CN 200810116022A CN 101621419 B CN101621419 B CN 101621419B
Authority
CN
China
Prior art keywords
test
message
moving body
tested application
case moving
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
CN2008101160229A
Other languages
Chinese (zh)
Other versions
CN101621419A (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.)
Datang Mobile Communications Equipment Co Ltd
Original Assignee
Datang Mobile Communications Equipment 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 Datang Mobile Communications Equipment Co Ltd filed Critical Datang Mobile Communications Equipment Co Ltd
Priority to CN2008101160229A priority Critical patent/CN101621419B/en
Publication of CN101621419A publication Critical patent/CN101621419A/en
Application granted granted Critical
Publication of CN101621419B publication Critical patent/CN101621419B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a reusable test message adapting method and a reusable test message adapting system related to an embedded system, which are used for overcoming a technical defect that a specific test message adaptor needs to be defined and realized for each test operator and a tested application when performing an embedded software test. The reusable test message adapting method and the reusable test message adapting system associate the test operator with the tested application by means of a standard interface through the test message adaptor, and describe a message format of the tested application in a standard mode, thereby reducing repeated definition of the test message adaptation layer, and having high code reuse ratio, strong universality and capability of being conveniently applied to test environments adopting different test tools for different tested applications.

Description

Reusable test message adapting method and system
Technical field
The present invention relates to the adaptive method and system of message when the tested entity that adopts the different messages form tested, relate in particular to a kind of Reusable test message adapting method and device at tested entity in the embedded system.
Background technology
When software was carried out system testing, regular meeting used for reference black-box approach in theory.The commercialization testing tool of one of test environment chief component all adopts standard communication protocol usually, as HTTP, FTP or based on the Socket of TCP/IP, communicates with tested entity.If tested entity also adopts above-mentioned standard agreement and external environment condition mutual, it is adaptive just to need not to carry out complicated loaded down with trivial details test post when then making up test environment.
In fact; because the computational resource of embedded system is in short supply and emphasis operational efficiency and real-time performance; a large amount of tested embedded softwares can adopt various self-defining nonstandard protocols and other embedded system components communicate usually; therefore; just must make up message aptamers independently when embedded software is carried out system testing and guarantee and the docking of the communication format of business-like testing tool, thereby bring into play business-like testing tool in test development, operation and managerial advantage.
Embedded software is deployed on the different computing hardware platforms usually with the test run body (ETS, ExecutableTest Suite) of other parts of simulation embedded system, and the test run body is communicated by letter with embedded tested software by asynchronous system.The test post aptamers that makes up based on intuition adopts and tested application (AUT usually, Application Under Test) similar transmission technology, the port or the passage of definition in the abstract test use-case (ATS, Abstract Test Suite) are hinted obliquely at into the message addressing sign that AUT supports.Finish the network information in case of necessity and transmit of the mutual conversion of essential message native representations form to the network transformat.
Yet, embedded system is of a great variety, the communication mode of embedded software and other embedded system assemblies is ever-changing equally, if only consider the communication mode of specific tested software when design realizes the test post aptamers, then need every kind of tested software design is realized a kind of specific test post aptamers.Though it is many similar that the function between the different test post aptamers has, realize lacking common point, cause the rate of reusing of code low, many technological deficiencies such as versatility is poor, structure test environment very complicated.
Summary of the invention
In view of this, one of main purpose of the present invention is to provide a kind of reusable test post adaptation method, to solve the technological deficiency that the code reuse rate of test post aptamers is low when embedded software is tested, versatility is poor, need re-define, for achieving the above object, technical scheme of the present invention is achieved in that
A kind of Reusable test message adapting method comprises step:
A, by the message format of configuration interface identification test case moving body, set up the message interface between test post aptamers and the test case moving body;
B, discern the message format of tested application, set up the message interface between test post aptamers and the tested application by configuration interface;
C, set up bearer path between described test case moving body and the described tested application by described test post aptamers;
D, tested application is tested according to the test case logic.
Based on technique scheme, further, in the steps A, by the message format description document of the importing of the test case moving body interface service unit in test post aptamers test case moving body, the message format of the described test case moving body of identification after resolving; Among the step B, import the message format description document of tested application, the message format of the described tested application of identification after resolving by the tested application interface services unit in the test post aptamers.
Further, can provide message interface between described test post aptamers and the test case moving body by one or more test case moving body interface service unit; Can provide message interface between test post aptamers and the tested application by one or more tested application interface services unit; Can realize the forwarding of test post between test case moving body interface service unit and the described tested application interface services unit by one or more test post retransmission units.
Further, constitute test node by test case moving body and test case moving body interface service unit, constitute forward node by the test post retransmission unit, constitute tested node by tested application and tested application interface services unit, among the step C, before setting up described bearer path, also comprise the step of setting up test node, forward node and tested internodal routing relation.
Further, node (comprising test node, forward node, tested node) is receiving that the treatment step after the request of setting up bearer path is as follows:
C1, judge whether the state of bearer path to be created is unused state, if, execution in step C2 then;
C2, send the bearer path request of setting up to node, wait for back execution in step C3 after the node feedback is finished response message to the back of present node;
C3, the described bearer path status indicator of renewal present node are user mode;
C4, renewal present node carrying quick indexing table;
C5, be sent completely response message to the forward direction node of present node.
Further, among the step D, when testing, test post is as follows by the step that described test case moving body flows to described tested application:
The test post that D01, test case moving body send is to send to the test post retransmission unit behind the test post aptamers inside story form by test case moving body interface service cell translation;
D02, the test post retransmission unit test post after with format conversion is transmitted to tested application interface services unit;
D03, the tested application interface services unit test post after with format conversion sends to tested application after being converted to the message format of tested application;
Test post is as follows by the step that tested application flows to the test case moving body:
The test post that D11, tested application send is to send to the test post retransmission unit behind the test post aptamers inside story form by tested application interface services cell translation;
D12, the test post retransmission unit test post after with format conversion is transmitted to test case moving body interface service unit;
After converting test case moving body message format to, D13, the test case moving body interface service unit test post after with format conversion sends to the test case moving body.
Further, message communicating form between the logic entity of message aptamers inside is made up of type of message identification field, data length field and data load field, if the value in the type of message identification field represent during less than the value set in this message the carrying of data load field be command parameter, if the value in the type of message identification field is not less than the value of setting, then represent in this message the carrying of data load field be data.
Further, doubly be the value that one group of odevity of separation is used as described type of message identification field with positive integer with 2 greater than described set point, be used for distinguishing and identifying the message of same route different directions on the same bearer path.
Another object of the present invention provides a kind of Reusable test message adaption system, and technical scheme is as follows:
A kind of Reusable test message adaption system comprises the test case moving body, and tested application also comprises the test post aptamers that is used to test case moving body and tested application to give information adaptive, and the test post aptamers comprises:
Test case moving body interface service unit is used to provide the interface service between described test case moving body and the described test post aptamers;
Tested application interface services unit is used to provide the interface service between described tested application and the described test post aptamers;
The test post retransmission unit is used for carrying out forwards between described test case moving body interface service unit and described tested application interface services unit.
Based on technique scheme, further, when carrying out the capacity/pressure test, described test post aptamers can connect a plurality of test case moving bodies and a plurality of tested application simultaneously, and one or more test case moving bodies can be connected with one or more test case moving body interface service unit; One or more tested application can be connected with one or more tested application interface services unit; One or more test case moving body interface service unit can be connected with one or more test post retransmission units, can set up route between a plurality of test post retransmission units.
Further, test case moving body interface service unit comprises a configuration interface that is used to import and discern the message format of test case moving body; Tested application interface services unit comprises a configuration interface that is used to import and discern the message format of tested application.
Because the present invention gets up the test run body with standard interface by test post aptamers and tested association, discern the message format of tested application by the description interface of standard, thereby reduce re-defining to the test post adaptation layer, highly versatile, can be conveniently used in adopting the test environment of different testing tools at the tested application of difference, man power and material when reducing greatly the different test post aptamers of structure communication mode drops into, and reduces the complexity and the technical risk of test job.
Description of drawings
Fig. 1 is the building-block of logic of system of the present invention;
Fig. 2 is the building-block of logic of test post aptamers of the present invention;
Deployment way figure when Fig. 3 tests for Embedded Application capacity/pressure of the present invention;
Fig. 4 is the main process figure of the method for the invention;
Fig. 5 increases the flow chart of route for present node of the present invention;
Fig. 6 is the flow chart of present node deletion route of the present invention;
Fig. 7 sets up the flow chart of bearer path for present node of the present invention;
Fig. 8 removes the flow chart of bearer path for present node of the present invention;
Fig. 9 is the process chart of present node of the present invention to institute's message transfer between node;
Figure 10 is for creating the collaboration process of transmission bearer between logic entity of the present invention;
Figure 11 is for removing the collaboration process of transmission bearer between logic entity of the present invention;
Figure 12 sends the collaboration process of test post for TE in the present invention's one specific embodiment;
Figure 13 is the collaboration process of TE acceptance test message/response in the present invention's one specific embodiment.
Embodiment
Below in conjunction with accompanying drawing technical scheme of the present invention is described in detail.
Accompanying drawing 1 is system logic structure figure of the present invention, and the test post aptamers is between test case moving body and the tested application entity, is used to provide with the interface TEI of test case moving body with towards the interface TSI of tested application.After adopting test post adaptive, need not consider operating system and the communication protocol that test case moving body and tested application are adopted when carrying out the test case exploitation, and main function course and the message content of considering that tested application should provide of concentrating, and the processing logic of test case.TE forms test macro with test post aptamers and other test environment assemblies, realizes test and other subtest functions (as log/trace/test suite handler) to AUT.
The test post aptamers is supported by test case moving body transmission of messages bearer path between initiation and foundation and the tested application when the test starting, be the follow-up unidirectional or transmitted in both directions preparation path that carries out test post, and before test case finishes, remove this transmission bearer, release corresponding calculated resource.Message bearing mode under the Practical Calculation environment has multiple as Socket class, message queue MessageQueue class or shared drive SharedMemory class etc., but the TEI interface will shield this class difference, and the sign of standard only is provided.The test post aptamers is also supported the mutual forwarding of test post between TE and the AUT, support the message presentation format of TE one side necessity and the mutual conversion of network transmission format, and the mutual conversion of AUT message format and test post aptamers inside story form is provided in AUT one side.Herein, described message presentation format is meant the discernible data type format of computer, and described network transformat is the transformats of the discernible data of computer in network.The interface function that the test post aptamers externally provides can simply be summarized as follows:
TEI::{
Message bearing is set up;
Message bearing is removed, computational resource discharges;
The native representations form of TE message is changed to network transmission format;
TE is to the AUT forwards;
Detection/the reception of AUT message;
The network transmission format of the message that AUT sends is to the conversion of TE native representations form;
}
TSI::{
Message bearing is set up;
Message bearing is removed, computational resource discharges;
The conversion of data packet format communication data packet format in AUT in the message aptamers;
AUT is to the forwarding of TE message;
TE is to the forwarding of AUT message
}
Consideration authenticates to the needs of Embedded Application performance/capacity/pressure test from Embedded Application institute supported protocol/standard consistency, the essential requirement of supporting test AUT under the distributed environment of test post aptamers, promptly must be able to support a plurality of AUT nodes of a plurality of TE node tests, this just requires, should possess corresponding message routing capabilities in test post aptamers inside, to support the requirement of capacity/pressure test to load control.
Fig. 2 is the building-block of logic of test post aptamers, and according to osi model, the test post aptamers can cover the function of a plurality of communication protocols sublayer, as network layer, transport layer and presentation layer etc.Wherein TEI-Svr is test case moving body interface service unit, and Msg-Disp represents test post retransmission unit between TE and the AUT, and TSI-Svr represents tested application interface services unit.TEI-Svr can related one or more TE examples, and TEI-Svr is related with the Msg-Disp unit, and Msg-Disp is related with the one or more TSI-Svr unit that is provided with of distributing based on sharing of load and AUT interface.
TEI-Svr is used for the message format of TE is converted to test post aptamers inside story form and is transmitted to Msg-Disp, the AUT message conversion of expressing with test post aptamers inside story form that Msg-Disp is forwarded becomes the message format of TE and is transmitted to TE, in order to discern the TE message format and to carry out the message format conversion, TEI-Svr also comprises a configuration interface, be used to read and resolve the configuration file that comprises TE message format descriptor, the TE message format descriptor that the TEI-Svr foundation is obtained by this configuration interface is carried out the conversion between TE message format and the test post aptamers inside story form.The inside story that Msg-Disp is responsible between TEI-Svr and the TSI-Svr is transmitted, and in distributed environment, Msg-Disp also need finish the routing function of test post, can be according to the message route between routing configuration strategy realization TEI-Svr and the TSI-Svr.TSI-Svr is used for the AUT message format that AUT sends is converted to test post aptamers inside story form and is transmitted to Msg-Disp, and the TE message conversion of expressing with test post aptamers inside story form that Msg-Disp forwards become the AUT message format and be transmitted to AUT, in order to discern the AUT message format and to carry out conversion, TSI-Svr also comprises a standard configuration interface, be used to read and resolve the configuration file that comprises AUT message format descriptor, TSI-Svr carries out conversion between AUT message format and the test post aptamers inside story form according to the descriptor of the AUT message format that obtains by this configuration interface.
Usually TE and TEI-Svr are in together on the node, are called test node in logic, and AUT and the TSI-Svr node that exists together is called tested node in logic, and Msg-Disp is called forward node in logic.According to test purpose, can arrange each logic entity in the test post aptamers as required, for example when carrying out Embedded Application interface consistency checking, a test node and a forward node can be arranged on the same physical node, tested node is arranged on the another one node.And when carrying out Embedded Application capacity/pressure test scene, the forward node of a plurality of TE of comprising of test environment configuration and the test node of TEI-Svr, a plurality of Msg-Disp of comprising and one/or a plurality of tested node that comprises AUT and TSI-Svr, as shown in Figure 3,2 test nodes, 2 tested nodes and 3 forward node have been comprised, the test post that is sent by test node 1 can arrive tested node 1 by the routed path of forward node 1 and forward node 3, also can arrive tested node 1 by the routed path of forward node 1, forward node 2, forward node 3.Because the present invention's flexibility in design uses the logical construction of test post aptamers of the present invention can lay out more complicated test environment.
Between the logic entity in the test post aptamers, promptly between test case moving body interface service unit and the test post retransmission unit, the end-to-end message between test post retransmission unit and the tested application interface services unit, between test post retransmission unit and the test post retransmission unit adopts following message format:
[router_id/cmd][datalenth][payload]
Router_id/cmd is that type of message identification field, datalenth are data length field, payload data load field.Wherein Router_id/Cmd partly represents the type of message, in the present invention's one specific embodiment, type of message is divided into two types of inter-entity cooperation order and TE/AUT Data-carrying orders, inter-entity cooperation order refers to that interpolation/deletion route, foundation/orders such as dismounting bearer path, Data-carrying order are meant the order of completion logic inter-entity test post transmission.In order to distinguish two kinds of type of messages, set a judgment value Cmd_highBut in the present invention's one specific embodiment, represent when the value of Router_id/Cmd that this order is cooperated for inter-entity during less than Cmd_highBut and order that its payload field is a command parameter; Otherwise be the Data-carrying order, its payload field is a data carried by data.The Cmd value comprises with the implication of issuing orders:
Id_AddRouterEntryReq adds the route entity request mark;
Id_AddRouterEntryRsp adds route entity request response identification;
Id_RemRouterEntryReq, deletion route entity request mark;
Id_RemRouterEntryRsp, deletion route entity request response identification;
Id_CrMsgBearerReq creates the message bearing request mark;
Id_CrMsgBearerRsp creates message bearing request response identification;
Id_RmMsgBearerReq, deletion message bearing request mark;
Id_RmMsgBearerRsp, deletion message bearing response identification;
In order to distinguish the data of the different directions on the same bearer path, doubly be that one group of odevity of separation is come the value as described type identification field with positive integer in the present invention's one specific embodiment with 2 greater than Cmd_highBut, be used for distinguishing and identifying the message of same route different directions on the same bearer path, for example: when router_id=2*n+Cmd_highBut+0, represent that router_id route data carried by data is to mail to AUT by TE; When router_id=2*n+Cmd_highBut+1, represent that router_id route data carried by data is to mail to TE by AUT;
In the present invention's one specific embodiment between tested application interface services unit and AUT message format be:
[autInnr_header][payload]
Wherein autInnr_header is the message header of tested software special use.
In order to realize logic function of the present invention, each node in the present invention's one specific embodiment comprises test node, forward node, tested node, all should comprise following information, is similar to the member variable in each entity class, but is not limited to the following message key element:
1, MonitorPort is used for the service processes monitor port;
2, routing table RouterTable{RouterEntry0, RouterEntry1 ..., be used for route between local memory node;
Each route entry wherein as RouterEntry0, comprises following attribute:
(1), router_id, route numbering is used to identify a route;
(2), DynBearerState, the dynamic loaded state of route, this state has four types, is respectively: [OffSrv] do not use, [InSet] carrying set up in, during [InSrv] use, [InDisment] carrying removes;
(3), prehop_type, the forward direction node type, the forward direction node is meant the last node of present node on same route, and three kinds of values are arranged, and is respectively: [TEN|ROU|AUT], TEN represents test node; ROU represents forward node; A UT represents tested node.
(4), phaddr_type, forward direction node address type, three kinds of value types are arranged, be respectively [socket_based|MagQueue_based|SharedMem_based], represent address style respectively based on Socket type, message queue type, shared drive type;
(5), prehop_addr, the forward direction node address is used to identify the forward direction address of node;
(6), nexthop_type, the back is to node type, the back is meant the back node of present node on same route to node, the type has three kinds of values, [TEN|ROU|AUT], implication is with describing in (3);
(7), nhaddr_type, the back to node address type [socket_based|MagQueue_based|SharedMem_based];
(8), nexthop_addr, the back to node address
(9), autInnr_header, AUT specific messages head is used for the specific identity of AUT message, when the back effective when node is AUT;
(10), autmsg_constractor, AUT message constructing function, effective when node is the AUT node type when the back, the AUT message format descriptor realization test post aptamers inside story form that this function is used for importing according to configuration interface is changed to the AUT message format;
(11), autmsg_destractor, AUT message destructing function, effective when the forward direction node is the AUT node; The AUT message format descriptor that this function is used for importing according to configuration interface realizes the conversion of AUT message format to test post aptamers inside story form;
(12), testmsg_packer, test post transfer encoding function, effective when the forward direction node is the TEN node type, the TE message format descriptor that this function is used for importing according to configuration interface realizes the conversion of TE message format to test post aptamers inside story form;
(13), testmsg_unpacker, test post transmission decoding functions, effective when node is TEN when the back, the TE message format descriptor realization test post aptamers inside story form that this function is used for importing according to configuration interface is changed to the TE message format;
3, carrying quick indexing table, BearerIdxTable{BearerEntry0, BearerEntry1 ...
Wherein each quick indexing item (as BearerEntry0) comprises:
BearerId/* bearing identification */
Corresponding routing iinformation position (side-play amount in the routing table) * of RT_OffSet/*/
Carrying quick indexing table is used for each logic entity and obtains the bearer path sign fast, and locatees the pairing routing iinformation of this bearer path fast.
The externally main administrative class interface function of logic entity described in the present invention's one specific embodiment comprises: increase route table items and deletion route table items.
Increase core processing that route table items handles function as shown in Figure 5, flow process is as follows:
Step 501: judge according to Route Distinguisher composition rule and routing policy whether Route Distinguisher is effective, if effectively then execution in step 502, then end if not;
Step 502: in node, increase corresponding route in the back; This step with the interpolation route requests be distributed to other the back to node, and etc. operation to be added finish;
Step 503: upgrade present node route entry information;
Step 504: carry out the registration of message format transfer function to node types according to forward direction and back;
When the forward direction node type was TEN, registration TE was to the transfer function of test post aptamers inside story form;
When node type was TEN, registration test post aptamers inside story form was to the transfer function of TE message format when back;
When the forward direction node type was AUT, registration AUT message format was to the transfer function of test post aptamers inside story form;
When node type was AUT, registration test post aptamers inside story form was to the transfer function of AUT message format when back;
Step 505: send the route entry increase to the forward direction node and finish response message.
Below provide the code sample of above-mentioned steps:
AddRouterEntery(){
IsValid(Router_id){
!IsComplete(AddRouterEntry(nextHop)){
Wait?NxtHEntryAddComplete
}
ThisEntry.AddField(prehop_type,addr_type,prehop_addr,
nexthop_type,next_type,nxxthop_addr)
if(prehop_type==TEN){
ThisEntry.AddField.AddFiled(testmsg_packer)}
If(nexthop_type==TEN){
ThisEntry.AddField.AddFiled(testmsg_unpacker)}
If(prehop_type==AUT){
ThisEntry.AddFiled(autmsg_destractor)}
}
If(nexthop_type==AUT){
ThisEntry.AddFiled(autmsg_constractor)}
}
SendRspTo(PreHop)
Return?OK;
}
Need to prove, existing routing protocol has a variety of, the present invention does not limit the agreement of setting up route that is adopted, and the routing relation of setting up between each node is to set up the basis of bearer path, is setting up the establishment step that just can carry out bearer path between each test node after the routing relation.
The core processing flow process that the deletion route table items is handled function is as described in Figure 6:
Step 601: judge according to Route Distinguisher composition rule and routing policy whether Route Distinguisher is effective, if effectively then execution in step 602, then end if not;
Step 602: in node, delete corresponding route in the back, and wait for that the back executes the deletion action feedback to node and finishes response message;
Step 603: upgrade this node route entry information;
Step 604: send the route entry deletion to the forward direction node and finish response message.
Below provide the code sample of above-mentioned steps:
RemRouterEntery()
{
IsValid(Router_id){
!IsComplete(RemRouterEntry(nextHop)){
WaitNxtHEntryRemComplete
}
ThisEntry.Delete
SendRspTo(PreHop)
}
Return?OK
}
Create message bearing core processing flow process as shown in Figure 7:
Step 701: judge whether Route Distinguisher is effective, if effectively then execution in step 702, then end if not;
Step 702: whether the state of judging bearer path to be created is unused state, if execution in step 703 then; Then finish if not;
Step 703: send the bearer path request of setting up to the back of present node to node, wait for back execution in step 704 after the node feedback is finished response message;
Step 704: upgrading the described bearer path status indicator of present node is user mode;
Step 705: upgrade present node carrying quick indexing table;
Step 706: the forward direction node to present node is sent completely response message.
Below provide the code sample of above-mentioned steps:
Cr_MsgBearer(){
IsValid(Router_id){
IsNormalEntry(Router_id){
!IsComplete(Cr_MsgBearer(nextHop)){
Wait?CrNxtHBearerCmp
}
Update_DynBearerState
Update_BearerIdxTable
SendRspTo(PreHop);
}
Return?OK
}
}
The core processing flow process of tear down message carrying is as shown in Figure 8:
Step 801: judge whether the Route Distinguisher quote is effective, if execution in step 802 then, process ends then if not;
Step 802: judge whether bearer path state to be removed is normal operating condition; If then execution in step 803, process ends then if not;
Step 803: send the bearer path request of removing to node backward, and wait for and finish response message;
Step 804: upgrade loaded state and be designated unused state;
Step 805: new bearer quick indexing table more;
Step 806: send out the bearer path dismounting to the forward direction node and finish response message;
RmMsgBearer(){
IsValid(Router_id){
IsInSvr(Router_id){
!IsComplete(RmMsgBearer(nextHop)){
Wait?RmNxtHBearerCmp
}
Update_DynBearerState
Update_BearerIdxTable
SendRspTo(PreHop)
}
Return?OK
}
}
The external key data service class of logic entity interface function mainly is the top layer message processing function, its flow process as shown in Figure 9:
Step 901: judge whether the Route Distinguisher quote is effective, if execution in step 902 then, process ends then if not;
Step 902: judge whether type of message sign meets rule, if meet then execution in step 903, process ends then if not;
Step 903: the message type identification is judged if inter-entity cooperation order, then execution in step 904; If TE/AUT Data-carrying order, then execution in step 905;
Step 904: call corresponding function interface according to inter-entity cooperation command id;
Inter-entity cooperation order mainly contains the order of increase route entry, the order of deletion route entry, the order of establishment message bearing, the order of deletion message bearing, and corresponding response command of ordering after finishing.
Step 905: obtain the back to node address, forward the data to next node.
OnRecvMsg(){
IsValid(Router_id){
ContorlCmd(Router_id){
If(Router_id==Id_AddRouterEntryReq)Call?AddRouterEntry
Else?If(Router_id==Id_AddRouterEntryRsp)Set?NxtHEntryAddComplete
Else?If(Router_id==Id_RemRouterEntryReq)Call?RemRouterEntry
Else?If(Router_id==Id_RemRouterEntryRsp)Set?NxtEntryRemComplete
Else?If(Router_id==Id_CrMsgBearerReq)Call?CrMsgBearer
Else?If(Router_id==Id_CrMsgBearerRsp)Set?CrNxtHBearerCmp
Else?If(Router_id==Id_RmMsgBearerReq)Call?RmMsgBearer
Else?If(Router_id==Id_RmMsgBearerRsp)Set?RmNxtHBearerCmp
Else{
findNextHopAddrBy(Router_id)
sendData(NextHop,userData)
}
}
Return?OK
}
Below in conjunction with Fig. 4 the method for the invention is described in detail:
Steps A, by the message format of configuration interface identification test case moving body, set up the message interface between test post aptamers and the test case moving body;
When modes such as using standard configuration interface or programming realizations is set up after identification between TE message format and the test post aptamers inside story form concerns, when the same TE of following adopted tests other tested application, with regard to not needing once more the message interface between TE and the test post aptamers is carried out again definition, only need redefine and get final product the message interface between AUT and the tested application, thereby improved the reusability of code, saved message format by configuration interface identification TE, and the operation that test post aptamers interrelated logic entity attribute parameter is configured.
Step B, discern the message format of tested application, set up the message interface between test post aptamers and the tested application by configuration interface;
Import the message format descriptor by configuration interface, behind the message format and configuration testing message aptamers interrelated logic entity attribute parameter of identification test case moving body and tested application, can begin the establishment step of bearer path, should be noted that, before setting up bearer path, also should comprise the step of setting up internodal routing relation, routing relation mainly embodies with the routing table that each logic entity was comprised;
The main function of described configuration interface is by importing and resolve the message format description document, the message format of identification TE/AUT, described message format description document can be the descriptive language of standard, XML (extensible Markup Language) (XML for example, or self-defining configuration file etc. eXtensible Markup Language).The TE message format descriptor that TEI-Svr provides according to described standard configuration interface is carried out the mutual conversion between test post aptamers inside story form and the TE message format.AUT message format information and executing test post aptamers inside story form that the described standard configuration interface of TSI-Svr foundation provides and the mutual conversion between the AUT message format.In addition, before carrying out test, also need the property parameters of the logic entity in the test post aptamers is configured, for example attributes such as route strategy, address style, node identification, message coding/decoding function are provided with.
Step C, by described test post aptamers and set up described test case moving body and described tested application between bearer path;
The process of setting up the bearer path between described test case moving body and the described tested application as shown in figure 10, BearCr_Req represents to set up the request message of bearer path, BearCr_Rsp represents the response message to the request message of setting up bearer path.Concrete steps are as follows:
Step C1, test case moving body send the carrying request of setting up to described test case moving body interface service unit; Test case moving body interface service unit is resolved identification according to the message format descriptor to described foundation carrying request, successfully then sets up or revise dynamic bearing identification and quick indexing and with described foundation or remove to carry and ask to be transmitted to the test post retransmission unit if discern;
Step C2, described test post retransmission unit are transmitted to described tested application interface services unit with described foundation carrying request;
The configuration of step C3, described tested application interface services unit establishing criteria configuration interface converts described foundation carrying request the message format that described tested application can discern to and is transmitted to described tested application;
The carrying request response is set up to described test post retransmission unit feedback in step C4, described tested application interface services unit, and described test post retransmission unit is transmitted to described test case moving body interface service unit with described foundation carrying request response;
The configuration of step C5, described test case moving body interface service unit establishing criteria configuration interface converts described foundation carrying request response the message format that described test case moving body can discern to and is transmitted to described test case moving body.
Step D, tested application is tested according to the test case logic.
After setting up bearer path, can carry out the mutual identification and the forwarding of test post between TE and the AUT, the flow process that TE sends test post to AUT as shown in figure 12, the flow process that AUT sends test post to TE is as shown in figure 13.TE is as follows to the flow process that AUT sends test post:
Step D1, TE send test post to TEI-Svr, are to be transmitted to Msg-Disp behind the test post aptamers inside story form by TEI-Svr with the test post format conversion, and Msg-Disp is transmitted to TSI-Svr with test post again;
Step D2, TSI-Svr are the message format of AUT and are transmitted to AUT by test post aptamers inside story format conversion described test post;
Test post is opposite with above-mentioned steps to the transfer step of TE by AUT, is not giving unnecessary details herein.Wherein, MsgDat_Ind represents the message data that sends between TE and the AUT.
After finishing test, also need to remove the bearer path between described test case moving body and the described tested application and discharge resource.The flow process of removing the bearer path between test case moving body and the tested application is similar with the process of setting up bearer path, and as shown in figure 11, BearRm_Req represents to remove request message, and BearRm_Rsp represents to remove request responding message.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.

Claims (10)

1. a Reusable test message adapting method is characterized in that, comprising:
A, by the message format of configuration interface identification test case moving body, set up the message interface between test post aptamers and the test case moving body;
B, discern the message format of tested application, set up the message interface between test post aptamers and the tested application by configuration interface;
C, set up bearer path between described test case moving body and the described tested application by described test post aptamers;
D, tested application is tested according to the test case logic;
Wherein, in the steps A, import the message format description document of described test case moving body, the message format of the described test case moving body of identification after resolving by the test case moving body interface service unit in the described test post aptamers;
Among the step B, import the message format description document of described tested application, the message format of the described tested application of identification after resolving by the tested application interface services unit in the described test post aptamers.
2. method according to claim 1 is characterized in that, provides message interface between described test post aptamers and the test case moving body by one or more test case moving body interface service unit in the described test post aptamers; Provide message interface between test post aptamers and the tested application by one or more tested application interface services unit in the described test post aptamers; Realize the forwarding of test post between described test case moving body interface service unit and the described tested application interface services unit by one or more test post retransmission units.
3. method according to claim 2, it is characterized in that, constitute test node by described test case moving body and test case moving body interface service unit, constitute forward node by the test post retransmission unit, constitute tested node by tested application and tested application interface services unit, among the step C, before setting up described bearer path, also comprise the step of setting up the routing relation between described test node, forward node and the tested node.
4. method according to claim 3 is characterized in that, the establishment step of described bearer path is:
C1, judge whether the state of bearer path to be created is unused state, if, execution in step C2 then;
C2, send the bearer path request of setting up to node, wait for back execution in step C3 after the node feedback is finished response message to the back of present node;
C3, the described bearer path status indicator of renewal present node are user mode;
C4, renewal present node carrying quick indexing table, wherein, carrying quick indexing table is used for each logic entity and obtains the bearer path sign fast, and locatees the pairing routing iinformation of this bearer path fast;
C5, be sent completely response message to the forward direction node of present node.
5. method according to claim 4 is characterized in that, among the step D, test post is as follows by the step that described test case moving body flows to described tested application:
The test post that D01, described test case moving body send is to send to described test post retransmission unit behind the test post aptamers inside story form by described test case moving body interface service cell translation;
D02, the described test post retransmission unit test post after with format conversion is transmitted to described tested application interface services unit;
D03, the described tested application interface services unit test post after with described format conversion sends to described tested application after being converted to the message format of described tested application;
Test post is as follows by the step that described tested application flows to described test case moving body:
The test post that D11, described tested application send is to send to described test post retransmission unit behind the test post aptamers inside story form by tested application interface services cell translation;
D12, the described test post retransmission unit test post after with format conversion is transmitted to described test case moving body interface service unit;
After converting described test case moving body message format to, D13, the described test case moving body interface service unit test post after with described format conversion sends to described test case moving body.
6. method according to claim 5, it is characterized in that, message communicating form between the logic entity of described message aptamers inside is made up of type of message identification field, data length field and data load field, if the value in the described type of message identification field represent during less than the value set in this message the carrying of data load field be command parameter, if the value in the described type of message identification field is not less than the value of setting, then represent in this message the carrying of data load field be data.
7. method according to claim 6, it is characterized in that, with the positive integer with 2 greater than described set point doubly is the value that one group of odevity of separation is used as described type of message identification field, is used for distinguishing and identifying the message of same route different directions on the same bearer path.
8. Reusable test message adaption system, comprise the test case moving body, tested application is characterized in that, also comprise the test post aptamers that is used to described test case moving body and tested application to give information adaptive, described test post aptamers comprises:
Test case moving body interface service unit, be used to provide the interface service between described test case moving body and the described test post aptamers, wherein, import the message format description document of described test case moving body by the test case moving body interface service unit in the described test post aptamers, the message format of the described test case moving body of identification after resolving;
Tested application interface services unit, be used to provide the interface service between described tested application and the described test post aptamers, wherein, import the message format description document of described tested application by the tested application interface services unit in the described test post aptamers, the message format of the described tested application of identification after resolving;
The test post retransmission unit is used for carrying out forwards between described test case moving body interface service unit and described tested application interface services unit.
9. system according to claim 8, it is characterized in that, when carrying out the capacity/pressure test, described test post aptamers can connect a plurality of test case moving bodies and a plurality of tested application simultaneously, and one or more test case moving bodies can be connected with one or more test case moving body interface service unit; One or more tested application can be connected with one or more tested application interface services unit; One or more test case moving body interface service unit can be connected with one or more test post retransmission units, can set up route between a plurality of test post retransmission units.
10. system according to claim 9 is characterized in that, described test case moving body interface service unit comprises a configuration interface that is used to import and discern the message format of test case moving body; Tested application interface services unit comprises a configuration interface that is used to import and discern the message format of tested application.
CN2008101160229A 2008-07-01 2008-07-01 Reusable test message adapting method and system Active CN101621419B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101160229A CN101621419B (en) 2008-07-01 2008-07-01 Reusable test message adapting method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101160229A CN101621419B (en) 2008-07-01 2008-07-01 Reusable test message adapting method and system

Publications (2)

Publication Number Publication Date
CN101621419A CN101621419A (en) 2010-01-06
CN101621419B true CN101621419B (en) 2011-12-14

Family

ID=41514478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101160229A Active CN101621419B (en) 2008-07-01 2008-07-01 Reusable test message adapting method and system

Country Status (1)

Country Link
CN (1) CN101621419B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101872303B (en) * 2010-06-03 2013-06-12 深圳天源迪科信息技术股份有限公司 Method for processing Diameter protocol message
CN104077212B (en) * 2013-03-26 2017-03-01 阿里巴巴集团控股有限公司 pressure testing system and method
CN103236959A (en) * 2013-05-09 2013-08-07 中国银行股份有限公司 Test system and test method for testing business processing module
CN106294177B (en) * 2016-08-22 2018-06-22 腾讯科技(深圳)有限公司 The method for testing pressure and test equipment of a kind of interface
CN109634855A (en) * 2018-12-04 2019-04-16 郑州云海信息技术有限公司 A kind of automatic test ambient intelligence matching process based on cloud computing

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1494249A (en) * 2002-10-31 2004-05-05 深圳市中兴通讯股份有限公司 Base station controller/base station receiving/transmitting information apparatus imitator in CDMA system
CN1642116A (en) * 2004-01-05 2005-07-20 华为技术有限公司 Asynchronous transmission mode reverse multiplex measuring method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1494249A (en) * 2002-10-31 2004-05-05 深圳市中兴通讯股份有限公司 Base station controller/base station receiving/transmitting information apparatus imitator in CDMA system
CN1642116A (en) * 2004-01-05 2005-07-20 华为技术有限公司 Asynchronous transmission mode reverse multiplex measuring method and device

Also Published As

Publication number Publication date
CN101621419A (en) 2010-01-06

Similar Documents

Publication Publication Date Title
CN103081418B (en) Computer system and communication method in computer system
JP6147274B2 (en) Minimal connection object network architecture
CN101621419B (en) Reusable test message adapting method and system
CN103281197B (en) A kind of ForCES collocation method based on NETCONF
CN104753828A (en) SDN controller, data central system and route connection method
CN102821050A (en) Processing method for applying rapid spanning tree protocol to monocyclic network topology
CN108289061B (en) Service chain topology system based on SDN
TW201703473A (en) Method for constituting hybrid network spanning tree, method of redundancy, and control system thereof
CN111327483B (en) Equipment nano-tube method, system and storage medium
CN104135446A (en) System and method of implementing transition from IPv4 (Internet Protocol Version4) to IPv6 (Internet Protocol Version6) based on SDN (Software Defined Network)
CN109743259A (en) A kind of traffic scheduling method and device of network
CN101499639A (en) Relay protection and measurement integrated apparatus with multiple communication interfaces integrated
CN100466611C (en) Processing method for network node configuration information when network topology changing
CN111555915A (en) Dynamic network element control system based on plug-in configuration
CN103067287A (en) Method achieving virtual programmable router under framework of forwarding and control separation
Wei et al. An IPv6 internet accessing architecture and approach for industrial wireless network
CN103580909A (en) Method and device for customizing hardware resource
CN104426715A (en) Distributed testing tool control method
WO2015003420A1 (en) Resource deployment method for cloud computing environment
CN108650116A (en) A kind of group technology being used under the IP interconnections of DMR intermediate stations
CN114979139B (en) Management system and method for heterogeneous virtual gateway in edge computing scene
CN106790693A (en) The analysis method and system of a kind of network packet
CN109286536B (en) Interface testing method and device
CN101621528B (en) Conversation system based on Ethernet switch cluster management and method for realizing conversation passage
CN103457795B (en) MAD method and apparatus in VCF network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant