[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN118550784A - Automatic test case integration method and device and case test method and device - Google Patents

Automatic test case integration method and device and case test method and device Download PDF

Info

Publication number
CN118550784A
CN118550784A CN202410718920.0A CN202410718920A CN118550784A CN 118550784 A CN118550784 A CN 118550784A CN 202410718920 A CN202410718920 A CN 202410718920A CN 118550784 A CN118550784 A CN 118550784A
Authority
CN
China
Prior art keywords
test
test case
class
file
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410718920.0A
Other languages
Chinese (zh)
Inventor
许强
曾昭贵
姚香君
罗迪
刘世伟
董志豪
李奔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202410718920.0A priority Critical patent/CN118550784A/en
Publication of CN118550784A publication Critical patent/CN118550784A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/263Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention relates to the technical field of chip verification, and discloses an automatic test case integration method and device, a case test method and device, wherein the invention extracts the preset field information of the logic of a plurality of test excitation and the function call relation among the test excitation, based on the function call relation, renders the preset field to generate a reusable packer interface class file, the packer interface class file binds with the plurality of test excitation by introducing declaration, by acquiring all test case information in the reporter interface class file and the test case information base and initializing the test case information into the test case file, the resource pool class is parameterized into basic data types to form a parameterized resource pool for storing shared resources, and the whole general verification methodology verification platform realizes test case management integration and multiplexing excitation integration, so that the multiplexing efficiency of different excitation classes among cross modules is remarkably improved.

Description

Automatic test case integration method and device and case test method and device
Technical Field
The invention relates to the technical field of chip verification, in particular to an automatic test case integration method and device and a case test method and device.
Background
In a conventional UVM verification platform, management of test case information is not integrated. In the design process of complex and large-scale test cases, only an engineer can write external script management, and the scripts generally collect information of the cases in batch at one time in the verification regression stage and cannot be synchronized with a verification platform. When building a verification environment platform, often due to the addition of new function points or the modification of old function points, the use cases often need to be inherited or recreated on the known use cases, which needs to carry out reloading or rewriting on the old excitation classes, so that the multiplexing rate of environment codes is low, and particularly, when calling at a cross-module level, the excitation classes are difficult to multiplex.
Disclosure of Invention
In view of the above, the invention provides an automated test case integration method and apparatus, and a test case test method and apparatus, so as to solve the problem of how to improve the cross-module multiplexing efficiency of different excitation types.
In a first aspect, the present invention provides an automated test case integration method, the method comprising: acquiring all excitation classes pre-registered by a general verification methodology verification platform; packaging logic corresponding to a plurality of test stimulus in the stimulus class;
Extracting a plurality of pieces of preset field information in the logic, and extracting a plurality of pieces of function call relations among the test stimulus;
Rendering a plurality of preset fields based on a function call relation among a plurality of test excitation to obtain a reusable packer interface class file;
And configuring an introduction statement corresponding to the wrapper interface class file for a plurality of test stimuli based on a function call relationship between the plurality of test stimuli, the introduction statement being used to indicate establishment of a binding relationship between the wrapper interface class file and each of the plurality of test stimuli;
acquiring a preset reporter interface class file and all test case information in a test case information base, wherein a resource pool class is predefined in the reporter interface class file;
initializing all the test case information into a test case file;
Parameterizing the resource pool corresponding to the resource pool class into a basic data type, wherein the parameterized resource pool is used for storing the reporter interface class file, the wrapper interface class file and the test case file so as to complete test case management integration and multiplexing excitation integration of the general verification methodology verification platform.
According to the embodiment of the invention, through extracting the function call relation between the preset field information and the test excitation, the relation between each excitation class is clearly determined, a basis is provided for subsequent multiplexing, the preset field is rendered, a reusable packer interface class file is generated, the logic of the excitation class is packaged in a standardized interface, compared with the prior art, the method and the device for carrying out reloading or rewriting on the old excitation class, the similar excitation class can be directly multiplexed among different modules through the standardized packer interface class file, the condition that the excitation class needs to be reloaded or rewritten when the different module levels are called is avoided, the binding relation between the packer interface class file and the test excitation is indicated through configuring the introduction statement corresponding to the packer interface class file for a plurality of test excitation classes, and when the test excitation is called, no matter whether the packer interface class file is the same module, the corresponding packer interface class file is directly used, and the realization of each excitation class does not need to be independently called, therefore, the efficiency of multiplexing the cross-module is improved, the parameterized resource pool class can be used for storing the packer interface class file, the packer interface class file and the packer interface class file is used as the report resource, the report resource can be further improved, and the resource can be shared in the same class, and the shared between the interface class files can be further, and the related resource can be shared in the interface class files.
In an alternative embodiment, the plurality of preset fields include a file path segment, a class name segment, an attribute segment, and an operation method;
Rendering a plurality of preset fields based on function call relations among a plurality of test excitation to obtain a reusable packer interface class file, wherein the method comprises the following steps:
Storing the file path segment, the class name segment, the attribute segment, and the method of operation in a data frame object;
acquiring a preset wrapper type template file, wherein the wrapper type template file is used as a prototype of a wrapper interface type file;
Converting the prototype declaration of the function and the corresponding data frame object into a format of Python dictionary data;
Rendering a prototype statement of a function converted into the format of the Python dictionary data and a data frame object converted into the format of the Python dictionary data into the preset wrapper class template file through a render () method of a mako library to obtain the wrapper interface class file, wherein the wrapper interface class comprises a tracker () method and an is_ inlib () method;
The tracker () method is used for showing a function call relation among a plurality of test stimuli in the stimulus class in the universal verification methodology verification platform;
The is_ inlib () method is used to query the operating methods in a plurality of the test stimulus.
According to the embodiment, key information such as file paths, class names, attributes and operation methods are stored in one Pandas data frame object, a developer can improve the maintainability of codes by checking and modifying the content of the data frame object, the data frame object is converted into a Python dictionary format by a preset wrapper class template file, the data are automatically rendered into the template file by using a render () method of a mako library, the developer can avoid the troublesome step of writing a wrapper class from beginning to end in each time, the developer still needs to write a wrapper class from beginning to end in the related art, the development time is saved, and the method of tracker () and is_ inlib contained in a common task of a wrapper interface class file can integrate function calling relation and operation method query into the common task at one time, so that the reusability of the whole wrapper interface class file is effectively improved.
In an alternative embodiment, the method of operation includes a different method of task; each task method corresponds to a task calling relationship; wherein the function call relationship comprises the task call relationship; the method further comprises the steps of:
determining the level of different tasks based on different task calling relations;
The levels of the different tasks are used for representing the execution sequences of the different tasks, wherein each task method corresponds to one task;
selecting a first excitation class to which a task corresponding to a first task level belongs, wherein the first task level is used for representing the task of which the execution order is first executed;
The wrapper implementation declaration is added to the first incentive class, wherein the first incentive class includes a plurality of tasks.
In this embodiment, since the wrapper implementation statement provides a unified interface, the process of compiling and executing program codes cannot be executed in parallel, and only subsequent codes can be executed sequentially from the starting position of the codes, and the task of the first level is the most basic task which does not depend on other tasks, and can be understood as the basis of executing the subsequent tasks, and is the first task at the starting position, by declaring in the task of the first level, all the subsequent tasks can be ensured to run in a consistent environment, and all the subsequent function tasks can be ensured to introduce the unified wrapper interface, so as to further ensure the reusability of the excitation class corresponding to the wrapper interface class file.
In an optional implementation manner, the reporter interface class file further comprises a basic data class, a reporter interface class and a sequence information class;
The report interface class is used for packaging report number function logic, report timestamp function logic, report state function logic, report coverage rate function logic, report description function logic, report inheritance logic and report summary logic; the sequence information class encapsulates identification information of the test case, timestamp information of the test case, test result information of the test case, coverage information of the test case, description information of the test case and hierarchy information of the test case.
According to the embodiment, the steps of repeatedly writing codes are reduced by packaging general report function logic, the reusability of the codes is improved, and when a test is executed, no matter what test result is, the report can be carried out through the interface class of the reporter, various test contents are directly reported at one time, so that the real-time update of the test case result is ensured, and the test result can be conveniently seen by a tester in real time.
In a second aspect, the present invention provides a method for testing a use case, where the method includes: responding to a test trigger instruction, and acquiring target test case information and a corresponding mark bit in the test trigger instruction;
confirming the type of the target test case according to the marking bit;
when the target test case is confirmed to be of a first type, integrating the target test case information based on the automatic test case integration method according to the first aspect or any implementation mode corresponding to the first aspect, wherein the first type is used for indicating that the target test case information is newly added test case information;
And according to the test trigger instruction, invoking multiplexing excitation integrated in a universal verification methodology verification platform in the automated test case integration method according to the first aspect or any implementation mode corresponding to the first aspect, and executing test operation corresponding to the target test case information.
According to the case testing method provided by the embodiment, the target test case information and the corresponding marking bit in the test trigger instruction are obtained in response to the test trigger instruction. And confirming the type of the target test case according to the marking bit, and integrating the information of the target test case based on the automatic test case integration method according to the first aspect or any corresponding implementation mode when confirming that the target test case is of the first type, and utilizing a general verification methodology to verify multiplexing excitation in a platform to rapidly multiplex the existing excitation codes, thereby greatly reducing repeated labor of testers and improving test execution efficiency.
In an alternative embodiment, the method further comprises:
When the type of the test case is confirmed to be the second type, directly calling multiplexing excitation integrated by a general verification methodology verification platform in the automatic test case integration method according to the test trigger instruction or any implementation mode corresponding to the first aspect, and executing test operation corresponding to the target test case information; the second type is used for indicating that the target test case information is integrated and effective test case information in the general verification methodology verification platform;
or when the type of the test case is confirmed to be a third type, the target test case information is cleared from the general verification methodology verification platform, wherein the third type is used for indicating that the target test case information is integrated and invalid test case information in the general verification methodology verification platform.
According to the case testing method provided by the embodiment, the types of the test cases, namely the first type, the second type and the third type, are distinguished by the marking bits, so that newly added test cases and existing test cases can be flexibly processed, and the accuracy of the test cases is ensured.
In an alternative embodiment, the method further comprises: analyzing logic in each excitation class, identifying a function call link in the logic in each excitation class, and dividing a main flow and a secondary flow of an excitation execution function; setting corresponding basic interface classes according to the divided main flows and sub flows, and setting parent classes inherited by different excitation classes as basic interface classes; the inherited base interface class is set as a reusable wrapper interface class file.
In the embodiment, by analyzing the logic in each excitation class, identifying a function call link in the logic in each excitation class, and dividing a main flow and a secondary flow of an excitation execution function; setting corresponding basic interface classes according to the divided main flows and sub flows, and setting parent classes inherited by different excitation classes as basic interface classes; the inherited basic interface class is set as the reusable wrapper interface class file, so that the modularization degree of the test code can be improved, the writing process of the excitation class can be simplified by reducing the repeated code, and the rapid integration can be realized.
In a third aspect, the present invention provides an automated test case integration apparatus, the apparatus comprising:
The excitation class acquisition and analysis module is used for acquiring all excitation classes registered in advance by the general verification methodology verification platform; packaging logic corresponding to a plurality of test stimulus in the stimulus class;
The logic analysis and encapsulator generation module is used for extracting a plurality of pieces of preset field information in the logic and extracting a plurality of pieces of function call relations among the test excitation;
The test excitation configuration and binding module is used for rendering a plurality of preset fields based on function call relations among a plurality of test excitation to obtain a reusable packer interface class file;
The reporter interface and resource management module is used for configuring an introduction statement corresponding to the packer interface class file for a plurality of test incentives based on a function call relation among the plurality of test incentives, wherein the introduction statement is used for indicating to establish a binding relation between the packer interface class file and each test incentives in the plurality of test incentives;
the system comprises a test case initializing module, a reporting device interface type file and a test case information library, wherein the test case initializing module is used for acquiring a preset reporting device interface type file and all test case information in the test case information library, and a resource pool type is predefined in the reporting device interface type file;
The resource pool parameterization module is used for initializing all the test case information into a test case file;
The test case integration and multiplexing management module is used for parameterizing the resource pool corresponding to the resource pool class into a basic data type, and the parameterized resource pool is used for storing the reporter interface class file, the wrapper interface class file and the test case file so as to complete the test case management integration and multiplexing excitation integration of the general verification methodology verification platform.
In a fourth aspect, the present invention provides a use case testing device, where the device includes:
The test instruction analysis and target identification module is used for responding to the test trigger instruction and acquiring target test case information and corresponding mark bits in the test trigger instruction;
the test case type confirming and processing module is used for confirming the type of the target test case according to the marking bit;
The new test case integration module is used for integrating the target test case information based on the automatic test case integration method according to the first aspect or any implementation mode corresponding to the first aspect when the target test case is confirmed to be of a first type, wherein the first type is used for indicating that the target test case information is newly added test case information;
And the multiplexing excitation scheduling and test executing module is used for calling multiplexing excitation integrated by the universal verification methodology verification platform in the automatic test case integration method according to the test triggering instruction and any implementation mode corresponding to the first aspect, and executing the test operation corresponding to the target test case information.
In a fifth aspect, the present invention provides a generic verification methodology verification platform comprising: the processor executes the computer instructions, thereby executing the automated test case integration method according to the first aspect or any implementation manner corresponding to the first aspect, or the case test method according to the second aspect or any implementation manner corresponding to the second aspect.
In a sixth aspect, the present invention provides a computer readable storage medium having stored thereon computer instructions for causing a computer to execute the automated test case integration method of the first aspect or any embodiment thereof, or the case test method of the second aspect or any embodiment thereof.
In a seventh aspect, the present invention provides a computer program product, including computer instructions for causing a computer to execute the automated test case integration method of the first aspect or any implementation manner corresponding thereto, or the use case test method of the second aspect or any implementation manner corresponding thereto.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow diagram of an automated test case integration method according to an embodiment of the invention;
FIG. 2 is a flow diagram of another automated test case integration method in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart of a case testing method according to an embodiment of the invention;
fig. 4 is a UVM verification block diagram of a use case testing method according to an embodiment of the present invention;
FIG. 5 is a flow chart of another example test method according to an embodiment of the invention;
FIG. 6 is a block diagram of an automated test case integration device, according to an embodiment of the invention;
FIG. 7 is a block diagram of a case testing apparatus according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
With the development of large-scale integrated circuit technology, the logic scale of a chip and the complexity of a circuit are continuously increased, and in order to ensure the correctness of design functions, a verification person needs to build a verification platform and a test scene according to a test plan. Currently, UVM verification platforms can provide a generic verification framework including a transaction to be stimulated (Sequence), a Driver to drive the transaction to interface (Driver), a Monitor to Monitor the interface (Monitor), a reference model (REFERENCE MODEL) to simulate the primary function of the design under test, and a scoreboard (Scoreboard) to compare the reference model output to the design under test output. Thus, the verifier can develop different test cases.
However, in a large chip verification scenario, the number of test cases increases greatly, and when there are many automation cases for maintenance of each project, management becomes confused and inefficient. In the current use case management, engineers typically manually enter test cases in a checking and verifying plan, or process a large amount of log information by adopting an external script language. Obtaining and processing use case information is not timely and friendly for the verification personnel and the verification platform.
It will be appreciated that as designs are updated and iterated, it is often necessary to multiplex old test cases. The old test case is difficult to be directly used by the new test case, and needs to be processed and changed, i.e. the same excitation class cannot be used for cross-module multiplexing. The management and multiplexing of these test cases is coupled to the verification platform to some extent.
The invention provides an automatic test case integration method which is applied to a large-scale hardware verification test scene, and can realize iteration (adding new cases) and multiplexing (multiplexing excitation types) of a test case library by only calling an automatic python script on an original verification platform, and realize cross-module multiplexing of the excitation types of the test case library by only calling the automatic python script on the original verification platform.
In accordance with an embodiment of the present invention, an automated test case integration method embodiment is provided, it being noted that the steps illustrated in the flowchart of the figures may be performed in a computer system, such as a set of computer-executable instructions, and, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
In this embodiment, an automated test case integration method is provided, which may be used in the computer described above, and fig. 1 is a flowchart of the automated test case integration method according to an embodiment of the present invention, as shown in fig. 1, where the flowchart includes the following steps:
step S101, all excitation classes registered in advance by a general verification methodology verification platform are obtained; and packaging logic corresponding to a plurality of test stimulus in the stimulus class.
It should be noted that a universal verification methodology verification platform (UVM verification platform), a standard methodology for creating reusable verification components, is used for hardware verification. UVM provides a framework containing rich class libraries and methods that support modeling, configuration, control, reporting, etc. of an advanced authentication environment.
It will be appreciated that in a UVM environment, a class of stimuli refers to a class used to generate test stimuli, and a plurality of test stimuli refer to input sequences under a plurality of different test scenarios or conditions, each test stimulus representing a particular test case. The logic corresponding to the plurality of test stimulus refers to logic implemented in each test stimulus class, for example, how a certain logic generates a test condition a of the hardware to be tested, where the logic at least includes an attribute, a file path, an operation method, and the like of the test condition a of the hardware to be tested.
Specifically, the code catalog of the verification platform can be traversed by using a Python script, all test files with specific naming rules are identified, and all inherited excitation classes and corresponding logic thereof are automatically extracted from the files according to a preset analysis algorithm.
In a UVM verification platform, test stimulus is then applied to the hardware (e.g., chip, etc.) to be verified to trigger specific actions and responses. Preregistration in a UVM verification platform means that the incentive class has been defined and configured in the verification platform ready for use. While different test cases correspond to different stimulus classes, these registered stimulus classes are not reusable, i.e. when different test cases may require the same stimulus class, registration is required twice, and even if the stimulus classes are the same, registration is repeated.
Step S102, extracting a plurality of preset field information in the logic, and extracting a function call relation among a plurality of test stimulus.
It should be noted that, the plurality of preset field information in the logic refers to predefined configuration information in the test stimulus, so as to implement logic corresponding to the plurality of test stimulus.
It will be appreciated that the different test stimuli are not separate or isolated, and that there is still a calling or dependency between the test stimuli, e.g. one test stimulus T1 needs to be executed first with another test stimulus T2 to set the initial state, at which time the function of test stimulus T1 will call the function of test stimulus T2.
Specifically, a static code analysis tool is used for identifying variables and configuration parameter fragments used in logic, a call graph or class graph preset in the process of programming codes is obtained, direct or indirect call relations among methods are analyzed, and function call relations among a plurality of test stimuli are determined.
And step S103, rendering a plurality of preset fields based on the function call relation among a plurality of test stimulus to obtain a reusable encapsulator interface class file.
It can be understood that, by rendering a plurality of preset fields, a reusable wrapper interface class file is obtained, which means that a unified and standard common wrapper interface class file (which can be understood as a common interface) is obtained, before the reusable wrapper interface class file is generated, the stimulus class cannot be independently invoked across modules, and once the reusable wrapper interface class file is generated, different test stimulus can be invoked in a standardized manner, so that multiplexing of test cases when invoking the stimulus class is realized.
Illustratively, based on the extracted function prototype and the preset field information, a Mako template engine is used to fill a pre-prepared wrapper_template.sv template file, and a wrapper.sv is generated, which is a reusable wrapper interface class file.
Example code in a reusable wrapper interface class file that may be provided by the present embodiment is as follows:
interface class wrapper;
pure virtual function void cal_xor(...);
pure virtual function void cal_crc(...);
pure virtual task void dma_read(input...,output...);
pure virtual task void dma_write(input...,output...);
endclass:wrapper;
Wherein INTERFACE CLASS WRAPPER denotes that an interface class named wrapper is defined; pure virtual function void cal _xor (..) and pure virtual function void cal _crc (..) respectively represent different pure virtual functions ;pure virtual task void dma_read(input...,output...)、pure virtual task void dma_write(input...,output...) respectively represent different tasks of return type void, with input and output parameters.
Step S104, based on the function call relation among the plurality of test incentives, configuring an introduction statement corresponding to the wrapper interface class file for the plurality of test incentives, wherein the introduction statement is used for indicating the establishment of a binding relation between the wrapper interface class file and each test incentives in the plurality of test incentives.
It will be appreciated that the necessary declarations are added to each stimulus class in order to introduce (also referred to as instantiate) the above-described wrapper interface file to establish an association between the stimulus class and the wrapper interface class.
Specifically, in each source code of the excitation class to be multiplexed, an introduction statement of the generated wrapper interface class is added through a script so as to realize the wrapper interface in the excitation class.
An example code that may be provided by the present embodiments to implement a wrapper interface in an excitation class is as follows:
class dma_imp_seg extends mcu_seg_base implements wrapper;
Wherein dmaimp seg represents a defined class name; the extensions mcu_seg_base represents that dmaimp_seg inherits from the mcu_seg_base base class; IMPLEMENTS WRAPPER shows that the stimulus class implements the incoming wrapper interface.
Step S105, acquiring a preset reporter interface class file and all test case information in a test case information base, wherein a resource pool class is predefined in the reporter interface class file.
It should be noted that, the preset reporter interface class file refers to a predefined class, and is specially used for reporting information of the verification test process, which can be understood as a feedback mechanism for the test result and the verification progress of the chip, so as to ensure the efficiency of the chip verification test and provide a stable and synchronous verification environment for the chip.
Illustratively, an existing reporter.sv file is read, in which a resource pool class (e.g., a predefined uvm _pool class) is defined for storing shared data, and specific information of all test cases is extracted from a database, including at least a test case name, a test case coverage, a test case priority, and so on.
Step S106, initializing all the test case information into a test case file.
It can be understood that initializing all test case information into a test case file refers to converting data in a test case information base into a specific file format (e.g., a YAML file) so as to facilitate automated integration into a resource pool, and also simplifies the step of integrating different test cases in sequence separately in the related art.
Step S107, parameterizing the resource pool corresponding to the resource pool class into a basic data type, wherein the parameterized resource pool is used for storing a reporter interface class file, a wrapper interface class file and a test case file so as to complete test case management integration and multiplexing excitation integration of the general verification methodology verification platform.
It should be noted that, the resource pool is a specific instance of resource pool instantiation, and different types of resource storage, such as the wrapper interface file and the reporter interface file, and the test case file belong to different types of resource storage respectively, by parameterizing (also referred to as a specified data type), so that the resource pool needs to be parameterized so as to store the reporter interface file, the wrapper interface file and the test case file efficiently, thereby ensuring resource sharing and further improving multiplexing efficiency.
According to the embodiment of the invention, through extracting the function call relation between the preset field information and the test excitation, the relation between the excitation classes is clearly determined, a basis is provided for subsequent multiplexing, the preset field is rendered, a reusable packer interface class file is generated, the logic of the excitation class is packaged in a standardized interface, compared with the prior art, the method and the device for multiplexing the old excitation class, the standardized packer interface class file can be directly reused among different modules, the condition that the excitation class needs to be reloaded or rewritten during different module level calls is avoided, the introduction statement corresponding to the packer interface class file is configured for a plurality of test excitation, the binding relation between the packer interface class file and the test excitation is indicated, and when the test excitation is called, no matter whether the module is the same module, the corresponding packer interface class file can be directly used, and the realization of independently calling each excitation class is not needed, so that the multiplexing efficiency of a cross-module is improved, the parameterized resource pool class is used, the report interface class file, the packer interface class file and the packer interface class file are stored, the test interface class file and the test interface class file can be further understood as the shared between the cross-module and the test interface class file, and the resource pool is further improved, and the resource of the test class can be obviously shared among the interface class files.
In this embodiment, an automated test case integration method is provided, which may be used in the above computer, and the flow includes the following steps:
Step S201, all excitation classes registered in advance by a general verification methodology verification platform are obtained; and packaging logic corresponding to a plurality of test stimulus in the stimulus class. Please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S202, extracting a plurality of preset field information in the logic, and extracting a function call relation among a plurality of test stimulus. Please refer to step S102 in the embodiment shown in fig. 1 in detail, which is not described herein.
And step S203, rendering a plurality of preset fields based on the function call relation among a plurality of test stimulus to obtain a reusable encapsulator interface class file.
Specifically, the step S203 includes:
step S2031, storing the file path fragment, class name fragment, attribute fragment, and operation method in the data frame object.
Specifically, each field information including the file path, class name, attribute and operation method is collected and stored in one data frame object (DATAFRAME object). The data frame is a two-dimensional tabular data structure and the data frame object may be determined by Pandas libraries in Python. It can be understood that the fragment information is stored in a data frame object, so that the logic of a plurality of test incentives is more intuitively understood, and when a developer modifies, the developer can directly intuitively modify the content of the DATAFRAME object.
Step S2032, a preset wrapper type template file is acquired, and the wrapper type template file is used as a prototype of the wrapper interface type file.
It will be appreciated that the use of preset templates ensures that the developer does not have to write wrapper classes from scratch each time, saving time.
Step S2033, converting the prototype declaration of the function and the corresponding data frame object into the format of Python dictionary data.
In step S2034, a prototype declaration of the function converted into the format of the Python dictionary data and a data frame object converted into the format of the Python dictionary data are rendered into a preset wrapper class template file by a render () method of the mako library to obtain a wrapper interface class file, wherein the wrapper interface class includes a tracker () method and an is_ inlib () method.
The tracker () method is used for showing the function call relation among a plurality of test stimulus in the stimulus class in the universal verification methodology verification platform; the is_ inlib () method is used to query the operating method in multiple test stimuli.
Specifically, the render () method of mako libraries is used to render the data (e.g., function prototype declaration) previously converted into Python dictionary format into a preset wrapper class template file, and generate a final wrapper interface class file. The common logical class in this wrapper interface class file contains two methods: the tracker () and the is_ inlib () methods contained in the wrapper interface class are respectively used for showing the function calling relation and the query operation method, and effectively guaranteeing the multiplexing of codes.
Exemplary, file path: the path/to/wrapper; class name: WRAPPERCLASS; attributes: attr1, attr2; the operation method comprises the following steps: method1 (), method2 (), storing the above information in a Pandas data frame object, converting the function prototype statement and the corresponding data frame object into the format of Python dictionary data, converting the data frame object into Python dictionary data, outputting Python dictionary data, using the render () method of mako library to render dictionary data into template file wrapper_template.sv to obtain wrapper.sv file, wherein a common task is encapsulated, the common task includes the methods of tracker () and is_ inlib () for displaying function call relation and query operation method respectively, and code multiplexing is ensured.
According to the embodiment, key information such as file paths, class names, attributes and operation methods are stored in one Pandas data frame object, a developer can improve the maintainability of codes by checking and modifying the content of the data frame object, the data frame object is converted into a Python dictionary format by a preset wrapper class template file, the data are automatically rendered into the template file by using a render () method of a mako library, the developer can avoid the troublesome step of writing a wrapper class from beginning to end in each time, the developer still needs to write a wrapper class from beginning to end in the related art, the development time is saved, and the method of tracker () and is_ inlib contained in a common task of a wrapper interface class file can integrate function calling relation and operation method query into the common task at one time, so that the reusability of the whole wrapper interface class file is effectively improved.
Step S204, based on the function call relation among the plurality of test incentives, configuring an introduction statement corresponding to the wrapper interface class file for the plurality of test incentives, wherein the introduction statement is used for indicating the establishment of a binding relation between the wrapper interface class file and each test incentives in the plurality of test incentives. Please refer to step S104 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S205, obtaining a preset reporter interface class file and all test case information in a test case information base, wherein a resource pool class is predefined in the reporter interface class file. Please refer to step S105 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S206, initializing all the test case information into a test case file. Please refer to step S106 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S207, parameterizing the resource pool corresponding to the resource pool class into a basic data type, wherein the parameterized resource pool is used for storing a reporter interface class file, a wrapper interface class file and a test case file so as to complete test case management integration and multiplexing excitation integration of the general verification methodology verification platform. Please refer to step S107 in the embodiment shown in fig. 1 in detail, which is not described herein.
In an alternative embodiment, the step S203 may further include: analyzing logic in each excitation class, identifying a function call link in the logic in each excitation class, and dividing a main flow and a secondary flow of an excitation execution function; setting corresponding basic interface classes according to the divided main flows and sub flows, and setting parent classes inherited by different excitation classes as basic interface classes; the inherited base interface class is set as a reusable wrapper interface class file.
Specifically, the basic interface class includes a method for operating a preset field, for example setUp () for initializing a test environment and setting the preset field. executeTest () is used for core test logic execution portals, invoking different internal methods depending on the particular stimulus. tearDown () is used to clean up the test environment, freeing up resources. verifyResults () is used for unified result verification logic, accepting test results as input, and judging whether passing or not.
It can be appreciated that during the operation, the specific excitation class instance and the method of the wrapper interface class can be dynamically bound according to the preconfigured excitation class and the interface class, and when the test excitation is newly added or modified, the configuration is only required to be adjusted without changing the wrapper interface class code, so as to realize the rapid integration.
In the embodiment, by analyzing the logic in each excitation class, identifying a function call link in the logic in each excitation class, and dividing a main flow and a secondary flow of an excitation execution function; setting corresponding basic interface classes according to the divided main flows and sub flows, and setting parent classes inherited by different excitation classes as basic interface classes; the inherited basic interface class is set as the reusable wrapper interface class file, so that the modularization degree of the test code can be improved, the writing process of the excitation class can be simplified by reducing the repeated code, and the rapid integration can be realized.
In an alternative embodiment, the methods of operation include different task methods; each task method corresponds to a task calling relationship; the function call relationship comprises a task call relationship; the method for integrating the automatic test cases provided by the embodiment further comprises the following steps:
Step A1, determining the levels of different tasks based on different task calling relations;
Step A2, the levels of different tasks are used for representing the execution sequences of the different tasks, wherein each task method corresponds to one task;
Step A3, selecting a first excitation class to which a task corresponding to a first task level belongs, wherein the first task level is used for representing the task of which the execution order is first executed;
Step A4, adding the wrapper implementation statement to a first stimulus class, wherein the first stimulus class includes a plurality of tasks.
It should be noted that, the task method refers to a function used by a specific task defined in an automatic test process, the task call relationship refers to a call sequence and a dependency relationship between task methods, for example, task a may depend on output data of task B, so task a calls task B, and the function call relationship refers to a call and a dependency relationship between different functions in a program, including a task call relationship. The task level refers to the priority or hierarchy of different tasks in order of execution, and is used to indicate which tasks are executed first and which tasks are executed later.
Specifically, referring to fig. 2, a topology ordering algorithm is used to analyze the task graph, find out the task without dependence as the first-stage task, and so on until all tasks are distributed; and (3) applying the task level determined in the step A1 to a task method. Task level is low, first execution, level is high, then execution. In the test framework, configuring the execution sequence of tasks according to the sequence of task levels; all tasks of level 1 are selected from the task list and are categorized into the first incentive class. The tasks in the first stimulus class are the first set of tasks to execute, and in the definition of the first stimulus class, a wrapper implementation declaration is added to implement a wrapper interface in the stimulus class.
In this embodiment, since the wrapper implementation statement provides a unified interface, the process of compiling and executing program codes cannot be executed in parallel, and only subsequent codes can be executed sequentially from the starting position of the codes, and the task of the first level is the most basic task which does not depend on other tasks, and can be understood as the basis of executing the subsequent tasks, and is the first task at the starting position, by declaring in the task of the first level, all the subsequent tasks can be ensured to run in a consistent environment, and all the subsequent function tasks can be ensured to introduce the unified wrapper interface, so as to further ensure the reusability of the excitation class corresponding to the wrapper interface class file.
In an alternative embodiment, the reporter interface class file further includes a basic data class, a reporter interface class, and a sequence information class;
the report interface class is used for packaging report number function logic, report timestamp function logic, report state function logic, report coverage rate function logic, report description function logic, report inheritance logic and report summary logic; the sequence information class encapsulates identification information of the test case, timestamp information of the test case, test result information of the test case, coverage information of the test case, description information of the test case and hierarchy information of the test case.
It should be noted that, the basic data class inherited from uvm _object is used to provide basic attribute definitions of test cases, such as test case names and identification information, and the reporter interface class provides a set of general reporting functions, and exemplary functions include report_id (), report_timestamp (), report_status (), report_coverage (), report_description (), report_ heri (), and report_sum (), and each function encapsulates specific reporting logic. The sequence information class is the detailed information of the package test case and at least comprises identification information, a time stamp, a test result, coverage rate, description, hierarchy and the like.
According to the embodiment, the steps of repeatedly writing codes are reduced by packaging general report function logic, the reusability of the codes is improved, and when a test is executed, no matter what test result is, the report can be carried out through the interface class of the reporter, various test contents are directly reported at one time, so that the real-time update of the test case result is ensured, and the test result can be conveniently seen by a tester in real time.
In this embodiment, a case testing method is provided, which may be used in the above computer, and fig. 3 is a flowchart of the case testing method according to an embodiment of the present invention, as shown in fig. 3, where the flowchart includes the following steps:
Step S301, in response to the test trigger instruction, acquiring target test case information and corresponding flag bits in the test trigger instruction.
Step S302, confirming the type of the target test case according to the mark bit.
Step S303, when it is determined that the target test case is of the first type, integrating the target test case information based on the automated test case integration method of the first aspect or any implementation manner corresponding to the first aspect, where the first type is used to indicate that the target test case information is newly added test case information.
Step S304, according to the test trigger instruction, invoking the multiplexing excitation integrated in the universal verification methodology verification platform in the automatic test case integration method of the first aspect or any implementation mode corresponding to the first aspect, and executing the test operation corresponding to the target test case information.
It should be noted that, the test trigger instruction refers to a command signal for starting or triggering a test operation, and the target test case information refers to data and detailed information of a specific case to be tested. The flag bit is used to identify and distinguish the flag variable of the test case state type. When the test starts, the specific use case to be tested and the related information thereof need to be obtained in response to the instruction from the test management system or the user, so as to provide a foundation for the subsequent test operation, ensure which use case is tested and whether the test use case is available. When the target test case is confirmed to be of the first type, the fact that the target test case information is newly added test case information is indicated, multiplexing excitation integrated in a general verification methodology verification platform in the automatic test case integration method of the first aspect or any implementation mode corresponding to the first aspect is called, and test operation corresponding to the target test case information is executed so as to quickly multiplex excitation codes of the general verification methodology verification platform integrated with the common excitation class.
In actual operation, the UVM verification structure of adding the test case management and multiplexing incentive class may refer to fig. 4, where:
sequence r: and organizing and managing the sequence, and transmitting the transaction generated by the sequence to the driver.
Driver: the sequence_item packet transaction is applied to sequencer, and the information in the transaction is driven to the port of the DUT according to the bus protocol specification.
Monitor: a component for receiving data from the DUT, in signal communication with the DUT interface, converting to transactions of the transaction level and transmitting to the subscription.
REFERENCE MODEL: and referring to the model, simulating the main functions of the design to be tested and providing a design theoretical value for scoreboard.
Scoreboard: the data from monitor is compared to the data from REFERENCE MODEL.
CASE MANAGER: consists of an interface class encapsulating all tasks and a reporter interface class reporting case information, and initializes case information from the YAML DB. The manager component is not a UVM native component class, but rather a UVM _object class that relies on the interface class to enable multiplexing and management of test cases.
YAML DB: the test case information base comprises data sets of different cases, such as test names, coverage rates, test case priorities, functions, test result test flag bits (used for reporting historical test results of the verification regression process) and other data information.
For example, to verify a certain interactive function of the DUT (chip under test), a new test case is created, and the test case obtains a corresponding sequence (test stimulus class) through a wrapper (wrapper class) in CASE MANAGER (case management). sequence will generate transactions. The sequencers schedule these sequences according to test cases. The Sequencer sends transactions to the Driver (transmitter) in the expected order. The Driver converts the transaction into a physical signal which can be identified by the DUT, and the whole test process is completed. Monitor monitors the response of the DUT and obtains the actual output signal of the DUT. REFERENCE MODEL (desired model) is a pre-designed model. The model simulates the response signals that the DUT should have under the test case based on the content of the in agent (input entity). Scoreboard obtains the signal actually output by the DUT according to the content of out_agent (output entity). The actual output signal from the DUT is then compared to the desired signal generated by REFERENCE MODEL. The comparison results generate a test report and store it in a YAML DB (YAML file library). The reporter in CASE MANAGER is used to report the test results in the YAML DB. And finally, completing the comprehensive verification of the DUT interaction function and generating a corresponding test report.
According to the case testing method provided by the embodiment, the target test case information and the corresponding marking bit in the test trigger instruction are obtained in response to the test trigger instruction. And when the type of the target test case is confirmed according to the marking bit, integrating the information of the target test case based on the automatic test case integration method of the first aspect or any implementation mode corresponding to the first aspect, and utilizing a general verification methodology to verify multiplexing excitation in a platform to rapidly multiplex the existing excitation codes, thereby greatly reducing repeated labor of testers and improving test execution efficiency.
In an alternative embodiment, the method further comprises:
When the type of the test case is confirmed to be the second type, directly calling multiplexing excitation integrated by a general verification methodology verification platform in the automatic test case integration method of the first aspect or any implementation mode corresponding to the first aspect according to the test trigger instruction, and executing test operation corresponding to the target test case information; the second type is used for indicating that the target test case information is integrated in the general verification methodology verification platform and effective test case information;
Or when the type of the test case is confirmed to be the third type, the target test case information is cleared from the general verification methodology verification platform, wherein the third type is used for indicating that the target test case information is integrated and invalid test case information in the general verification methodology verification platform.
Illustratively, referring to FIG. 5, after verifying that the platform integrates the test case management and multiplexing components, the test command script is first executed and a test case is executed. The use case may multiplex the virtual method in the wrapper interface class, and when the verification platform executes, first call the case_ infoload () function, which searches the YAML file for whether the use case already exists. If the test flag bit is "add", the test is directly performed. If the test flag bit is "off", then the test flag bit is removed from the use case library. If the test flag bit is "new", executing the automation script and updating the test case library to re-execute the simulation. The test flag bit is reset or modified after the verification platform use case data is updated. And executing the test case, calling a case_ infoupdate () method after the test is finished, and directly updating the test result information into the YAML file.
According to the case testing method provided by the embodiment, the types of the test cases, namely the first type, the second type and the third type, are distinguished by the marking bits, so that newly added test cases and existing test cases can be flexibly processed, and the accuracy of the test cases is ensured.
The embodiment provides an automated test case integration device, as shown in fig. 6, including:
the excitation class acquisition and analysis module 601 is configured to acquire all excitation classes that are registered in advance by the general verification methodology verification platform; packaging logic corresponding to a plurality of test stimulus in the stimulus class;
the logic analysis and encapsulator generation module 602 is configured to extract a plurality of preset field information in logic, and extract a function call relationship between a plurality of test stimuli;
a test stimulus configuration and binding module 603, configured to render a plurality of preset fields based on a function call relationship between a plurality of test stimulus, so as to obtain a reusable wrapper interface class file;
the reporter interface and resource management module 604 is configured to configure, for a plurality of test stimuli, an incoming claim corresponding to the wrapper interface class file based on a function call relationship between the plurality of test stimuli, the incoming claim being used to indicate that a binding relationship between the wrapper interface class file and each of the plurality of test stimuli is established;
the test case initializing module 605 is configured to obtain a preset reporter interface class file and all test case information in the test case information base, where a resource pool class is predefined in the reporter interface class file;
a resource pool parameterization module 606, configured to initialize all test case information into a test case file;
The test case integration and multiplexing management module 607 is configured to parameterize a resource pool corresponding to a resource pool class into a basic data type, where the parameterized resource pool is used to store a reporter interface class file, a wrapper interface class file, and a test case file, so as to complete test case management integration and multiplexing excitation integration of the general verification methodology verification platform.
In some alternative embodiments, the test stimulus configuration and binding module 603 includes:
The data storage unit is used for storing the file path fragments, the class name fragments, the attribute fragments and the operation method in the data frame object;
the template acquisition unit is used for acquiring a preset wrapper type template file which is used as a prototype of the wrapper interface type file;
the data conversion unit is used for converting the prototype declaration of the function and the corresponding data frame object into the format of Python dictionary data;
A template rendering unit, configured to render, by using a render () method of a mako library, a prototype declaration of a function converted into a format of Python dictionary data and a data frame object converted into a format of Python dictionary data into a preset wrapper class template file, to obtain a wrapper interface class file, where the wrapper interface class includes a wrapper () method and an is_ inlib () method;
the tracker () method is used for showing the function call relation among a plurality of test stimuli in the stimulus class in the universal verification methodology verification platform;
the is_ inlib () method is used to query the operating method in multiple test stimuli.
In some alternative embodiments, the methods of operation include different task methods; each task method corresponds to a task calling relationship; the function call relationship comprises a task call relationship; the device further comprises:
the task level determining module is used for determining the levels of different tasks based on different task calling relations;
the task level characterization module is used for characterizing the execution sequence of different tasks, wherein each task method corresponds to one task;
The first excitation class selection module is used for selecting a first excitation class to which a task corresponding to a first task level belongs, wherein the first task level is used for representing the task of which the execution order is first executed;
The system comprises a wrapper implementation adding module for adding a wrapper implementation declaration to a first incentive class, wherein the first incentive class comprises a plurality of tasks.
In some optional embodiments, the reporter interface class file further includes a base data class, a reporter interface class, and a sequence information class;
the report interface class is used for packaging report number function logic, report timestamp function logic, report state function logic, report coverage rate function logic, report description function logic, report inheritance logic and report summary logic; the sequence information class encapsulates identification information of the test case, timestamp information of the test case, test result information of the test case, coverage information of the test case, description information of the test case and hierarchy information of the test case.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The embodiment also provides a use case testing device, which is used for implementing the above embodiment and the preferred implementation manner, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a use case testing device, as shown in fig. 7, including:
The test instruction analysis and target identification module 701 is configured to respond to the test trigger instruction, and obtain target test case information and a corresponding flag bit in the test trigger instruction;
the test case type confirming and processing module 702 is configured to confirm the type of the target test case according to the flag bit;
The new test case integration module 703 is configured to integrate the target test case information based on the automated test case integration method when the target test case is confirmed to be of a first type, where the first type is used to indicate that the target test case information is newly added test case information;
and the multiplexing excitation scheduling and test executing module 704 is used for calling the multiplexing excitation integrated by the universal verification methodology verification platform in the automatic test case integration method according to the test trigger instruction and executing the test operation corresponding to the target test case information.
In some alternative embodiments, the apparatus further comprises:
The general verification module is used for directly calling multiplexing excitation integrated by the general verification methodology verification platform in the automatic test case integration method according to the test trigger instruction when the type of the test case is confirmed to be the second type, and executing test operation corresponding to the target test case information; the second type is used for indicating that the target test case information is integrated in the general verification methodology verification platform and effective test case information;
And the test case clearing module is used for clearing the target test case information from the general verification methodology verification platform when the type of the test case is confirmed to be a third type, wherein the third type is used for indicating that the target test case information is integrated and invalid test case information in the general verification methodology verification platform.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The automated test case integration device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application SPECIFIC INTEGRATED Circuit) Circuit, a processor and a memory that execute one or more software or firmware programs, and/or other devices that can provide the above functions.
The embodiment of the invention also provides a general verification methodology verification platform which is provided with the automatic test case integration device shown in the figure 6 or the figure 7.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a general verification methodology verification platform according to an alternative embodiment of the present invention, as shown in fig. 8, the general verification methodology verification platform includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the generic verification methodology verification platform, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device (such as a display device coupled to the interface). In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple generic authentication methodology authentication platforms may be connected, with each device providing part of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 8.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform a method for implementing the embodiments described above.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the generic authentication methodology authentication platform, etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the generic verification methodology verification platform via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The generic verification methodology verification platform also includes a communication interface 30 for the generic verification methodology verification platform to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Portions of the present invention may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or aspects in accordance with the present invention by way of operation of the computer. Those skilled in the art will appreciate that the form of computer program instructions present in a computer readable medium includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the manner in which the computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Herein, a computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by a computer.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the appended claims.

Claims (10)

1. An automated test case integration method, the method comprising:
acquiring all excitation classes pre-registered by a general verification methodology verification platform; packaging logic corresponding to a plurality of test stimulus in the stimulus class;
Extracting a plurality of pieces of preset field information in the logic, and extracting a plurality of pieces of function call relations among the test stimulus;
Rendering a plurality of preset fields based on a function call relation among a plurality of test excitation to obtain a reusable packer interface class file;
And configuring an introduction statement corresponding to the wrapper interface class file for a plurality of test stimuli based on a function call relationship between the plurality of test stimuli, the introduction statement being used to indicate establishment of a binding relationship between the wrapper interface class file and each of the plurality of test stimuli;
acquiring a preset reporter interface class file and all test case information in a test case information base, wherein a resource pool class is predefined in the reporter interface class file;
initializing all the test case information into a test case file;
Parameterizing the resource pool corresponding to the resource pool class into a basic data type, wherein the parameterized resource pool is used for storing the reporter interface class file, the wrapper interface class file and the test case file so as to complete test case management integration and multiplexing excitation integration of the general verification methodology verification platform.
2. The method of claim 1, wherein the plurality of preset fields include a file path section, a class name section, an attribute section, and an operation method;
Rendering a plurality of preset fields based on function call relations among a plurality of test excitation to obtain a reusable packer interface class file, wherein the method comprises the following steps:
Storing the file path segment, the class name segment, the attribute segment, and the method of operation in a data frame object;
acquiring a preset wrapper type template file, wherein the wrapper type template file is used as a prototype of a wrapper interface type file;
Converting the prototype declaration of the function and the corresponding data frame object into a format of Python dictionary data;
Rendering a prototype statement of a function converted into the format of the Python dictionary data and a data frame object converted into the format of the Python dictionary data into the preset wrapper class template file through a render () method of a mako library to obtain the wrapper interface class file, wherein the wrapper interface class comprises a tracker () method and an is_ inlib () method;
The tracker () method is used for showing a function call relation among a plurality of test stimuli in the stimulus class in the universal verification methodology verification platform;
The is_ inlib () method is used to query the operating methods in a plurality of the test stimulus.
3. The method of claim 2, wherein the operating methods include different task methods; each task method corresponds to a task calling relationship; wherein the function call relationship comprises the task call relationship; the method further comprises the steps of:
determining the level of different tasks based on different task calling relations;
The levels of the different tasks are used for representing the execution sequences of the different tasks, wherein each task method corresponds to one task;
selecting a first excitation class to which a task corresponding to a first task level belongs, wherein the first task level is used for representing the task of which the execution order is first executed;
The wrapper implementation declaration is added to the first incentive class, wherein the first incentive class includes a plurality of tasks.
4. A method according to any one of claims 1 to 3, wherein the reporter interface class file further comprises a base data class, a reporter interface class and a sequence information class;
The report interface class is used for packaging report number function logic, report timestamp function logic, report state function logic, report coverage rate function logic, report description function logic, report inheritance logic and report summary logic; the sequence information class encapsulates identification information of the test case, timestamp information of the test case, test result information of the test case, coverage information of the test case, description information of the test case and hierarchy information of the test case.
5. A use case testing method, the method comprising:
responding to a test trigger instruction, and acquiring target test case information and a corresponding mark bit in the test trigger instruction;
confirming the type of the target test case according to the marking bit;
When the target test case is confirmed to be of a first type, integrating the target test case information based on the automatic test case integration method according to any one of claims 1 to 4, wherein the first type is used for indicating that the target test case information is newly added test case information;
And according to the test trigger instruction, invoking multiplexing excitation integrated in a general verification methodology verification platform in the automated test case integration method according to any one of claims 1-4, and executing a test operation corresponding to the target test case information.
6. The method of claim 5, wherein the method further comprises:
When the type of the test case is confirmed to be the second type, directly calling multiplexing excitation integrated by a general verification methodology verification platform in the automatic test case integration method according to the test trigger instruction, and executing test operation corresponding to the target test case information; the second type is used for indicating that the target test case information is integrated and effective test case information in the general verification methodology verification platform;
Or alternatively
And when the type of the test case is confirmed to be a third type, clearing the target test case information from the general verification methodology verification platform, wherein the third type is used for indicating that the target test case information is integrated and invalid test case information in the general verification methodology verification platform.
7. An automated test case integration device, the device comprising:
The excitation class acquisition and analysis module is used for acquiring all excitation classes registered in advance by the general verification methodology verification platform; packaging logic corresponding to a plurality of test stimulus in the stimulus class;
The logic analysis and encapsulator generation module is used for extracting a plurality of pieces of preset field information in the logic and extracting a plurality of pieces of function call relations among the test excitation;
The test excitation configuration and binding module is used for rendering a plurality of preset fields based on function call relations among a plurality of test excitation to obtain a reusable packer interface class file;
The reporter interface and resource management module is used for configuring an introduction statement corresponding to the packer interface class file for a plurality of test incentives based on a function call relation among the plurality of test incentives, wherein the introduction statement is used for indicating to establish a binding relation between the packer interface class file and each test incentives in the plurality of test incentives;
the system comprises a test case initializing module, a reporting device interface type file and a test case information library, wherein the test case initializing module is used for acquiring a preset reporting device interface type file and all test case information in the test case information library, and a resource pool type is predefined in the reporting device interface type file;
The resource pool parameterization module is used for initializing all the test case information into a test case file;
The test case integration and multiplexing management module is used for parameterizing the resource pool corresponding to the resource pool class into a basic data type, and the parameterized resource pool is used for storing the reporter interface class file, the wrapper interface class file and the test case file so as to complete the test case management integration and multiplexing excitation integration of the general verification methodology verification platform.
8. A use case testing device, the device comprising:
The test instruction analysis and target identification module is used for responding to the test trigger instruction and acquiring target test case information and corresponding mark bits in the test trigger instruction;
the test case type confirming and processing module is used for confirming the type of the target test case according to the marking bit;
The new test case integration module is configured to integrate the target test case information based on the automated test case integration method according to any one of claims 1 to 5 when the target test case is confirmed to be of a first type, where the first type is used to indicate that the target test case information is newly added test case information;
And the multiplexing excitation scheduling and test executing module is used for calling multiplexing excitation integrated by the universal verification methodology verification platform in the automatic test case integration method according to the test triggering instruction and executing the test operation corresponding to the target test case information.
9. A universal verification methodology verification platform, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the automated test case integration method of any of claims 1-4 or the use case test method of any of claims 5-6.
10. A computer readable storage medium having stored thereon computer instructions for causing a generic verification methodology verification platform to perform the automated test case integration method of any one of claims 1-4; or performing the use case testing method of any one of claims 5-6.
CN202410718920.0A 2024-06-04 2024-06-04 Automatic test case integration method and device and case test method and device Pending CN118550784A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410718920.0A CN118550784A (en) 2024-06-04 2024-06-04 Automatic test case integration method and device and case test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410718920.0A CN118550784A (en) 2024-06-04 2024-06-04 Automatic test case integration method and device and case test method and device

Publications (1)

Publication Number Publication Date
CN118550784A true CN118550784A (en) 2024-08-27

Family

ID=92449687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410718920.0A Pending CN118550784A (en) 2024-06-04 2024-06-04 Automatic test case integration method and device and case test method and device

Country Status (1)

Country Link
CN (1) CN118550784A (en)

Similar Documents

Publication Publication Date Title
CN110008113B (en) Test method and device and electronic equipment
KR101132560B1 (en) System and method for automatic interface testing based on simulation for robot software components
US8924937B1 (en) Method and system for generating verification information and tests for software
US6385765B1 (en) Specification and verification for concurrent systems with graphical and textual editors
US7623981B2 (en) Testing of embedded systems
KR20210149045A (en) artificial intelligence chip verification
CN112270149B (en) Verification platform automatic integration method and system, electronic equipment and storage medium
US7194726B2 (en) Method for automatically decomposing dynamic system models into submodels
CN104268079A (en) POS (Point Of Sale) application program testing method and system
WO2007001108A1 (en) System for providing feature-oriented software product line engineering environment
US20070061641A1 (en) Apparatus and method for generating test driver
KR100994070B1 (en) A Reserved Component Container Based Software Development Method and Apparatus
CN117892665B (en) Modeling simulation method, device, medium and equipment based on circuit system level model
CN111382065B (en) Verification flow management system and method based on test template
CN116431103B (en) Digital DevOps platform design method for embedded software
CN118550784A (en) Automatic test case integration method and device and case test method and device
CN114281709A (en) Unit testing method, system, electronic equipment and storage medium
EP4260175A1 (en) System and method for developing user interface applications
CN113515452A (en) Automatic test method and system for application, electronic equipment and storage medium
Orjala Unit testing methods for Internet of Things Mbed OS operating system
CN117873650B (en) Real-time running environment generation system, method, computer device and storage medium
Wehrmeister et al. Framework to simulate the behavior of embedded real-time systems specified in UML models
CN117331565B (en) Software generation method, device, computer equipment and storage medium
Pereira et al. Development of self-diagnosis tests system using a DSL for creating new test suites for integration in a cyber-physical system
Di Natale et al. Matching execution architecture models with functional models to analyze the time performance of CPS systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination