Summary of the invention
The embodiment of the invention provides a kind of method and device that communication equipment is tested, and in order to improving testing equipment to the recognition accuracy of equipment under test, thereby guarantees the correct enforcement of testing process.
The concrete technical scheme that the embodiment of the invention provides is as follows:
A kind of method of accepting the communication equipment test comprises:
Communication equipment obtains the asset of equipments number of self, and wherein, described asset of equipments number comprises at least: date of manufacture, integrated circuit board type and produce sequence number;
Described communication equipment with designation number purpose bits switch in the asset of equipments obtained number for being used for identifying the mac address of described communication equipment, designation number purpose bits switch in the asset of equipments obtained number for being used for identifying the IP address of described communication equipment, and is bound the mac address and the IP address that generate;
Described communication equipment is based on the test of described mac address and IP address acceptance test equipment.
A kind of method that communication equipment is tested comprises:
Testing equipment is obtained the mac address and the IP address that are used for the described communication equipment of unique identification that communication equipment to be tested adopts said method to generate;
Described testing equipment is tested described communication equipment according to the mac address and the IP address that are used for the described communication equipment of unique identification.
A kind of device of accepting the communication equipment test comprises:
Acquiring unit is used for obtaining the asset of equipments number of this device, and wherein, described asset of equipments number comprises at least: date of manufacture, integrated circuit board type and produce sequence number;
Processing unit, the asset of equipments designation number purpose bits switch that is used for obtaining is for being used for identifying the mac address of described communication equipment, designation number purpose bits switch in the asset of equipments obtained number for being used for identifying the IP address of described communication equipment, and is bound the mac address and the IP address that generate;
Unit to be tested is used for the test based on described mac address and IP address reception testing equipment.
A kind of device that communication equipment is tested comprises:
Acquiring unit is used for obtaining that the above-mentioned device of accepting the communication equipment test generates, and is used for mac address and the IP address of the described communication equipment of unique identification;
Test cell is used for according to mac address and IP address in order to the described communication equipment of unique identification described communication equipment being tested.
In the embodiment of the invention, communication equipment to be tested does not re-use the IP address of acquiescence when dispatching from the factory and the test that the mac address receives testing equipment, but generate mac address and the IP address that is used for this communication equipment of unique identification according to self asset of equipments number, and should be for mac address and the IP address of unique identification communication equipment to be tested by the testing equipment basis, communication equipment is carried out corresponding test, like this, testing equipment just can identify many communication equipments of testing simultaneously exactly, avoid testing process to cause confusion, guaranteed the correct execution of testing process.
Embodiment
In order to improve testing equipment to the recognition accuracy of communication equipment to be tested, thereby guarantee the correct enforcement of testing process.In the embodiment of the invention, communication equipment to be tested does not re-use the IP address of acquiescence when dispatching from the factory and the test that the mac address receives testing equipment, but generate mac address and the IP address that is used for this communication equipment of unique identification according to self asset of equipments number, and by testing equipment basis this mac address and IP address for unique identification communication equipment to be tested, carry out corresponding test to communication equipment.
Below in conjunction with accompanying drawing the preferred embodiment of the present invention is elaborated.
Consult shown in Figure 2ly, in the embodiment of the invention, communication equipment to be tested (being designated hereinafter simply as tested equipment) comprises acquiring unit 20, processing unit 21 and unit to be tested 22, wherein,
Acquiring unit 20 is used for obtaining the asset of equipments number of this equipment;
Processing unit 21 is used for the asset of equipments that will obtain and number is converted to mac address and IP address for this equipment of unique identification;
Unit 22 to be tested is used for the test that receives testing equipment based on mac address and IP address in order to this equipment of unique identification.
Tested equipment side increases configuration parameter " switch is reshuffled in the test address " and " sign is reshuffled in the test address ", the reconfiguration operation of mac address and IP address by automatic test port, realize the renewal of tested equipment self address, the mac address that generation can not repeat and new IP address.Make testing equipment can distinguish, identify and control many tested equipment.
Consult shown in Figure 3ly, in the embodiment of the invention, testing equipment comprises acquiring unit 30 and test cell 31, wherein,
Acquiring unit 30 is used for obtaining that above-mentioned tested equipment generates, and is used for mac address and the IP address of this tested equipment of unique identification;
Test cell 31 is used for according to mac address and IP address in order to the above-mentioned tested equipment of unique identification, to tested testing equipment.
In the present embodiment, test cell 31 can be set up the function that many TCP/IP connect simultaneously for the tested equipment of different IP addresses, increase the quantity of configuration device address name and IP address, the device address title extends to the controlled armamentarium scope of testing equipment by the existing sole disposition that is confined to certain equipment.
Based on technique scheme, to consult shown in Figure 4ly, in the embodiment of the invention, tested equipment is as follows based on the detailed process that self asset of equipments number generates the mac address that is used for this equipment of unique identification and IP address:
Does step 400: tested equipment judge whether needs executive address reconfiguration operation according to the default configuration parameter in this locality? if then execution in step 430; Otherwise, execution in step 410.
In the embodiment of the invention, set in advance configuration parameter in the tested equipment, be called " switch is reshuffled in the test address " and " sign is reshuffled in the test address ", wherein, parameter " switch is reshuffled in the test address " is used to indicate the reconfiguration operation whether tested equipment needs to carry out mac address and IP address, if parameter is designated as " opening " and illustrates that then tested equipment need to regenerate mac address and the IP address for test, if being designated as mac address and the reception test of IP address " pass " given tacit consent to when then aplanatic tested equipment basis is dispatched from the factory, parameter gets final product; And whether parameter " sign is reshuffled in the test address " is used to indicate mac address and IP address that tested equipment reshuffles effective, if parameter indication " effectively ", then explanation has regenerated effective mac address and IP address, can directly use, if parameter indication engineering noise, then explanation need to regenerate mac address and the IP address for test.In step 400, namely be to judge whether to carry out reconfiguration operation according to parameter " switch is reshuffled in the test address ".
Step 410: tested equipment is invalid with parameter " sign is reshuffled in the test address " equipment.
Step 420: tested equipment obtain when dispatching from the factory acquiescence the mac address and the IP address as current mac address of coming into force and IP address, then, carry out step 470.
For example, obtain mac address and the IP address that calculates according to machine frame and slot number.
Step 430: tested equipment judges whether parameter " sign is reshuffled in the test address " is effective, if then carry out step 470; Otherwise, carry out step 440:
" sign is reshuffled in the test address " is effective, and the mac address and the IP address that have configuration take-effective are described, directly uses to get final product.
Step 440: tested equipment is set to " effectively " with " sign is reshuffled in the test address " of this locality.
Step 450: tested equipment is used for mac address and the IP address of this equipment of unique identification according to the asset of equipments number generation of this equipment.
In the practical application, tested integrated circuit board on each tested equipment has the asset of equipments number of self, and generally speaking, the asset of equipments of each equipment number writes when dispatching from the factory in the read-only memory unit of tested integrated circuit board, for example, the formation form of asset of equipments number is as shown in table 1:
Table 1
Generally, asset of equipments number is 32 or 48 bits, asset of equipments shown in the table 1 number is made of 48 bits, front 24 bits (being 0-23bit) expression production time, it can be month day year, the recording modes such as date, middle 4 bits (being 24-27bit) display plate Card Type, there is oneself definition in each producer, sequence number is produced in last 20 bits (being the 28-47 bit) expression, table 1 only is an example, in any case the asset of equipments of the communication equipment that each producer produces number definition all can be mapped to the form of 48 bits.
In the present embodiment, when execution in step 450, tested equipment can be with designation number purpose bits switch in the asset of equipments number of self for being used for the mac address of this equipment of sign, and be converted to the IP address for this equipment of sign.
At first, with designation number purpose bits switch in the asset of equipments obtained number for being used for identifying the mac address of tested equipment, better, with asset of equipments number from 48 bits that start at the position, end, per 8 bits are a hexadecimal digit by Binary Conversion, and 6 hexadecimal digits that will obtain form the mac address that is used for identifying described communication equipment.
If when the asset of equipments that tested equipment gets access to number is lower than 48 bit, use 0 polishing to 48 bit up front, 48 bits will starting at from the position, end again are as the mac address that is used for identifying tested equipment; If the asset of equipments length that tested equipment gets access to is 48 bits, then directly with these 48 bits as the mac address that is used for identifying tested equipment, can think also that namely 48 bits will starting at from the position, end are as for the mac address that identifies tested equipment; When if the asset of equipments that tested equipment gets access to number is higher than 48 bit, 48 bits after then intercepting, 48 bits that are about to start at from the position, end are as the mac address that is used for identifying tested equipment, this be because, the integrated circuit board type that number comprises of asset of equipments and produce sequence number and be recorded in rear 48 bits generally, 48 bits after the intercepting can be distinguished each tested equipment better.
Like this, tested equipment get access to 48 bits in finish since the 0th bit to the 47 bits, just in time 48 bits on corresponding mac ground can enter to be converted into the mac address by two with these 48 bits, have so just drawn the mac address that regenerates.In tested equipment of the same race, because the difference of asset of equipments number, the mac address that calculates can not repeated yet.For example, suppose that 48 bits that extract from tested equipment are: 01,000,000 00,100,011 00,111,110 10,010,000 10,000,001 01100001 per 8 bits are a hexadecimal digit by Binary Conversion, thereby obtain mac address: 40:23:3e:90:81:61.
Secondly, designation number purpose bits switch in the asset of equipments obtained number is for being used for identifying the IP address of tested equipment, better, can be the decimal system by Binary Conversion with above-mentioned 48 bits, to obtain for the IP address that identifies tested equipment.
After getting access to above-mentioned mac address, above-mentioned 48 bits can be converted into the IP address that regenerates in such a way: the deletion of 0-7 bit, the deletion of 24-31 bit, keep remaining 32 bits, again in remaining 32 bits since the 0th bit, per 8 bits are the decimal system by Binary Conversion, obtain a ten's digit, thereby obtain 4 ten's digits, 4 ten's digits that will obtain again form the IP address that is used for identifying tested equipment.Like this, 32 bits that just will keep are converted into the IP address of complete IPv4, thus the IP address that obtains regenerating.For example, 32 each and every one bits that extract from 48 bits 01,000,000 00,100,011 00,111,110 10,010,000 10,000,001 01100001 in the manner described above are: 00,100,011 00,111,110 10,000,001 01100001, and then be converted to the IP address and be: 35.62.129.97
At last, the mac address and the IP address that generate are bound.
This be because, in the practical application, the IP address of generation might duplicate phenomenon, if but the IP address of generation and the mac address of generation are bound, then can think uniquely, can carry out unique identification to the automatic test interface of tested equipment in any case.
Memory cell with the mac address that regenerates and IP address write appointment reactivates automatic test interface, is come into force in the mac address and the IP address that regenerate, thereby finishes whole reconfiguration operation.
Step 460: judge whether reconfiguration operation successful? if then execution in step 470; Otherwise, return step 400.
Step 470: according to the mac address of current configuration take-effective and the test of IP address reception testing equipment.
Based on above-described embodiment, to consult shown in Figure 5ly, in the embodiment of the invention, testing equipment is as follows to the flow process of tested testing equipment:
Step 500: testing equipment obtains that tested equipment generates be used for this tested equipment of unique identification mac address and IP address.
The concrete mode of above-mentioned mac address and IP address that generates is referring to step 400-step 470.
Step 510: standby mac address and the IP address according to being used for unique identification equipment to be tested of testing equipment, to this tested testing equipment.
Better, if there are at least two tested equipment, then testing equipment testing equipment equipment carries out joint test for these at least two tested equipment.Its concrete operations are as follows:
Under the prior art, although testing equipment can sign in to the automatic test that many different communication equipments in IP address carry out, not relevant related between these a plurality of testing processs.For example, consult Fig. 6 and shown in Figure 7, take the LTE system as example, suppose that terminal 1 is the eNBT equipment of certain producer, equipment 1 and equipment 2 are respectively the eNB equipment of certain producer, as shown in Figure 6 and Figure 7, terminal 1 at first is attached on the equipment 1, because the variation of parameter, terminal 1 switches on the equipment of being attached to 2 after attachment removal on the equipment 1.In the existing testing process, testing equipment substantially all realizes testing to terminal and the equipment message that says the word by order, and is namely to terminal 1, equipment 1 and equipment 2 orders and send respectively test data, uncorrelated mutually between each testing process.Yet, suppose terminal 1 attachment removal failure, still be attached on the equipment 1, basic testing equipment continuation execution this moment terminal 1 is attached to the dependence test operation on the equipment 2, will affect the correctness of test result.
In view of this, in the embodiment of the invention, testing equipment had both been supported to control respectively simultaneously many tested equipment, guaranteed between the tested equipment it is parallel test and be independent of each other; Also support the Collaborative Control to many tested equipment, be also referred to as and jointly control, namely by design software framework and the form of writing software scripts test result is controlled (for example, accurately realizing the switching of eNBT between different e NB of LTE), its implementation schematic diagram as shown in Figure 8.
For realizing control flow as shown in Figure 8, the testing software framework that needs test cell 31 operations in the design test equipment, to realize the class definition to each tested equipment message, for the application layer on upper strata provides the software interface of each tested equipment of control, be implemented in application layer to the script control of various tested equipment.Wherein, test cell 31 needs in such a way design software framework:
Bottom UDP communication module: be responsible for the UDP(User Datagram Protocol of foundation and a plurality of tested equipment, User Datagram Protoco (UDP)) the UDP communication protocol functions such as connection and release, UDP message transmitting-receiving, link monitoring.
The operating system interface layer: realize the application software on upper strata to the package interface of bottom UDP communication, the basic function of definition socket level communication is for the various functions in upper strata provide base layer support.Because what testing equipment usually adopted all is windows operating system, employing all be the standard ICP/IP protocol, therefore, only need to get final product bottom socket level communication definitions is clear.
The message definition layer: the message interface function by the dissimilar tested equipment of testing equipment support forms, and is definition and the encapsulation to various dissimilar tested equipment message interfaces.Be divided into different message definition modules according to different tested equipment.When needs are tested the tested equipment of which money, test script definition according to application layer, directly call tested equipment message definition module separately, with the various operations that need in the application layer test script to carry out, good message sends to be encapsulated as each tested device definition.Simultaneously, the message parse with operating system interface layer feedback becomes the use-case application layer of standard can identify form.
Application layer: the message definition of the various tested equipment of supporting according to testing equipment, define the test action that various tested equipment need be carried out, receive the result who also processes the various device feedback.Can carry out a plurality of tested device synchronization independent tests, also can define multiple, the collaborative test of multiple devices.By the design example script, realize automatically performing of example.
Terminal applies interface: the software operation interface is provided, provides and call the use-case interface, guarantee Testcase execution.
Like this, adopt above-mentioned software architecture, testing equipment just can realize the joint test between each tested equipment, for example, for the situation of as shown in Figure 8 terminal 1, equipment 1 and equipment 2, testing equipment just can by and above-mentioned three between the communication connection of setting up respectively, accurately grasp the handover operation of terminal 1 between equipment 1 and equipment 2, thereby test mode is in time adjusted, to obtain accurately test result.
In sum, in the embodiment of the invention, communication equipment to be tested does not re-use the IP address of acquiescence when dispatching from the factory and the test that the mac address receives testing equipment, but generate mac address and the IP address that is used for this communication equipment of unique identification according to self asset of equipments number, and should be for mac address and the IP address of unique identification communication equipment to be tested by the testing equipment basis, communication equipment is carried out corresponding test, like this, testing equipment just can identify many communication equipments of testing simultaneously exactly, avoid testing process to cause confusion, guaranteed the correct execution of testing process.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.