CN115543852A - Automatic test method for embedded system - Google Patents

Automatic test method for embedded system Download PDF

Info

Publication number
CN115543852A
CN115543852A CN202211401562.8A CN202211401562A CN115543852A CN 115543852 A CN115543852 A CN 115543852A CN 202211401562 A CN202211401562 A CN 202211401562A CN 115543852 A CN115543852 A CN 115543852A
Authority
CN
China
Prior art keywords
protocol
segment
etl
attribute
description file
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
Application number
CN202211401562.8A
Other languages
Chinese (zh)
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.)
Kaiyun Lianchuang Beijing Technology Co ltd
Original Assignee
Kaiyun Lianchuang Beijing Technology 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 Kaiyun Lianchuang Beijing Technology Co ltd filed Critical Kaiyun Lianchuang Beijing Technology Co ltd
Priority to CN202211401562.8A priority Critical patent/CN115543852A/en
Publication of CN115543852A publication Critical patent/CN115543852A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)

Abstract

The invention relates to the technical field of automatic testing, and discloses an automatic testing method of an embedded system, which comprises the following steps: compiling an etl description file through a human-computer interaction interface; registering the etl description file to an ETestID process module; sending the test data to an ETestID process module, wherein the ETestID process module processes the test data according to the data format of the communication protocol described in the etl description file; the ETestID process module issues the processed test data to an actuator; and the executor uploads the test result back to the human-computer interaction interface in the data execution process. Compared with the prior art, the method uses the etl description file to replace the WORD form description file in the automatic test process of the embedded system, and the protocol segment array is specified in the etl file description, and the length of the protocol segment array is expressed in a mode of protocol segment reference or calculation expression, so that the protocol analysis of the variable field length is realized, and the definition of the communication protocol is more sufficient and flexible.

Description

Automatic test method for embedded system
Technical Field
The invention relates to the technical field of automatic testing, in particular to an automatic testing method of an embedded system.
Background
Currently, in the process of using an ETest platform for embedded testing, interactive data needs to follow a corresponding communication protocol, and description of the communication protocol in the current embedded testing process generally uses a word file type description mode, that is, a mode shown in a following table describes the protocol in a word file.
In the manner of WORD file, the data format of the communication protocol is defined, including the contents of field format, parameter format, byte number, etc. However, in the WORD file description mode, the field length is usually fixed, and for a complex communication protocol with variable field length, the WORD file cannot be well described.
Disclosure of Invention
The present invention is directed to overcoming one or more of the problems set forth above and to providing an automatic testing method for an embedded system.
In order to achieve the above object, the present invention provides an automatic testing method for an embedded system, comprising:
s1, compiling an etl description file through a human-computer interaction interface, wherein the etl description file is used for describing a data format of a communication protocol of an embedded test; wherein, a protocol segment array is specified in the etl description file, and the length of the protocol segment array is expressed as a protocol segment reference or a calculation expression;
s2, registering the etl description file to an ETestID process module;
s3, sending the test data to an ETestID process module, wherein the ETestID process module processes the test data according to the data format of the communication protocol described in the etl description file;
s4, the ETestID process module issues the processed test data to an actuator;
and S5, the executor uploads a test result back to the human-computer interaction interface in the data execution process.
According to an aspect of the present invention, in the etl description file, the described sub-element types include:
segment protocol segment is the minimum unit inside the protocol and is composed of the name of the protocol segment and the attribute of the protocol segment;
segments protocol group, which is a collection of several protocols and is composed of protocol group name and sublevel protocol segment; and oneof protocol branch for dynamically judging the analysis path, which is composed of judgment condition and branch protocol.
According to one aspect of the invention, the oneof protocol branches are dynamically parsed using a where conditional statement, and define aliases for the branches using as keywords; the branch alias is only used in the result description information of packing and unpacking without changing the reference mode of the protocol segment so as to describe the branch used during unpacking and packing; when the calculation result of the wyen judgment condition is true, the analyzer enters the branch for analysis, and other branches are ignored; when the result of the calculation of the while judgment condition is false, the branch is skipped and the judgment of the next branch condition is continued.
According to an aspect of the present invention, a protocol segment reference is also defined in the etl description file, and when a protocol segment attribute is assigned, the other protocol segment is referenced by using this.
According to an aspect of the present invention, the etl description file further specifies a protocol segment array, where the length of the protocol segment array is expressed as a protocol segment reference or a computational expression, and specifically includes using a segment protocol segment or segment protocol set setting array, and the array length value is a protocol segment reference or a computational expression.
According to one aspect of the invention, the etl description file specifies a protocol built-in function, which is used for dynamically calculating or calling a built-in algorithm when defining a protocol, and the built-in function comprises:
the ByteSize function receives a protocol segment reference and returns the byte length of the protocol segment, and the ByteSize can only receive the protocol segment of a whole byte;
a CheckCode function for calculating a check value; receiving 3 parameters, wherein the two parameters after the check function, the check start protocol section and the check end protocol section are optional parameters in sequence, and three assignment modes are provided from the first protocol section of the protocol to the first parameter after the previous protocol section of the check field is ended by default: built-in check function names, user-defined check function names or CRC algorithm description modes.
According to one aspect of the present invention, the etl description file defines a parsing attribute parser for describing a parsing manner of a protocol segment, and there are two assignment manners: parsing a string or custom parsing an object.
According to one aspect of the invention, the etl description file specifies the automatic value attribute, when the message data is packed, if the value of the corresponding protocol segment is null, the parser automatically uses the automatic value attribute to pack, and if the corresponding protocol segment has been assigned the automatic value attribute, the parser ignores the automatic value attribute.
According to one aspect of the invention, a character string attribute is specified in the etl description file, and the character string attribute must be set to one of the following: a length attribute for setting the byte length of the string type protocol segment; an endswitch end symbol attribute for setting an end symbol of a string type protocol segment.
According to an aspect of the invention, when the length attribute and the endswitch terminator attribute are set simultaneously, only the length attribute is valid, and the endswitch attribute is ignored by the parser.
According to one aspect of the invention, an additional attribute option is defined in the etl description file, and the additional attribute option is composed of a plurality of key value pairs and is used for describing protocol additional attributes, and the additional attribute option comprises:
the minimum value min is the minimum value of the protocol section and is used for automatically verifying the analysis result;
the maximum value max is the maximum value of the protocol section and is used for automatically verifying the analysis result;
categorizing catalog, a category of protocol segment, for provision to an automation utility;
precision, the numerical precision of the protocol segment, for use by the automation utility;
automatically matching match, wherein the protocol section must accord with expression rule, which is used to search matched data from data flow before protocol analysis;
and automatically verifying valid, namely an expression rule which the protocol section should accord with, and automatically verifying validity after the protocol analysis is completed.
Based on this, the beneficial effects of the invention are:
the invention uses the etl description file to replace the WORD form description file in the automatic test process of the embedded system, and the protocol segment array is specified in the etl file description, and the length of the protocol segment array is expressed as the protocol segment reference or the calculation expression, thereby realizing the protocol analysis of the variable field length and ensuring that the definition of the communication protocol is more sufficient and flexible.
Drawings
FIG. 1 is a flow chart schematically illustrating an automatic test system for embedded systems according to the present invention;
fig. 2 schematically shows a flow chart of an automatic testing method of an embedded system according to the present invention.
Detailed Description
The present invention will now be discussed with reference to exemplary embodiments, it being understood that the embodiments discussed are only for the purpose of enabling a person of ordinary skill in the art to better understand and thus implement the contents of the present invention, and do not imply any limitation on the scope of the present invention.
As used herein, the term "include" and its variants are to be read as open-ended terms meaning "including, but not limited to. The term "based on" is to be read as "based, at least in part, on" and the terms "one embodiment" and "an embodiment" are to be read as "at least one embodiment".
As shown in fig. 1, the embodiment discloses an automatic test system for an embedded system, which includes a human-computer interaction interface 101, an ETestID process module 102, and an executor 103.
As shown in fig. 2, the embodiment discloses an automatic testing method for an embedded system, which specifically includes:
s1, compiling an etl description file through a human-computer interaction interface 101, wherein the etl description file is used for describing a data format of a communication protocol of an embedded test; wherein, a protocol segment array is specified in the etl description file, and the length of the protocol segment array is expressed as a protocol segment reference or a calculation expression;
s2, registering the etl description file to an ETestID process module 102;
s3, sending the test data to the ETestID process module 102, wherein the ETestID process module 102 processes the test data according to the data format of the communication protocol described in the etl description file;
s4, the ETestID process module 102 issues the processed test data to an actuator 103;
and S5, the executor 103 uploads the test result back to the human-computer interaction interface 101 in the data execution process.
Wherein, in the etl description file, the described sub-element types include:
the segment protocol segment is the minimum unit of composition inside the protocol and is composed of the name of the protocol segment and the attribute of the protocol segment.
The segments protocol group is a collection of a plurality of protocols and is composed of protocol group names and sub-level protocol segments.
The oneof protocol branch is used for dynamically judging the analysis path and is composed of a judgment condition and a branch protocol.
Example (c):
protocol prot_name {
segment msg_type { parser: 'uint8',autovalue: 0}
segments point {
segment x_number_data {parser: 'uint16 > ! ',autovalue: 0}
segment y_number_data {parser: 'uint16 < ! ',autovalue: 0}
}
oneof {
when(this.msg_type == 1) as alias1:
segment len {parser:'uint32',autovalue: 0}
when(this.msg_type == 2) as alias2:
segment len {parser:'uint16',autovalue: 0}
}
}
the etl description file also defines:
protocol segment reference: when the attribute of the protocol segment is assigned, the method of this.seg _ name can be used for referring to other protocol segments; when a protocol segment reference is used in a computational expression, it is equivalent to using the value of the corresponding protocol segment.
The protocol embeds functions: the protocol built-in function is used for dynamically calculating or calling a built-in algorithm when a protocol is defined, and comprises the following steps:
the ByteSize function, which receives a protocol segment reference and returns the byte length of the protocol segment, can only receive a whole byte of the protocol segment.
A CheckCode function for calculating a check value; receiving 3 parameters, wherein the two parameters after the check function, the check start protocol section and the check end protocol section are optional parameters in sequence, and three assignment modes are provided from the first protocol section of the protocol to the first parameter after the previous protocol section of the check field is ended by default: built-in check function names, user-defined check function names or CRC algorithm description modes. The CRC algorithm is described using an array, where the first 3 values of the array are numbers, the last 2 values are boolean values, and the numbers are sequentially [ polynomial value, CRC initial value, result xor value, whether to invert input, whether to invert output ].
Example (c):
protocol prot {
segment seg_begin { parser: 'uint16',autovalue: 0}
segment data { parser: 'uint16',autovalue: 0}
segment seg_end { parser: 'uint16',autovalue: 0}
segment seg_crc1 {
parser: 'uint16',
autovalue: CheckCode([0x04C11DB7,0xFFFF,0xFFFF,true,true],this.seg_begin,this.seg_end)
}
segment seg_crc2 {
parser: 'uin32',
autovalue: CheckCode(CRC_32,this.seg_begin)
}
}
empty communication protocol segment: a protocol segment may describe only a name without any attributes, called a null protocol segment.
The null protocol segment is used primarily to identify the byte stream location, and will be ignored when parsing.
Communication protocol segment: the protocol segment uses a type key segment, and the internal constituent element is the attribute setting of the protocol segment.
Analyzing the attribute: the resolution attribute parser is used for describing the resolution mode of the protocol segment, and has two assignment modes: parsing a string or custom parsing an object.
The parsing string is composed of a combination of the following keywords:
data type: int1 to int64, uint1 to uint64, float, double, string;
big end sequence (>): the high byte of data is stored in the low address of the memory, and the low byte of data is stored in the high address of the memory;
small endian (<): the high byte of data is stored in the high address of the memory, and the low byte of data is stored in the low address of the memory;
original (=): converting an integer into binary, namely the original code (the first bit is the sign bit 0 which represents a positive number, and 1 which represents a negative number);
anticode (|): the inverse code of the positive number is the original code; the negative code is obtained by inverting each bit except the sign bit in the original code;
complement (&): the complement of the positive number is the original code; the inverse +1 of the negative number is the complement;
note: other options than the data type must be described; the default is to use little endian, complement.
Example (c):
protocol prot_1 {
segment segment_data_1 { parser: 'uint2' ,autovalue: 0}
segment segment_data_2 { parser: 'uint20' ,autovalue: 0}
segment segment_data_3 { parser: 'uint10' ,autovalue: 0}
segment segment_data_4 { parser: 'float > !' ,autovalue: 0}
}
the custom analysis object comprises two attributes of pack and unpack, and the two attributes are respectively used for specifying a user-defined packing function name and unpacking function name.
Example (c):
protocol prot_1 {
segment seg_1 {parser: { pack: MyPackFn,unpack: MyUnpackFn }}
}
automatic value attribute: when the message data is packed, if the value of the corresponding protocol segment is null, the parser automatically uses the autovalue attribute value for packing. If the corresponding protocol segment has been assigned, the attribute is ignored by the parser.
The autovalue attribute value may be set to a constant, an array, a protocol segment reference, a built-in function call, or a computational expression.
Character string attributes: the string protocol segment must set one of the following attributes:
a length attribute for setting the byte length of a string type protocol segment;
an endswitch end symbol attribute for setting an end symbol of a string type protocol segment;
for the endswitch attribute, note that: the ending symbol can be automatically added during packing, and the ending symbol can be automatically deleted during unpacking.
When the two attributes are set simultaneously, only the length attribute is valid, and the endswitch attribute is ignored by the parser.
Additional attributes: the option attribute value is composed of a plurality of key value pairs and is used for describing protocol additional attributes, and the option attribute value comprises the following components:
the minimum value min is the minimum value of the protocol section and is used for automatically verifying the analysis result;
maximum max, maximum of protocol segment, for automatic verification of analytic result;
categorizing catalog, a category of protocol segment, for provision to an automation utility;
precision, the numerical precision of the protocol segment, for provision to an automation utility;
automatically matching match, the expression rule that the protocol section must conform to, is used for searching the matched data from the data stream before the protocol analysis begins;
automatically verifying valid, namely automatically verifying validity after the protocol analysis is finished and the expression rule which the protocol section should accord with;
example (c):
protocol prot_1 {
segment cmd {parser: 'uint8',autovalue: 0,option: {
match: 'value > 1',
valid: 'value == 1',
catalog: 'Baotou',
min: 4,
max: 23,
precision: 4,
enumeration: '10,12',
},
}
protocol group: the protocol suite uses type key segments. The protocol suite is used to group multiple protocol segments together and uses the same parent name. The protocol groups can be used in a multi-layer nesting mode, and can also be set to be array types.
Example (c):
protocol prot_1 {
segment HEADER { parser: 'uint16',autovalue: 0x55AA }
segments POS[100] {
segment X { parser: 'float' }
segment Y { parser: 'float' }
}
}
protocol branching: the type key word of the protocol group is oneof, a where conditional statement is used for dynamic analysis, and an as key word is used for defining an alias for the branch; the branch alias is only used in the result description information of the packing and unpacking without changing the reference mode of the protocol segment so as to describe the branch used in the unpacking and packing.
When the calculation result of the wyen judgment condition is true, the analyzer enters the branch for analysis, and other branches are ignored; when the result of the calculation of the while judgment condition is false, the branch is skipped and the judgment of the next branch condition is continued.
Example (c):
protocol prot_oneof {
segment type1 { parser: 'int8',autovalue: 0 }
segment type2 { parser: 'int8',autovalue: this.type1*2 }
oneof {
when(this.type1 == 2) as pro_alias_type1_equal_two:
segment x { parser: 'float' }
segment y { parser: 'float' }
when(this.type1 == 3) as pro_alias_type1_equal_three:
segment x { parser: 'float' }
segment y { parser: 'float' }
segment z { parser: 'float' }
}
oneof {
when(this.type2 <= 2) as pro_alias_type2_less_two:
segment x1 { parser: 'float',autovalue: 9.8 }
when(this.type2==2*this.type1)as pro_alias_type2_equal_doubleType1:
segment x2 { parser: 'double' }
}
segment tail { parser: 'int8',autovalue: 2*(1+this.type1)}
}
array of protocol segments [ ]
An array is set using segment protocol segments or segment protocol groups, followed by [ ] to identify the array, with the length of the array in parentheses, and the length value being a protocol segment reference or a computational expression.
Protocol segment reference example:
protocol prot_1 {
segment seg { parser: 'int32',autovalue: ByteSize(this.seg_arr) }
segment seg_arr[this.seg] { parser: 'uint8' }
}
the reference of the protocol segment, that is, the length of the protocol segment, can be set to be indefinite, the number of bytes of the seg protocol segment is obtained, and the protocol analysis of the variable field length is realized.
Example of computational expressions:
protocol prot_1 {
segment seg { parser: 'int32',autovalue: ByteSize(this.seg_arr) }
segment seg_arr[this.seg-3] { parser: 'uint8' }
}
the calculation expression can be added on the basis of the protocol segment reference, the protocol analysis of the length of the variable field is realized, and the definition of the communication protocol is more sufficient and flexible.
In the check function, SUM _8 represents 8-bit check, XOR _8 represents 8-bit XOR value, SUM _16 represents 16-bit checksum, big byte precedes, big byte succeeds, SUM _16 \\ FALSE represents 16-bit checksum, big byte precedes, XOR _16 succeeds, XOR _16 represents 16-bit XOR value, big byte precedes, XOR _16 \\ FALSE represents 16-bit XOR value, big byte precedes, low byte succeeds, SUM _32 represents 32-bit checksum, big byte precedes, SUM _32 \\ FALSE represents 32-bit checksum, big byte succeeds, XOR _32 represents 32-bit checksum, big byte precedes, XOR _32 succeeds, XOR _32 represents 32-bit XOR value, big byte precedes and big byte succeeds.
Based on the method, the method has the advantages that the etl description file is used for replacing the WORD form description file in the automatic test process of the embedded system, the protocol segment array is specified in the etl file description, and the length of the protocol segment array is expressed in a mode of protocol segment reference or calculation expression, so that the protocol analysis of the length of the variable field is realized, and the definition of the communication protocol is more sufficient and flexible.
Those of ordinary skill in the art will appreciate that the modules and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and devices may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one position, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, each functional module in the embodiments of the present invention may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method for transmitting/receiving the power saving signal according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.
It should be understood that, the serial numbers of the steps in the summary and the embodiments of the present invention do not absolutely imply the sequence of execution, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

Claims (11)

1. An automatic test method for an embedded system comprises the following steps:
s1, compiling an etl description file through a human-computer interaction interface, wherein the etl description file is used for describing a data format of a communication protocol of an embedded test; wherein, a protocol segment array is specified in the etl description file, and the length of the protocol segment array is expressed as a protocol segment reference or a calculation expression;
s2, registering the etl description file to an ETestID process module;
s3, sending the test data to an ETestID process module, wherein the ETestID process module processes the test data according to the data format of the communication protocol described in the etl description file;
s4, the ETestID process module issues the processed test data to an actuator;
and S5, the executor uploads a test result back to the human-computer interaction interface in the data execution process.
2. The embedded system automatic test method of claim 1, wherein in the etl description file, the described sub-element types comprise:
segment protocol segment is the minimum unit inside the protocol and is composed of the name of the protocol segment and the attribute of the protocol segment;
segments protocol group, which is the collection of several protocols and is composed of protocol group name and sublevel protocol segment; and an oneof protocol branch for dynamically judging the analysis path, which is composed of a judgment condition and a branch protocol.
3. The embedded system automatic test method of claim 2, wherein the oneof protocol branches are dynamically parsed using a where conditional statement and alias for the branches are defined using as keywords; the branch alias is only used in the result description information of packing and unpacking without changing the reference mode of the protocol segment so as to describe the branch used during unpacking and packing; when the calculation result of the wyen judgment condition is true, the analyzer enters the branch for analysis, and other branches are ignored; when the result of the calculation of the while judgment condition is false, the branch is skipped and the judgment of the next branch condition is continued.
4. The embedded system automatic test method of claim 3, wherein the etl description file further defines protocol segment references, and the protocol segment attributes are assigned using this.
5. The method for automatically testing an embedded system according to claim 4, wherein the etl description file further specifies a protocol segment array, the length of the protocol segment array is expressed as a protocol segment reference or a computational expression, specifically including setting an array using a segment protocol segment or a segments protocol group, and the array length value is a protocol segment reference or a computational expression.
6. The embedded system automatic test method of claim 2, wherein the etl description file specifies protocol built-in functions, the protocol built-in functions are used for dynamically calculating or calling built-in algorithms when a protocol is defined, and the built-in functions comprise:
the ByteSize function receives a protocol segment reference and returns the byte length of the protocol segment, and the ByteSize can only receive the protocol segment of a whole byte;
a CheckCode function for calculating a check value; receiving 3 parameters, wherein the two parameters after the check function, the check start protocol section and the check end protocol section are optional parameters in sequence, and three assignment modes are provided from the first protocol section of the protocol to the first parameter after the previous protocol section of the check field is ended by default: built-in check function names, user-defined check function names or CRC algorithm description modes.
7. The embedded system automatic test method of claim 2, wherein the etl description file specifies a parsing attribute parser for describing a parsing manner of the protocol segment, and there are two assignment manners: parsing a string or custom parsing an object.
8. The automatic test method of embedded system according to claim 2, wherein the etl description file specifies auto value attribute auto value, when the message data is packed, if the value of the corresponding protocol segment is null, the parser automatically uses the auto value attribute to pack, and if the corresponding protocol segment has assigned the auto value attribute auto value, the auto value attribute is ignored by the parser.
9. The automatic test method for embedded system according to claim 2, wherein the etl description file specifies the character string attribute, and the character string attribute must set one of the following: a length attribute for setting the byte length of the string type protocol segment; an endswitch end symbol attribute for setting an end symbol of a string type protocol segment.
10. The embedded system automatic test method according to claim 9, wherein when the length attribute and the endswitch terminator attribute are set simultaneously, only the length attribute is valid, and the endswitch attribute is ignored by a parser.
11. The embedded system automatic test method of claim 10, wherein the etl description file specifies an additional attribute option, which is composed of a plurality of key value pairs, for describing the protocol additional attribute, the additional attribute option includes:
the minimum value min is the minimum value of the protocol section and is used for automatically verifying the analysis result;
the maximum value max is the maximum value of the protocol section and is used for automatically verifying the analysis result;
categorizing catalog, a category of protocol segment, for provision to an automation utility;
precision, the numerical precision of the protocol segment, for use by the automation utility;
automatically matching match, wherein the protocol section must accord with expression rule, which is used to search matched data from data flow before protocol analysis;
and automatically verifying valid, namely automatically verifying the expression rule which the protocol section should accord with after the protocol is analyzed, and automatically verifying the validity.
CN202211401562.8A 2022-11-10 2022-11-10 Automatic test method for embedded system Pending CN115543852A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211401562.8A CN115543852A (en) 2022-11-10 2022-11-10 Automatic test method for embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211401562.8A CN115543852A (en) 2022-11-10 2022-11-10 Automatic test method for embedded system

Publications (1)

Publication Number Publication Date
CN115543852A true CN115543852A (en) 2022-12-30

Family

ID=84720953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211401562.8A Pending CN115543852A (en) 2022-11-10 2022-11-10 Automatic test method for embedded system

Country Status (1)

Country Link
CN (1) CN115543852A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100251224A1 (en) * 2009-03-27 2010-09-30 Cheriton David R Interpreter-based program language translator using embedded interpreter types and variables
CN113238936A (en) * 2021-05-11 2021-08-10 中国船舶重工集团公司第七0九研究所 Extensible universal embedded software communication interface testing method and device
CN113468057A (en) * 2021-07-07 2021-10-01 凯云联创(北京)科技有限公司 Method for automatically generating test case based on business process model
CN113992514A (en) * 2021-12-29 2022-01-28 北京万维盈创科技发展有限公司 Method for rapidly realizing data acquisition instrument protocol by zero code and data acquisition instrument terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100251224A1 (en) * 2009-03-27 2010-09-30 Cheriton David R Interpreter-based program language translator using embedded interpreter types and variables
CN113238936A (en) * 2021-05-11 2021-08-10 中国船舶重工集团公司第七0九研究所 Extensible universal embedded software communication interface testing method and device
CN113468057A (en) * 2021-07-07 2021-10-01 凯云联创(北京)科技有限公司 Method for automatically generating test case based on business process model
CN113992514A (en) * 2021-12-29 2022-01-28 北京万维盈创科技发展有限公司 Method for rapidly realizing data acquisition instrument protocol by zero code and data acquisition instrument terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WEIXIN_45013592: "嵌入式系统测试工具——ETest", 《HTTPS://BLOG.CSDN.NET/WEIXIN_45013592/ARTICLE/DETAILS/114992253》 *
凯云科技: "ETestDev API 参考手册", 《HTTPS://GITEE.COM/KIYUN/ETEST-DEV2-RELEASE/COMMITS/DEFF8B446874A1A6D9CD9FC488B10557FEA8B7EC/DOCUMENTS/API参考手册V3.PDF》 *

Similar Documents

Publication Publication Date Title
CN109768970B (en) Configurable universal protocol generation method
WO2022126966A1 (en) Interface parameter verification and conversion method and apparatus, and device and storage medium
CN102098131B (en) Dynamic parameter configuration-based general framing and de-framing method for serial port data frames
CN106970820B (en) Code storage method and code storage device
CN111209004B (en) Code conversion method and device
US10666718B2 (en) Dynamic data transport between enterprise and business computing systems
CN110445860B (en) Message sending method, device, terminal equipment and storage medium
CN108881251B (en) System and method for access analysis and standardization of any binary equipment
JP5377818B2 (en) Method and system for sequentially accessing a compiled schema
CN111354099B (en) Data processing method, data processing device and diagnostic equipment
JP5044942B2 (en) System and method for determining acceptance status in document analysis
US20080313291A1 (en) Method and apparatus for encoding data
CN114331416A (en) Data processing method and device, electronic equipment and storage medium
JP5044943B2 (en) Method and system for high-speed encoding of data documents
CN115543852A (en) Automatic test method for embedded system
CN110347567B (en) Binary data log analysis method and system based on protocol matching
CN110381056B (en) Netty-based private protocol coding and decoding method and apparatus
CN116996601A (en) Message format conversion method and device, electronic equipment and storage medium
CN110839022A (en) Vehicle-mounted control software communication protocol analysis method based on xml language
CN114416776A (en) Data self-defined query statistical method
CN111711605B (en) Data protocol active analysis method for Internet of things platform
CN112148694B (en) Data compression method and data decompression method for electronic equipment and electronic equipment
JP2006221655A (en) Method and system for compiling schema
CN113742294A (en) Method, system, device and medium for decoding ASN.1-PER signaling message
CN116016296B (en) Binary data processing method, system and equipment based on JSON

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20221230