CN105099808A - Protocol consistency test method and device - Google Patents
Protocol consistency test method and device Download PDFInfo
- Publication number
- CN105099808A CN105099808A CN201410506217.XA CN201410506217A CN105099808A CN 105099808 A CN105099808 A CN 105099808A CN 201410506217 A CN201410506217 A CN 201410506217A CN 105099808 A CN105099808 A CN 105099808A
- Authority
- CN
- China
- Prior art keywords
- test
- message
- output message
- standard
- output
- 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.)
- Pending
Links
Landscapes
- Computer And Data Communications (AREA)
Abstract
The invention discloses a test method including the following steps: receiving a test output message generated from a device to be tested; transforming the test output message into a standard output message; transforming the standard output message into a test case output message according to a message format of the test case; and determining a test result according to the test case output message. Meanwhile the invention also discloses a test device. By using the protocol consistency test method and device, the independence of an adaptation layer is realized, so that simulators of different manufacturers are independently used for the development of the adaptation layer. Meanwhile the unification of the coding formats is realized, and thus the compatibility processing is carried out on various coding formats.
Description
Technical field
The invention belongs to mobile communication technology field, particularly, relate to a kind of Protocol Conformance Test System adaptation layer decoding method and system.
Background technology
Terminal consistency test utilizes one group of cycle tests, under certain network environment, carries out Black-box Testing to measured terminal (IUT), and the similarities and differences exported with expection by the actual output of comparing IUT, judge the consistent degree of IUT and standard and agreement.At moving communicating field, some exception defined due to cycle tests and specific test condition are difficult to trigger in real network, or the exploitation of certain characteristic of network side lags behind the needs of terminal research and development, characteristic flow process needed for being simulated so general by consistency testing system is tested, at present, the technical scheme that consistency testing system adopts usually is: use the definition of TTCN technology and perform cycle tests, adopts network simulator analog network environment.
There is provided the producer of system simulator a lot of in the current communications field, the system simulator implementation of each producer, the api interface mode of external call are very various, therefore, different system simulator, corresponding different system Dependent Layers, in its encoding and decoding exploitation, system configuration message conversion module, messaging interface is also all different.For testing scheme provider, can use to make cycle tests, need exploitation for the system adapter of concrete system simulator, and once change system simulator, just need again to develop, for system simulator provider, if provider cooperates with testing scheme, the system Dependent Layer that can for call at least to be provided, even will develop corresponding codec, for testing scheme provider or system simulator provider, need very large development amount.
Summary of the invention
In view of this, for overcoming at least one shortcoming above-mentioned, and following at least one advantage is provided.The invention discloses a kind of protocol conformance test method and system.
On the one hand, adopt the present invention can realize the independent of adaptation layer, make the simulator of exploitation independent of different vendor of adaptation layer.
On the other hand, adopt the present invention can realize the unitized of coded format, thus compatible processing can be carried out to various different coded format.
For solving the problems of the technologies described above, the present invention by the following technical solutions:
A kind of method of testing, comprises the following steps:
Receive the test output message that equipment under test produces;
Described test output message is converted to standard output message;
Be test case output message according to the message format of test case by described standard output message conversion.
According to described test case output message determination test result.
Further, before described reception equipment under test is according to the test output message step exported, also comprise:
Message is sent according to Test cases technology test case;
Described test case being sent message conversion is that standard sends message;
Be the test transmission message for equipment under test by described standard transmission message conversion, and export to described equipment under test.
Further, described test output message produces after sending Message Processing by described equipment under test to described test.
It is further, described that described standard to be sent message conversion be the step sending message for the test of equipment under test is:
Determine the message format of described equipment under test receipt message;
According to described message format, described standard is sent message conversion for test transmission message.
Further, the described step described test output message being converted to standard output message is:
Determine the output format of described test output message;
According to described output format, described test output message is changed, obtain described standard output message.
A kind of testing apparatus, comprises
First modular converter, for being converted to standard output message by the test received output message;
Second modular converter, for being test case output message according to the message format of described test case by described standard output message conversion;
Test result module, for according to described test case output message determination test result.
Further, described test case module, sends message for producing test case according to test case, and sends to described second modular converter.
Further, described second modular converter is also that standard sends message for described test case being sent message conversion;
Described first modular converter, is also send message for the test of equipment under test for described standard being sent message conversion, and exports to described equipment under test.
Further, according to described equipment under test, described first modular converter, determines that described test sends the form of message; Described standard transmission message conversion is that described test sends message by the form sending message according to described test.
Further, described first modular converter, determines the form of described test output message according to described test output message; Described test output message is converted to described standard output message by the form according to described test output message.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing the embodiment of the present invention is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to the content of the embodiment of the present invention and these accompanying drawings.
Fig. 1 is consistency Black-box Testing system schematic in the embodiment of the present invention.
Fig. 2 is testing equipment schematic diagram in one embodiment of the invention.
Fig. 3 is method of testing flow chart in one embodiment of the invention.
Embodiment
The technical problem solved for making the present invention, the technical scheme of employing and the technique effect that reaches are clearly, be described in further detail below in conjunction with the technical scheme of accompanying drawing to the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those skilled in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Technical scheme of the present invention is further illustrated by embodiment below in conjunction with accompanying drawing.
Fig. 1 is consistency Black-box Testing system schematic in the embodiment of the present invention.
Fig. 2 is testing equipment schematic diagram in one embodiment of the invention.
With reference to figure 1, when carrying out consistency Black-box Testing to testing equipment, according to test purpose, test data is produced by test case, test data is entered in testing equipment through the adaptation layer transport matched with equipment under test, testing equipment, in running, to received test data for input data process, and produces corresponding output data.Outside in test data, by comparing to the output data corresponding with the test data of input, and then obtain the result to the Black-box Testing of testing equipment consistency.
But, due to the distinctiveness of equipment under test, different testing equipments has different input/output formats and follows different data transmission standards, therefore, adaptation layer is needed to carry out adaptive conversion for different input/output formats and data transmission standard to the test data of input and the test data of output.
With reference to figure 2, in adaptation layer, for being adapted to different equipment under tests, the testing apparatus in the embodiment of the present invention comprises the first modular converter, the second modular converter.
First modular converter, when carrying out Black-box Testing, receives the test output message produced by equipment under test, and changes test output message, and the test output message after conversion is the standard output message with Uniform data format.
Second modular converter receives the standard output message that the first modular converter produces, and sends the message format of message according to the test produced with test case, transfers this standard output message to test case output message.
Test result module is arranged in outside adaptation layer, read test use-case output message, and according to the test request of uniformity test, test case output message is compared and analyzes, in order to judge whether equipment under test meets uniformity test result in Black-box Testing.
State on the invention in embodiment, complete the format conversion to the test output message that equipment under test produces by the first modular converter in adaptation layer and the second modular converter.Thus the Black-box Testing data making adaptation layer export are consistent with the data format produced according to test case, overcome the inconsistency due to different equipment under test data format and consensus standard, the adaptation layer compatibling problem caused.
Before receiving the test output message produced by equipment under test, need to inject corresponding test post to equipment under test, test output message accordingly to produce as the input stimulus equipment under test of equipment under test.Therefore, one as above-described embodiment is expanded, and above-mentioned testing apparatus comprises test case module further, and this test case module can receive the test case that tester writes, and producing test transmission message according to test case, the test of generation sends message and is output to the second conversion module.
In the present embodiment, test case module can adopt the test languages such as TTCN-2, TTCN-3 to write test case, but it will be understood by those skilled in the art that the supported test language of above-mentioned test case module includes but not limited to TTCN-2, TTCN-3 etc.By supporting that tester utilizes general test language to write test case, extend the versatility of testing apparatus of the present invention, tester only to be carried out programming the test that just can realize different testing equipment with the test language that oneself is familiar with.
Further, as the expansion of above-described embodiment, for test test case module produced sends transmission of messages to testing equipment.It is that standard sends message that test can be sent message conversion by above-mentioned second test module further, and the standard produced after conversion sends message can be output to the first modular converter.
Corresponding first modular converter sends after message in the standard that receives, and determining to test according to equipment under test the form that sends message thus standard being sent message conversion is send message for the test of equipment under test, and exports to described equipment under test.
Above-described embodiment, by conversion test being sent to message of the first test module and the second test module, make to test the input requirements sending message and automatically can adapt to equipment under test, and the first test module is by the judgement to equipment under test message format, the test being adapted to different equipment under test can be produced and send message, thus extend the scope of equipment under test applicatory.
Fig. 3 is method of testing flow chart in one embodiment of the invention.
With reference to figure 3, in step S301, receive the test case that tester is write by all-purpose language, and produce test transmission message according to test case.All-purpose language for writing test case comprises and is singly not limited in TTCN-2, TTCN-3 etc.
In step s 302, because test case is write according to different all-purpose languages, therefore, the test that test case produces sends message may exist different forms, therefore, sends message for the test produced in step S301, first determine that this test sends the form of message, then, according to determined form, message is sent to test and transform, thus the standard of generation sends message.This standard sends message and has general information format, thus is applicable to the unified process to message.
In step S303, standard is sent message and be further converted to the test transmission message being adapted to different equipment under test.For realizing conversion standard being sent to message, first determine the message format that equipment under test receives, thus according to this message format, standard transmission message is transformed.
Further, as the interchangeable embodiment of one, before standard being sent message conversion and being test transmission message, first the coded format of equipment under test received message is determined, thus carry out encoding according to coded format to standard transmission message, thus generation is applicable to the coded data being input to equipment under test, such as, produce corresponding to the bitstream data in coded format as test transmission message.
In step s 304, the test after step S303 transforms that equipment under test receives input sends message, and produces test output message according to this test transmission message.
Individual in step S305, for test output message, carry out the conversion with step S303 contrary, namely in one embodiment, according to the form of the test output message that equipment under test produces, determine the mode of message conversion, by this test output message transformation standard output message.Accordingly, in another kind of embodiment, according to the coded format of the test output message that equipment under test produces, test output message is decoded, thus generates standard output message.
In step S306, for the standard output message produced in step S305, and the discernible message format of test case, standard output message is transformed, thus generates the test case output message being applicable to test case.
In step S307, according to test case output message, the output that equipment under test produces is analyzed, thus complete the Black-box Testing to equipment under test.
By the above-mentioned flow process of the present embodiment, can on the basis retaining equipment under test output content, only stylistic conversion or encoding and decoding are carried out to the message that equipment under test produces, thus overcome the inconsistency existed between message and the message that exports of equipment under test that test case exports, extend the practicality of test case and the popularity of equipment under test.
Further, concrete as above-described embodiment, above-mentioned protocol of encode and decode can be but be not limited to CSN.1/ASN.1 standard, thus the message encoding and decoding be applicable in moving communicating field, further, for being adapted to CSN.1/ASN.1 standard, the SET that can ASN.1 can be adopted further to provide, SETOF, SEQUENCE, the coding function of the forms such as SEQUENCEOF, thus realize standard being sent the test transmission that message conversion is bit format, and can SET be provided, SETOF, SEQUENCE, the decoding functions of the forms such as SEQUENCEOF, thus the test case of bitstream format is sent message conversion for sending message for standard.
Those skilled in the art can know, above-mentioned CSN.1/ASN.1 standard is only exemplary illustration, other embodiments of the present invention also can be adapted to other standards or form accordingly, such as adopt the embodiment of the present invention also can the time to TLV, CSN.1, the encoding and decoding of the format messages such as ASN.1 and conversion, thus the evolution of field of satellite mobile communication consensus standard can well be adapted to, and provide general interface and transmission of messages type to system adapter and system Dependent Layer, testing scheme provider is made not need according to different system simulator exploitation dedicated encoder/decoder, system simulator producer does not need to develop whole test macro yet.
All or part of content in the technical scheme that above embodiment provides can be realized by software programming, and its software program is stored in the storage medium that can read, storage medium such as: the hard disk in computer, CD or floppy disk.
Note, above are only preferred embodiment of the present invention and institute's application technology principle.Skilled person in the art will appreciate that and the invention is not restricted to specific embodiment described here, various obvious change can be carried out for a person skilled in the art, readjust and substitute and can not protection scope of the present invention be departed from.Therefore, although be described in further detail invention has been by above embodiment, the present invention is not limited only to above embodiment, when not departing from the present invention's design, can also comprise other Equivalent embodiments more, and scope of the present invention is determined by appended right.
Claims (10)
1. a method of testing, is characterized in that comprising the following steps:
Receive the test output message that equipment under test produces;
Described test output message is converted to standard output message;
Be test case output message according to the message format of test case by described standard output message conversion.
According to described test case output message determination test result.
2. method of testing as claimed in claim 1, is characterized in that, before described reception equipment under test is according to the test output message step exported, also comprises:
Message is sent according to Test cases technology test case;
Described test case being sent message conversion is that standard sends message;
Be the test transmission message for equipment under test by described standard transmission message conversion, and export to described equipment under test.
3. method of testing as claimed in claim 2, is characterized in that, described test output message produces after sending Message Processing by described equipment under test to described test.
4. method of testing as claimed in claim 2, is characterized in that, described described standard to be sent message conversion be the step sending message for the test of equipment under test is:
Determine the message format of described equipment under test receipt message;
According to described message format, described standard is sent message conversion for test transmission message.
5. method of testing as described in claim 1 or 2 or 4, is characterized in that, the described step described test output message being converted to standard output message is:
Determine the output format of described test output message;
According to described output format, described test output message is changed, obtain described standard output message.
6. a testing apparatus, is characterized in that:
First modular converter, for being converted to standard output message by the test received output message;
Second modular converter, for being test case output message according to the message format of described test case by described standard output message conversion;
Test result module, for according to described test case output message determination test result.
7. testing apparatus as claimed in claim 6, is characterized in that:
Described test case module, sends message for producing test case according to test case, and sends to described second modular converter.
8. testing apparatus as claimed in claim 7, is characterized in that:
Described second modular converter is also that standard sends message for described test case being sent message conversion;
Described first modular converter, is also send message for the test of equipment under test for described standard being sent message conversion, and exports to described equipment under test.
9. testing apparatus as claimed in claim 8, is characterized in that:
According to described equipment under test, described first modular converter, determines that described test sends the form of message; Described standard transmission message conversion is that described test sends message by the form sending message according to described test.
10. testing apparatus as described in as arbitrary in claim 6 ~ 9, is characterized in that:
Described first modular converter, determines the form of described test output message according to described test output message; Described test output message is converted to described standard output message by the form according to described test output message.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410506217.XA CN105099808A (en) | 2014-09-28 | 2014-09-28 | Protocol consistency test method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410506217.XA CN105099808A (en) | 2014-09-28 | 2014-09-28 | Protocol consistency test method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105099808A true CN105099808A (en) | 2015-11-25 |
Family
ID=54579420
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410506217.XA Pending CN105099808A (en) | 2014-09-28 | 2014-09-28 | Protocol consistency test method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105099808A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115412473A (en) * | 2022-08-30 | 2022-11-29 | 云控智行(上海)汽车科技有限公司 | Method and terminal for detecting data consistency of intelligent networking broadcast signals in real time for vehicles |
CN117729138A (en) * | 2024-02-08 | 2024-03-19 | 广州高新兴网联科技有限公司 | Internet of vehicles protocol consistency test method and system |
-
2014
- 2014-09-28 CN CN201410506217.XA patent/CN105099808A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115412473A (en) * | 2022-08-30 | 2022-11-29 | 云控智行(上海)汽车科技有限公司 | Method and terminal for detecting data consistency of intelligent networking broadcast signals in real time for vehicles |
CN115412473B (en) * | 2022-08-30 | 2024-03-29 | 云控智行(上海)汽车科技有限公司 | Method and terminal for detecting data consistency of intelligent internet-connected broadcast signals of vehicles in real time |
CN117729138A (en) * | 2024-02-08 | 2024-03-19 | 广州高新兴网联科技有限公司 | Internet of vehicles protocol consistency test method and system |
CN117729138B (en) * | 2024-02-08 | 2024-05-28 | 广州高新兴网联科技有限公司 | Internet of vehicles protocol consistency test method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103299366B (en) | Devices for encoding and detecting a watermarked signal | |
CN101236523B (en) | Input method test method and device | |
CN107436844B (en) | Method and device for generating interface use case aggregate | |
CN105912473B (en) | Mobile APP automatically testing platform and test method based on BDD | |
CN103346927A (en) | System and method for testing terminal consistency | |
CN104575502A (en) | Intelligent toy and voice interaction method thereof | |
CN107562637B (en) | Method, device, system and storage medium for software testing | |
CN107404418B (en) | Internet product testing method, device, equipment and storage medium | |
CN109032860A (en) | A kind of ARINC429 bus general purpose simulation system and emulation mode | |
CN103179133A (en) | Communication method between client side and server based on entity class | |
CN104917646A (en) | GOOSE protocol consistency test method | |
CN103795711A (en) | Automated test method and system based on mobile phone client sides | |
KR20140106857A (en) | Protocol conformity verification method, apparatus performing the same and systme performing the same | |
CN107948009B (en) | Method and model for constructing data interaction channel for PLC protocol test | |
CN112631884A (en) | Pressure measurement method and device based on data synchronization, computer equipment and storage medium | |
CN105099808A (en) | Protocol consistency test method and device | |
CN101860882A (en) | Method, device and system for controlling protocol consistency test by using wireless resources | |
CN104539478A (en) | Pressure test device and method for instant communication system | |
CN103812730B (en) | A kind of multiple cell TTCN Conformance Testing Environment systems | |
CN103391291A (en) | Codec based on terminal consistency testing system and coding and decoding method | |
CN113162977A (en) | Information processing method and device, equipment and storage medium | |
TW201321765A (en) | Automatic test system of communication device | |
CN104469368A (en) | Universal performance detection method for mobile phone platform VPU video coding and decoding | |
CN117201601A (en) | Internet of things equipment access method, device, equipment and storage medium | |
CN111078533A (en) | Automatic testing method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20151125 |