CN101639806A - Topology adaptation method and device for automatization test - Google Patents

Topology adaptation method and device for automatization test Download PDF

Info

Publication number
CN101639806A
CN101639806A CN200910172067A CN200910172067A CN101639806A CN 101639806 A CN101639806 A CN 101639806A CN 200910172067 A CN200910172067 A CN 200910172067A CN 200910172067 A CN200910172067 A CN 200910172067A CN 101639806 A CN101639806 A CN 101639806A
Authority
CN
China
Prior art keywords
matrix
topology
logical topology
tabulation
adaptive
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN200910172067A
Other languages
Chinese (zh)
Other versions
CN101639806B (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN200910172067.2A priority Critical patent/CN101639806B/en
Publication of CN101639806A publication Critical patent/CN101639806A/en
Application granted granted Critical
Publication of CN101639806B publication Critical patent/CN101639806B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a topology adaptation method for automatization test, comprising the following steps: constructing a physical topology matrix and a logical topology matrix according to the structure of a physical topology and the structure of a logical topology; adapting the physical topology and the logical topology according to the size relationship of the values and the uniformity of thetypes of each element in the physical topology matrix and the logical topology matrix; and outputting an adaptation result after the adaptation is successful. The invention also provides a topology adaptation device for the automatization test. The invention can quickly and effectively carry out mapping from the logical topology to the physical topology, intelligently adapt test equipment and test ports, carry out outputting according to the requirement of a system, save the test time and adapt to the requirement of large-scale automatization test at present.

Description

The topology adaptation method and the device that are used for automatic test
Technical field
The present invention relates to the communications field, in particular to a kind of topology adaptation method and device that is used for automatic test.
Background technology
Automatization test system has been deep into the various aspects of software test gradually.Product and patent about automatic test have also had a lot, but the part adaptive to topology in the automatic test do not elaborated.For example Chinese patent CN1731747 is by building test environment, the topology and the storage of test physical environment are described, the logical topology and the storage of test case are described, read the test script of described test case and resolve the logical topology that it relies on, shine upon described logical topology to described physical topology, carry out the operation of described test definition.But specifically how logical topology is mapped to physical topology, how exports new logical relation, this patent is explanation not, only rests on the description stage.For implementation method, Chinese patent CN101110734 has mentioned the annexation of removing to describe port by the form of a data structure three-dimensional array, but just topological how shining upon is also not mentioned.Similarly, Chinese patent CN1731747 has also used Topological Mapping in topology, but not mentioned implementation method.
The inventor finds that there is following problem at least in prior art: because the adaptation scheme of how realizing from the logical topology to the physical topology is not provided, can't satisfy the needs of automatic test.
Summary of the invention
The present invention aims to provide a kind of topology adaptation method and device that is used for automatic test, does not provide the adaptation scheme of how realizing from the logical topology to the physical topology to solve, and can't satisfy the problem of the needs of automatic test.
According to an aspect of the present invention, provide a kind of topology adaptation method that is used for automatic test, having comprised: according to the structure of physical topology and the structure of logical topology, structural physical topological matrix and logical topology matrix; According to the consistance of the type of the magnitude relationship of the value of each element in physical topology matrix and the logical topology matrix and each element, adaptive physical topology and logical topology; Adaptive result is exported in adaptive success.
Preferably, according to the structure of physical topology and the structure of logical topology, structural physical topological matrix and logical topology matrix specifically comprise: the structure of the structure of physical topology and logical topology is stored as database file; The resolution data library file obtains the facility information and the port information of physical topology and logical topology; According to facility information, generate tabulation List1 and tabulation List2, the element among the tabulation List1 is the title of the equipment in the physical topology, the element among the tabulation List2 is the title of the equipment in the logical topology; Whether the number of judging the element among the tabulation List1 is greater than the number of the element among the tabulation List2; If, then according to tabulation List1, tabulation List2 and port information, structural physical topological matrix Array1 and logical topology matrix A rray2, elements A rrayk (i among physical topology matrix A rray1 and the logical topology matrix A rray2, j) (i, the j) degree of connection between i element corresponding equipment and j the element corresponding equipment among the expression tabulation List k, Type represent the to tabulate type of i element corresponding equipment among the List k of the Array k in (Type), k=1 wherein, 2.
Preferably, database file is the XML file; The type of equipment comprises testing apparatus and tested equipment.
Preferably, in above-mentioned topology adaptation method, also comprise: if not, then adaptive failure.
Preferably, according to the consistance of the type of the magnitude relationship of the value of each element in physical topology matrix and the logical topology matrix and each element, adaptive physical topology specifically comprises with logical topology: whether the value of judging each element in the physical topology matrix whether device type more than or equal to the value of each element in the logical topology matrix and corresponding element is consistent; If, then adaptive success; If not, then carry out matrix transpose, according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive physical topology and logical topology.
Preferably, carry out matrix transpose, according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive physical topology and logical topology specifically comprise: the element among the tabulation List1 is arranged entirely; The variation of the element among the tabulation List1 after the full arrangement of record and the index position of the element among the tabulation List1; Ranks corresponding among the physical topology matrix A rray1 are rearranged the physical topology matrix that constitutes behind the transposition according to the variation of index position; Whether the value of judging each element in the physical topology matrix behind the transposition whether device type more than or equal to the value of each element in the logical topology matrix and corresponding element is consistent; If, configuration successful then; If not, configuration failure then.
Preferably, carry out matrix transpose, according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive physical topology and logical topology also comprise: the element among the tabulation List2 is arranged entirely; The variation of the element among the tabulation List2 after the full arrangement of record and the index position of the element among the tabulation List2; Ranks corresponding among the logical topology matrix A rray2 are rearranged the logical topology matrix that constitutes behind the transposition according to the variation of index position; On the ranks of the logical topology matrix behind the transposition, mend 0, identical with the ranks number of physical topology matrix; Whether the value of judging each element in the physical topology matrix whether device type more than or equal to the value of each element in the logical topology matrix of mending after 0 and corresponding element is consistent; If, configuration successful then; If not, configuration failure then.
Preferably, adaptive success is exported adaptive result and is specifically comprised: according to the mapping relations of logical topology matrix and physical topology matrix, the device map of logical topology arrived the equipment of physical topology; According to port information, with the port mapping of the equipment of logical topology port to the equipment of physical topology; The equipment of the equipment of output logic topology and port thereof and physical topology and the mapping result of port thereof.
According to another aspect of the present invention, also provide a kind of topological adaptive device that is used for automatic test, having comprised: the matrix construction module is used for according to the structure of physical topology and the structure of logical topology structural physical topological matrix and logical topology matrix; The matrix adaptation module is used for the consistance according to the type of the magnitude relationship of the value of physical topology matrix and each element of logical topology matrix and each element, adaptive physical topology and logical topology; Output module is used for adaptive success as a result, exports adaptive result.
Preferably, the matrix construction module is according to the structure of physical topology and the structure of logical topology, and structural physical topological matrix and logical topology matrix specifically comprise: the structure of the structure of physical topology and logical topology is stored as database file; The resolution data library file obtains the facility information and the port information of physical topology and logical topology; According to facility information, generate tabulation List1 and tabulation List2, the element among the tabulation List1 is the title of the equipment in the physical topology, the element among the tabulation List2 is the title of the equipment in the logical topology; Whether the number of judging the element among the tabulation List1 is greater than the number of the element among the tabulation List2; If, then according to tabulation List1, tabulation List2 and port information, structural physical topological matrix Array1 and logical topology matrix A rray2, elements A rray k (i among physical topology matrix A rray1 and the logical topology matrix A rray2, j) (i, the j) degree of connection between i element corresponding equipment and j the element corresponding equipment among the expression tabulation List k, Type represent the to tabulate type of i element corresponding equipment among the List k of the Array k in (Type), k=1 wherein, 2.
Preferably, the matrix adaptation module comprises: whether whether judging unit, the value that is used for judging each element of physical topology the matrix device type more than or equal to the value of each element in the logical topology matrix and corresponding element consistent; The transposition unit, be used for when the judged result of judging unit for not the time, carry out matrix transpose, according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive physical topology and logical topology.
Preferably, matrix transpose is carried out in the transposition unit, and according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive physical topology and logical topology specifically comprise: the element among the tabulation List1 is arranged entirely; The variation of the element among the tabulation List1 after the full arrangement of record and the index position of the element among the tabulation List1; Ranks corresponding among the physical topology matrix A rray1 are rearranged the physical topology matrix that constitutes behind the transposition according to the variation of index position; Whether the value of judging each element in the physical topology matrix behind the transposition whether device type more than or equal to the value of each element in the logical topology matrix and corresponding element is consistent; If, configuration successful then; If not, configuration failure then.
Preferably, matrix transpose is carried out in the transposition unit, and according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive physical topology and logical topology also comprise: the element among the tabulation List2 is arranged entirely; The variation of the element among the tabulation List2 after the full arrangement of record and the index position of the element among the tabulation List2; Ranks corresponding among the logical topology matrix A rray2 are rearranged the logical topology matrix that constitutes behind the transposition according to the variation of index position; On the ranks of the logical topology matrix behind the transposition, mend 0, identical with the ranks number of physical topology matrix; Whether the value of judging each element in the physical topology matrix whether device type more than or equal to the value of each element in the logical topology matrix of mending after 0 and corresponding element is consistent; If, configuration successful then; If not, configuration failure then.
Preferably, output module is exported adaptive result and is specifically comprised after adaptive success as a result: according to the mapping relations of logical topology matrix and physical topology matrix, the device map of logical topology is arrived the equipment of physical topology; According to port information, with the port mapping of the equipment of logical topology port to the equipment of physical topology; The equipment of the equipment of output logic topology and port thereof and physical topology and the mapping result of port thereof.
Because describe physical topology and logical topology structure with the form of matrix, by comparing the size and the consistance of the value of each element in physical topology matrix and the logical topology matrix, come adaptive physical topology and logical topology, having solved does not provide the adaptation scheme of how realizing from the logical topology to the physical topology, can't satisfy the problem of the needs of automatic test, thereby can fast and effeciently carry out the mapping of logical topology to physical topology, adaptive intelligently testing apparatus and test port, and export according to system requirements, save the test duration, can adapt to the demand of at present extensive automatic test.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 shows the process flow diagram according to the topology adaptation method that is used for automatic test of the embodiment of the invention;
Fig. 2 shows the synoptic diagram of physical topological structure according to the preferred embodiment of the invention;
Fig. 3 shows the process flow diagram of the topology adaptation method that is used for automatic test according to the preferred embodiment of the invention;
Fig. 4 shows the synoptic diagram according to the topological adaptive device that is used for automatic test of the embodiment of the invention.
Embodiment
Below with reference to the accompanying drawings and in conjunction with the embodiments, describe the present invention in detail.
Fig. 1 shows the process flow diagram according to the topology adaptation method that is used for automatic test of the embodiment of the invention, may further comprise the steps:
Step S10, according to the structure of physical topology and the structure of logical topology, structural physical topological matrix and logical topology matrix;
Step S20 is according to the consistance of the type of the magnitude relationship of the value of each element in physical topology matrix and the logical topology matrix and each element, adaptive physical topology and logical topology;
Step S30, adaptive result is exported in adaptive success.
This embodiment describes physical topology and logical topology structure with the form of matrix, by comparing the size and the consistance of the value of each element in physical topology matrix and the logical topology matrix, come adaptive physical topology and logical topology, having solved does not provide the adaptation scheme of how realizing from the logical topology to the physical topology, can't satisfy the problem of the needs of automatic test.Use this embodiment can fast and effeciently carry out the mapping of logical topology to physical topology, adaptive intelligently testing apparatus and test port, and export according to system requirements, saved the test duration, can adapt to the demand of at present extensive automatic test.
Preferably, step S10 specifically comprises: the structure of the structure of physical topology and logical topology is stored as database file; The resolution data library file obtains the facility information and the port information of physical topology and logical topology; According to facility information, generate tabulation List1 and tabulation List2, the element among the tabulation List1 is the title of the equipment in the physical topology, the element among the tabulation List2 is the title of the equipment in the logical topology; Whether the number of judging the element among the tabulation List1 is greater than the number of the element among the tabulation List2; If, then according to tabulation List1, tabulation List2 and port information, structural physical topological matrix Array1 and logical topology matrix A rray2, elements A rrayk (i among physical topology matrix A rray1 and the logical topology matrix A rray2, j) (i, the j) degree of connection between i element corresponding equipment and j the element corresponding equipment among the expression tabulation List k, Type represent the to tabulate type of i element corresponding equipment among the List k of the Array k in (Type), k=1 wherein, 2.
Wherein, database file is the XML file; The type of equipment comprises testing apparatus and tested equipment.
The preferred embodiment provides with the formal description physical topology of matrix and the specific embodiments of logical topology structure.
Preferably, in step S10, also comprise: the number of the element in judging tabulation List1 is during less than the number of the element among the tabulation List2, adaptive failure.
Because the equipment in the logical topology generally is less than the equipment in the physical topology, then ought determine equipment number in the logical topology greater than the equipment number in the physical topology, then can affirm adaptive unsuccessful.
Preferably, step S20 specifically comprises: whether the value of judging each element in the physical topology matrix whether device type more than or equal to the value of each element in the logical topology matrix and corresponding element is consistent; If, then adaptive success; If not, then carry out matrix transpose, according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive physical topology and logical topology.
Wherein, carry out matrix transpose, according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive physical topology and logical topology specifically comprise: the element among the tabulation List1 is arranged entirely; The variation of the element among the tabulation List1 after the full arrangement of record and the index position of the element among the tabulation List1; Ranks corresponding among the physical topology matrix A rray1 are rearranged the physical topology matrix that constitutes behind the transposition according to the variation of index position; Whether the value of judging each element in the physical topology matrix behind the transposition whether device type more than or equal to the value of each element in the logical topology matrix and corresponding element is consistent; If, configuration successful then; If not, configuration failure then.
Carry out matrix transpose, according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive physical topology and logical topology also comprise: the element among the tabulation List2 is arranged entirely; The variation of the element among the tabulation List2 after the full arrangement of record and the index position of the element among the tabulation List2; Ranks corresponding among the logical topology matrix A rray2 are rearranged the logical topology matrix that constitutes behind the transposition according to the variation of index position; On the ranks of the logical topology matrix behind the transposition, mend 0, identical with the ranks number of physical topology matrix; Whether the value of judging each element in the physical topology matrix whether device type more than or equal to the value of each element in the logical topology matrix of mending after 0 and corresponding element is consistent; If, configuration successful then; If not, configuration failure then.
Above preferred embodiment provides carries out the adaptive specific embodiments of matrix.When matrix is carried out transposition, can be that object of reference carries out matrix transpose, can be that object of reference carries out matrix transpose also, thereby carry out the adaptive of matrix with the logical topology matrix with the physical topology matrix.
Preferably, step S30 specifically comprises: according to the mapping relations of logical topology matrix and physical topology matrix, the device map of logical topology is arrived the equipment of physical topology; According to port information, with the port mapping of the equipment of logical topology port to the equipment of physical topology; The equipment of the equipment of output logic topology and port thereof and physical topology and the mapping result of port thereof.
The method of automatic test topology intelligent adaptation provided by the invention comprises following aspect:
1, with the form of matrix physical topology and logical topology structure are described:
From the topological structure storage file, resolve its facility information, at first resolve its testing apparatus and tested device name, generate a tabulation List1; From tabulation List1, take out each deviceelement successively then, calculate degree of connection (the connection degree: be used for describing certain equipment of each element among this deviceelement and the tabulation List1 with other equipment or when self being connected, the quantitative relation that connects, as 0,1,2 etc.), and write down the type of each equipment, testing apparatus or tested equipment are represented with T and D respectively.Degree of connection among the n line display tabulation List1 between n deviceelement and all devices element, m tabulation show all devices element and List1 show in the degree of connection of m element, the type of this deviceelement of symbolic representation that its bracket is interior.
Use the two-dimensional array storage matrix, Array1 for example, wherein (i, j) (Type represents the type of this deviceelement to the Array1 in (Type) to array element Array1 for i, the j) element of the capable j row of i in the representing matrix, and device type is T or D.
2, matrix transpose:
How to allow one of them topological matrix generation transposition, can and write down the order of each element in its transposition? at first each element among the List1 is arranged entirely, each puts in order according to it, matrix carries out transposition, specific implementation method: the variation of each element index position among each element and the basis tabulation List1 during the record tabulation is arranged, then corresponding ranks in its matrix are rearranged into new matrix, finish transpose of a matrix.
3, array element conversion:
According to above-mentioned matrix transpose order, the subscript with array changes successively, can satisfy transpose of a matrix.
4, topology is adaptive:
The adaptive principle of matrix: when the value of each element of physical topology matrix during all more than or equal to the value of each element of logical topology matrix, it is adaptive that this physical topology satisfies logical topology.
So physical topology matrix array and each element of logical topology matrix array are compared, when the value of each element in the physical topology matrix array all is greater than or equal to the device type unanimity of each element value of logical topology matrix array and corresponding element, adaptive success.
The method of automatic test provided by the invention topology intelligent adaptation can be directly carried out adaptive and is exported its mapping relations according to physical topology and logical topology structure, and exports its required arbitrary topology information according to system requirements.
Fig. 3 shows the process flow diagram of the topology adaptation method that is used for automatic test according to the preferred embodiment of the invention, may further comprise the steps:
Step S102, carry out the topological structure storage, the logic connecting relation of its testing apparatus of preservation and tested equipment and equipment, port information save as database file from physical topology synoptic diagram (as shown in Figure 2) and logical topology synoptic diagram, simply realize for example XML file.
Step S104 carries out topology and resolves, and resolves its facility information from the XML file, at first resolves its testing apparatus and tested device name, generates a tabulation; For example its storing X ML of Fig. 2 physical topological structure synoptic diagram can generate a tabulation List1, and its element is TESTER1, DUT1, DUT2, DUT3 respectively.
Same, the logical topology structure also generates a logical topology tabulation List2.
Step S106, finish in these two tabulations of generation, at first compare List1, element number among the List2, if the element number among the List2, illustrates that the number of devices in the logical topology is more than the equipment in the physical topology greater than the element number among the List1, can't satisfy adaptive, return mistake, enter step S122.
Step S108, structural physical topological matrix and logical topology matrix.Take out each deviceelement from tabulation successively the List1, calculate the degree of connection of each element among this deviceelement and the List1 that tabulates, and write down the type of each equipment, testing apparatus or tested equipment are represented with T and D respectively.Degree of connection among the n line display tabulation List1 between n deviceelement and all devices element, m tabulation show all devices element and List1 show in the degree of connection of m element, the type of this deviceelement of symbolic representation that its bracket is interior, for example 2 (D).Its storing X ML can construct a matrix by Fig. 2 physical topological structure synoptic diagram, and is as follows:
0(D) 2(D) 0(D) 1(D)
2(T) 0(T) 1(T) 1(T)
0(T) 1(T) 0(T) 1(T)
1(T) 1(T) 1(T) 0(T)
For example: second element type is DUT among the 2nd row " 2 (T) 0 (T), 1 (T) 1 (T) " the expression List1, the degree of connection of 4 elements among the element that name is called DUT1 and the List1, DUT1 is 2 with the degree of connection of TESTER1, with the degree of connection of DUT1 is 0, with the degree of connection of DUT2 is 1, is 1 with the degree of connection of DUT3.
Certainly, simple disposal route also can only be represented element type in first element insertion of brackets of every row, because each provisional capital is same element and the degree of connection of other equipment, type is identical certainly.
Insertion of brackets only is a kind of expressive element device type specific implementation, also can take other modes, as 2D, 2-D etc. do not enumerate one by one, and are comprehensive, matrix element shows as connection degree and extended attribute two parts thereof, its extended attribute comprises device type but is not only device type, and the manifestation mode of device type is too many, can not exhaustive finishing.
Same, can be according to the logical topology List2 constitutive logic topological matrix of tabulating.
Step S110, it is adaptive to carry out matrix, judges whether whether each element value of physical topology matrix consistent more than or equal to the device type of each element value of logical topology matrix and corresponding element, if, then change step S116 over to, if not, then change step S112 over to.
The comparison of matrix element can be that whole entry of a matrix element all compares, the simple processing: because physical topology matrix and logical topology matrix all are symmetric matrix, so for matrix element E (i, j) (its capable number is i, row number be j), need only i<=j in the adaptation, logic matrix and (still can satisfy comparison condition during or i>=j).Relatively the time, is not only the comparison of connections degree value concrete, and its extended attribute also will compare, and with regard to device type, this element device type is consistent with respective element device type in the physical topology matrix, otherwise does not satisfy adaptive condition.
Step S112, the topological matrix transposition, since in the logical topology equipment be generally less than equipment in the physical topology (if greater than, then can't satisfy condition, adaptive unsuccessful), if when taking the logical topology matrix transpose adaptive, need list at row matrix and mend 0, gather together enough consistently, can compare with physical topology matrix ranks.Simple any realization transposition physical topology matrix is got its ranks number and is carried out adaptively for the upper left corner of logical topology matrix, satisfies condition equally.If take the physical topology matrix transpose adaptive, then need not to mend 0.
In concrete matrix transpose realizes, use the two-dimensional array storage matrix, for example Array1, wherein array element Array1 (i, j) element of the capable j row of i in the representing matrix.
At first each element among the List1 is arranged entirely, each puts in order according to it.Simple realization can generate a new tabulation List1 ' according to element number among the tabulation List1, and its element is the integer since 1, and total quantity and List1 equate.Each element in this tabulation of full arrangement, according to its rank results, { 213 4} for example wherein, so the 2nd row in the original physical topology matrix is moved on to the 1st row, the 2nd row move on to the 1st row, and originally the 1st row moves on to the 2nd row, and the 1st row move on to the 2nd row, so just can the realization matrix transposition, can realize this matrix transpose with the form of change array index.
When the physical topology matrix transpose, write down the order of its transposition, the order of the promptly new middle arrangement of tabulation List1 ' is foundation according to this, just can be mapped to device name on the physical topological structure in the adaptive logical topology device name that just can obtain when successful of matrix.
Step S114 judges whether the topological matrix transposition travels through, if promptly the whole mode transposition of physical topology matrix finish, failure is then returned in not adaptive yet success, changes step S122 over to, if not, then changes step S110 over to.
Step S116, topological adaptive output, the adaptive result of output device.Can obtain the logical topology device name from above step and be mapped to device name on the physical topological structure.
Step S118 in conjunction with the annexation between each equipment, carries out on the equipment the adaptive of concrete port.When an adaptive result of port can have a plurality of selection, select one of them adaptive for example Port1 at random, then the port that is connected of its logic also carry out adaptive, the port that adaptive result directly selects current adaptive Port1 as a result to be connected.Guarantee the adaptive order of port like this.Accordingly, when concrete port is adaptive, check at first whether this port has had adaptive result, if it is adaptive not carry out concrete port again.
Step S120, equipment and port are adaptive to finish, and according to system requirements, the output logic Topological Mapping is to each equipment of physical topology and the mapping title of port, and is required in order to automatic test.
Step S122, adaptive failure.
Fig. 4 shows the synoptic diagram according to the topological adaptive device that is used for automatic test of the embodiment of the invention, this device comprises: matrix construction module 10, be used for according to the structure of physical topology and the structure of logical topology structural physical topological matrix and logical topology matrix; Matrix adaptation module 20 is used for the consistance according to the type of the magnitude relationship of the value of physical topology matrix and each element of logical topology matrix and each element, adaptive physical topology and logical topology; Output module 30 as a result, are used for adaptive success, export adaptive result.
This embodiment describes physical topology and logical topology structure with the form of matrix, by comparing the size and the consistance of the value of each element in physical topology matrix and the logical topology matrix, come adaptive physical topology and logical topology, having solved does not provide the adaptation scheme of how realizing from the logical topology to the physical topology, can't satisfy the problem of the needs of automatic test.Use this embodiment can fast and effeciently carry out the mapping of logical topology to physical topology, adaptive intelligently testing apparatus and test port, and export according to system requirements, saved the test duration, can adapt to the demand of at present extensive automatic test.
Preferably, matrix construction module 10 is according to the structure of physical topology and the structure of logical topology, and structural physical topological matrix and logical topology matrix specifically comprise: the structure of the structure of physical topology and logical topology is stored as database file; The resolution data library file obtains the facility information and the port information of physical topology and logical topology; According to facility information, generate tabulation List1 and tabulation List2, the element among the tabulation List1 is the title of the equipment in the physical topology, the element among the tabulation List2 is the title of the equipment in the logical topology; Whether the number of judging the element among the tabulation List1 is greater than the number of the element among the tabulation List2; If, then according to tabulation List1, tabulation List2 and port information, structural physical topological matrix Array1 and logical topology matrix A rray2, elements A rray k (i among physical topology matrix A rray1 and the logical topology matrix A rray2, j) (i, the j) degree of connection between i element corresponding equipment and j the element corresponding equipment among the expression tabulation List k, Type represent the to tabulate type of i element corresponding equipment among the List k of the Array k in (Type), k=1 wherein, 2.
The preferred embodiment provides with the formal description physical topology of matrix and the specific embodiments of logical topology structure.The topological structure of physical topology and logical topology is stored as database file, is to facilitate for later stage parsing topological structure.From database file, resolve testing apparatus and by facility information with and port information, with two matrixes these information is described respectively.
Preferably, matrix adaptation module 20 comprises: whether whether judging unit, the value that is used for judging each element of physical topology the matrix device type more than or equal to the value of each element in the logical topology matrix and corresponding element consistent; The transposition unit, be used for when the judged result of judging unit for not the time, carry out matrix transpose, according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive physical topology and logical topology.
Wherein, matrix transpose is carried out in the transposition unit, and according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive physical topology and logical topology specifically comprise: the element among the tabulation List1 is arranged entirely; The variation of the element among the tabulation List1 after the full arrangement of record and the index position of the element among the tabulation List1; Ranks corresponding among the physical topology matrix A rray1 are rearranged the physical topology matrix that constitutes behind the transposition according to the variation of index position; Whether the value of judging each element in the physical topology matrix behind the transposition whether device type more than or equal to the value of each element in the logical topology matrix and corresponding element is consistent; If, configuration successful then; If not, configuration failure then.
Wherein, matrix transpose is carried out in the transposition unit, and according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive physical topology and logical topology also comprise: the element among the tabulation List2 is arranged entirely; The variation of the element among the tabulation List2 after the full arrangement of record and the index position of the element among the tabulation List2; Ranks corresponding among the logical topology matrix A rray2 are rearranged the logical topology matrix that constitutes behind the transposition according to the variation of index position; On the ranks of the logical topology matrix behind the transposition, mend 0, identical with the ranks number of physical topology matrix; Whether the value of judging each element in the physical topology matrix whether device type more than or equal to the value of each element in the logical topology matrix of mending after 0 and corresponding element is consistent; If, configuration successful then; If not, configuration failure then.
Above preferred embodiment provides carries out the adaptive specific embodiments of matrix.When matrix is carried out transposition, can be that object of reference carries out matrix transpose, can be that object of reference carries out matrix transpose also, thereby carry out the adaptive of matrix with the logical topology matrix with the physical topology matrix.The matrix adaptation module is utilized two matrixes of matrix construction module output, if each element value is more than or equal to the device type unanimity of each element value and corresponding element in the logical topology matrix in the current physical topology matrix, the then adaptive success of matrix, this logical topology is mapped to physical topology, exports its mapping relations; Otherwise one of them topological matrix (physical topology matrix or logical topology matrix) is carried out transposition, the matrix behind the transposition is carried out adaptive, until the adaptive mapping relations of successfully exporting; Otherwise current physical topology does not satisfy the adaptive of logical topology, returns failure.
Preferably, output module 30 is exported adaptive result and is specifically comprised after adaptive success as a result: according to the mapping relations of logical topology matrix and physical topology matrix, the device map of logical topology is arrived the equipment of physical topology; According to port information, with the port mapping of the equipment of logical topology port to the equipment of physical topology; The equipment of the equipment of output logic topology and port thereof and physical topology and the mapping result of port thereof.
Output module is according to its matrix mapping relations as a result, and the demand of coupling system is retrieved corresponding information and output in the physical topology database file, be used for the system automation test.
From above description, as can be seen, the present invention has realized following technique effect: owing to describe physical topology and logical topology structure with the form of matrix, by comparing the size and the consistance of the value of each element in physical topology matrix and the logical topology matrix, come adaptive physical topology and logical topology, having solved does not provide the adaptation scheme of how realizing from the logical topology to the physical topology, can't satisfy the problem of the needs of automatic test, thereby can fast and effeciently carry out the mapping of logical topology to physical topology, make logical topology quick, being mapped to physical topology intelligently gets on, and export its mapping result, adaptive intelligently testing apparatus and test port, and export according to system requirements, saved the test duration, can adapt to the demand of at present extensive automatic test.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with the general calculation device, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the memory storage and carry out by calculation element, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (14)

1. a topology adaptation method that is used for automatic test is characterized in that, comprising:
According to the structure of physical topology and the structure of logical topology, structural physical topological matrix and logical topology matrix;
According to the consistance of the type of the magnitude relationship of the value of each element in described physical topology matrix and the described logical topology matrix and described each element, adaptive described physical topology and described logical topology;
Adaptive result is exported in adaptive success.
2. topology adaptation method according to claim 1 is characterized in that, according to the structure of physical topology and the structure of logical topology, structural physical topological matrix and logical topology matrix specifically comprise:
The structure of the structure of described physical topology and described logical topology is stored as database file;
Resolve described database file, obtain the facility information and the port information of described physical topology and described logical topology;
According to described facility information, generate tabulation List1 and tabulation List2, the element among the described tabulation List1 is the title of the equipment in the described physical topology, the element among the described tabulation List2 is the title of the equipment in the described logical topology;
Whether the number of judging the element among the described tabulation List1 is more than or equal to the number of the element among the described tabulation List2;
If, then according to described tabulation List1, described tabulation List2 and described port information, construct described physical topology matrix A rray1 and described logical topology matrix A rray2, elements A rray k (i among described physical topology matrix A rray1 and the described logical topology matrix A rray2, j) the Array k (i in (Type), j) degree of connection between i element corresponding equipment and j the element corresponding equipment among the expression tabulation List k, Type represent the to tabulate type of i element corresponding equipment among the List k, k=1 wherein, 2.
3. topology adaptation method according to claim 2 is characterized in that,
Described database file is the XML file;
The type of described equipment comprises testing apparatus and tested equipment.
4. topology adaptation method according to claim 2 is characterized in that, also comprises: if not, and then adaptive failure.
5. topology adaptation method according to claim 2, it is characterized in that, according to the consistance of the type of the magnitude relationship of the value of each element in described physical topology matrix and the described logical topology matrix and described each element, adaptive described physical topology and described logical topology specifically comprise:
Whether the value of judging each element in the described physical topology matrix whether device type more than or equal to the value of each element in the described logical topology matrix and corresponding element is consistent;
If, then adaptive success;
If not, then carry out matrix transpose, according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive described physical topology and described logical topology.
6. topology adaptation method according to claim 5 is characterized in that, carries out matrix transpose, and according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive described physical topology and described logical topology specifically comprise:
Element among the described tabulation List1 is arranged entirely;
The variation of the index position of the element among element among the tabulation List1 after the full arrangement of record and the described tabulation List1;
Ranks corresponding among the described physical topology matrix A rray1 are rearranged the physical topology matrix that constitutes behind the transposition according to the variation of described index position;
Whether the value of judging each element in the physical topology matrix behind the described transposition whether device type more than or equal to the value of each element in the described logical topology matrix and corresponding element is consistent;
If, configuration successful then;
If not, configuration failure then.
7. topology adaptation method according to claim 5 is characterized in that, carries out matrix transpose, and according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive described physical topology and described logical topology also comprise:
Element among the described tabulation List2 is arranged entirely;
The variation of the index position of the element among element among the tabulation List2 after the full arrangement of record and the described tabulation List2;
Ranks corresponding among the described logical topology matrix A rray2 are rearranged the logical topology matrix that constitutes behind the transposition according to the variation of described index position;
On the ranks of the logical topology matrix behind the described transposition, mend 0, identical with the ranks number of described physical topology matrix;
Whether the value of judging each element in the described physical topology matrix whether device type more than or equal to the value of each element in the logical topology matrix after the described benefit 0 and corresponding element is consistent;
If, configuration successful then;
If not, configuration failure then.
8. according to claim 6 or 7 described topology adaptation methods, it is characterized in that adaptive success is exported adaptive result and specifically comprised:
According to the mapping relations of described logical topology matrix and described physical topology matrix, the device map of described logical topology is arrived the equipment of described physical topology;
According to described port information, with the port mapping of the equipment of described logical topology port to the equipment of described physical topology;
Export equipment and the equipment of port and described physical topology and the mapping result of port thereof of described logical topology.
9. a topological adaptive device that is used for automatic test is characterized in that, comprising:
The matrix construction module is used for according to the structure of physical topology and the structure of logical topology structural physical topological matrix and logical topology matrix;
The matrix adaptation module is used for the consistance according to the type of the magnitude relationship of the value of described physical topology matrix and described each element of logical topology matrix and described each element, adaptive described physical topology and described logical topology;
Output module is used for adaptive success as a result, exports adaptive result.
10. topological adaptive device according to claim 9 is characterized in that, described matrix construction module is according to the structure of physical topology and the structure of logical topology, and structural physical topological matrix and logical topology matrix specifically comprise:
The structure of the structure of described physical topology and described logical topology is stored as database file;
Resolve described database file, obtain the facility information and the port information of described physical topology and described logical topology;
According to described facility information, generate tabulation List1 and tabulation List2, the element among the described tabulation List1 is the title of the equipment in the described physical topology, the element among the described tabulation List2 is the title of the equipment in the described logical topology;
Whether the number of judging the element among the described tabulation List1 is more than or equal to the number of the element among the described tabulation List2;
If, then according to described tabulation List1, described tabulation List2 and described port information, construct described physical topology matrix A rray1 and described logical topology matrix A rray2, elements A rray k (i among described physical topology matrix A rray1 and the described logical topology matrix A rray2, j) the Array k (i in (Type), j) degree of connection between i element corresponding equipment and j the element corresponding equipment among the expression tabulation List k, Type represent the to tabulate type of i element corresponding equipment among the List k, k=1 wherein, 2.
11. topological adaptive device according to claim 10 is characterized in that, described matrix adaptation module comprises:
Whether whether judging unit, the value that is used for judging described each element of physical topology the matrix device type more than or equal to the value of each element in the described logical topology matrix and corresponding element consistent;
The transposition unit, be used for when the judged result of described judging unit for not the time, carry out matrix transpose, according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive described physical topology and described logical topology.
12. topological adaptive device according to claim 11, it is characterized in that, matrix transpose is carried out in described transposition unit, and according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive described physical topology and described logical topology specifically comprise:
Element among the described tabulation List1 is arranged entirely;
The variation of the index position of the element among element among the tabulation List1 after the full arrangement of record and the described tabulation List1;
Ranks corresponding among the described physical topology matrix A rray1 are rearranged the physical topology matrix that constitutes behind the transposition according to the variation of described index position;
Whether the value of judging each element in the physical topology matrix behind the described transposition whether device type more than or equal to the value of each element in the described logical topology matrix and corresponding element is consistent;
If, configuration successful then;
If not, configuration failure then.
13. topological adaptive device according to claim 11, it is characterized in that, matrix transpose is carried out in described transposition unit, and according to the magnitude relationship of the value of each element in the matrix behind the transposition and the consistance of type, adaptive described physical topology and described logical topology also comprise:
Element among the described tabulation List2 is arranged entirely;
The variation of the index position of the element among element among the tabulation List2 after the full arrangement of record and the described tabulation List2;
Ranks corresponding among the described logical topology matrix A rray2 are rearranged the logical topology matrix that constitutes behind the transposition according to the variation of described index position;
On the ranks of the logical topology matrix behind the described transposition, mend 0, identical with the ranks number of described physical topology matrix;
Whether the value of judging each element in the described physical topology matrix whether device type more than or equal to the value of each element in the logical topology matrix after the described benefit 0 and corresponding element is consistent;
If, configuration successful then;
If not, configuration failure then.
14., it is characterized in that described output module is as a result exported adaptive result and specifically comprised according to claim 12 or 13 described topological adaptive devices after adaptive success:
According to the mapping relations of described logical topology matrix and described physical topology matrix, the device map of described logical topology is arrived the equipment of described physical topology;
According to described port information, with the port mapping of the equipment of described logical topology port to the equipment of described physical topology;
Export equipment and the equipment of port and described physical topology and the mapping result of port thereof of described logical topology.
CN200910172067.2A 2009-09-01 2009-09-01 Topology adaptation method and device for automatization test Active CN101639806B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910172067.2A CN101639806B (en) 2009-09-01 2009-09-01 Topology adaptation method and device for automatization test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910172067.2A CN101639806B (en) 2009-09-01 2009-09-01 Topology adaptation method and device for automatization test

Publications (2)

Publication Number Publication Date
CN101639806A true CN101639806A (en) 2010-02-03
CN101639806B CN101639806B (en) 2015-06-03

Family

ID=41614793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910172067.2A Active CN101639806B (en) 2009-09-01 2009-09-01 Topology adaptation method and device for automatization test

Country Status (1)

Country Link
CN (1) CN101639806B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937394A (en) * 2010-09-14 2011-01-05 中兴通讯股份有限公司 Method and device for adaption of topology
CN101986282A (en) * 2010-11-08 2011-03-16 中兴通讯股份有限公司 Topological adaptation method and device
US9495277B1 (en) 2015-06-10 2016-11-15 International Business Machines Corporation Dynamic test topology visualization
CN106936605A (en) * 2015-12-29 2017-07-07 迈普通信技术股份有限公司 A kind of method and apparatus for creating test assignment
CN107104829A (en) * 2017-04-18 2017-08-29 国家计算机网络与信息安全管理中心 A kind of physical equipment matching distribution method and device based on network topology data
CN109728929A (en) * 2017-10-30 2019-05-07 中兴通讯股份有限公司 A kind of test method, device and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100356738C (en) * 2005-07-29 2007-12-19 杭州华三通信技术有限公司 Automatization testing frame system and method
WO2007096935A1 (en) * 2006-02-20 2007-08-30 Fujitsu Limited Program analysis method, program analysis device, and program analysis program

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937394A (en) * 2010-09-14 2011-01-05 中兴通讯股份有限公司 Method and device for adaption of topology
CN101986282A (en) * 2010-11-08 2011-03-16 中兴通讯股份有限公司 Topological adaptation method and device
US9495277B1 (en) 2015-06-10 2016-11-15 International Business Machines Corporation Dynamic test topology visualization
US9632923B2 (en) 2015-06-10 2017-04-25 International Business Machines Corporation Dynamic test topology visualization
US9928163B2 (en) 2015-06-10 2018-03-27 International Business Machines Corporation Dynamic test topology visualization
US10055340B2 (en) 2015-06-10 2018-08-21 International Business Machines Corporation Dynamic test topology visualization
CN106936605A (en) * 2015-12-29 2017-07-07 迈普通信技术股份有限公司 A kind of method and apparatus for creating test assignment
CN106936605B (en) * 2015-12-29 2019-09-20 迈普通信技术股份有限公司 A kind of method and apparatus creating test assignment
CN107104829A (en) * 2017-04-18 2017-08-29 国家计算机网络与信息安全管理中心 A kind of physical equipment matching distribution method and device based on network topology data
CN107104829B (en) * 2017-04-18 2020-09-15 国家计算机网络与信息安全管理中心 Physical equipment matching distribution method and device based on network topology data
CN109728929A (en) * 2017-10-30 2019-05-07 中兴通讯股份有限公司 A kind of test method, device and storage medium

Also Published As

Publication number Publication date
CN101639806B (en) 2015-06-03

Similar Documents

Publication Publication Date Title
CN101639806A (en) Topology adaptation method and device for automatization test
CN106095673A (en) Automated testing method based on WEB interface and system
US7181383B1 (en) System and method for simulating a circuit having hierarchical structure
CN100472445C (en) Configuring load application method and system of communication apparatus
CN102236672A (en) Method and device for importing data
CN102118281B (en) Method, device and network equipment for automatic testing
CN104871485A (en) Sevice ID assignment in a system of devices
US7024652B1 (en) System and method for adaptive partitioning of circuit components during simulation
CN111353235B (en) Component port modeling method based on model drive and terminal
CN107861876A (en) Method of testing, device, computer equipment and readable storage medium storing program for executing
CN102163316A (en) Repayment data processing device, system and method
CN102834806A (en) System structure managing device, method of managing system structure, and program
CN108897577A (en) A kind of server backplane CPLD state self-adaption system and method
CN107171897A (en) A kind of interface test method and data-interface test system
CN105677605A (en) Highly-efficient interconnected system capable of configuring chips and realization system thereof and device
CN105187255A (en) Fault analysis method, fault analysis device and server
CN102157037A (en) Automatic test method and system for software and module
CN101986282A (en) Topological adaptation method and device
CN107562428A (en) Rule-based adaptable software quick interface arrangement method and system
CN105389394A (en) Data request processing method and device based on a plurality of database clusters
CN102970241A (en) Multipath load balancing method and multipath load balancing device
US7392170B1 (en) System and method for dynamically compressing circuit components during simulation
CN113851175A (en) Redundancy replacement circuit integrating storage and calculation, chip and calculation device
CN101388882B (en) Network protocol address configuring system and method
CN111079390B (en) Method and device for determining selection state of check box list

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