Background technology
TTCN(Testing and Test Control Notation, test and test control representation method) be one by ETSI(European Telecommunications Standards Institute, ETSI) the applicable standard testing script in the whole world safeguarded.Its third generation standard TTCN-3 is modern times and language flexibly, can be described and be permitted eurypalynous system testing by interface widely.The typical application of TTCN-3 is system testing, interactivity test, protocol test, operational trials, module testing etc., and the platform independence of TTCN-3 and its special power of test make it be widely used in defining the official testing collection of communication system.
At present, a kind of overall structure schematic diagram of TTCN-3 test macro as shown in Figure 1, in Fig. 1, TM(Test Management, test and management) be responsible for the holistic management of test macro, after test macro initialization, TM entity is responsible for calling other modules and is tested.
TL(Test Logging, test log) be responsible for the daily record that produces in maintenance test, for recording the TE(TTCN-3 Executable of TTCN-3, TTCN-3 can carry out entity) in the test event that occurs.Between it and TE, have a unidirectional interface, TE can send log request to TL by this interface.
CD(Coding and Decoding, encoding and decoding) be responsible for, in outside, data are carried out to coding-decoding operation, TE also can built-in codec functions, but outside CD has standardized interface, can transplant easily in different TTCN-3 system and instrument, improve durability.
CH(Component Handling, assembly processing) be responsible for distributing parallel test suite, for distributed test macro.SA(System Under Test Adapter, system under test (SUT) adapter) message and the instruction of being responsible for TTCN-3 test macro to produce be converted into the form that can be identified by system under test (SUT), as the medium of communicating by letter between test macro and system under test (SUT).
PA(Platform Adapter, platform adapter) TE is adapted to specific execution platform.
TRI(TTCN-3 Runtime Interface, TTCN-3 when operation interface) define mutual between TE, SA and PA, it sends data, receives the data sent from system under test (SUT) and the method for managing timer for TE provides to system under test (SUT).
In reality test, TTCN-3 test macro needs to communicate with system under test (SUT), controls the behavior of system under test (SUT), carries out testing procedure, and reads the state of system under test (SUT), whether meets expection with the result of validation test.As seen from Figure 1, system under test (SUT) is directly connected with the SA in TTCN-3 test macro, and SA realizes the adaptation of transfer of data between test macro and system under test (SUT), and the data from TE are sent to system under test (SUT), and notifies TE to read in the time that system under test (SUT) returns to response.Being undertaken by TRI alternately between SA and TE, the data between SA and TE all can be transmitted via TRI.
TETRA(Terrestrial Trunked Radio, land trunked radio, old Trans European Trunked Radio, pan-European trunked radio) digital packet terminal should possess PEI(Peripheral Equipment Interface, external data interface), so that the connection of TETRA terminal to data terminal (as PC) to be provided, make external data equipment can access the business that TETRA network provides.Between TETRA terminal and data terminal, carry out alternately i.e. AT instruction by a set of special instruction set.AT instruction is a set of instruction set defining between terminal equipment and terminal adapter, is generally used for communicating by letter between terminal equipment and data terminal.
TETRA terminal is connected by the serial ports with the computer that moves TTCN-3 test macro, and realization is connected with test macro, makes TTCN-3 test macro can pass through the behavior of AT instruction control TETRA terminal, and obtains the state of TETRA terminal.TTCN-3 test macro wishes to send when data to TETRA terminal, produces data by TE according to moved TTCN-3 script, by SA as calculated the serial ports of machine send to TETRA terminal; When TETRA terminal sends data to test macro, terminal sends to SA by data through serial ports, and SA receives after data, notice TE data ready.
The method that a kind of TTCN-3 of use test macro of the prior art is tested TETRA terminal is: in the time using TTCN-3 test macro to test TETRA terminal, test macro uses serial ports to be connected with the PEI of tested TETRA terminal, uses AT command set and tested TETRA terminal to carry out alternately.TTCN-3 test macro can be by operation TTCN-3 script, and the PEI from serial ports to tested TETRA terminal sends AT instruction, and the behavior of terminal is controlled, and test can be carried out automatically according to the testing process designing in TTCN-3 script.The AT instruction that TTCN-3 script also can send over by serial ports tested TETRA terminal is analyzed, and obtains the state of tested TETRA terminal, verifies whether the result that each test action and step are carried out meets expectation.
The shortcoming of the method that above-mentioned use TTCN-3 test macro of the prior art is tested TETRA terminal is: in reality test, find, although ETSI has stipulated the standard of the AT command set of TETRA terminal, but the AT command set that the TETRA terminal that in fact different manufacturers produce is supported often there are differences, therefore control different TETRA terminals and carry out same operation, may need to use different instructions just can complete.Operating personnel need to understand the various difference condition of the AT command set that different TETRA terminals support, could carry out correct operation to various TETRA terminals by different AT instructions, increased the complexity that TETRA terminal is tested, the method depends on operator's manual operation.
Summary of the invention
Embodiments of the invention provide a kind of method and apparatus of TETRA terminal being tested based on TTCN-3, the complexity of TETRA terminal being tested to reduce TTCN-3 test macro.
A method of TETRA terminal being tested based on TTCN-3, comprising:
Ports filter unit is set in the TRI in TTCN-3 test macro, in described ports filter unit, stores the AT command set that various types of TETRA terminals are supported respectively;
Described ports filter unit is monitored AT instruction mutual between TETRA terminal and TTCN-3 test macro, according to sending or receiving the type of TETRA terminal of described AT instruction and the AT command set that various types of TETRA terminals of described storage are supported respectively, described AT instruction is modified.
In the described TRI in TTCN-3 test macro, ports filter unit is set, in described ports filter unit, stores the AT command set that various types of TETRA terminals are supported respectively, comprising:
System under test (SUT) adapter SA in TTCN-3 test macro and can carry out ports filter unit is set in the TRI between entity TE, described ports filter unit comprises AT instruction monitoring subelement, AT instruction modification subelement, TETRA terminal type recognin unit and memory, in described memory, store the AT command set that various types of TETRA terminals are supported respectively, and different information between the standard A T instruction set supported of the AT command set supported respectively of various TETRA terminal and described TE.
Described different information comprises: the difference of the difference of AT order parameter form, the difference of AT instruction number, AT instruction type.
Described ports filter unit is monitored AT instruction mutual between TETRA terminal and TTCN-3 test macro, according to sending or receive the type of TETRA terminal of described AT instruction and the AT command set that various types of TETRA terminals of described storage are supported respectively, described AT instruction is modified, comprising:
AT instruction in described ports filter unit is monitored subelement and is sent to the AT instruction of TE to monitor described TETRA terminal by SA, the AT instruction listening to is sent to TETRA terminal type recognin unit, described TETRA terminal type recognin unit obtains the source port information that comes of described AT instruction, carry out source port information and obtain the type information of TETRA terminal that sends described AT instruction according to this, the type information is sent to described AT instruction modification subelement;
Described AT instruction modification subelement is according to the type information of described TETRA terminal, and different information between the standard A T instruction set supported of the AT command set supported of the described TETRA terminal of storing in described memory and described TE, the described AT instruction listening to is modified, make amended AT instruction meet the standard A T instruction set that described TE supports.
Described ports filter unit is monitored AT instruction mutual between TETRA terminal and TTCN-3 test macro, according to sending or receive the type of TETRA terminal of described AT instruction and the AT command set that various types of TETRA terminals of described storage are supported respectively, described AT instruction is modified, comprising:
AT instruction in described ports filter unit is monitored subelement and is sent to the AT instruction of described TETRA terminal to monitor described TE by SA, the AT instruction listening to is sent to TETRA terminal type recognin unit, described TETRA terminal type recognin unit obtains the destination interface information of described AT instruction, receive the type information of the TETRA terminal of described AT instruction according to this destination interface acquisition of information, the type information is sent to described AT instruction modification subelement;
Described AT instruction modification subelement is according to the type information of described TETRA terminal, and different information between the standard A T instruction set supported of the AT command set supported of the described TETRA terminal of storing in described memory and described TE, the described AT instruction listening to is modified, make amended AT instruction meet the AT command set that described TETRA terminal is supported.
A device of TETRA terminal being tested based on TTCN-3, this device is arranged in the TRI in TTCN-3 test macro, stores the AT command set that various types of TETRA terminals are supported respectively in described device;
Described device is monitored AT instruction mutual between TETRA terminal and TTCN-3 test macro, according to sending or receiving the type of TETRA terminal of described AT instruction and the AT command set that various types of TETRA terminals of described storage are supported respectively, described AT instruction is modified.
Described device is arranged on the system under test (SUT) adapter SA in TTCN-3 test macro and can carries out in the TRI between entity TE, comprising: subelement, TETRA terminal type recognin unit, AT instruction modification subelement and memory are monitored in AT instruction,
Described memory, the AT command set of supporting respectively for storing various types of TETRA terminals, and different information between the standard A T instruction set supported of the AT command set supported respectively of various TETRA terminal and described TE.
Subelement is monitored in described AT instruction, for sending to the AT instruction of TE to monitor described TETRA terminal by SA, the AT instruction listening to is sent to TETRA terminal type recognin unit;
Described TETRA terminal type recognin unit, for obtaining the source port information that comes of described AT instruction, carry out source port information and obtain the type information of TETRA terminal that sends described AT instruction according to this, the type information is sent to described AT instruction modification subelement;
Described AT instruction modification subelement, be used for according to the type information of described TETRA terminal, and different information between the standard A T instruction set supported of the AT command set supported of the described TETRA terminal of storing in described memory and described TE, the described AT instruction listening to is modified, make amended AT instruction meet the standard A T instruction set that described TE supports.
Subelement is monitored in described AT instruction, for sending to the AT instruction of described TETRA terminal to monitor described TE by SA, the AT instruction listening to is sent to TETRA terminal type recognin unit;
Described TETRA terminal type recognin unit, for obtaining the destination interface information of described AT instruction, receive the type information of the TETRA terminal of described AT instruction according to this destination interface acquisition of information, the type information is sent to described AT instruction modification subelement;
Described AT instruction modification subelement, be used for according to the type information of described TETRA terminal, and different information between the standard A T instruction set supported of the AT command set supported of the described TETRA terminal of storing in described memory and described TE, the described AT instruction listening to is modified, make amended AT instruction meet the AT command set that described TETRA terminal is supported.
The technical scheme being provided by the embodiment of the invention described above can be found out, the embodiment of the present invention is by arranging ports filter unit in the TRI in TTCN-3 test macro, different information between the standard A T instruction set that the AT command set that described ports filter unit is supported respectively according to the various TETRA terminals of storage and described TE support, the data of transmitting between SA and TE are monitored and revised, thereby reach the object of eliminating TETRA terminal difference.TTCN-3 test macro can be controlled the behavior of different TETRA terminals by standard A T instruction, and needn't consider the difference of the TETRA AT command set that terminal is supported that different manufacturers produce to have reduced complexity and difficulty that TTCN-3 test macro is tested TETRA terminal.
Embodiment
For ease of the understanding to the embodiment of the present invention, be further explained explanation below in conjunction with accompanying drawing as an example of several specific embodiments example, and each embodiment does not form the restriction to the embodiment of the present invention.
Embodiment mono-
The embodiment of the present invention is by arranging ports filter unit in the TRI in TTCN-3 test macro, in described ports filter unit, store the different information between the standard A T instruction set that AT command set that various TETRA terminals support respectively and described TE support, described ports filter unit is monitored and revises the data of transmitting between SA and TE, reaches the object of eliminating TETRA terminal difference.
The handling process that embodiment provides a kind of method of TETRA terminal being tested based on TTCN-3 as shown in Figure 2, comprises following treatment step:
In step 21, TRI in TTCN-3 test macro, ports filter unit is set, in ports filter unit, stores the AT command set that various types of TETRA terminals are supported respectively.
The TETRA terminal that different manufacturers produce supports the otherness between AT command set to mainly contain following several situation:
(1) difference of AT order parameter form
In the AT command set that the TETRA terminal that different manufacturers produce is supported, same instruction there are differences on parameter format.As for TETRA terminal is carried out to identical configuration, number of parameters and the meaning of the desired AT instruction of different TETRA terminals may be not quite similar.For instance, in the time of test short data service, need to use " AT+CTSP " instruction TETRA terminal to be carried out to the initialization setting of short data service, for the TETRA terminal of MOTOROLA and SEPURA Liang Ge manufacturer, the order parameter of required use is " AT+CTSP=1,3,130 "; And carry out identical configuration, the instruction of the TETRA demanding terminal that EADS produces is " AT+CTSP=1,2 ".
(2) difference of AT instruction number
In the AT command set that the TETRA terminal that different manufacturers produce is supported, realize identical function and use the quantity of AT instruction there are differences.As sent after short data, TETRA terminal can send the state that "+CMGS " instruction indication short data sends to TTCN-3 test macro, and the TETRA terminal of producing for MOTOROLA, is used two "+CMGS " instructions altogether; The TETRA terminal of producing for SEPURA, is used three "+CMGS " instructions altogether; And the TETRA terminal of producing for EADS is only used "+CMGS " instruction.
(3) difference of AT instruction type
In the AT command set that the TETRA terminal that different manufacturers produce is supported, there are some exclusive instructions.As exclusive in EADS terminal " AT+CMGF " instruction, using its TETRA terminal while carrying out the dependence test of short data, also needing additionally to send instruction " AT+CMGF=7 ", travelling carriage is set is PEI pattern, the testing procedure after could carrying out smoothly.
The AT command set of standard and TE in TTCN-3 test macro supports, if the TE in TTCN-3 test macro only uses unique standard A T instruction to identical testing procedure for all TETRA terminals,, for the TETRA terminal of not supporting this standard A T instruction, test just cannot go on.
In TRI between TE and the SA of the embodiment of the present invention in TTCN-3 test macro, ports filter unit is set, described ports filter unit comprises AT instruction monitoring subelement, AT instruction modification subelement, TETRA terminal type recognin unit and memory, in described memory, store the AT command set that various types of TETRA terminals are supported respectively, and different information between the standard A T instruction set supported of the AT command set supported respectively of various TETRA terminal and described TE.
Step 22, ports filter unit are monitored AT instruction mutual between TETRA terminal and TTCN-3 test macro, according to sending or receiving the type of TETRA terminal of described AT instruction and the AT command set that various types of TETRA terminals of described storage are supported respectively, described AT instruction is modified.
AT instruction in described ports filter unit is monitored subelement and is sent to the AT instruction of TE to monitor described TETRA terminal by SA, the AT instruction listening to is sent to TETRA terminal type recognin unit, described TETRA terminal type recognin unit obtains the source port information that comes of described AT instruction, carry out source port information and obtain the type information of TETRA terminal that sends described AT instruction according to this, the type information is sent to described AT instruction modification subelement.Described AT instruction modification subelement is according to the type information of described TETRA terminal, and different information between the standard A T instruction set supported of the AT command set supported of the described TETRA terminal of storing in described memory and described TE, the described AT instruction listening to is modified, make amended AT instruction meet the standard A T instruction set that described TE supports.
AT instruction in described ports filter unit is monitored subelement and is sent to the AT instruction of described TETRA terminal to monitor described TE by SA, the AT instruction listening to is sent to TETRA terminal type recognin unit, described TETRA terminal type recognin unit obtains the destination interface information of described AT instruction, receive the type information of the TETRA terminal of described AT instruction according to this destination interface acquisition of information, the type information is sent to described AT instruction modification subelement.Described AT instruction modification subelement is according to the type information of the TETRA terminal of the described AT instruction of reception, and different information between the standard A T instruction set supported of the AT command set supported of the described TETRA terminal of storing in described memory and described TE, the described AT instruction listening to is modified, make amended AT instruction meet the AT command set that described TETRA terminal is supported.
In actual applications, above-mentioned ports filter unit also can be arranged on other position in TTCN-3 test macro, such as, be arranged on SA or TE inside.The embodiment of the present invention is not limited to above-mentioned port mistake
The concrete placement location of filter unit, any modes of emplacement of above-mentioned ports filter unit in TTCN-3 test macro is all in the protection range of the embodiment of the present invention.
Embodiment bis-
A kind of handling process that TE in TTCN-3 test macro is sent to the method that the AT instruction of TETRA terminal processes that this embodiment provides as shown in Figure 3, comprises following processing procedure:
In TRI between TE and SA in TTCN-3 test macro, ports filter unit is set, described ports filter unit comprises AT instruction monitoring subelement, AT instruction modification subelement, TETRA terminal type recognin unit and memory, in described memory, store the AT command set that various types of TETRA terminals are supported respectively, and different information between the standard A T instruction set supported of the AT command set supported respectively of various TETRA terminal and described TE.
In the time that TE sends data by SA to TETRA terminal, above-mentioned AT instruction is monitored subelement and is first judged that whether these data are AT instruction, if these data are not AT instructions, do not make any modification and directly send to SA; If these data are AT instructions, this AT instruction is sent to TETRA terminal type recognin unit.
The destination interface that this AT instruction sends is inquired about in above-mentioned TETRA terminal type recognin unit, thereby inquires about the type information of the object TETRA terminal that this AT instruction mails to, and the type information is sent to AT instruction modification subelement.Then, AT instruction modification subelement is according to the type information of described object TETRA terminal, and different information between the standard A T instruction set supported of the AT command set supported of the described object TETRA terminal of storing in described memory and described TE, described AT instruction is modified, make amended AT instruction meet the AT command set that described object TETRA terminal is supported.
Afterwards, amended AT instruction is sent to SA by ports filter unit, and the AT instruction receiving is sent to object TETRA terminal by SA.
Applicating example
TTCN-3 test macro sends the specific transactions of the short data of AT+CTSP instruction configuration TETRA terminal, in TTCN-3 script, send according to standard A T instruction all the time, i.e. " AT+CTSP=1,3; 130 ", the TETRA terminal that EADS produces is carried out the instruction difference that same configuration is used.For the TETRA terminal that compatible EADS produces, " AT+CTSP=1,3,130 " instruction modification that example of the present invention sends TE is " AT+CTSP=1,2 ", and the TETRA terminal of producing to EADS sends extra " AT+CMGF=7 " instruction.
Embodiment tri-
A kind of handling process that TETRA terminal is sent to the method that the AT instruction of the TE in TTCN-3 test macro processes that this embodiment provides as shown in Figure 4, comprises following processing procedure:
In TRI between TE and SA in TTCN-3 test macro, ports filter unit is set, described ports filter unit comprises AT instruction monitoring subelement, AT instruction modification subelement, TETRA terminal type recognin unit and memory, in described memory, store the AT command set that various types of TETRA terminals are supported respectively, and different information between the standard A T instruction set supported of the AT command set supported respectively of various TETRA terminal and described TE.
In the time that TETRA terminal sends data by SA to TE, above-mentioned AT instruction is monitored subelement and is first judged that whether these data are AT instruction, if these data are not AT instructions, do not make any modification and directly send to TE; If these data are AT instructions, this AT instruction is sent to TETRA terminal type recognin unit.
The source port that comes of this AT instruction is inquired about in above-mentioned TETRA terminal type recognin unit, thereby inquiry sends the type information of the TETRA terminal of this AT instruction, and the type information is sent to AT instruction modification subelement.Then, AT instruction modification subelement is according to the type information of the TETRA terminal of this AT instruction of described transmission, and different information between the standard A T instruction set supported of the AT command set supported of the TETRA terminal of this AT instruction of described transmission of storing in described memory and described TE, described AT instruction is modified, make amended AT instruction meet the standard A T instruction set that described TE supports.
Afterwards, amended AT instruction is sent to TE by ports filter unit.
Applicating example
TTCN-3 test system and test TETRA terminal receives short data, in TTCN-3 script, receiving two or three+CMGS instruction all the time according to tag splice processes, and the TETRA terminal that EADS produces only can send one+CMGS instruction to TTCN-3 test macro, for the TETRA terminal of compatible EADS production, the invention process regular meeting be EADS produce TETRA terminal send AT instruction supplementary quota outside+CMGS instruction, send to TE.
Embodiment tetra-
This embodiment provides a kind of device of TETRA terminal being tested based on TTCN-3, this device is arranged in the TRI between SA and the TE in TTCN-3 test macro, its specific implementation structure as shown in Figure 5, specifically can comprise: subelement 51, TETRA terminal type recognin unit 52, AT instruction modification subelement 53 and memory 54 are monitored in AT instruction
Described memory 54, the AT command set of supporting respectively for storing various types of TETRA terminals, and different information between the standard A T instruction set supported of the AT command set supported respectively of various TETRA terminal and described TE.
Concrete, send to the AT instruction of TE by SA for described TETRA terminal:
Subelement 51 is monitored in described AT instruction, for sending to the AT instruction of TE to monitor described TETRA terminal by SA, the AT instruction listening to is sent to TETRA terminal type recognin unit;
Described TETRA terminal type recognin unit 52, for obtaining the source port information that comes of described AT instruction, carry out source port information and obtain the type information of TETRA terminal that sends described AT instruction according to this, the type information is sent to described AT instruction modification subelement;
Described AT instruction modification subelement 53, be used for according to the type information of described TETRA terminal, and different information between the standard A T instruction set supported of the AT command set supported of the described TETRA terminal of storing in described memory and described TE, the described AT instruction listening to is modified, make amended AT instruction meet the standard A T instruction set that described TE supports.
Concrete, send to the AT instruction of TETRA terminal by SA for described TE:
Subelement 51 is monitored in described AT instruction, for sending to the AT instruction of described TETRA terminal to monitor described TE by SA, the AT instruction listening to is sent to TETRA terminal type recognin unit;
Described TETRA terminal type recognin unit 52, for obtaining the destination interface information of described AT instruction, receive the type information of the TETRA terminal of described AT instruction according to this destination interface acquisition of information, the type information is sent to described AT instruction modification subelement;
Described AT instruction modification subelement 53, be used for according to the type information of described TETRA terminal, and different information between the standard A T instruction set supported of the AT command set supported of the described TETRA terminal of storing in described memory and described TE, the described AT instruction listening to is modified, make amended AT instruction meet the AT command set that described TETRA terminal is supported.
Carry out with the device of the embodiment of the present invention detailed process and the preceding method embodiment that TETRA terminal are tested based on TTCN-3 similar, repeat no more herein.
One of ordinary skill in the art will appreciate that: accompanying drawing is the schematic diagram of an embodiment, the module in accompanying drawing or flow process might not be that enforcement the present invention is necessary.
One of ordinary skill in the art will appreciate that: the module in the equipment in embodiment can be described and be distributed in the equipment of embodiment according to embodiment, also can carry out respective change and be arranged in the one or more equipment that are different from the present embodiment.The module of above-described embodiment can be merged into a module, also can further split into multiple submodules.
In sum, the embodiment of the present invention is by arranging ports filter unit in the TRI in TTCN-3 test macro, different information between the standard A T instruction set that the AT command set that described ports filter unit is supported respectively according to the various TETRA terminals of storage and described TE support, the data of transmitting between SA and TE are monitored and revised, thereby reach the object of eliminating TETRA terminal difference.TTCN-3 test macro can be undertaken alternately by standard A T instruction and different TETRA terminals, and this can comprise the control (test macro sends instruction to terminal) to TETRA terminal behavior and read (terminal is replied instruction to test macro) to TETRA SOT state of termination alternately.And needn't consider the difference of the TETRA AT command set that terminal is supported that different manufacturers produce to have reduced complexity and difficulty that TTCN-3 test macro is tested TETRA terminal.
The embodiment of the present invention makes TTCN-3 test macro the state of different TETRA terminals be read and to be analyzed by AT instruction, and needn't consider the difference of the TETRA AT command set that terminal is supported of different manufacturers production.Tested TETRA terminal sends to the AT instruction of TE by SA, first process via example of the present invention, instruction is converted into TE and can mates and analytical standard form, then send to TE, make TE carry out correct coupling and analysis to the state of current tested TETRA terminal.
The embodiment of the present invention is by identifying and revise communicating by letter of AT instruction between TE and SA, make TTCN-3 script carry out extra judgement and processing for different tested TETRA terminals, simplify the exploitation of TTCN-3 script, guaranteed standard and the accuracy of TTCN-3 test macro.
The above; only for preferably embodiment of the present invention, but protection scope of the present invention is not limited to this, is anyly familiar with in technical scope that those skilled in the art disclose in the present invention; the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.