Test method and device, electronic equipment and storage medium

By parsing the keyword lines in the test description file, the problem of reduced test accuracy caused by verbose command lines is solved, and a more efficient testing process is achieved.

CN121807715APending Publication Date: 2026-04-07HUNAN GOKE MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

The command lines entered in the existing technology are too long, which reduces the accuracy of the test of the application system.

Method used

By acquiring and parsing the test description file corresponding to the test instructions, several keyword lines of data, differentiated by function, are obtained under each module in the chip. Tests are then performed based on this data, avoiding the use of command lines with multiple parameters.

Benefits of technology

It improves the readability of test description files, reduces errors caused by input parameters, improves test accuracy, and enables quick identification of error points and modification of test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807715A_ABST
    Figure CN121807715A_ABST
Patent Text Reader

Abstract

The invention provides a test method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining and analyzing a test description file corresponding to a test instruction in response to the test instruction, and obtaining a plurality of keyword line data which are distinguished according to functions under each module in a chip; and testing according to the plurality of keyword line data under each module to obtain a test result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of testing technology, and in particular to a testing method, apparatus, electronic device, and storage medium. Background Technology

[0002] Each application system under test may require tens of thousands of test cases, and each test case may contain hundreds of input parameters.

[0003] Currently, different parameters can be passed from the command line as input for test cases during testing. However, since the input command line is very long, it is easy to make mistakes in the use of test cases, which in turn reduces the accuracy of the test of the application system under test. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a testing method, apparatus, electronic device, and storage medium to solve the problem that the input command lines in the prior art are very long, which leads to a decrease in the testing accuracy of the application system under test.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] This application provides a testing method, including:

[0007] In response to a test command, the test description file corresponding to the test command is obtained and parsed to obtain several keyword rows of data in each module of the chip, which are distinguished by function.

[0008] Tests were conducted based on the keyword rows of data under each module to obtain test results.

[0009] Optionally, the step of acquiring and parsing the test description file corresponding to the test instruction to obtain several keyword lines of data distinguished by function under each module in the chip includes:

[0010] Obtain and parse the test description file corresponding to the test instruction to obtain the module switch field of each module in the chip and several keyword rows of data under each module;

[0011] The testing based on several keyword rows of data under each module includes:

[0012] Test the target module with the module switch field in each of the modules in the "on" state and the several keyword rows of data under the target module.

[0013] Optionally, the keyword row data under each module includes several keywords under each module and several attribute field values ​​corresponding to each keyword;

[0014] The test, which involves setting the target module to have its module switch field enabled and comparing it with several keyword rows of data within that target module, includes:

[0015] Identify several target modules whose module switch fields are in the on state from each of the aforementioned modules;

[0016] Read the attribute field values ​​corresponding to the keywords under each target module from the keyword row data;

[0017] Configure the attribute field values ​​corresponding to the keywords under each target module as input parameters of the test code, so as to run the test code to test the target module.

[0018] Optionally, after obtaining several keyword rows of data categorized by function under each module in the chip, the method further includes:

[0019] Store the key row data of each module, which is distinguished by function, in a global linked list;

[0020] The step of reading the attribute field values ​​corresponding to the keywords under each target module from the keyword row data; and configuring the attribute field values ​​corresponding to the keywords under each target module as input parameters for the test code includes:

[0021] Register corresponding parameter setting functions for each of the keywords under each target module;

[0022] Execute the parameter setting function corresponding to each keyword to parse the attribute field values ​​corresponding to several keywords under each target module from the global linked list, and configure the corresponding attribute field values ​​as input parameters of the test code according to the corresponding keywords.

[0023] Optionally, in the test description file, the attribute field values ​​corresponding to the keywords are arranged in rows.

[0024] Optionally, the keyword row data further includes keyword annotations, which include several attribute fields corresponding to each keyword according to content relevance, and the attribute fields of the same keyword correspond one-to-one with the values ​​of the attribute fields.

[0025] Optionally, parsing the test description file corresponding to the test instruction to obtain several keyword lines of data differentiated by function under each module in the chip includes:

[0026] The test description file corresponding to the test instruction is parsed to filter out line data containing the target character from the test description file as keyword line data.

[0027] This application provides a testing apparatus, including:

[0028] The processing unit is used to respond to a test instruction, acquire and parse the test description file corresponding to the test instruction, and obtain several keyword rows of data in each module of the chip according to their functions;

[0029] The test unit is used to perform tests based on several keyword row data under each module and obtain test results.

[0030] This application provides an electronic device, which includes a processor and a memory. The memory is used to store program code and data for data generation, and the processor is used to call program instructions in the memory to execute the test method described above.

[0031] This application provides a storage medium including a stored program, wherein the program controls the device where the storage medium is located to perform the test method described above when it is running.

[0032] Based on the testing method, apparatus, electronic device, and storage medium provided in the above embodiments of the present invention, by responding to a test instruction, the test description file corresponding to the test instruction is obtained and parsed to obtain several keyword lines of data under each module of the chip, distinguished by function; tests are performed based on the several keyword lines of data under each module to obtain test results. In the embodiments of the present invention, when a test instruction is received and a test description file corresponding to the test instruction is obtained, and the test description file is further divided into several keyword lines of data distinguished by function according to each module of the chip, thereby using this module-function keyword flattened design in the test description file, with one test case corresponding to one test description file, avoiding the use of command lines with multiple parameters, and making the overall content more concise and focused.

[0033] The advantages of this design are as follows:

[0034] 1) It helps to speed up differentiation and understanding, improving the readability of test description files;

[0035] 2) It greatly reduces the problem of errors caused by a large number of input parameters, improves the accuracy of testing, and makes it easy to trace the source of errors and quickly find the error point;

[0036] 3) It can quickly modify and / or expand test cases.

[0037] Furthermore, the keyword row data includes several keywords and their corresponding attribute fields and values, categorized by content relevance. This allows for the division of modules into keywords based on function, establishing corresponding mapping relationships. Attribute fields with high similarity are designed to share the same keyword. This design approach makes the overall content more concise and focused, improving the correlation between test content and enhancing the clustering of related content. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0039] Figure 1 This is a flowchart illustrating a testing method according to an embodiment of the present invention;

[0040] Figure 2 This is an example diagram of a test description document shown in an embodiment of the present invention;

[0041] Figure 3 This is a schematic diagram illustrating the relationship between the various modules in the chip according to an embodiment of the present invention;

[0042] Figure 4 This is a schematic diagram illustrating the relationship between modules and keywords in an embodiment of the present invention;

[0043] Figure 5 This is a schematic diagram illustrating the relationship between keywords and attribute fields in an embodiment of the present invention;

[0044] Figure 6 This is a schematic diagram of the structure of a testing device according to an embodiment of the present invention. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0047] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0048] See Figure 1 This is a flowchart illustrating a testing method according to an embodiment of the present invention. The method can be applied to microelectronic devices, such as chips, that have at least one application program with a specific function loaded on them, and can also be applied to testing systems including chips. The method includes:

[0049] Step S101: In response to the test command, obtain and parse the test description file corresponding to the test command to obtain several keyword rows of data in each module of the chip, which are distinguished by function;

[0050] Step S102: Test according to the keyword row data under each module to obtain test results.

[0051] In this embodiment of the invention, when a test instruction is received and a test description file corresponding to the test instruction is obtained, the test description file is further divided into several keyword lines of data according to the functions of each module of the chip. This module-function keyword flat design is used in the test description file. One test case corresponds to one test description file, avoiding the use of command lines with multiple parameters. The overall content is more concise and focused, solving the problem that the input command lines in the prior art are very long, which leads to a decrease in the test accuracy of the application system under test.

[0052] The advantages of this design are as follows:

[0053] 1) It helps to speed up differentiation and understanding, improving the readability of test description files;

[0054] 2) It greatly reduces the problem of errors caused by a large number of input parameters, improves the accuracy of testing, and makes it easy to trace the source of errors and quickly find the error point;

[0055] 3) It can quickly modify and / or expand test cases.

[0056] It should be noted that this embodiment can be executed by a chip, which connects to a computer via a development board and a serial port. Furthermore, the computer can also communicate with a server, for example, via the Samba protocol. The server can send test commands, test description files, etc., to the chip. Correspondingly, the test results / data after the chip performs the test can be stored on the server, and the computer can view the relevant test data on the server.

[0057] In the specific implementation process, the chip can receive test instructions issued by the server and obtain or directly receive the test description file corresponding to the test instructions sent by the server. The test description file can be a test case XML file. The test description file can be parsed later to obtain several keyword lines of data under each module in the chip according to their functions, and then use them for testing.

[0058] In some examples, by obtaining and parsing the test description file corresponding to the test instructions, the module switch fields of each module in the chip and several keyword lines of data under each module can be obtained. That is to say, in addition to several keyword lines of data under each module that are distinguished by function, the test description file also includes the module switch fields of each module.

[0059] It should be noted that each chip includes multiple functional modules, for example, it may include 15 modules in total, such as module1, module2, ..., module15. Figure 3 As shown.

[0060] Please refer to the following: Figure 2 The test description file includes a module switch list (i.e., the module switch field section) and a keyword row data section, where the module switch list corresponds to... Figure 3 The system has 15 functional modules, and the module switch field of each module indicates the switch status of the corresponding module, which can be used for targeted testing according to different switch statuses.

[0061] Correspondingly, the testing process in step S102 above may include:

[0062] Test the target module with the module switch field in each of the modules in the "on" state and the several keyword rows of data under the target module.

[0063] It should be noted that this solution introduces the concepts of module switches and module switch fields for each module. For example, if a test case does not need to include a certain module, then the switch field of that module in the corresponding test description file is in the off state, for example, the switch field is 0. In this case, the input parameters and other contents of the related module with a switch field of 0 will be ignored during testing. If a certain module needs to be included, then the switch field of that module in the test description file is in the on state, for example, the switch field is 1.

[0064] This embodiment sets a switch field and uses only a few keyword rows of data under the target module in the on state to test the target module in the on state. It can perform targeted testing of the target module under a structured approach, which facilitates the rapid construction of test cases and test description files.

[0065] In some embodiments, the keyword row data under each module may include several keywords under each module and several attribute field values ​​corresponding to each keyword.

[0066] like Figure 2 As shown, the test description file includes a module switch list and a keyword row data section. The module switch list includes module switch fields, and the keyword row data section also includes keywords, corresponding attribute field values, and field comments.

[0067] Each keyword row occupies two rows, containing the keyword and its attribute fields. Specifically, one row is a keyword comment, which includes several attribute fields corresponding to each keyword. The attribute fields for the same keyword are categorized according to content relevance. The keyword comment section fully explains the meaning of each attribute field.

[0068] A line represents a keyword and the specific values ​​of several attribute fields belonging to that keyword, i.e., attribute field values. It should be noted that there is a one-to-one correspondence between the various attribute fields and their values ​​for the same keyword. Adding attribute field comments to the numerous attributes of a keyword and mapping them to their values ​​improves the readability of the test description file.

[0069] The above implementation of the process of testing the target module with the module switch field in each of the modules in the "on" state and several keyword rows of data under the target module includes the following steps.

[0070] Step S11: Determine a number of target modules from each of the modules whose module switch fields are in the on state;

[0071] Step S12: Read the attribute field values ​​corresponding to the keywords under each target module from the keyword row data;

[0072] Step S13: Configure the attribute field values ​​corresponding to the keywords under each target module as input parameters of the test code, so as to run the test code to test the target module.

[0073] When implementing the above scheme, the module switch fields of each module can be obtained and parsed from the test description file first. Based on the determined module switch fields that are in the "on" state, several modules whose module switch fields are in the "on" state are identified from the various modules of the chip, and these are designated as several target modules. This yields a list of target modules in the "on" state among the various modules in the chip. Then, several keyword lines of data for the target modules are parsed from the test description file.

[0074] Correspondingly, when designing test cases, several keywords can be designed according to different modules of the chip, and these keywords can be further decomposed into several attribute fields. The keywords, their corresponding attribute fields, and their values ​​are arranged in rows, thus forming the keyword row data.

[0075] In the test description file, the attribute fields corresponding to the keywords are arranged in rows, and the attribute field values ​​corresponding to the keywords are also arranged in rows. See [link / reference] Figure 2 The attribute fields and attribute field values ​​corresponding to the same keyword are arranged in adjacent rows, and the attribute fields and attribute field values ​​correspond one by one.

[0076] In the example above, by arranging several keywords and their attribute field values ​​in rows, the thousands of input parameters in the test case can be divided into several rows of keywords. Each keyword corresponds to several attribute fields with highly related meanings. These attribute fields correspond to different input parameters, which makes it easy to distinguish and understand. The overall test description file is concise and focused, which can solve the problem of long input lines in related technologies that are not intuitive and prone to errors. It can also accurately distinguish different parameters and facilitate modification and expansion.

[0077] It should be noted that in some examples, the attribute fields in the keyword comments may not need to be configured in the test description file. This is mainly because the mapping relationship between modules and keywords, as well as the mapping relationship between each keyword and its subordinate attribute fields, are already defined in the test code or test program. Only the keywords and their corresponding attribute field values ​​need to be configured in the test description file, and these attribute field values ​​should be arranged in the order of the mapping relationship. Then, each attribute field value will be configured sequentially to its corresponding different API interface to achieve input parameter configuration.

[0078] To further illustrate the use and structure of the test description document of this application, the following description is provided in conjunction with the accompanying drawings.

[0079] In this plan, such as Figure 3 and Figure 4 As shown, where Figure 4 for Figure 3 The eight keywords corresponding to the target module module1 are m1_keyword1, m1_keyword2, m1_keyword3, m1_keyword4, m1_keyword5, m1_keyword6, m1_keyword7, and m1_keyword8.

[0080] Please refer to the following: Figure 4 , Figure 5 and combined Figure 2 ,like Figure 5 As shown, it illustrates Figure 4 The keyword m1_keyword1 has eight specific attribute fields: m1_keyword1_param_1, m1_keyword1_param_2, m1_keyword1_param_3, m1_keyword1_param_4, m1_keyword1_param_5, m1_keyword1_param_6, m1_keyword1_param_7, and m1_keyword1_param_8.

[0081] exist Figure 2 The text shows the row-arranged 8 attribute fields corresponding to the keywords m1_keyword1 and m1_keyword2, including the values ​​of the 8 attribute fields under the keyword m1_keyword1 and the keyword comments, and the values ​​of the 8 attribute fields under the keyword m1_keyword2 and the keyword comments.

[0082] It should be noted that each module is divided into 8 keywords based on functional relevance, and each keyword contains 8 attribute fields with different meanings. Thus, this product feature can be decomposed into 15 * 8 * 8 = 960 attribute fields, each with a different meaning, and different values ​​represent different test cases.

[0083] For example, if a target module is a video acquisition module (VI module), its corresponding keywords could be video acquisition device keywords (VI_DEV), video PIPE keywords (VI_PIPE), video processing group (VIPROC_GRP), video processing channel keywords (VIPROC_CHN), etc.

[0084] The video acquisition device keyword VI_DEV contains attribute fields such as dev_id (vi device number), port_en (whether the video device is enabled), sensor_type (if a MIPI type sensor is connected, it indicates which type of image sensor is used), pipe0 (vi pipe0 number used), and pipe1 (if vi pipe1 is used, it indicates pipe1 number).

[0085] In addition, combined Figure 2 As can be seen, this application sets a switch field for each module in each test description file (corresponding to each test case). When the switch field value of a module is 1, it means that the keyword corresponding to the module needs to be configured, and 0 means that the keyword corresponding to the module does not need to be configured. Modules that are not configured are not used in this test case.

[0086] It should be noted that for modules with an actual switch field value of 1, certain keywords may not be configured, and certain fields of keywords may also be omitted. For unconfigured attribute fields, the program will set a default value based on other configured attribute fields and the purpose of the test case itself. In other words, if a test case uses a module that does not use a certain sub-function, the corresponding keyword does not need to be included in the keyword section of the test description file, thus enabling keyword selection and configuration.

[0087] In summary, this application, by defining certain rules for configuration and parsing, can fully meet the needs of having many input parameters, clear meanings for each parameter, and low error rate in configuration. This configuration scheme for switch modules and keywords can also achieve automatic generation of test description files, helping to improve test execution efficiency.

[0088] After obtaining the attribute field values ​​corresponding to the keywords under each target module, the system can be started to initialize each module or target module. Then, the parsed attribute field values ​​are configured as input parameters for the test code into the corresponding API interface of each module, thereby executing the business logic and starting the test. Subsequently, the chip test results can be obtained from the server via a computer.

[0089] Optionally, several target modules can be deinitialized before or after testing.

[0090] In some examples, the step S12 above, which involves reading the attribute field values ​​corresponding to the keywords under each target module from the keyword row data, may include:

[0091] Register corresponding parameter setting functions for each of the keywords under each target module;

[0092] Execute the parameter setting function corresponding to each keyword to parse the attribute field values ​​corresponding to several keywords under each target module from the global linked list, and configure the corresponding attribute field values ​​as input parameters of the test code according to the corresponding keywords.

[0093] In this example, after obtaining and parsing the module switch lines of the test description file to get the module switch list, only the target modules that are in the enabled state can be recorded. Then, when reading the keyword line data, the keywords and their corresponding attribute field values ​​can be parsed, and both the keywords and attribute field values ​​can be stored in a global linked list. That is, several keyword line data under each module, distinguished by function, can be stored in a global linked list.

[0094] When subsequently reading the attribute field values ​​corresponding to the keywords under each target module from the keyword row data, corresponding parameter setting functions can be registered for each keyword under each target module.

[0095] After the parameter setting function corresponding to each keyword is registered, the parameter setting function corresponding to each keyword can be executed to parse the attribute field values ​​corresponding to several keywords under each target module from the global linked list, and configure the corresponding attribute field values ​​in the corresponding global variables according to the keyword to which the attribute field belongs, as input parameters for the test code.

[0096] This embodiment, by registering and executing parameter setting functions corresponding to each keyword, combined with the mapping relationship between the keywords defined in the test program / test code and their subordinate attribute fields, as well as the mapping relationship between the target module and each keyword, can realize the rapid configuration of input parameters in the current test environment, and is compatible with the flat structure of module-keyword-attribute field / attribute field value in the test description file.

[0097] In some embodiments, when parsing the test description file corresponding to the test instruction, lines containing the target character can be selected from the test description file as keyword lines. That is, lines that do not contain the target character are not considered keyword lines.

[0098] The target character mentioned above can be "=", for example, see Figure 2 The system can parse the keyword before the "=" sign and store it together with the content after the "=" sign in the global linked list mentioned above. Lines that do not contain the "=" sign, such as blank lines or lines that begin with "#", are considered invalid lines and are not used as the basis for reading keyword line data.

[0099] In these examples, target characters were used to filter keyword line data, enabling rapid reading of relevant content within the test description file.

[0100] Based on the above, the present invention has implemented the illustrated test method. Correspondingly, the embodiments of the present invention also illustrate a schematic diagram of the modular structure of a test device, as shown below. Figure 6 As shown, the device includes:

[0101] The processing unit 601 is used to respond to a test instruction, acquire and parse the test description file corresponding to the test instruction, and obtain several keyword rows of data in each module of the chip according to their functions;

[0102] Test unit 602 is used to perform tests based on several keyword row data under each module and obtain test results.

[0103] The specific principles and execution processes of each unit in the testing device disclosed in the above embodiments of the present invention are the same as the corresponding contents in the testing method provided in the above embodiments of the present invention. Please refer to the corresponding parts in the testing method disclosed in the above embodiments of the present invention, and they will not be repeated here.

[0104] Optionally, based on the testing apparatus shown in the above embodiments of the present invention, the processing unit 601 is specifically used for:

[0105] Obtain and parse the test description file corresponding to the test instruction to obtain the module switch field of each module in the chip and several keyword rows of data under each module;

[0106] Accordingly, test unit 602 is specifically used for:

[0107] Test the target module with the module switch field in each of the modules in the "on" state and the several keyword rows of data under the target module.

[0108] Optionally, based on the testing apparatus shown in the above embodiments of the present invention, the keyword row data under each module includes several keywords under each module and several attribute field values ​​corresponding to the several keywords respectively;

[0109] The test unit 602, which tests the target module based on the target module having its module switch field in the enabled state and several keyword rows of data under the target module, is specifically used for:

[0110] Identify several target modules whose module switch fields are in the on state from each of the aforementioned modules;

[0111] Read the attribute field values ​​corresponding to the keywords under each target module from the keyword row data;

[0112] Configure the attribute field values ​​corresponding to the keywords under each target module as input parameters of the test code, so as to run the test code to test the target module.

[0113] Optionally, based on the testing apparatus shown in the above embodiments of the present invention, after obtaining several keyword rows of data differentiated by function under each module in the chip, the processing unit 601 further includes:

[0114] Store the key row data of each module, which is distinguished by function, in a global linked list;

[0115] Accordingly, the processing unit 601 is specifically used for:

[0116] Register corresponding parameter setting functions for each of the keywords under each target module;

[0117] Execute the parameter setting function corresponding to each keyword to parse the attribute field values ​​corresponding to several keywords under each target module from the global linked list, and configure the corresponding attribute field values ​​as input parameters of the test code according to the corresponding keywords.

[0118] Optionally, based on the testing apparatus shown in the above embodiments of the present invention, in the test description file, the attribute field values ​​corresponding to the several keywords are arranged in rows.

[0119] Optionally, the keyword row data also includes keyword annotations, which include several attribute fields corresponding to each keyword according to content relevance, and the attribute fields of the same keyword correspond one-to-one with the values ​​of the attribute fields.

[0120] Optionally, based on the testing apparatus shown in the above embodiments of the present invention, the processing unit 601, which parses the test description file corresponding to the test instruction to obtain a plurality of keyword line data distinguished by function under each module in the chip, is specifically used for:

[0121] The test description file corresponding to the test instruction is parsed to filter out line data containing the target character from the test description file as keyword line data.

[0122] This application provides an electronic device, which includes a processor and a memory. The memory is used to store test program code and data, and the processor is used to call program instructions in the memory to execute the steps shown in the test method in the above embodiments.

[0123] This invention provides a storage medium, namely a computer-readable storage medium, which includes the electronic device provided in the above-described embodiments of this application. The electronic device is used to execute the test method disclosed in the embodiments of this application.

[0124] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0125] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0126] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A testing method, characterized in that, Applied to a chip, the method includes: In response to a test command, the test description file corresponding to the test command is obtained and parsed to obtain several keyword rows of data in each module of the chip, which are distinguished by function. Tests were conducted based on the keyword rows of data under each module to obtain test results.

2. The method according to claim 1, characterized in that, The process of acquiring and parsing the test description file corresponding to the test instructions yields several keyword lines of data categorized by function under each module in the chip, including: Obtain and parse the test description file corresponding to the test instruction to obtain the module switch field of each module in the chip and several keyword rows of data under each module; The testing based on several keyword rows of data under each module includes: Test the target module with the module switch field in each of the modules in the "on" state and the several keyword rows of data under the target module.

3. The method according to claim 2, characterized in that, The keyword row data under each module includes several keywords under each module and several attribute field values ​​corresponding to each keyword; The test, which involves setting the target module to have its module switch field enabled and comparing it with several keyword rows of data within that target module, includes: Identify several target modules whose module switch fields are in the on state from each of the aforementioned modules; Read the attribute field values ​​corresponding to the keywords under each target module from the keyword row data; Configure the attribute field values ​​corresponding to the keywords under each target module as input parameters of the test code, so as to run the test code to test the target module.

4. The method according to claim 3, characterized in that, After obtaining the keyword row data of each module in the chip according to its function, the method further includes: Store the key row data of each module, which is distinguished by function, in a global linked list; The step of reading the attribute field values ​​corresponding to the keywords under each target module from the keyword row data; and configuring the attribute field values ​​corresponding to the keywords under each target module as input parameters for the test code includes: Register corresponding parameter setting functions for each of the keywords under each target module; Execute the parameter setting function corresponding to each keyword to parse the attribute field values ​​corresponding to several keywords under each target module from the global linked list, and configure the corresponding attribute field values ​​as input parameters of the test code according to the corresponding keywords.

5. The method according to claim 3, characterized in that, In the test description file, the attribute field values ​​corresponding to the keywords are arranged in rows.

6. The method according to claim 5, characterized in that, The keyword row data also includes keyword annotations, which include several attribute fields corresponding to each keyword according to content relevance. The attribute fields of the same keyword correspond one-to-one with the values ​​of the attribute fields.

7. The method according to claim 1, characterized in that, The process of parsing the test description file corresponding to the test instructions yields several keyword lines of data categorized by function under each module in the chip, including: The test description file corresponding to the test instruction is parsed to filter out line data containing the target character from the test description file as keyword line data.

8. A testing apparatus, characterized in that, include: The processing unit is used to respond to a test instruction, acquire and parse the test description file corresponding to the test instruction, and obtain several keyword rows of data in each module of the chip according to their functions; The test unit is used to perform tests based on several keyword row data under each module and obtain test results.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory being used to store program code and data for data generation, and the processor being used to call program instructions in the memory to execute the test method as described in any one of claims 1-7.

10. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to perform the test method as described in any one of claims 1-7.