CN100456865C - Universal automatization testing device and method - Google Patents

Universal automatization testing device and method Download PDF

Info

Publication number
CN100456865C
CN100456865C CNB200410056120XA CN200410056120A CN100456865C CN 100456865 C CN100456865 C CN 100456865C CN B200410056120X A CNB200410056120X A CN B200410056120XA CN 200410056120 A CN200410056120 A CN 200410056120A CN 100456865 C CN100456865 C CN 100456865C
Authority
CN
China
Prior art keywords
frame
message
module
testing
test
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.)
Expired - Fee Related
Application number
CNB200410056120XA
Other languages
Chinese (zh)
Other versions
CN1735252A (en
Inventor
张晓翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB200410056120XA priority Critical patent/CN100456865C/en
Publication of CN1735252A publication Critical patent/CN1735252A/en
Application granted granted Critical
Publication of CN100456865C publication Critical patent/CN100456865C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

The present invention relates to an automation testing device and a testing method thereof, and the automation testing device comprises a message type processing module, a message format conversion module, a buffer zone message queue module, a message type interface module and a control module. The testing method of the automation testing device comprises the following procedures: S1. a testing message frame is constructed; S2. the testing message frame is sealed into an inner part sealed frame, and a frame head of the sealed frame is arranged according to the property of the testing frame; S3. the sealed frame is stored in a buffer zone message queue; S4. the sealed framed is unsealed into the testing message frame, and the testing message frame is sent to a measured module; S5. the message frame is received and responded; S6. the inner part sealed frame is sealed, and the frame head of the inner part sealed frame is arranged; S7. a sealed responded message frame is unsealed, and a testing result is generated. The present invention can construct a universal automation testing tool based on message and avoid the problems of a large and complicated testing tool, hard realization and low performance in the process of testing a tested object with multiple message interfaces. A message pool constructs, sends and separates the testing message, and the requirement of performance test is met.

Description

A kind of general automation testing apparatus and method
Technical field
The present invention relates to field tests, relate to a kind of general automatic test device and method of testing by it.
Technical background
Automatic test has been applied in the various test activities now widely, can not only simulate various abnormal conditions tests easily by tool test and automatic test, and because automatically performing of test case can be saved great amount of manpower.A kind of important tie between testing tool and the measurand is exactly a message.
Message is a kind of citation form of communication between each module, subsystem.Generally can mark off various message interfaces clearly, thereby structure test driver module and test pile module are tested to measurand on the border of measurand.As shown in Figure 1.Wherein to tested module input test message, stubs is used for supporting the tested module operation to driver module according to the needs structure of test case.
Because type of message is many, often cause driver module and stubs that separately independence is arranged.This independence can increase instrument complexity and control difficulty for automatic test.If testing tool itself is distributed, so corresponding tool interior communication and control cost can be bigger.
Automated test tool also has a common fault: often functional test instrument and performance testing tool can not unite two into one.The functional test instrument requires the careful of test as far as possible, and has ignored aspect of performance; Performance testing tool often requires fast as much as possible, often takes into account less than function detail.
The processing module that existing test automation test model separates according to the different messages type structure is often handled various message respectively, or respectively message is carried out preliminary treatment, and then passes to the control module analysis result.As shown in Figure 2, promptly be test model schematic diagram in this case.
When testing, the different driver module of control module control constructs different message according to the test case needs, sends to tested module then, causes that tested module does corresponding action or state exchange.Simultaneously control module need be controlled stubs to the action of tested module provide support (moving needed data as constructing it).The final result that tested module is carried out goes on record, and by with desired value come relatively to determine whether its function normal, thereby finish test to tested module.
Because above-mentioned each module may be arranged on different application programs or the different machine, the difficulty of Communication Control is bigger.Testing tool internal system (as driver module and stubs) communication and coordination ability is also limited.Because driving message is to construct and send to tested module in real time, so can't carry out Flow Control and performance test.
Summary of the invention
Purpose of the present invention just provides a kind of testing apparatus and method of testing, makes in test process, can the unified message processing procedure control with test, finishes functional test and performance test simultaneously, and for this reason, the present invention adopts following technical scheme:
A kind of general automation testing apparatus comprises:
Type of message processing module, message-format-conversion module, buffering area message queue module, type of message interface module and control module;
Described type of message processing module is accepted the control of input script, structure test post frame; And the response message of reception tested module, this response message of interpretation process;
Described message-format-conversion module links to each other with the type of message processing module, the test post frame of type of message processing module structure is packaged into the inside encapsulated frame of set form, the response message frame of receiving is packaged into the inside encapsulated frame of set form, above-mentioned inner encapsulated frame decapsulation is reduced into message frame;
Described buffering area message queue module links to each other with message-format-conversion module, the storage enclosure frame, and when receiving transmitting control commands, the encapsulated frame of storing is sent to the message-format-conversion module decapsulation;
Described type of message interface module links to each other with message-format-conversion module, and the test post frame of its reduction is loaded into tested module, perhaps receives the response of tested module and response message frame is sent to message-format-conversion module;
Described control module links to each other with above-mentioned each module, and transmits control signal to each module.
A kind of general automation method of testing comprises:
S1, according to test case structure test post frame;
S2, the test post frame is packaged into inner encapsulated frame, and the frame head of encapsulated frame is set according to the test frame attribute;
S3, store encapsulated frame into the buffering area message queue;
S4, the encapsulated frame deblocking is dressed up the test post frame and sent to tested module;
S5, receive response message frame from tested module;
S6, response message frame is packaged into inner encapsulated frame, and the frame head of inner encapsulated frame is set according to the response message Frame Properties;
S7, inner encapsulated frame deblocking is dressed up original response message frame, and produce test result.
The present invention can construct a general message based automated test tool, and when having avoided test multimessage interface measurand, testing tool is huge, complicated, the problem that unfavorable realization and performance are low.And, realize that the structure of test post separates with sending by message pool, satisfy the needs of performance test.
Method of testing of the present invention can realize that the structure of test post separates with sending, and can satisfy the needs of performance test and functional test simultaneously.
Description of drawings
Fig. 1 is the test model schematic diagram that test post drives in the prior art;
Fig. 2 is the automation model schematic diagram of separating treatment test post in the prior art;
Fig. 3 is that the present invention unifies the testing apparatus schematic diagram that test post drives;
Fig. 4 is the flow chart of method of testing in the embodiment of the invention;
Fig. 5 is an encapsulated frame schematic diagram of the present invention.
Embodiment
Below in conjunction with Figure of description the specific embodiment of the present invention is described.
As shown in Figure 3, be the structural representation of testing apparatus of the present invention, as we can see from the figure, this testing apparatus mainly comprises following part:
Type of message processing module, message-format-conversion module, buffering area message queue module, flow-control module, type of message interface module and control module.
Wherein, the type of message processing module links to each other with script input units such as test script controllers, accept the control of input script, construct dissimilar test post frames, and send to message-format-conversion module, by message-format-conversion module this test post frame is formed encapsulated frame according to fixing frame format encapsulation, and deposit buffering area message queue module in.In content of the present invention, this type of message processing module is provided with 4, so just can construct 4 types test post frame.
Simultaneously, this type of message processing module also will receive the message of the respective type that tested module replys, this response message of interpretation process;
Encapsulated frame after the encapsulation of buffering area message queue module stores message-format-conversion module, and send encapsulated frame to message-format-conversion module, by message-format-conversion module encapsulated frame is reduced into original test post frame, by the type of message interface module this test post frame is sent to tested module, and receive the response message frame of tested module, finish test.
In the connection of above-mentioned each module, the course of action, by control module send and received signal to above-mentioned each module, each module is controlled.
In the present embodiment, type of message processing module and type of message interface module are provided with 4 respectively, this can decide according to actual needs, according to different test cases different type of message processing modules is set, corresponding different type of message interface modules is set, this setup makes that testing apparatus of the present invention can the flexible processing testing requirement.
Control module at first starts when the test beginning, being responsible for then loading other module (here is not that each test process all needs to start all message processing modules, and the type of message interface module also is to set up according to the connection needs of reality, and these can be controlled by control module).In the test process, control module is in charge of buffering area message queue module, and the distribution test frame is distributed to different type of message processing modules to the response message frame of tested module simultaneously to corresponding interface module.In addition, control module also is responsible for the state of each module of monitoring, log and the current test mode of demonstration etc.During EOT, control module is responsible for unloading other module, the resource of release busy.
The testing apparatus of present embodiment is provided with a general inside story protocol format, by different test post frames all is packaged into the inside story form, has finished the regular of different messages frame format.Just because of the regular process of this message, for unified test control, flow control lay the foundation.At the interface with tested module, this inside story form encapsulated frame is reduced into original message frame form by decapsulation, thereby does not influence the test to measurand.
Because test post adopts unified frame format in inside, can construct a message buffer formation module in instrument, realize that the structure of test post separates with sending.Test post is stored in this Buffer Pool by the mode of constructing in advance, can once send a large amount of test post (transmitted traffic only is subjected to the restriction of decapsulation and bang path ability) when test, satisfies the needs of performance test.
Buffering area message queue module is the message queue of an inner encapsulated frame, can use chained list, hash or other collection class to realize, as long as be easy to insert, delete and traversal.Generally consider the computer resource situation of operation testing tool, should limit buffering area message queue block size in a reasonable range, in order to avoid the excessive system's instability that causes of buffering area message queue module.
As shown in Figure 4, be the schematic flow sheet of method of testing of the present invention, as can be seen from the figure, concrete test process of the present invention comprises the steps:
S1, according to test case, test script control messages processing module structure test post frame (supposing it is type of message 1,2 two kind of message format).
S2, message format modulus of conversion money are packaged into unified frame interior form with these test post frames, form encapsulated frame, and fill frame head (type of message, ID, command code etc.) according to the various attributes of this encapsulated frame;
As shown in Figure 5, be a schematic diagram of encapsulated frame of the present invention, as seen from the figure, the frame header branch of this encapsulated frame comprises relevant informations such as frame number, frame type, command word, frame length.These information are used for connecing the packaging and testing message frame.
This process is to drive the message constructing process, and it is independently with the test post frame process of transmitting of back, both can construct these encapsulated frame in advance, also can send these encapsulated frame while constructing.
S3, will construct good encapsulated frame then and deposit the buffering area message queue in.The setting of this buffering area message queue can be so that test frame be preserved when not needing to test, and disposable or a large amount of transmission when needing structure reaches the purpose of performance test.
S4, assign the order that sends encapsulated frame in control module after, encapsulated frame is just taken out from the buffering area message queue, after the information decapsulation according to frame head, reduction test post frame, and give dissimilar message interfaces and handle.
Here, the flow that encapsulated frame sends is subjected to the control of flow control step, and after receiving the flow control order, the message of storing in the buffering area message queue is sent to the message-format-conversion module decapsulation, and sends.And message interface directly sends to tested module to these test post frames, causes that tested module does corresponding action or state exchange.
S5, receive response message frame from tested module; After tested module receives the test post frame, do corresponding test response, these test responses can be collected and be beneficial to Measurement results.
S6, response message frame is packaged into inner encapsulated frame, and the frame head of inner encapsulated frame is set according to the response message Frame Properties;
S7, inner encapsulated frame deblocking is dressed up original response message frame, and produce test result.
The final result of test feeds back to testing tool by other interface (supposing type of message 4 interfaces), is recorded as test result after the type of message processing module analysis of correspondence.So just finished test to a certain function point of tested module.Tested module may need other support (as the some state values of needs) therebetween, can feed back to testing tool by other interface (supposing message 3 style interfaces), directly constructs its needed test post frame by testing tool, and the response tested module.
Testing apparatus of the present invention and method of testing can be constructed a general message based automated test tool.When having avoided test multimessage interface measurand, testing tool is huge, complicated, the problem that unfavorable realization and performance are low.And, realize that the structure of test post separates with sending by message pool, satisfy the needs of performance test.

Claims (9)

1, a kind of general automation testing apparatus is characterized in that comprising:
Type of message processing module, message-format-conversion module, buffering area message queue module, type of message interface module and control module;
Described type of message processing module is accepted the control of input script, structure test post frame; And the response message of reception tested module, this response message of interpretation process;
Described message-format-conversion module links to each other with the type of message processing module, the test post frame of type of message processing module structure is packaged into the inside encapsulated frame of set form, the response message frame of receiving is packaged into the inside encapsulated frame of set form, above-mentioned inner encapsulated frame decapsulation is reduced into message frame;
Described buffering area message queue module links to each other with message-format-conversion module, the storage enclosure frame, and when receiving transmitting control commands, the encapsulated frame of storing is sent to the message-format-conversion module decapsulation;
Described type of message interface module links to each other with message-format-conversion module, and the test post frame of its reduction is loaded into tested module, perhaps receives the response of tested module and response message frame is sent to message-format-conversion module;
Described control module links to each other with above-mentioned each module, and transmits control signal to each module.
2, testing apparatus as claimed in claim 1 is characterized in that also comprising flow-control module, links to each other with buffering area message queue module and control module, and the transmitted traffic control signal is given buffering area message queue module.
3, testing apparatus as claimed in claim 2 is characterized in that described type of message processing module is a plurality of.
4, testing apparatus as claimed in claim 2 is characterized in that described type of message interface module is a plurality of.
5, a kind of general automation method of testing is characterized in that comprising:
S1, according to test case structure test post frame;
S2, the test post frame is packaged into inner encapsulated frame, and the frame head of encapsulated frame is set according to the test frame attribute;
S3, store encapsulated frame into the buffering area message queue;
S4, the encapsulated frame deblocking is dressed up the test post frame and sent to tested module;
S5, receive response message frame from tested module;
S6, response message frame is packaged into inner encapsulated frame, and the frame head of inner encapsulated frame is set according to the response message Frame Properties;
S7, inner encapsulated frame deblocking is dressed up original response message frame, and produce test result.
6, method of testing as claimed in claim 5 is characterized in that among described step S2 or the S6, comprises type of message, ID or command code information in this frame head.
7, method of testing as claimed in claim 5 is characterized in that among the described step S3, and described buffering area message queue is realized by chained list or hash.
8, method as claimed in claim 5 is characterized in that also comprising the step that writes down test log.
9, method as claimed in claim 5 is characterized in that also comprising the step that shows test mode.
CNB200410056120XA 2004-08-12 2004-08-12 Universal automatization testing device and method Expired - Fee Related CN100456865C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200410056120XA CN100456865C (en) 2004-08-12 2004-08-12 Universal automatization testing device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200410056120XA CN100456865C (en) 2004-08-12 2004-08-12 Universal automatization testing device and method

Publications (2)

Publication Number Publication Date
CN1735252A CN1735252A (en) 2006-02-15
CN100456865C true CN100456865C (en) 2009-01-28

Family

ID=36077403

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200410056120XA Expired - Fee Related CN100456865C (en) 2004-08-12 2004-08-12 Universal automatization testing device and method

Country Status (1)

Country Link
CN (1) CN100456865C (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100520732C (en) * 2006-12-26 2009-07-29 中国电信股份有限公司 Performance test script generation method
CN101212362B (en) * 2006-12-26 2010-05-19 中兴通讯股份有限公司 Automatic testing device and method incorporating a variety of testing tools
CN101227349B (en) * 2008-02-03 2010-08-11 华为技术有限公司 Device and method for automatically testing system change
CN101645808B (en) * 2009-05-15 2012-01-04 天津七一二通信广播有限公司 Method for testing communication terminal by adopting analogue feedback frame
US8094566B2 (en) * 2009-12-24 2012-01-10 Advantest Corporation Test apparatus and test method
CN102214140B (en) * 2011-06-21 2017-02-15 中兴通讯股份有限公司 Method and system for automatic software testing
CN106201810A (en) * 2016-06-30 2016-12-07 乐视控股(北京)有限公司 A kind of method of testing, device
CN108459958A (en) * 2017-12-08 2018-08-28 平安科技(深圳)有限公司 The creation method of function and performance test script, device, equipment and storage medium
CN110213119B (en) * 2018-03-07 2022-02-22 财付通支付科技有限公司 Test pile generation method, test system, test method and test equipment
CN113595966B (en) * 2020-04-30 2023-04-18 阿里巴巴集团控股有限公司 Serial port communication control, configuration and test method, device, electronic equipment and storage medium
CN111866148B (en) * 2020-07-23 2022-05-31 浪潮云信息技术股份公司 Message queue flow control system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1471249A (en) * 2002-07-23 2004-01-28 华为技术有限公司 White ox measuring system and method using script patch
CN1489306A (en) * 2002-10-10 2004-04-14 华为技术有限公司 Measuring device
CN1503168A (en) * 2002-11-22 2004-06-09 深圳市中兴通讯股份有限公司 Automatic test method for system products
US6769114B2 (en) * 2000-05-19 2004-07-27 Wu-Hon Francis Leung Methods and apparatus for preventing software modifications from invalidating previously passed integration tests

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6769114B2 (en) * 2000-05-19 2004-07-27 Wu-Hon Francis Leung Methods and apparatus for preventing software modifications from invalidating previously passed integration tests
CN1471249A (en) * 2002-07-23 2004-01-28 华为技术有限公司 White ox measuring system and method using script patch
CN1489306A (en) * 2002-10-10 2004-04-14 华为技术有限公司 Measuring device
CN1503168A (en) * 2002-11-22 2004-06-09 深圳市中兴通讯股份有限公司 Automatic test method for system products

Also Published As

Publication number Publication date
CN1735252A (en) 2006-02-15

Similar Documents

Publication Publication Date Title
CN100456865C (en) Universal automatization testing device and method
CN103686831A (en) Test system, test method, and test device
CN108121326A (en) A kind of fault diagnosis method and system
CN111464419B (en) Data transmission control method based on bus network communication
CN110632461B (en) Test method, test terminal and test system for synchrophasor data concentrator
CN112650198B (en) Multi-spacecraft injection plan automatic generation and control method and device
CN112947961A (en) Vehicle flashing method and device based on visual graph configuration
CN101776915B (en) Cross-platform station automatic monitoring system testing method based on concurrency simulating tools
CN108337125A (en) Intelligent hardware devices test method, cloud platform and background controller
CN110069435B (en) Multi-camera module configuration method based on USB 3.0-SCCB
CN112468378A (en) High-capacity data transmission equipment and method based on CAN bus
CN108594632B (en) Satellite time service scene recording device and method based on satellite time service module
CN116647490A (en) Aviation AFDX network data detection system
CN101753375B (en) Device for debugging UDP network packet in avionics simulation environment and method therefor
CN112491620B (en) Multi-channel data transmission controller based on SRIO and adjusting method
CN108107750B (en) Real-time IO data processing method and system for power system simulation
CN112838938B (en) Test system of Internet of things platform
CN111371799A (en) Method, device and equipment for controlling data transmission and reception of MCTP (Multi-channel media processing protocol) controller
JPH1023107A (en) Communication simulator and communication simulating method
CN110691008B (en) Intelligent management unit test system and test method
CN116756043B (en) Software testing method, device and equipment of target equipment and storage medium
CN213937974U (en) Automatic drive car hardware-in-the-loop platform simulation communication testing device
JPH0784901A (en) Terminal operation reproducing device
CN117376379A (en) Multi-channel information message configuration method, storage medium and electronic device
Babić et al. Automotive Video Data Gathering and Reproduction Tool

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090128

Termination date: 20200812