The method and apparatus that suitability configuration is carried out to TTCN-3 test systems
Technical field
The present invention relates to media communication technical field, more particularly to a kind of suitability configuration is carried out to TTCN-3 test systems
Method and apparatus.
Background technology
TTCN(Testing and Test Control Notation, test and testing and control representation)Be one by
ETSI(European Telecommunications Standards Institute, ETSI)Safeguard
Globally applicable standard testing script, its third generation standard TTCN-3 is a modern times and flexible language, is passed through
Extensive interface can describe perhaps eurypalynous system testing.The typical applications of TTCN are system testing, interactivity is tested,
Protocol test, operational trials, module testing etc., the platform independence of TTCN and its special power of test cause it extensively should
For defining the official testing collection of communication system.
A kind of overall structure diagram of TTCN-3 test systems of the prior art is as shown in Figure 1.In Fig. 1, TM(Test
Management, test and management)Entity is responsible for the holistic management of test system, and after test system initialization, TM entities are responsible for
Other modules are called to be tested.
TL(Test Logging, test log)Entity is responsible for the daily record produced in maintenance test, for recording TTCN-3
TE(TTCN-3Executable, can perform entity)The test event of middle generation, there is a unidirectional interface, TE between TL and TE
Log request can be sent to TL by the interface.
CD(Coding and Decoding, encoding and decoding)It is responsible for carrying out coding-decoding operation to data in outside, TE can also
Built-in codec functions, but the CD of outside has standardized interface so as to can easily transplant in different TTCN-3 systems
System and instrument, improve durability.
CH(Component Handling, component process)It is responsible for the parallel test suite of distribution, for distributed survey
Test system.
SA(System Under Test Adapter, system under test (SUT) adapter)By disappearing that TTCN-3 test systems are produced
Breath and the instruction morphing form to be recognized by system under test (SUT), as TTCN-3 test systems and the matchmaker communicated between system under test (SUT)
It is situated between.
PA(Platform Adapter, platform adapter)TE is adapted to specifically to perform platform.
In FIG, system under test (SUT) is connected with the SA in TTCN-3 test systems, and SA realizes TTCN-3 test systems and quilt
The adaptation communicated between examining system, will be sent to system under test (SUT) from the test request of TE and instruction, and return in system under test (SUT)
Notify that TE is read out during response.
TTCN-3 test systems shown in above-mentioned Fig. 1 in actual applications, the operating personnel of test according to system under test (SUT) with
The actual connection of TTCN-3 test systems, and the concrete connection request of system under test (SUT), manually to TTCN-3 test systems
It is attached parameter configuration.
The shortcoming of above-mentioned TTCN-3 test systems of the prior art is:Need the connection of artificial enquiry system under test (SUT) requirement
Parameter, and need manual configuration Connecting quantity.The Connecting quantity of system under test (SUT) or the connection with TTCN-3 test systems
After changing, need to carry out manual configuration to the relevant connection parameter of test system again.
The content of the invention
The embodiment provides a kind of method and apparatus that suitability configuration is carried out to TTCN-3 test systems, with
Realize that TTCN-3 test systems can be adapted to system under test (SUT) automatically.
The invention provides following scheme:
A kind of method that suitability configuration is carried out to TTCN-3 test systems, including:
System under test (SUT) adapter SA in TTCN-3 test systems configures preset Connecting quantity in the TTCN-3 for selecting
On the external interface of test system, interaction request message is sent out by the interface;
The SA receives the response of the interaction request message of system under test (SUT) return in the time interval of setting and disappears
The interface and the Connecting quantity are associated storage, the interface and the Connecting quantity are defined as by breath, the SA
The corresponding interface of the system under test (SUT) and Connecting quantity.
A kind of device that suitability configuration is carried out to TTCN-3 test systems, the device is arranged in TTCN-3 test systems
SA in, described device is specifically included:
System under test (SUT) connection adaptation preset module, for the Connecting quantity of preset system under test (SUT) to be configured in selection
On the external interface of TTCN-3 test systems;
System under test (SUT) connection adaptation determining module, for being sent out interaction request message by the interface, in setting
Time interval in receive system under test (SUT) return the interaction request message response message, then by the interface and described
Connecting quantity is associated storage, and the interface and the Connecting quantity are defined as into the corresponding interface of the system under test (SUT) and company
Connect parameter.
The technical scheme provided by embodiments of the invention described above can be seen that the embodiment of the present invention by surveying in TTCN-3
Before test system is tested system under test (SUT), SA is actively communicated with system under test (SUT), it is possible to achieve TTCN-3 test systems are certainly
Dynamic detection and the connecting interface situation of system under test (SUT), and automatic detection is connected required Connecting quantity with system under test (SUT), and
The characteristic parameter of the system under test (SUT) needed for being tested, enables TTCN-3 test systems to be adapted to system under test (SUT) automatically,
Operating personnel's manual queries and configuration parameter are not needed.
Description of the drawings
In order to be illustrated more clearly that the technical scheme of the embodiment of the present invention, below will be to use needed for embodiment description
Accompanying drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this
For the those of ordinary skill of field, without having to pay creative labor, can be obtaining other according to these accompanying drawings
Accompanying drawing.
Fig. 1 is a kind of TTCN-3 test systems overall structure of the prior art
Fig. 2 is that a kind of SA that the embodiment of the present invention one is provided is attached interface and Connecting quantity detection to system under test (SUT)
The principle schematic of method;
Fig. 3 is a kind of tool of device that suitability configuration is carried out to TTCN-3 test systems that the embodiment of the present invention three is provided
Body structure chart.
Specific embodiment
For ease of the understanding to the embodiment of the present invention, do by taking several specific embodiments as an example further below in conjunction with accompanying drawing
Explanation, and each embodiment does not constitute the restriction to the embodiment of the present invention.
SA in TTCN-3 test systems of the prior art is only responsible for the communication between TE and system under test (SUT).When TE wish to
When system under test (SUT) sends message, data are issued SA by TE, then are sent out with system under test (SUT) interface by TTCN-3 test systems by SA
Give system under test (SUT);When system under test (SUT) have sent message to TTCN-3 test systems, SA is first between test system and system under test (SUT)
Interface by data receiver, reinform TE read message.Generally, SA is not actively communicated with system under test (SUT).This
Inventive embodiments make SA actively be communicated with system under test (SUT) before TTCN-3 test systems are tested system under test (SUT), examine
Survey is connected required parameters with system under test (SUT), and TTCN-3 test systems are automatically configured, and tests TTCN-3
System can be adapted to system under test (SUT) automatically.
Embodiment one
Before TE execution TTCN-3 scripts in TTCN-3 test systems are tested, can first by SA initialization and quilt
The connection of examining system, detections of the SA to system under test (SUT) should be performed at this moment, after detecting the Connecting quantity required by system under test (SUT),
The connection with system under test (SUT) could correctly be configured.
In actual applications, the interface parameters that system under test (SUT) is required typically only has a small amount of difference, and TTCN-3 test systems
External interface limited amount, SA can travel through to these interfaces, all possible parameter be attempted, to detect system under test (SUT)
Connection and the required parameter of connection.
A kind of SA that the embodiment is provided is attached the principle of the method for interface and Connecting quantity detection to system under test (SUT)
Schematic diagram is as shown in Fig. 2 including following processing procedure:
TTCN-3 test systems can have multiple external interfaces, can simultaneously connect multiple systems under test (SUT), SA replies
All external interfaces of TTCN-3 test systems are detected.It is all to external that SA detects that first TTCN-3 test systems are present
Mouthful, each interface is then chosen successively, such as, first interface is chosen first.
The Connecting quantity that various systems under test (SUT) may require, above-mentioned parameter collection are stored in SA beforehand through a parameter set
In store multigroup Connecting quantity.SA first takes out first group of Connecting quantity from parameter set, by first group of Connecting quantity configuration
To on above-mentioned first interface, and interaction request message is sent to system under test (SUT) that may be present by first interface.
The SA receives the response of the interaction request message of system under test (SUT) return in the time interval of setting and disappears
Breath, then be connected with system under test (SUT) on first interface for illustrating current detection, and current parameter setting is correct, and the SA is by institute
State first interface and the Connecting quantity is associated storage, first interface and the Connecting quantity are defined as into institute
State the corresponding interface of system under test (SUT) and Connecting quantity.
The SA is not received by the sound of the interaction request message of system under test (SUT) return in the time interval of setting
Message is answered, then the SA chooses second group of Connecting quantity from the parameter set, second group of Connecting quantity is configured to into institute
State on first interface, and the second interaction request message is sent out by first interface.
The SA receives the sound of the second interaction request message of system under test (SUT) return in the time interval of setting
Message is answered, then first interface and second group of Connecting quantity are associated storage by the SA, by described first
Interface and second group of Connecting quantity are defined as the corresponding interface of the system under test (SUT) and Connecting quantity.The SA is in setting
The response message of the second interaction request message of system under test (SUT) return is not received by time interval, then the SA is from institute
The 3rd group of Connecting quantity of selection in parameter set is stated, the 3rd group of Connecting quantity is configured on first interface, and led to
Cross first interface and be sent out the 3rd interaction request message.
The SA repeats above-mentioned processing procedure, and the SA travels through successively the connection ginseng of each group in the parameter set
Number, when the SA is successively configured to the Connecting quantity of each group in the parameter set on first interface, and successively
After being sent out interaction request message, the response message of the interaction request message of system under test (SUT) return is never received
Afterwards, then the SA to determine and do not connect system under test (SUT) on first interface.SA is recorded to this situation, in case occurring
Inquire about during missing inspection.
The SA tests system to the TTCN-3 successively according to the corresponding Connecting quantity adaptation procedure of first interface
Each interface is attached parameter adaptation in all external interfaces of system, finds the system under test (SUT) connected on each interface.
Such as, above-mentioned SA chooses second interface, and the Connecting quantity of each group in the parameter set is configured to successively
On second interface, and interaction request message is sent out successively, until the SA receives the friendship of system under test (SUT) return
The response message of mutual request message, the then connection that the SA will be currently configured on second interface and second interface
Parameter is associated storage, and the Connecting quantity being currently configured on second interface and second interface is defined as into institute
State the corresponding interface of system under test (SUT) and Connecting quantity.
To improve detection speed, each Connecting quantity that above-mentioned parameter is concentrated can be ranked up by its applicability, more
Before the Connecting quantity that system under test (SUT) is used comes, behind the Connecting quantity that less system under test (SUT) is used comes.
Those skilled in the art will be understood that the application type of above-mentioned parameter collection is only for example, and other are existing or from now on may be used
The storage form of the Connecting quantity that can occur, such as tables of data, XML(Extensible Markup Language, expansible mark
Note language)Deng, the embodiment of the present invention being such as applicable to, also should be included within the scope of the present invention, and here is with the side of reference
Formula is incorporated herein.
Embodiment two
SA is got after the corresponding interface of system under test (SUT) and Connecting quantity, it is possible to come using these interfaces and Connecting quantity
Connection between initialization and system under test (SUT), the query statement for then being provided by system under test (SUT) inquires about what TTCN-3 scripts needed
The characteristic parameter of system under test (SUT).
Based on above-described embodiment one, a kind of SA that the embodiment is provided carries out the side of characteristic parameter inquiry to system under test (SUT)
Method, including following processing procedure:
TTCN-3 test systems typically can by with system under test (SUT) consult or the predefined exchange method of system under test (SUT), such as
The modes such as instruction set, interact with system under test (SUT).In actual test, the query statement that system under test (SUT) is used may be different,
In this case, SA needs for the query statement being possibly used to save as an instruction set, tested to difference to support
The inquiry of system.Above-mentioned SA prestores an instruction set comprising multiple queries instruction, and from the instruction set first is chosen
Individual query statement.
The SA is configured to the system under test (SUT) corresponding Connecting quantity on the corresponding interface of the system under test (SUT), passes through
The corresponding interface of the system under test (SUT) sends first query statement to the system under test (SUT).Times of the SA in setting
First query statement of the characteristic parameter of the carrying system under test (SUT) that the system under test (SUT) is returned is received in interval
After corresponding response signaling, then the SA is stored the characteristic parameter of the system under test (SUT), and features described above parameter is TTCN-
The characteristic parameter of the system under test (SUT) that 3 scripts need.
The SA is not received by first query statement of system under test (SUT) return in the time interval of setting
Response signaling, then the SA second query statement is chosen from the instruction set, by the corresponding interface of the system under test (SUT)
Second query statement is sent to the system under test (SUT);
The SA receives the spy of the carrying system under test (SUT) that the system under test (SUT) is returned in the time interval of setting
After levying the corresponding response signaling of second query statement of parameter, then the SA enters the characteristic parameter of the system under test (SUT)
Row storage.The SA is not received by the sound of second query statement of system under test (SUT) return in the time interval of setting
Answer signaling, then the SA chooses the 3rd query statement from the instruction set, by the corresponding interface of the system under test (SUT) to
The system under test (SUT) sends the 3rd query statement;
The SA repeats above-mentioned processing procedure, by the corresponding interface of the system under test (SUT) successively to the tested system
System sends each query statement in the instruction set, until receiving the carrying tested system that the system under test (SUT) is returned
After the corresponding response signaling of the query statement of the characteristic parameter of system, then the SA enters the characteristic parameter of the system under test (SUT)
Row storage.
If all query statements in instruction set are all attempted going over, and SA did not receive all the time correct reply,
The inquiry failure of above-mentioned instruction set is then thought, SA is recorded to this situation, in case inquiry.Afterwards, SA is tested according to the next one
The corresponding interface of system and Connecting quantity, the inquiry of the characteristic parameter of next system under test (SUT) is carried out using above-mentioned instruction set.When
The system under test (SUT) of all presence all detects after going over that testing process terminates.
To improve inquiry velocity, each query statement in above-mentioned instruction set can be ranked up by its applicability, more
Before the query statement that system under test (SUT) is used comes, behind the query statement that less system under test (SUT) is used comes.Such as need to tested
Multiple characteristic parameters of system are inquired about, and can still use above-mentioned handling process, and can pass through reasonable arrangement query argument
Order saving query time, the manufacturer of such as preferential inquiry system under test (SUT) is that follow-up inquiry is chosen suitably according to manufacturer
Instruction, without attempting all possible query statement successively.
For the characteristic parameter of the system under test (SUT) for inquiring, the TRI between SA and TE can be passed through(TTCN-3Runtime
Interface when Interface, TTCN-3 run)Send TE to read for TTCN-3 scripts, enable TTCN-3 scripts according to tested
The suitable method of testing of characteristic parameter selection of system and flow process.
Those skilled in the art will be understood that the application type of above-mentioned instruction set is only for example, and other are existing or from now on may be used
The storage form of the query statement that can occur, such as tables of data, XML(Extensible Markup Language, expansible mark
Note language)Deng, the embodiment of the present invention being such as applicable to, also should be included within the scope of the present invention, and here is with the side of reference
Formula is incorporated herein.
Using example:
In the TTCN-3 test systems tested TETRA digital packet terminals, tested TETRA terminals pass through serial ports
It is connected with TTCN-3 test systems, TTCN-3 test systems are interacted by AT instructions with terminal.Different manufacturer's productions
The serial ports Connecting quantity of TETRA demanding terminals is different, and the AT instructions for using there is also difference.The embodiment of the present invention is to TETRA
The serial ports Connecting quantity such as baud rate of demanding terminal, and the information such as terminal manufacturer, number inquired about.
In the case of serial ports parameter setting is correct, TTCN-3 test systems send AT and refer to by serial ports to TETRA terminals
After order, the instruction of terminal replies can be typically received, if serial ports parameter configuration is incorrect, the reply of terminal cannot be received, or
The data for receiving are incorrect.The embodiment of the present invention is tested current TTCN-3 in the corresponding serial ports parameter of detection TETRA terminals
All serial ports of system are detected, for each serial ports, TTCN-3 test systems are entered successively using different serial ports parameters
Row configuration, and send AT instructions to TETRA terminals.
If TTCN-3 test systems can receive the correct response of TETRA terminals return in the time restriction of regulation,
Then think that the serial ports is connected with TETRA terminals, and the parameter configuration of serial ports is correct;If not receiving the response of TETRA terminals,
Or the data that receive are incorrect, then it is assumed that the configuration of the serial ports parameter is wrong, change and detected again after parameter;If the attempt to
All possible parameter, and the correct response of TETRA terminals is not received all the time, then it is assumed that the serial ports is currently without connection
TETRA terminals.
TETRA terminals provide the AT instructions for inquiring about its own information, according to the TTR 004-01Core AT that ETSI is issued
Regulation in Commands, uses " AT+GMI" instruction can inquire about the manufacturer of terminal, use " AT+CNUM" instruction can be with
The number of inquiry terminal.The embodiment of the present invention will in the TETRA terminals and terminal for detecting current TTCN-3 test systems connection
After the serial ports parameter asked, TTCN-3 test systems set up the connection with terminal, are instructed to information such as such as manufacturer, numbers using AT
Inquired about, the AT instructions that analysing terminal is replied obtain information of concern, and are sent to TE.
In actual applications, the serial ports parameter of TETRA demanding terminals typically only has baud rate difference, and the embodiment of the present invention can
Only baud rate is detected, other specification such as data bit, check bit, stop position etc. may be configured as fixed value, to simplify detection
Flow process, shortens detection time.AT instructions used by detection TETRA terminals can be used directly instruction " AT ", to returning for should instructing
It is again " OK " that content is simply easy to judge, and the instruction will not carry out any actual operation to TETRA terminals, it is ensured that TETRA
Terminal is in normal original state when test starts.The AT command set that the TETRA terminals of different manufacturer's productions are used is omited
There is difference, instruction of the embodiment of the present invention in advance to being possibly used is stored, to realize looking into different TETRA terminals
Ask, and preferentially inquire about the manufacturer of TETRA terminals, be that suitable AT instructions are chosen in follow-up inquiry according to the manufacturer of terminal,
Without attempting all possible instruction successively.
Embodiment three
A kind of device that suitability configuration is carried out to TTCN-3 test systems is this embodiment offers, the device is arranged on
In SA in TTCN-3 test systems, its concrete structure is as shown in figure 3, described device is specifically included:
System under test (SUT) connection adaptation preset module 41, for the Connecting quantity of preset system under test (SUT) to be configured in selection
On the external interface of TTCN-3 test systems;
System under test (SUT) connection adaptation determining module 42, for being sent out interaction request message by the interface, is setting
The response message of the interaction request message of system under test (SUT) return is received in fixed time interval, then by the interface and institute
State Connecting quantity and be associated storage, by the interface and the Connecting quantity be defined as the corresponding interface of the system under test (SUT) and
Connecting quantity.
Specifically, described system under test (SUT) connection adaptation preset module 41, specifically for obtaining TTCN-3 test systems
All external interface information, choose first interface from all external interfaces, prestore one comprising multigroup connection
The parameter set of parameter, chooses certain group Connecting quantity from the parameter set, and described certain group Connecting quantity is configured to into described first
On individual interface, and interaction request message is sent to system under test (SUT) by first interface.
Specifically, described system under test (SUT) connection adaptation determining module 42, is additionally operable to not have in the time interval of setting
The response message of the interaction request message of system under test (SUT) return is received, then second group of connection is chosen from the parameter set
Parameter, second group of Connecting quantity is configured on first interface, and is sent out by first interface
Second interaction request message;
The response message of the second interaction request message of system under test (SUT) return is received in the time interval of setting,
Then first interface and second group of Connecting quantity are associated into storage, by first interface and described second
Group Connecting quantity is defined as the corresponding interface of the system under test (SUT) and Connecting quantity.
It is additionally operable to be not received by the second interaction request message of system under test (SUT) return in the time interval of setting
Response message, then the 3rd group of Connecting quantity is chosen from the parameter set, the 3rd group of Connecting quantity is configured to described
On first interface, and the 3rd interaction request message is sent out by first interface;
Above-mentioned processing procedure is repeated, it is described when the Connecting quantity of each group in the parameter set is configured to successively
On first interface, and it is sent out successively after interaction request message, never receives the friendship of system under test (SUT) return
Mutually after the response message of request message, it is determined that do not connect system under test (SUT) on first interface;
According to the corresponding Connecting quantity adaptation procedure of first interface, successively to the institute of the TTCN-3 test systems
There is each interface in external interface to be attached parameter adaptation, find the system under test (SUT) connected on each interface.
Further, described device also includes:
System under test (SUT) query statement preset module 43, for prestoring an instruction set comprising multiple queries instruction,
First query statement is chosen from the instruction set;
System under test (SUT) characteristic parameter determining module 44, it is described for the corresponding Connecting quantity of the system under test (SUT) to be configured to
On the corresponding interface of system under test (SUT), send described first to the system under test (SUT) by the corresponding interface of the system under test (SUT) and look into
Ask instruction;
The characteristic parameter of the carrying system under test (SUT) that the system under test (SUT) is returned is received in the time interval of setting
The corresponding response signaling of first query statement after, then the characteristic parameter of the system under test (SUT) is stored.
Specifically, described system under test (SUT) characteristic parameter determining module 44, is additionally operable to not connect in the time interval of setting
The response signaling of first query statement of system under test (SUT) return is received, then second inquiry is chosen from the instruction set
Instruction, second query statement is sent by the corresponding interface of the system under test (SUT) to the system under test (SUT);
The characteristic parameter of the carrying system under test (SUT) that the system under test (SUT) is returned is received in the time interval of setting
The corresponding response signaling of second query statement after, then the characteristic parameter of the system under test (SUT) is stored;
The response letter of second query statement of system under test (SUT) return is not received by the time interval of setting
Order, then choose the 3rd query statement, by the corresponding interface of the system under test (SUT) to the tested system from the instruction set
System sends the 3rd query statement;
Above-mentioned processing procedure is repeated, is sent to the system under test (SUT) successively by the corresponding interface of the system under test (SUT)
Each query statement in the instruction set, until receiving the spy of the carrying system under test (SUT) that the system under test (SUT) is returned
After levying the corresponding response signaling of the query statement of parameter, then the characteristic parameter of the system under test (SUT) is stored.
Carried out carrying out TTCN-3 test systems with the device of the embodiment of the present invention detailed process of suitability configuration with it is front
State embodiment of the method to be similar to, here is omitted.
One of ordinary skill in the art will appreciate that:Accompanying drawing is the schematic diagram of one embodiment, module in accompanying drawing or
Flow process is not necessarily implemented necessary to the present invention.
One of ordinary skill in the art will appreciate that:The module in equipment in embodiment can be according to embodiment description point
In being distributed in the equipment of embodiment, it is also possible to carry out respective change and be disposed other than in one or more equipment of the present embodiment.On
Stating the module of embodiment can merge into a module, it is also possible to be further split into multiple submodule.
In sum, the embodiment of the present invention is by the way that before TTCN-3 test systems are tested system under test (SUT), SA is actively
Communicated with system under test (SUT), it is possible to achieve the connecting interface situation of TTCN-3 test systems automatic detection and system under test (SUT), and
Automatic detection is connected required Connecting quantity, and the characteristic parameter of the system under test (SUT) needed for being tested with system under test (SUT),
TTCN-3 test systems are enable to be adapted to system under test (SUT) automatically, it is not necessary to operating personnel's manual queries and configuration parameter.
The embodiment of the present invention make SA can automatic detection be connected required parameters with system under test (SUT), and be applied to itself
With the connection of system under test (SUT), the automatic detection to testing adaptation parameter and configuration are realized.The embodiment of the present invention instead of matches somebody with somebody manually
The step of putting TTCN-3 test system parameters, simplifies the operation of TTCN-3 test systems.
The above, the only present invention preferably specific embodiment, but protection scope of the present invention is not limited thereto,
Any those familiar with the art the invention discloses technical scope in, the change or replacement that can be readily occurred in,
All should be included within the scope of the present invention.Therefore, protection scope of the present invention should be with scope of the claims
It is defined.