Test case generation method and equipment

By decoding and converting the air-interface message code stream into a TTCN-3 language template, combined with interface modification and generation modules, the problem of difficulty in writing TTCN-3 templates in the existing technology is solved, and the writing efficiency of protocol test cases is improved.

CN120455340APending Publication Date: 2025-08-08DATANG LINKTESTER TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410170533.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-06
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the prior art, when writing protocol test cases using TTCN-3 templates, it is difficult and has low writing efficiency, especially for those who are not familiar with TTCN-3 syntax.

Method used

Provide a test case generation device and method, decode the air-interface message code stream through the code stream analysis module, generate a structure tree, and convert it into a template recognized by TTCN-3 language. The display module modifys the template parameters on the interface, and uses the use case generation module to generate protocol test cases.

Benefits of technology

It simplifies message processing methods, reduces the difficulty of writing protocol test cases, and improves writing efficiency. Users can directly read and modify template parameters through the interface to generate protocol test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455340A_ABST
    Figure CN120455340A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a test case generation method and device.The test case generation device comprises a code stream analysis module, a display module and a case generation device.The code stream analysis module is used for decoding an air interface message code stream to obtain a structure tree; converting the air interface message code stream from a structure tree into a template identified by a TTCN3 language of a third version of a test and test control representation method; the display module is used for displaying the template in a display area and receiving input operation, and the input operation is used for modifying parameters in the template to obtain a modified template; and the case generation module is used for generating a protocol test case according to the modified template. According to the embodiment of the invention, the compiling difficulty of the protocol test case can be reduced, and the compiling efficiency of the protocol test case is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of wireless communication technology, and in particular to a test case generation method and device. Background Art

[0002] Protocol conformance testing typically uses the 3rd Generation Partnership Project (3GPP) Radio Access Network (RAN) 5 test scripts, primarily written using the Testing and Test Control Notation Version 3 (TTCN-3) syntax. TTCN-3 templates are special data structures used to carry sent messages and match received messages during protocol conformance testing. 3GPP currently assembles a complete message by calling multiple templates, then sending the complete message through a port.

[0003] In the prior art, the message content needs to be delivered in the form of a template, which is difficult for people who are not familiar with TTCN3 syntax to understand, resulting in great difficulty and low efficiency in writing use cases. Summary of the Invention

[0004] The embodiments of the present application provide a test case generation method and device to solve the problems of difficulty and low efficiency in writing test cases in the prior art.

[0005] In a first aspect, an embodiment of the present application provides a test case generation device, comprising: a code stream parsing module, a display module, and a test case generation module, wherein:

[0006] The code stream parsing module is used to decode the air interface message code stream to obtain a structure tree; convert the air interface message code stream from the structure tree into a template recognized by the Test and Test Control Notation (TTCN3) language;

[0007] The display module is used to display the template in a display area and receive input operations, wherein the input operations are used to modify parameters in the template to obtain a modified template;

[0008] The use case generation module is used to generate a protocol test case according to the modified template.

[0009] In a second aspect, an embodiment of the present application provides a test case generation method, the method comprising:

[0010] Calling the code stream parsing module to decode the air interface message code stream to obtain a structure tree;

[0011] Converting the air interface message code stream from a structure tree into a template recognized by the TTCN3 language;

[0012] In response to an input operation, modifying parameters in the template on the display area to obtain a modified template;

[0013] The use case generation module is called to generate a protocol test case according to the modified template.

[0014] In some embodiments, according to a test case generation method of an embodiment of the present application, an initial value of at least one tree node in the structure tree is determined by a parameter value corresponding to the air interface message code stream.

[0015] In some embodiments, according to a test case generation method according to an embodiment of the present application, the method further includes:

[0016] The structure tree is displayed in the display area, and different tree nodes correspond to different parameters of the protocol test case.

[0017] In some embodiments, according to a test case generation method according to an embodiment of the present application, the method further includes:

[0018] According to the selection operation, the message type of the air interface message code stream is determined; the message type includes at least one of a system information block SIB message, a radio resource control RRC message, and a non-access stratum NAS message.

[0019] In some embodiments, according to a test case generation method according to an embodiment of the present application, the method further includes:

[0020] When the message type of the air interface message code stream is a SIB message or an RRC message, an ASN.1 encoding and decoding tool is called to parse the air interface message code stream into an ASN.1 hierarchical structure format; and the ASN.1 hierarchical structure format is converted into a template recognized by the TTCN3 language.

[0021] In some embodiments, according to a test case generation method according to an embodiment of the present application, the method further includes:

[0022] When the message type of the air interface message code stream is a SIB message, presenting the configurable content in the air interface message code stream in the form of a first default value through a template recognized by the TTCN3 language according to a first protocol rule corresponding to the SIB message;

[0023] Alternatively, when the message type of the air interface message code stream is an RRC message, according to the second protocol rule corresponding to the RRC message, the configurable content in the air interface message code stream is presented in the form of a second default value through the template recognized by the TTCN3 language.

[0024] In some embodiments, according to a test case generation method according to an embodiment of the present application, the method further includes:

[0025] In the case where there are multiple NAS message templates, the multiple NAS message templates are included in the RRC message template; or, different NAS message templates are displayed at the same level.

[0026] In a third aspect, an embodiment of the present application further provides a test case generation device, including a memory, a transceiver, and a processor, wherein:

[0027] A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations:

[0028] Call the code stream parsing module to decode the air interface message code stream to obtain a structure tree;

[0029] Converting the air interface message code stream from a structure tree into a template recognized by the TTCN3 language;

[0030] In response to an input operation, modifying parameters in the template on the display area to obtain a modified template;

[0031] The use case generation module is called to generate a protocol test case according to the modified template.

[0032] In some embodiments, an initial value of at least one tree node in the structure tree is determined by a parameter value corresponding to the air interface message code stream.

[0033] In some embodiments, the operations further include:

[0034] The structure tree is displayed in the display area, and different tree nodes correspond to different parameters of the protocol test case.

[0035] In some embodiments, the operations further include:

[0036] According to the selection operation, the message type of the air interface message code stream is determined; the message type includes at least one of a system information block SIB message, a radio resource control RRC message, and a non-access stratum NAS message.

[0037] In some embodiments, the operations further include:

[0038] When the message type of the air interface message code stream is a SIB message or an RRC message, an ASN.1 encoding and decoding tool is called to parse the air interface message code stream into an ASN.1 hierarchical structure format; and the ASN.1 hierarchical structure format is converted into a template recognized by the TTCN3 language.

[0039] In some embodiments, the operations further include:

[0040] When the message type of the air interface message code stream is a SIB message, presenting the configurable content in the air interface message code stream in the form of a first default value through a template recognized by the TTCN3 language according to a first protocol rule corresponding to the SIB message;

[0041] Alternatively, when the message type of the air interface message code stream is an RRC message, according to the second protocol rule corresponding to the RRC message, the configurable content in the air interface message code stream is presented in the form of a second default value through the template recognized by the TTCN3 language.

[0042] In some embodiments, the operations further include:

[0043] In the case where there are multiple NAS message templates, the multiple NAS message templates are included in the RRC message template; or, different NAS message templates are displayed at the same level.

[0044] In a fourth aspect, an embodiment of the present application further provides a non-transitory readable storage medium, wherein the non-transitory readable storage medium stores a computer program, and the computer program is used to enable a processor to execute the test case generation method described in the second aspect above.

[0045] In a fifth aspect, an embodiment of the present application further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the steps of the test case generation method described in the second aspect above.

[0046] In a sixth aspect, an embodiment of the present application further provides a chip product, wherein a computer program is stored in the chip product, and the computer program is used to enable the chip product to execute the test case generation method described in the second aspect above.

[0047] The test case generation method and device provided in the embodiments of the present application input an air interface message code stream and call a code stream parsing module to decode the air interface message code stream to obtain a structure tree. The user can directly read the message content through the interface without having to fill in each IE one by one, which can simplify the message processing method. The air interface message code stream is then converted from the structure tree into a template recognized by the TTCN3 language. In response to the input operation, the parameters in the template are modified in the display area to obtain the modified template; the use case generation module is called to generate a protocol test case based on the modified template, thereby reducing the difficulty of writing protocol test cases and improving the efficiency of writing protocol test cases. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0049] Figure 1 This is one of the structural diagrams of the test case generation device provided in the embodiment of the present application;

[0050] Figure 2 This is a flow chart of a test case generation method provided in an embodiment of the present application;

[0051] Figure 3 This is a schematic diagram of the code stream input provided by an embodiment of the present application;

[0052] Figure 4 This is a schematic diagram of test case generation and message sending and receiving provided in an embodiment of the present application;

[0053] Figure 5 This is a schematic diagram of the principle of the code stream parsing module provided in an embodiment of the present application;

[0054] Figure 6 Schematic diagram of a NAS message presentation method provided in an embodiment of the present application;

[0055] Figure 7 This is the second structural diagram of the test case generation device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0056] In the embodiments of this application, the term "and / or" describes the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0057] In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.

[0058] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0059] The embodiments of the present application provide a test case generation method and device, which can reduce the difficulty of writing protocol test cases and improve the efficiency of writing protocol test cases.

[0060] Among them, the method and the device are based on the same application concept. Since the principles of solving problems by the method and the device are similar, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.

[0061] The technical solutions provided in the embodiments of the present application can be applicable to a variety of systems, such as 5G systems or 6G systems. For example, applicable systems may be global system of mobile communication (GSM) systems, code division multiple access (CDMA) systems, wideband code division multiple access (WCDMA) general packet radio service (GPRS) systems, long term evolution (LTE) systems, LTE frequency division duplex (FDD) systems, LTE time division duplex (TDD) systems, long term evolution advanced (LTE-A) systems, universal mobile telecommunication systems (UMTS), worldwide interoperability for microwave access (WiMAX) systems, 5G new air interface (NR) systems, etc. These various systems include terminal devices and network devices. The system may also include a core network part, such as an evolved packet system (EPS), a 5G system (5GS), etc.

[0062] Figure 1 This is one of the structural diagrams of the test case generation device provided in the embodiment of the present application, such as Figure 1 As shown, the test case generation device includes: a code stream parsing module 101, a display module 102 and a test case generation module 103, wherein:

[0063] The code stream parsing module 101 is used to decode the air interface message code stream to obtain a structure tree; convert the air interface message code stream from the structure tree into a template recognized by the Test and Test Control Notation (TTCN3) language;

[0064] The display module 102 is used to display the template in a display area and receive input operations, wherein the input operations are used to modify parameters in the template to obtain a modified template;

[0065] The use case generation module 103 is used to generate a protocol test case according to the modified template.

[0066] The test case generation device provided in the embodiment of the present application inputs an air interface message code stream and calls a code stream parsing module to decode the air interface message code stream to obtain a structure tree. The user can directly read the message content through the interface without having to fill in each IE one by one, which can simplify the message processing method. The air interface message code stream is then converted from the structure tree into a template recognized by the TTCN3 language. In response to the input operation, the parameters in the template are modified in the display area to obtain the modified template; the use case generation module is called to generate a protocol test case according to the modified template, thereby reducing the difficulty of writing protocol test cases and improving the efficiency of writing protocol test cases.

[0067] In some embodiments, an initial value of at least one tree node in the structure tree is determined by a parameter value corresponding to the air interface message code stream.

[0068] Figure 2 This is a flow chart of a test case generation method provided by an embodiment of the present application, which is applied to a test case generation device, such as Figure 2 As shown, the method includes steps 201 to 204, wherein:

[0069] Step 201: Call the code stream parsing module to decode the air interface message code stream to obtain a structure tree.

[0070] It should be noted that the message type corresponding to the air interface message code stream is the same as the message type of the protocol test case. For example, the code stream parsing module is called to decode the air interface message code stream input by the user to obtain a visual structure tree. The structure tree here refers to the tree structure of Abstract Syntax Notation One (ASN.1). The root node of the structure tree is the air interface message name, and each child node is obtained by disassembling the air interface message structure. The code stream parsing module decodes the air interface message code stream based on the ASN.1 document and code stream editing rules. The ASN.1 document is used to convert the air interface message structure into the ASN.1 structure.

[0071] Optionally, a structure tree is displayed in the display area, with different tree nodes corresponding to different parameters of the protocol test case. The initial value of at least one tree node in the structure tree is determined by the parameter value corresponding to the air interface message code stream. Users can directly read the message content through the interface without having to fill in each IE, which simplifies message processing.

[0072] Step 202: Convert the air interface message code stream from the structure tree into a template recognized by the TTCN3 language.

[0073] The template recognized by the TTCN-3 language is a special data structure used to carry sent messages and match received messages in protocol conformance testing.

[0074] For example, an object-oriented programming language (Csharp) module is called to convert the air interface message code stream from a structure tree into a template recognized by the TTCN language.

[0075] Step 203: In response to the input operation, modify the parameters in the template in the display area to obtain a modified template.

[0076] Step 204: Call the use case generation module to generate a protocol test case according to the modified template.

[0077] Specifically, the modified template is used to generate a test body, which is the main part of the test case and can include multiple steps. The use case generation module is called to construct a protocol test case based on the test body, completing the use case writing.

[0078] In the test case generation method provided in the embodiment of the present application, an air interface message code stream is input, and a code stream parsing module is called to decode the air interface message code stream to obtain a structure tree. The user can directly read the message content through the interface without the user having to fill in each IE one by one, which can simplify the message processing method. The air interface message code stream is then converted from the structure tree into a template recognized by the TTCN3 language. In response to the input operation, the parameters in the template are modified in the display area to obtain the modified template; the use case generation module is called to generate a protocol test case according to the modified template, thereby reducing the difficulty of writing protocol test cases and improving the efficiency of writing protocol test cases.

[0079] Optionally, according to the selection operation, the message type of the air interface message code stream is determined; the message type includes at least one of a system information block (SIB) message, a radio resource control (RRC) message and a non-access stratum (NAS) message.

[0080] Optionally, when the message type of the air interface message code stream is a SIB message or an RRC message, an ASN.1 encoding and decoding tool is called to parse the air interface message code stream into an ASN.1 hierarchical structure format; and the ASN.1 hierarchical structure format is converted into a template recognized by the TTCN3 language.

[0081] Optionally, in the case where the message type of the air interface message code stream is a SIB message, according to the first protocol rule corresponding to the SIB message, the configurable content in the air interface message code stream is presented in the form of a first default value through a template identified by the TTCN3 language. Here, the SIB message takes SIB1 as an example, and the first protocol rule is, for example, the structure definition content recorded in Chapter 6 of the 3GPP 5G standard protocol TS 38.331. The template will present the configurable content of SIB1 in the form of the default value agreed in Chapter 4.6 of the protocol TS38.508-1 in accordance with the structure definition content of the protocol TS 38.331, and the user can modify and fill in the corresponding configuration parameters as needed.

[0082] Alternatively, when the message type of the air interface message code stream is an RRC message, the configurable content in the air interface message code stream is presented as a second default value using a template identified by the TTCN3 language according to a second protocol rule corresponding to the RRC message. The second protocol rule corresponding to the RRC message herein is, for example, the structure definition content described in Section 6 of the 3GPP 5G standard protocol TS 38.331. The template presents the RRC configurable content as the default value specified in Section 4.6 of the protocol TS 38.508-1 according to the structure definition content of the protocol TS 38.331, and the user can modify and fill in the corresponding configuration parameters as needed.

[0083] Optionally, in the case where there are multiple NAS message templates, the multiple NAS message templates are included in the RRC message template; or, different NAS message templates are displayed at the same level.

[0084] In this application, the test case generation device supports two input methods: code stream and template. A template is a template supported (recognized) by TTCN3 syntax, such as a TTCN3 code template. The template input parameters are control elements configured in the SDT interface. The template is filled in with the input parameters to generate the corresponding TTCN3 code. The template is pre-acquired. The content of the air interface message is input in both code stream and template modes and can be presented in the display area. Figure 3 is a schematic diagram of the code stream input provided by the embodiment of the present application, Figure 4 This is a schematic diagram of test case generation and message sending and receiving provided by the embodiment of the present application, such as Figure 3 and Figure 4 As shown, for code stream input, the message content is entered through the interface. The background tool will obtain the interface value, automatically generate code that complies with the TTCN-3 specification, and finally encapsulate and send the message according to the specification. This application mainly introduces code stream input.

[0085] (1) The display area of the test case generator, also known as the script editing area. Here, users edit the test case flow and message content in the script editing area through the interface. The test case generator generates TTCN code from the message content by calling other modules and saves it as an executable file.

[0086] (2) Air interface message input.

[0087] In the script editing area, users select the air interface message input box and configure SIB messages, RRC messages, or NAS messages as needed. There are two configuration methods: template input, which allows users to directly view the message structure and parameters. However, the large number of information elements (IEs) required to be filled in can be time-consuming for users unfamiliar with the protocol. Stream input: In this interface module, users enter the corresponding message stream and click the decode button to display a visual structure tree, showing the parameters required for the test case.

[0088] (3) The code stream parsing module, also known as the code stream conversion tool, is used to convert the code stream into a template. The code stream conversion tool includes RRC code stream and NAS code stream parsing functions, and finally parses the code stream into a template format. The RRC code stream uses open source tools (OSS) (ASN.1 encoding and decoding tools) to parse the code stream into the ASN.1 hierarchical structure format, and then uses the object-oriented programming language (Csharp) to convert it into the template used by the TTCN language.

[0089] In the existing technology, NAS code streams are generally parsed by calling external functions, which requires manual coding and line-by-line adaptation, making the operation complex. To address this problem, this application uses a code stream conversion tool to convert the code stream into a template form and fill it into the test case body, thereby improving the efficiency of use case writing.

[0090] Figure 5 This is a schematic diagram of the principle of the code stream parsing module provided in the embodiment of the present application. Figure 5 As shown in the figure. For NAS stream conversion process:

[0091] a. Obtain NAS stream: Obtain the message stream from the live network or log. This stream can be obtained from the terminal or instrument monitoring tool. The obtained stream will be used in step e.

[0092] b. Create an ASN.1 file: Refer to 5G protocol 25.501 and convert the NAS message structure defined by 3GPP into the corresponding ASN.1 definition structure using the spreadsheet editing tool Excel according to the rules defined by the ASN.1 syntax, and generate the corresponding document.

[0093] c. Add rules and grammar: According to the protocol specification, define the encoding and decoding rules of the bitstream for the characteristic structure type. For example:

[0094] Syntax: sign ""

[0095] This syntax is used to mark a leaf node and add a code to the leaf node. The code is lowercase English letters. Among them, t and l are only used when the leaf node belongs to the iei or iel attribute but the name is not iei or iel.

[0096] This tag is auxiliary information and is used in subsequent execution of other grammars. After completing the parsing at this level, this information can be discarded.

[0097] Syntax: Format()

[0098] This syntax is used to indicate whether the iei and iel types appear in the current node structure. Format(t) indicates that iei appears but iel does not appear. Format(l) indicates that iei does not appear but iel appears. Format(tl) indicates that both appear.

[0099] This information can be discarded after the current structure has finished parsing.

[0100] Syntax: Choice(XXXX), ChoiceId"XXXX"O, ChoiceId"XXXX"B (XXXX is the option value, "XXXX"O is the hexadecimal option ID, and "XXXX"B is the binary option ID).

[0101] This syntax is used to determine the selection result of an option, and the selection result is determined by whether the option value is equal to the option ID.

[0102] d. Csharp encoding and decoding module: Import the ASN.1 document generated in step b into the Csharp software, then define the interface file based on the newly added encoding and decoding rules and syntax, develop the corresponding implementation code, and encapsulate it into a code stream encoding and decoding module, which can be called on other tools or software.

[0103] e. Generate a structure tree: Enter the code stream obtained in step a in the script editing area, call the Csharp encoding and decoding module, and use the decoding function to output the ASN.1 structure tree.

[0104] f. Convert to template: Call the Csharp conversion module to convert the structure tree into a template recognized by the TTCN language.

[0105] g. Embed use cases: By calling the SDT background code writing module, fill the template into the use case test body, construct the test case, and complete the use case writing.

[0106] (4) Template input.

[0107] The template carries the content of the air interface message and has a complex structure. It is processed according to the following three categories:

[0108] (a) SIB message. Taking SIB1 as an example, the template will present the configurable content of SIB1 as default values in accordance with the provisions of the 38.331 protocol. Users can modify and fill in the corresponding configuration parameters according to their needs.

[0109] (b) RRC message. Taking LTE RRC Reconfiguration as an example, the template will present the configurable content as default values in accordance with the provisions of the 36.331 protocol, so that users can intuitively see the configurable IE.

[0110] (c) NAS messages are divided into two scenarios, in which multiple NAS message templates will appear. Figure 6 This is a schematic diagram of a NAS message presentation method provided in an embodiment of the present application, such as Figure 6 This application designs the NAS message presentation method as a template for multiple NAS messages to be displayed at the same level, and users can adjust it according to their needs:

[0111] Scenario 1: The NAS message is included in the RRC message.

[0112] Scenario 2: The NAS message is included in the NAS message.

[0113] (5) Use case generation module, also known as the background code generation tool. The use case generation module obtains the modified template from the display area, saves it, and automatically encapsulates it according to the TTCN-3 format to generate the corresponding SIB message, RRC message, or NAS message.

[0114] (6)Message sending.

[0115] Send the message according to the TTCN-3 format and the configured time.

[0116] The test case generation method provided in the embodiments of this application can be used in protocol testing, simplifying message processing and reducing the difficulty of test case writing. By writing TTCN-3-style test cases, a user interface can be displayed and streamed, invoking the stream parsing module to convert NAS streams. This allows for direct reading of message content through the interface and streamed input. This provides increased flexibility and simplifies the test case writing process, making it easier to get started.

[0117] Figure 7 This is the second structural diagram of the test case generation device provided in the embodiment of the present application, such as Figure 7 As shown, the test case generation device includes a memory 720, a transceiver 700, and a processor 710, wherein:

[0118] The memory 720 is used to store computer programs; the transceiver 700 is used to send and receive data under the control of the processor 710; the processor 710 is used to read the computer program in the memory 720 and perform the following operations:

[0119] Call the code stream parsing module to decode the air interface message code stream to obtain a structure tree;

[0120] Converting the air interface message code stream from a structure tree into a template recognized by the TTCN3 language;

[0121] In response to an input operation, modifying parameters in the template on the display area to obtain a modified template;

[0122] The use case generation module is called to generate a protocol test case according to the modified template.

[0123] Specifically, the transceiver 700 is configured to receive and send data under the control of the processor 710 .

[0124] Among them, Figure 7 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 710 and memory represented by memory 720. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are all well known in the art and, therefore, will not be described further herein. The bus interface provides an interface. The transceiver 700 may be a plurality of components, i.e., a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, such as a wireless channel, a wired channel, an optical cable, and the like. The processor 710 is responsible for managing the bus architecture and general processing, and the memory 720 may store data used by the processor 710 when performing operations.

[0125] The processor 710 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or a complex programmable logic device (CPLD). The processor may also adopt a multi-core architecture.

[0126] Optionally, an initial value of at least one tree node in the structure tree is determined by a parameter value corresponding to the air interface message code stream.

[0127] Optionally, the operation further includes:

[0128] The structure tree is displayed in the display area, and different tree nodes correspond to different parameters of the protocol test case.

[0129] Optionally, the operation further includes:

[0130] According to the selection operation, the message type of the air interface message code stream is determined; the message type includes at least one of a system information block SIB message, a radio resource control RRC message, and a non-access stratum NAS message.

[0131] Optionally, the operation further includes:

[0132] When the message type of the air interface message code stream is a SIB message or an RRC message, an ASN.1 encoding and decoding tool is called to parse the air interface message code stream into an ASN.1 hierarchical structure format; and the ASN.1 hierarchical structure format is converted into a template recognized by the TTCN3 language.

[0133] Optionally, the operation further includes:

[0134] When the message type of the air interface message code stream is a SIB message, presenting the configurable content in the air interface message code stream in the form of a first default value through a template recognized by the TTCN3 language according to a first protocol rule corresponding to the SIB message;

[0135] Alternatively, when the message type of the air interface message code stream is an RRC message, according to the second protocol rule corresponding to the RRC message, the configurable content in the air interface message code stream is presented in the form of a second default value through the template recognized by the TTCN3 language.

[0136] Optionally, the operation further includes:

[0137] In the case where there are multiple NAS message templates, the multiple NAS message templates are included in the RRC message template; or, different NAS message templates are displayed at the same level.

[0138] It should be noted here that the above-mentioned test case generation device provided in the embodiment of the present application can implement all the method steps implemented by the method embodiment in which the execution subject is the test case generation device, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.

[0139] The present application also provides a test case generation device that can reduce the difficulty of writing protocol test cases and improve the efficiency of writing protocol test cases. It is understandable that the methods and devices provided in the various embodiments of the present application are based on the same application concept. Since the methods and devices solve the problems based on similar principles, the implementation of the devices and methods can refer to each other, and the repeated parts will not be repeated.

[0140] It should be noted that the division of units / modules in the above-mentioned embodiments of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods. In addition, the functional units in the various embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units.

[0141] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0142] In some embodiments, a non-transitory readable storage medium is further provided, wherein the non-transitory readable storage medium stores a computer program, and the computer program is used to enable a processor to execute the test case generation method provided by the above-mentioned method embodiments.

[0143] Specifically, the above-mentioned non-transitory readable storage medium provided in the embodiment of the present application can implement all the method steps implemented by the above-mentioned method embodiments, and can achieve the same technical effects. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.

[0144] It should be noted that the non-transitory readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NAND FLASH), solid-state drives (SSDs)), etc.

[0145] In some embodiments, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a computer program, and the computer program is used to enable a computer to execute the test case generation method provided by the above-mentioned execution subject of each method embodiment of the test case generation device.

[0146] Specifically, the above-mentioned computer-readable storage medium provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned method embodiments, and can achieve the same technical effects. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.

[0147] In some embodiments, a chip product is further provided, in which a computer program is stored. The computer program is used to enable the chip product to execute the test case generation method provided by the above-mentioned method embodiments.

[0148] Specifically, the above-mentioned chip product provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned method embodiments, and can achieve the same technical effects. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.

[0149] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) that contain computer-usable program code.

[0150] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0151] These processor-executable instructions may also be stored in a processor-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor-readable memory produce an article of manufacture comprising an instruction device that implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0152] These processor-executable instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0153] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A test case generation device, characterized in that: include: Stream parsing module, display module and use case generation module, including: The code stream parsing module is used to decode the air interface message code stream to obtain a structure tree; convert the air interface message code stream from the structure tree into a template recognized by the Test and Test Control Notation (TTCN3) language; The display module is used to display the template in a display area and receive input operations, wherein the input operations are used to modify parameters in the template to obtain a modified template; The use case generation module is used to generate a protocol test case according to the modified template.

2. A test case generation method, characterized in that: Applied to the test case generation device according to claim 1, the method comprises: Calling the code stream parsing module to decode the air interface message code stream to obtain a structure tree; Converting the air interface message code stream from a structure tree into a template recognized by the TTCN3 language; In response to an input operation, modifying parameters in the template on the display area to obtain a modified template; The use case generation module is called to generate a protocol test case according to the modified template.

3. The test case generation method according to claim 2, characterized in that: The initial value of at least one tree node in the structure tree is determined by the parameter value corresponding to the air interface message code stream.

4. The test case generation method according to claim 2 or 3, characterized in that: The method further comprises: The structure tree is displayed in the display area, and different tree nodes correspond to different parameters of the protocol test case.

5. The test case generation method according to claim 2, wherein: The method further comprises: According to the selection operation, the message type of the air interface message code stream is determined; the message type includes at least one of a system information block SIB message, a radio resource control RRC message, and a non-access stratum NAS message.

6. The test case generation method according to claim 5, characterized in that: The method further comprises: When the message type of the air interface message code stream is a SIB message or an RRC message, an ASN.1 encoding and decoding tool is called to parse the air interface message code stream into an ASN.1 hierarchical structure format; and the ASN.1 hierarchical structure format is converted into a template recognized by the TTCN3 language.

7. The test case generation method according to claim 5, characterized in that: The method further comprises: When the message type of the air interface message code stream is a SIB message, presenting the configurable content in the air interface message code stream in the form of a first default value through a template recognized by the TTCN3 language according to a first protocol rule corresponding to the SIB message; Alternatively, when the message type of the air interface message code stream is an RRC message, according to the second protocol rule corresponding to the RRC message, the configurable content in the air interface message code stream is presented in the form of a second default value through the template recognized by the TTCN3 language.

8. The test case generation method according to claim 5, characterized in that: The method further comprises: In the case where there are multiple NAS message templates, the multiple NAS message templates are included in the RRC message template; or, different NAS message templates are displayed at the same level.

9. A test case generation device, characterized in that: including memory, transceiver and processor; The memory is used to store a computer program; the transceiver is used to send and receive data under the control of the processor; and the processor is used to read the computer program in the memory and perform the following operations: Call the code stream parsing module to decode the air interface message code stream to obtain a structure tree; Converting the air interface message code stream from a structure tree into a template recognized by the TTCN3 language; In response to an input operation, modifying parameters in the template on the display area to obtain a modified template; The use case generation module is called to generate a protocol test case according to the modified template.

10. A non-transitory readable storage medium, characterized in that The non-transitory readable storage medium stores a computer program, and the computer program is used to enable a processor to execute the test case generation method according to any one of claims 2 to 8.