CN105846973B - A kind of protocol testing method and device of embedded software - Google Patents
A kind of protocol testing method and device of embedded software Download PDFInfo
- Publication number
- CN105846973B CN105846973B CN201610262842.3A CN201610262842A CN105846973B CN 105846973 B CN105846973 B CN 105846973B CN 201610262842 A CN201610262842 A CN 201610262842A CN 105846973 B CN105846973 B CN 105846973B
- Authority
- CN
- China
- Prior art keywords
- protocol
- configuration
- data frame
- host
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/24—Testing correct operation
Abstract
The invention discloses a kind of protocol testing method of embedded software and devices, applied in the protocol test of embedded software.Provide a kind of user configuration agreement in the method, which supports user-defined protocol content and timing so that protocol test agency can light analysis protocol content, and generate corresponding data frame.User only need to fill in configuration information in software configuration interface in host, can fill the protocol frame automatically, and protocol frame is sent to protocol test agency, carry out the configuration information of parsing user by protocol test agency, to realize that automatic protocol is tested.
Description
Technical field
The present invention relates to a kind of protocol testing method of embedded software and devices, are applied to embedded software test and lead
Domain.
Background technique
The continuous of computer technology application is popularized, so that real time embedded system plays work in more and more fields
With.These fields include Aeronautics and Astronautics, Industry Control, traffic, medical treatment and military field etc..It is not difficult to find out that these fields are to soft
The key property that part requires is exactly reliability, because the software in the field can directly or indirectly influence the mankind once failing
Lives and properties and ecological environment safety.
So-called real time embedded system refers to that those run in real time embedded system, plays the soft of core control action
Part.By the particularity of locating running environment and the task completed, real time embedded system has compared with being normally applied software
Its own characteristic.These characteristics are mainly shown as real-time, reactivity and insertion characteristic.And the communication party between embedded system
Formula is varied, and communication protocol is generally defined by user oneself, the communication protocol of such many and diverse multiplicity, how to guarantee stability with
Correctness can only be guaranteed that there are no a complete and effective testing schemes by user oneself at present.
Built-in system software protocol test, which can be divided into, to be tested on host and tests on target machine, although in place
Test is shown as more convenient and flexible on host, but how perfect the test no matter carried out on host is, on target machine
Test is still irreplaceable, because some problems are tested only on target machine is likely to confirmation and discovery.Based on test side
The test of target machine is divided into three classes by the difference of formula: pure software emulation testing, semi-physical simulation test and object test.Due to
Object test it is targeted be whole system, therefore test cost is expensive, and test period is long.And pure software emulation testing can not mould
The true protocol scheme of quasi- embedded software, and can have error, cause the confidence level of test result not high.
Summary of the invention
Present invention is primarily aimed at proposing the protocol testing method and device of a kind of embedded software, by host,
Protocol test agency and system under test (SUT) composition, wherein host is to be equipped with to act on behalf of matched software with protocol test, and provide
Parameter configuration interface, the configuration interface that user is provided by host software, and the frame structure of user configuration protocol frame is filled, it produces
Raw agreement content frame and agreement frame timing, are connected by system bus interface with system under test (SUT), and the software of host's generator terminal is only
Configuration method and control instruction are provided, so that the confidence level of embedded software protocol test increases substantially.
A kind of the technology of the present invention solution: protocol testing method realization of embedded software are as follows:
It is acted on behalf of via coffret from host to protocol test and sends configuration data frame, the configuration data frame is for matching
Set the bus data output format of protocol test agency;
After the configuration data frame that the protocol test proxy resolution receives, given via coffret feedback configuration response message
Host, host judge the configuring condition that protocol test is acted on behalf of according to response message;
According to the configuration data frame and in the configuration response message of host and protocol test agency's exchange, agreement is surveyed
Try the output frame format of proxy configurations bus interface;Frame format based on output, the automatic filling corresponding data of protocol test agency,
And data interaction is carried out by bus interface and system under test (SUT).
Based on the coffret that the host is configured, determine whether host and the connection of protocol test agency have
Effect, and according to it is identified as a result, configuration host coffret parameter, with adapt to protocol test agency transmission connect
Mouthful.
The configuration data frame includes the output data frame format of configuration protocol test agent, output data frame source and defeated
The transmission opportunity of data frame out.
The output data frame source, which is included in, to be automatically generated in protocol test agency and is made by oneself in host by user
Justice.
The transmission opportunity of the output data frame includes regularly sending data frame, sending data frame, the transmission of response formula at random
Data frame and follow host send data frame.
A kind of protocol testing device of embedded software, described device include:
Transmission interface unit is configured, the configuration transmission interface unit is to configure the coffret parameter of host, so as to
The coffret of host can smoothly transmit data;Configuration data frame unit, the configuration data frame unit is in protocol test
After agency's starting, the exchange configuration output result between host and protocol test agency;User surveys according to host and agreement
Exchange configuration exports the transmission opportunity as a result, the bus data frame to determine protocol test agency between examination agency.
A kind of protocol testing device of embedded software, described device include:
Transmission interface unit is configured, the configuration transmission interface unit is that the coffret of configuration protocol test agent is joined
Number, so that protocol test agency can send and receive data;Output data frame configuration unit, the output data frame configuration are single
Member generates corresponding bus data output frame after parsing configuration data frame, according to the content of configuration data frame.
The advantages of the present invention over the prior art are that:
(1) the external protocol content i.e. agreement timing of true embedded software can be generated;
(2) embedded software protocol test is with a high credibility;
(3) embedded software protocol test problem spreadability is wide.
The characteristic for being usually embedded formula system is mainly shown as real-time, reactivity and insertion characteristic.And embedded system it
Between communication mode it is varied, communication protocol is generally defined by user oneself, and how the communication protocol of such many and diverse multiplicity protects
Stability and correctness are demonstrate,proved, can only be guaranteed at present by user oneself, there are no a complete and effective testing scheme, and it is general
Embedded software test, the test of target machine is divided into three classes by the difference based on test mode: pure software emulation testing, half
Physical simulation test and object test.Due to object test it is targeted be whole system, test cost is expensive, test week
Phase is long.And pure software emulation testing can not generate the external protocol content i.e. agreement timing of embedded system, and can exist and miss
Difference causes the confidence level of test result not high.Semi-physical simulation test can carry out piecemeal test to embedded software, and providing can
The simulated environment leaned on, so that the confidence level of the protocol test of embedded software improves, and due to all protocol contents and association
View timing is all configurable, so test problem spreadability is wide.
Detailed description of the invention
Fig. 1 is overall framework figure of the present invention;
Fig. 2 is configuration data frame structure in the present invention;
Fig. 3 is communication process schematic diagram in the present invention.
Specific embodiment
Further to illustrate the present invention to reach the technical means and efficacy that predetermined goal of the invention is taken, to according to this
Protocol testing method and device its specific embodiment, the feature and its effect for inventing a kind of embedded software proposed, are answered
As follows with scene: certain embedded system needs external serial ports periodically to provide the data of certain data frame format, and according to this number
According to further operating is done, then in order to test the serial data Frame Protocol of the system.
The technical solution that this method uses are as follows: system connection is as shown in Figure 1.Host passes through coffret and agreement
Test agent is connected, and protocol test agency is connected by bus with system under test (SUT).And the data sending strategy of user configuration agreement
Layer provides content relevant to data sending strategy, and support regularly sends, sends at random, response formula sends and PC is followed to send,
The timing requirements of custom protocol are substantially met, and support that data source is the mode that user is customized and automatically generates,
Middle user's self-defined pattern is that user is facilitated to combine with other application software, generates more purposive and protocol test,
Protocol architecture figure is as shown in Figure 2;When protocol test agency has content to need to feed back, according to the content of configuration data frame, generate
The protocol contents of corresponding configuration data frame format, and to host feedback configuration condition information.Host, protocol test agency
With the communication process of system under test (SUT) as shown in figure 3, including user configuration stage, data transfer phase and operational order stage,
The middle user configuration stage are as follows: host sends user configuration frame and acts on behalf of to protocol test, and protocol test acts on behalf of feedback configuration situation,
Host sends initiation command;Data transfer phase is to carry out data exchange between protocol test agency and system under test (SUT);Operation
Instruction phase is that host can act on behalf of transmission order to protocol test at any time, between control protocol test agent and system under test (SUT)
Communication process.
The protocol testing method and device of a kind of embedded software proposed by the present invention, wherein protocol test agency uses
Cortex-M4, wherein Cortex-M4 is a kind of single-chip microcontroller model, and the operating system of operation is RTOS, and wherein RTOS is to grasp in real time
Make system, specific steps are as follows:
Step 1: system connection is as shown in Figure 1.Host is connected by coffret with protocol test agency, is assisted
View test agent is connected by bus with system under test (SUT).
Step 2: user fills in the configuration information of test in the client of host, and fills configuration data frame, wherein institute
The frame structure of configuration data frame is stated as shown in Fig. 2, including data frame format configuration, data frame transmission opportunity and data frame source
Information.
Step 3: the configuration data frame is sent to the coffret of host, and is matched by described in by coffret
It sets data frame and is sent to protocol test agency.
Step 4: it after the protocol test agency receives configuration data frame, according to the content of configuration data frame, generates corresponding
Configuration data frame format protocol contents, and to host feedback configuration condition information.
Step 5: host parses configuration state information, if feedback configuration condition information is to configure correct information, uses
Family selects opportunity appropriate to send enabling signal, if feedback configuration condition information is the information of configuration error, user is repeated
User configuration stage of the step 1 to step 3, i.e., in repeatedly Fig. 3.
Step 6: after user sends enabling signal, the protocol contents that step 3 generates are passed through bus by protocol test agency
It is sent to system under test (SUT), and is interacted with system under test (SUT), the data transfer phase in as Fig. 3.
Step 7: during step 5 protocol test agency and system under test (SUT) interact, user can pass through at any time
Host is intervened, for example pause data are sent, and are stopped data and are sent, the operational order stage in as Fig. 3.
Step 8: in step 7, if user select stop data send, host can be according to protocol test feelings
Condition generates protocol test report in the form of html web page, if being sent with data are stopped without selection, protocol test agency will
Continue and system under test (SUT) interacts.
The above described is only a preferred embodiment of the present invention, be not intended to limit the present invention in any form, though
So the present invention has been disclosed as a preferred embodiment, and however, it is not intended to limit the invention, any technology people for being familiar with this profession
Member, without departing from the scope of the present invention, when the technology contents using the disclosure above are modified or are modified
For the equivalent embodiment of equivalent variations, but anything that does not depart from the technical scheme of the invention content, according to the technical essence of the invention
Any simple modification, equivalent change and modification to the above embodiments, all of which are still within the scope of the technical scheme of the invention.
Claims (5)
1. a kind of protocol testing method of embedded software, it is characterised in that the described method includes:
It is acted on behalf of via coffret from host to protocol test and sends configuration data frame, the configuration data frame is for configuring association
Discuss the bus data output format of test agent;
After the configuration data frame that the protocol test proxy resolution receives, via coffret feedback configuration response message to host
Machine, host judge the configuring condition that protocol test is acted on behalf of according to response message;
According to the configuration data frame and in the configuration response message of host and protocol test agency's exchange, protocol test generation
The output frame format of reason configuration bus interface;Frame format based on output, the automatic filling corresponding data of protocol test agency, and lead to
It crosses bus interface and system under test (SUT) carries out data interaction;
Based on the coffret that the host is configured, determine whether the connection of host and protocol test agency are effective, with
And according to identified as a result, the coffret parameter of host is configured, to adapt to the coffret of protocol test agency;
The configuration data frame includes output data frame format, output data frame source and the output number of configuration protocol test agent
According to the transmission opportunity of frame.
2. a kind of protocol testing method of embedded software according to claim 1, it is characterised in that: the output data
Frame source, which is included in, to be automatically generated in protocol test agency and is customized by the user in host.
3. a kind of protocol testing method of embedded software according to claim 1, it is characterised in that: the output data
The transmission opportunity of frame includes regularly sending data frame, sending data frame, response formula transmission data frame at random and follow host
Send data frame.
4. a kind of protocol testing device of embedded software, it is characterised in that described device includes:
Transmission interface unit is configured, the configuration transmission interface unit is to configure the coffret parameter of host, so as to host
The coffret of machine can smoothly transmit data;Configuration data frame unit, the configuration data frame unit are acted on behalf of in protocol test
After starting, the exchange configuration output result between host and protocol test agency;User is according to host and protocol test generation
Exchange configuration exports the transmission opportunity as a result, the bus data frame to determine protocol test agency between reason,
Exchange configuration output result is as follows between host and protocol test agency:
The configuration data frame is sent to the coffret of host, and is sent the configuration data frame by coffret
It is acted on behalf of to protocol test;
After the protocol test agency receives configuration data frame, according to the content of configuration data frame, corresponding configuration data is generated
The protocol contents of frame format, and to host feedback configuration condition information;
Host parses configuration state information, if feedback configuration condition information is to configure correct information, user's selection is appropriate
Opportunity send enabling signal;
After user sends enabling signal, the protocol contents of generation are sent to system under test (SUT) by bus by protocol test agency, and with
System under test (SUT) interacts.
5. a kind of protocol testing device of embedded software, it is characterised in that described device includes:
Transmission interface unit is configured, the configuration transmission interface unit is the coffret parameter of configuration protocol test agent, is made
Data can be sended and received by obtaining protocol test agency;
Output data frame configuration unit, the output data frame configuration unit is after parsing configuration data frame, according to configuration data
The content of frame generates corresponding bus data output frame, specifically: the transmission that the configuration data frame is sent to host is connect
Mouthful, and protocol test agency is sent for the configuration data frame by coffret;
After the protocol test agency receives configuration data frame, according to the content of configuration data frame, corresponding configuration data is generated
The protocol contents of frame format, and to host feedback configuration condition information;
Host parses configuration state information, if feedback configuration condition information is to configure correct information, user's selection is appropriate
Opportunity send enabling signal;
After user sends enabling signal, the protocol contents of generation are sent to system under test (SUT) by bus by protocol test agency, and with
System under test (SUT) interacts.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610262842.3A CN105846973B (en) | 2016-04-25 | 2016-04-25 | A kind of protocol testing method and device of embedded software |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610262842.3A CN105846973B (en) | 2016-04-25 | 2016-04-25 | A kind of protocol testing method and device of embedded software |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105846973A CN105846973A (en) | 2016-08-10 |
CN105846973B true CN105846973B (en) | 2019-05-28 |
Family
ID=56589191
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610262842.3A Active CN105846973B (en) | 2016-04-25 | 2016-04-25 | A kind of protocol testing method and device of embedded software |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105846973B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108614765B (en) * | 2016-12-12 | 2021-07-16 | 中国航空工业集团公司西安航空计算技术研究所 | Method for acquiring embedded software test data in target machine |
CN115296998B (en) * | 2022-07-07 | 2023-08-11 | 珠海格力电器股份有限公司 | Analysis protocol upgrading method and device, electronic equipment and storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101409655A (en) * | 2008-11-12 | 2009-04-15 | 中兴通讯股份有限公司 | Message-driven automation test system and implementing method |
CN101937392B (en) * | 2010-08-27 | 2012-06-20 | 华南理工大学 | Dynamic defect detection system for embedded software |
CN102760062B (en) * | 2012-06-19 | 2015-03-25 | 株洲南车时代电气股份有限公司 | Parameter setting method for embedded software based on rail transit |
KR20140056478A (en) * | 2012-10-26 | 2014-05-12 | 삼성전자주식회사 | Automatic testing apparatus for embedded software, automatic testing method thereof and test scenario composing method |
-
2016
- 2016-04-25 CN CN201610262842.3A patent/CN105846973B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN105846973A (en) | 2016-08-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20140343915A1 (en) | Test environment configuration apparatus and method of operating network simulation apparatus using same | |
CN105450463B (en) | Adjustment method, the device and system of hardware device | |
CN103023708B (en) | The method of testing of communication protocol interface and system | |
CN102695187B (en) | Distributed Web-based device and method for testing 6LoWPAN protocol consistency | |
CN104579822A (en) | Automatic performance test system and method of mobile application based on Http protocol | |
CN106156424B (en) | Simulation system | |
CN107133024A (en) | Business management system based on OSGI frameworks | |
CN105846973B (en) | A kind of protocol testing method and device of embedded software | |
CN103530211A (en) | PCIE loop back self-test method based on UVM platform | |
CN110445635B (en) | Control message sending method and device and bus simulation test system | |
CN108270733A (en) | A kind of method and system for managing smart machine | |
CN110138617A (en) | Data transmission quality test method, system, electronic equipment and storage medium | |
CN103616607A (en) | Test system of valve base electronic equipment for converter valve | |
CN109728943A (en) | Fault simulator and computer interlock CAN bus communication failure test method | |
CN106776329B (en) | The adjustment method and commissioning device of energy accumulation current converter | |
CN110489245B (en) | Remote Procedure Call (RPC) -based fault injection method and system | |
CN104462693A (en) | 1394 link layer transaction-level model built on basis of UVM (universal verification methodology) | |
JP2005536789A (en) | A universal approach to simulate, emulate and test various serial bus types | |
CN103391223B (en) | A kind of IEC101 protocol massages fast automatic detecting method | |
CN103713934A (en) | Method and system for application program visiting physical peripheral | |
Schiller et al. | Emulating vehicular ad hoc networks for evaluation and testing of automotive embedded systems | |
CN104767808B (en) | A kind of WEB Proxy Method based on support AJAX | |
CN111786842B (en) | Data processing method and hardware-in-the-loop test system | |
CN101252598B (en) | Development system and development method of network communication protocol stack | |
Karner et al. | Holistic simulation of flexray networks by using run-time model switching |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |