CN112015633B - Test excitation multi-platform multiplexing method, device, equipment and storage medium - Google Patents

Test excitation multi-platform multiplexing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112015633B
CN112015633B CN201910465583.8A CN201910465583A CN112015633B CN 112015633 B CN112015633 B CN 112015633B CN 201910465583 A CN201910465583 A CN 201910465583A CN 112015633 B CN112015633 B CN 112015633B
Authority
CN
China
Prior art keywords
test
universal
tested
macro
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910465583.8A
Other languages
Chinese (zh)
Other versions
CN112015633A (en
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.)
Beijing Wuxin Technology Co ltd
Original Assignee
Beijing Wuxin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Wuxin Technology Co ltd filed Critical Beijing Wuxin Technology Co ltd
Priority to CN201910465583.8A priority Critical patent/CN112015633B/en
Publication of CN112015633A publication Critical patent/CN112015633A/en
Application granted granted Critical
Publication of CN112015633B publication Critical patent/CN112015633B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3624Software debugging by performing operations on the source code, e.g. via a compiler
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The embodiment of the invention discloses a test excitation multi-platform multiplexing method, a device, equipment and a storage medium. The method comprises the following steps: obtaining universal test excitation files corresponding to a plurality of tested objects and macro definition files corresponding to the tested objects respectively; the universal test excitation file is used for describing the same test excitation among all the tested objects, and the macro definition file is used for describing different test excitation among all the tested objects; driving each corresponding tested object by adopting a universal test excitation file and a macro definition file respectively so as to test each tested object under comprehensive test excitation; the integrated test stimulus includes the same test stimulus between each object under test and different test stimulus between each object under test and other objects under test. The technical scheme of the embodiment of the invention realizes the same test excitation, multiplexes different test objects, reduces the coding amount and the coding time and improves the coding efficiency.

Description

Test excitation multi-platform multiplexing method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of testing, in particular to a test excitation multi-platform multiplexing method, a device, equipment and a storage medium.
Background
With the continuous development of testing technology, the complexity of the tested object such as an application specific integrated circuit is higher and higher, and accordingly, the test stimulus for testing the tested object is also higher and higher, which results in heavier test tasks.
In the prior art, for a plurality of tested objects with similar test excitation, each tested object needs to be tested under the corresponding test excitation, so that a worker is required to write one test excitation for each tested object, and test verification of the tested object is realized by driving the test excitation to different tested objects. However, the test verification of the tested object by using the technology is inconvenient for maintenance of test excitation, greatly increases coding time and reduces test efficiency.
Disclosure of Invention
The invention provides a test excitation multi-platform multiplexing method, a device, equipment and a storage medium, which are used for multiplexing the same general test excitation file in different test excitation, reducing the coding time and improving the test efficiency.
In a first aspect, an embodiment of the present invention provides a test excitation multi-platform multiplexing method, including:
obtaining universal test excitation files corresponding to a plurality of tested objects and macro definition files corresponding to the tested objects respectively; the universal test excitation file is used for describing the same test excitation among all the tested objects, and the macro definition file is used for describing different test excitation among all the tested objects;
Driving each corresponding tested object by adopting the universal test excitation file and the macro definition file respectively so as to test each tested object under comprehensive test excitation; the integrated test stimulus includes the same test stimulus between each object under test and different test stimulus between each object under test and other objects under test.
Optionally, the driving each corresponding tested object by using the universal test excitation file and the macro definition file to test each tested object under the integrated test excitation includes:
loading the universal test excitation file and the macro definition file into the compiling environment of each corresponding tested object;
compiling the universal test excitation file and the macro definition file in a compiling environment to generate an object code;
executing the target code, generating comprehensive test excitation, and testing each tested object under the comprehensive test excitation to obtain a test result of each tested object;
and comparing the test result of each tested object with the corresponding expected test result to obtain a test conclusion.
Optionally, the macro definition file includes: defining a universal macro name of the test stimulus, and expanding a character string which is extended from the universal macro name and defines the test stimulus of the tested object;
Correspondingly, in the compiling environment, compiling the universal test excitation file and the macro definition file to generate target codes, and the method comprises the following steps:
in the compiling environment, when compiling the universal macro name of the test excitation in the universal test excitation file, calling the character string of the test excitation which extends from the universal macro name and defines the tested object in the macro definition file, and replacing the universal macro name of the test excitation in the universal test excitation file to generate an object code.
Optionally, the macro definition file includes: defining a universal macro name of a description sequence and extending a character string of the description sequence of the tested object, which is extended from the universal macro name;
correspondingly, in the compiling environment, compiling the universal test excitation file and the macro definition file to generate target codes, and the method comprises the following steps:
in a compiling environment, when compiling a universal macro name of a description sequence in the universal test excitation file, calling a character string which extends from the universal macro name and defines the description sequence of the tested object in the macro definition file, and replacing the universal macro name of the description sequence in the universal test excitation file to generate an object code;
The description sequence is obtained by arranging a preset number of basic excitation units according to a set sequence and is used for describing different test flows among all tested objects.
Optionally, the macro definition file includes: a universal macro name defining a time slot, and a character string extending from the universal macro name and defining the time slot of the object to be measured;
correspondingly, in the compiling environment, compiling the universal test excitation file and the macro definition file to generate target codes, and the method comprises the following steps:
in a compiling environment, when compiling the universal macro names of the time slots in the universal test excitation file, calling the character strings which extend from the universal macro names and define the time slots of the tested objects in the macro definition file, and replacing the universal macro names of the time slots in the universal test excitation file to generate target codes;
the character string of the time interval is used for establishing the time interval which is matched with the corresponding tested object and used for sending the excitation.
Optionally, the macro definition file includes: a general macro name defining an initialization flow and a character string extending from the general macro name and defining the initialization flow of the object to be tested;
Correspondingly, in the compiling environment, compiling the universal test excitation file and the macro definition file to generate target codes, and the method comprises the following steps:
in a compiling environment, when compiling a universal macro name of an initialization flow in the universal test excitation file, calling a character string which extends from the universal macro name and defines the initialization flow of a tested object in the macro definition file, and replacing the universal macro name of the initialization flow in the universal test excitation file to generate a target code;
the initialization process is used for initializing the configuration process of the tested object.
Optionally, the macro definition file includes: a universal macro name defining the characteristics of the measured object, and a character string extending from the universal macro name and defining the characteristics of the measured object;
correspondingly, in the compiling environment, compiling the universal test excitation file and the macro definition file to generate target codes, and the method comprises the following steps:
in a compiling environment, when compiling a universal macro name of the characteristics of the tested object in the universal test excitation file, calling a character string which extends from the universal macro name and defines the characteristics of the tested object in the macro definition file, and replacing the universal macro name of the characteristics of the tested object in the universal test excitation file to generate an object code;
Wherein the measured object characteristics include access depth and/or access width.
In a second aspect, an embodiment of the present invention further provides a test stimulus multi-platform multiplexing device, including:
the acquisition module is used for acquiring universal test excitation files corresponding to a plurality of tested objects and macro definition files corresponding to the tested objects respectively; the universal test excitation file is used for describing the same test excitation among all the tested objects, and the macro definition file is used for describing different test excitation among all the tested objects;
the test module is used for respectively driving the corresponding tested objects by adopting the universal test excitation file and the macro definition file so as to test the tested objects under comprehensive test excitation; the integrated test stimulus includes the same test stimulus between each object under test and different test stimulus between each object under test and other objects under test.
In a third aspect, an embodiment of the present invention further provides an apparatus, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the test stimulus multi-platform multiplexing method provided by any embodiment of the present invention.
In a fourth aspect, embodiments of the present invention further provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the test stimulus multi-platform multiplexing method provided by any of the embodiments of the present invention.
In the embodiment of the invention, the universal test excitation file is used for describing the same test excitation among all the tested objects, and the universal test excitation file is adopted to drive all the tested objects, so that the same universal test excitation file is multiplexed among different tested objects, namely, the multiplexing of the test excitation is realized; the macro definition file is used for describing different test excitation among all the tested objects, the universal test excitation file and the macro definition file are adopted to drive the corresponding tested objects respectively so as to test all the tested objects under the comprehensive test excitation, a set of complete test excitation is not required to be written for all the tested objects, the top-layer excitation description is the same, the bottom-layer excitation is driven in different modes, the same test excitation is realized, multiplexing among different test objects is realized, the coding amount and the coding time are reduced, the coding efficiency is improved, almost no repetitive description exists, and the maintenance of the test excitation is facilitated; in addition, different test excitation is abstracted and described in a macro-definition mode, and abstract excitation description similar in multiple aspects is integrated, so that the test excitation description is simpler and more convenient, man-machine interaction is facilitated, the coding efficiency is further improved, and the efficient completion of test work is facilitated.
Drawings
FIG. 1 is a flow chart of a test stimulus multi-platform multiplexing method in accordance with a first embodiment of the invention;
FIG. 2a is a schematic diagram of a conventional test stimulus transmission in a second embodiment of the present invention;
FIG. 2b is a schematic diagram of test stimulus transmission in a second embodiment of the invention;
FIG. 3 is a schematic structural diagram of a test stimulus multi-platform multiplexing device in a third embodiment of the invention;
fig. 4 is a schematic structural view of an apparatus according to a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a test stimulus multi-platform multiplexing method according to a first embodiment of the present invention, where the embodiment is applicable to a case of testing a plurality of objects to be tested with similar test stimulus, and the similar test stimulus includes the same test stimulus and different test stimulus among the plurality of objects to be tested. The method may be performed by a test stimulus multi-platform multiplexing device, which may be implemented in hardware and/or software and may be generally integrated in a device providing test services. As shown in fig. 1, the method includes:
Step 110, obtaining universal test excitation files corresponding to a plurality of tested objects and macro definition files corresponding to the tested objects respectively; the universal test stimulus file is used for describing the same test stimulus among all the tested objects, and the macro definition file is used for describing different test stimulus among all the tested objects.
In this embodiment, the object under test, also referred to as a test-under-test device (Design Under Test, DUT), may be tested and verified on a verification platform based on a universal verification methodology (Universal Verification Methodology, UVM). The characteristics of the plurality of objects to be measured in the present embodiment are similar and the driving interfaces are similar. Illustratively, the characteristic similarity means that the plurality of objects to be measured each have a certain access depth and/or access width, but the values of the access depth and/or access width are different. The drive interface is similar in that a plurality of objects to be tested can be driven by similar test stimuli of the same main flow.
Because multiple objects under test have similar characteristics and similar drive interfaces, test stimulus of the same main flow is required to be tested, but the test stimulus is not completely the same, but has both the same part and different parts, and the test stimulus of multiple objects under test is regarded as similar. Illustratively, the same test stimulus includes: the same main flow, sub-flows and/or parameters; different test stimuli include: sub-flows and/or parameters.
In this embodiment, descriptions of the same test stimulus among the objects to be tested are written into the universal test stimulus file in advance; and writing descriptions of different test incentives among the tested objects into the macro definition file in advance. The general test excitation file refers to a description of a test task for a tested object, and the content of the general test excitation file may include a test target, a test scene, input data, a test step, an expected test result, and the like, so as to test whether the tested object meets a certain set requirement. The macro definition file adopts a macro definition mode to carry out abstract description on different test excitation, thereby replacing different parameters or different sub-flows among all tested objects by macros. Moreover, the macro definition file integrates abstract descriptions of various test stimulus, such as different characteristics and different time intervals, so that abstract description of various similar stimulus is integrated into one file, and maintenance is convenient.
Further, if the test excitation of the plurality of objects to be tested includes at least two types of test excitation, where the test excitation belonging to the same type may be regarded as being similar, the embodiment may divide the plurality of objects to be tested in advance according to whether the test excitation has the same main flow, divide the objects to be tested having the same main flow as similar objects to the same similar object set, write a generic test excitation file corresponding to the plurality of similar objects to be tested for the similar objects in the same set, and a plurality of macro definition files corresponding to the similar objects respectively, for testing the similar objects. In this embodiment, for each object to be tested, a general test excitation file corresponding to a set of similar objects to which the object to be tested belongs and a macro definition file corresponding to the object to be tested are obtained. It can be seen that each similar object under test obtains the same general test stimulus file, as well as different macro definition files.
Step 120, adopting a general test excitation file and a macro definition file to respectively drive corresponding tested objects so as to test the tested objects under comprehensive test excitation; the integrated test stimulus includes the same test stimulus between each object under test and different test stimulus between each object under test and other objects under test.
After universal test excitation files corresponding to a plurality of tested objects and macro definition files corresponding to the tested objects are obtained, the universal test excitation files are driven to interfaces of the tested objects, the macro definition files are driven to interfaces corresponding to the tested objects, and then the corresponding tested objects are driven to be tested by adopting two files on a verification platform. In the test process, the main flow in the general test file is required to be executed, macro definitions of different sub-flows and/or parameters in the macro definition file are called, complete comprehensive test excitation is obtained, and then each tested object is tested under the comprehensive test excitation.
In a specific embodiment, firstly, a universal test excitation file and a macro definition file are loaded into the compiling environment of each corresponding tested object; in the compiling environment, a universal test excitation file and a macro definition file are compiled to generate target codes. Specifically, in the universal test excitation file, different test excitation of each tested object is represented by a macro name (namely macro definition), and for convenience of description and distinction, the same macro name of each tested object is a universal macro name; the macro definition file includes a universal macro name and a string extended from the universal macro name, and different test incentives are represented by the string extended from the universal macro name. Based on the above, in the compiling environment, when compiling the universal macro names in the universal test excitation file, the character strings extending from the universal macro names in the macro definition file are called, and the universal macro names in the universal test excitation file are replaced to generate the target codes.
Then, executing the target code to generate comprehensive test excitation; testing each tested object under the comprehensive test excitation to obtain a test result of each tested object; and comparing the test result of each tested object with the corresponding expected test result to obtain a test conclusion. Where the expected test results are stored in a generic test stimulus file for describing the desired output or metrics to be achieved by the object under test, e.g. a system response time of 2ms.
In the embodiment of the invention, the universal test excitation file is used for describing the same test excitation among all the tested objects, and the universal test excitation file is adopted to drive all the tested objects, so that the same universal test excitation file is multiplexed among different tested objects, namely, the multiplexing of the test excitation is realized; the macro definition file is used for describing different test excitation among all the tested objects, the universal test excitation file and the macro definition file are adopted to drive the corresponding tested objects respectively so as to test all the tested objects under the comprehensive test excitation, a set of complete test excitation is not required to be written for all the tested objects, the top-layer excitation description is the same, the bottom-layer excitation is driven in different modes, the same test excitation is realized, multiplexing among different test objects is realized, the coding amount and the coding time are reduced, the coding efficiency is improved, almost no repetitive description exists, and the maintenance of the test excitation is facilitated; in addition, different test excitation is abstracted and described in a macro-definition mode, and abstract excitation description similar in multiple aspects is integrated, so that the test excitation description is simpler and more convenient, man-machine interaction is facilitated, the coding efficiency is further improved, and the efficient completion of test work is facilitated.
Example two
The present embodiment describes the description of the macro definition file in detail on the basis of the above embodiments, and the process of generating the object code by compiling the universal test stimulus file and the macro definition file under different descriptions. The macro definition file includes at least one of the following descriptions, each of which is described in detail below, and a corresponding object code generation process.
First case: the macro definition file includes: a generic macro name defining the test stimulus, and a string of test stimulus defining the object under test extending from the generic macro name. Correspondingly, in the compiling environment, when compiling the universal macro names of the test excitation in the universal test excitation file, calling the character strings of the test excitation which extend from the universal macro names and define the tested objects in the macro definition file, and replacing the universal macro names of the test excitation in the universal test excitation file to generate target codes.
In this case, the generic macro name defining the test stimulus may be considered the name of the test stimulus. However, the test stimulus of each tested object is different, and the names of the test stimulus should be distinguished, so that a character string which extends from a common macro name and defines the test stimulus of the tested object is adopted as the name of the test stimulus of the tested object, and can also be further used as the identification of the macro definition file. And replacing the universal macro names in the universal test excitation file with character strings corresponding to all the tested objects, thereby generating target codes and realizing the calling of different macro definition files.
Second case: the macro definition file includes: defining a universal macro name of the description sequence and extending a character string of the description sequence of the tested object, which is extended from the universal macro name; the description sequence is obtained by arranging a preset number of basic excitation units according to a set sequence and is used for describing different test flows among all tested objects. Correspondingly, in a compiling environment, when compiling the universal macro names of the description sequences in the universal test excitation file, calling the character strings of the description sequences which extend from the universal macro names and define the tested objects in the macro definition file, and replacing the universal macro names of the description sequences in the universal test excitation file to generate target codes.
In this case, the basic excitation unit may be an operation step, and the description sequence is an operation procedure obtained by arranging a plurality of operation steps in a set order, and since the test procedures to which each of the objects to be tested is applied are different, macros of the description sequence defined in the macro definition file of each of the objects to be tested have the same macro name, that is, a common macro name; different test flows among the test incentives are specifically described by extending character strings which define description sequences of the tested objects from the universal macro names, so that when the target codes are executed to test the tested objects, different test flows are realized by calling macros of the description sequences in different macro definition files.
Third case: the macro definition file includes: a universal macro name defining a time slot, and a character string extending from the universal macro name and defining the time slot of the object to be measured; the character string of the time interval is used for establishing the time interval which is matched with the corresponding tested object and used for sending the excitation. Correspondingly, in the compiling environment, when compiling the universal macro names of the time slots in the universal test excitation file, calling the character strings which extend from the universal macro names and define the time slots of the tested objects in the macro definition file, and replacing the universal macro names of the time slots in the universal test excitation file to generate target codes.
In this case, when each object to be tested is tested, it is necessary to divide the generic stimulus file into a plurality of data packets and transmit the data packets to the object to be tested, and the time slot refers to the time interval for transmitting adjacent data packets. Because the requirements of different tested objects on time gaps are different, macros of time gaps defined in macro definition files of the tested objects have the same macro name, namely a common macro name, and different time intervals for sending adjacent data packets are described by expanding character strings of the common macro name, which define the time gaps of the tested objects, so that when target codes are executed to test the tested objects, different time intervals for sending the adjacent data packets are set by calling the character strings of the time gaps in the different macro definition files.
Fourth case: the macro definition file includes: the method comprises the steps of defining a universal macro name of an initialization process and expanding a character string which is extended from the universal macro name and defines the initialization process of the tested object, wherein the initialization process is used for initializing the configuration process of the tested object. Correspondingly, in a compiling environment, when compiling the universal macro names of the initialization processes in the universal test excitation file, calling the character strings which extend from the universal macro names and define the initialization processes of the tested objects in the macro definition file, and replacing the universal macro names of the initialization processes in the universal test excitation file to generate target codes;
in this case, since the initialization configuration flows of different objects to be measured are different, macros of the initialization flows defined in the macro definition file corresponding to each object to be measured have the same macro name, that is, a common macro name; the initialization configuration flow of each different tested object is described by expanding the character strings of the initialization flow of the defined tested object from the universal macro name, so that when the target code is executed to test each tested object, different initialization configuration flows are realized by calling the character strings of the initialization flow in different macro definition files.
Fifth case: the macro definition file includes: the method comprises the steps of defining a universal macro name of the characteristics of the measured object and expanding a character string which is extended from the universal macro name and defines the characteristics of the measured object, wherein the characteristics of the measured object comprise access depth and/or access width. Correspondingly, in a compiling environment, when compiling the universal macro names of the characteristics of the tested objects in the universal test excitation file, calling the character strings which extend from the universal macro names and define the characteristics of the tested objects in the macro definition file, and replacing the universal macro names of the characteristics of the tested objects in the universal test excitation file to generate target codes;
in this case, by way of example, assuming that the object to be measured is a memory, the memory can be accessed in a row dimension or in a column dimension, the access width and the access depth can be regarded as the number of accessible rows and columns of the memory. Because the characteristics of different measured objects are different, macros of the measured object characteristics defined in macro definition files corresponding to the measured objects have the same macro name, namely a common macro name; the character strings of the measured object characteristics of the measured objects are expanded from the universal macro names to describe the characteristics of the different measured objects, so that when the target codes are executed to test the measured objects, the character strings of the measured object characteristics in different macro definition files are called to set different characteristics.
The detailed description and test procedure of the macro definition file will be described in detail below with a specific application scenario.
For example, it is assumed that there are two objects to be tested, namely, a first Object to be tested (Object 1) and a second Object to be tested (Object 2), and the instruction configuration flow and the logic search flow of the two objects to be tested are similar, so that the same main flow can be abstracted from the instruction configuration excitation and the logic search excitation of the two objects to be tested, and corresponding general test excitation files can be written; and writing respective macro definition files according to different configuration excitation and logic search excitation between the two measured objects. For example, the macro definition file of the Object under test Object1 is as follows:
Object1_def.sv:
the macro definition file of the Object under test Object2 is as follows:
Object2_def.sv:
in the two macro definition files, object_base_test represents a generic macro name of the TEST stimulus, and the TEST stimulus of each of the OBJECTs OBJECT1 and OBJECT2 to be tested extends from tcam_base_test, respectively, as a character string: object1_base_test and Object2_base_test to ensure that the generic test stimulus can be driven in different verification scenarios. The object_diff_flow represents the common macro name of the description sequence, describes different test FLOWs of the OBJECT under test OBJECT1 and OBJECT2, and uses the description sequence with the same macro definition name for different parts in the FLOW in the common test stimulus, so that different descriptions in the test FLOW can be ensured to be used in the same common test stimulus. Object_cfg_2_send_time represents the common macro name of the same sequence (sequence) or item (item) driven time gap, wherein one sequence is one complete information flow, an item is the set of the smallest constituent units in the sequence, and since the requirements of the OBJECTs OBJECT1 and OBJECT2 to the time gap of sending stimulus (i.e. sequence or item) are different, the macro using macro definition name same time gap in the common test stimulus carries out the establishment of different time gaps to adapt to different OBJECTs to be tested; object_init_flow represents a common macro name of an initialization FLOW, object_width represents a common macro name of an access WIDTH of a measured OBJECT, and object_deep represents a common macro name of an access depth of the measured OBJECT.
The test equipment acquires the universal test excitation files corresponding to the objects to be tested Object1 and Object2, the macro definition file Object1_def.sv corresponding to the Object to be tested Object1 and the macro definition file Object2_def.sv corresponding to the Object to be tested Object2, and replaces the test excitation files corresponding to the objects to be tested in the prior art with the universal test excitation files and the macro definition files.
Then, the test apparatus loads the universal test stimulus file and the macro definition file object1_def.sv into the compiling environment of the Object under test Object1, and loads the universal test stimulus file and the macro definition file object2_def.sv into the compiling environment of the Object under test Object2 to compile the universal test stimulus file and the macro definition file, generating the Object code.
As shown in FIG. 2a, in the prior art, for the objects Object1 and Object2 to be tested, similar test stimuli are defined and written in the two test stimuli respectively, so that the encoding time is increased, and once parameters or sub-processes are modified, the test stimuli are not well maintained, and the workload of code maintenance is increased. In order to solve the above problems, as shown in fig. 2b, in the embodiment of the present invention, a general test excitation file is written according to the same test excitation between two tested objects, and macro definition files, i.e., object1_def.sv and Object2_def.sv, are respectively written for the tested objects, i.e., object1 and Object2_def.sv, where different sub-flows and parameters in the general test excitation are defined by using the same macro names, so that the two macro definition files can run in the same general test excitation file, thereby facilitating maintenance of codes, reducing coding time, and improving test efficiency.
Then, executing the target code to generate comprehensive test excitation; and testing the two tested objects under the comprehensive test excitation.
Optionally, the test device tests each tested object according to a set test step under the comprehensive test excitation, records test data generated by each tested object in the test process, and obtains a test result by analyzing the test data. And comparing the test result of each tested object with the corresponding expected test result to obtain a test conclusion. The test conclusion is to summarize the execution condition of the test task and the test result, and may include: control measures and success of the test risk, whether the test target is completed, whether the test is passed, whether a legacy problem exists, whether the next stage of test can be entered, and the like.
Optionally, the test device compares the test result of each tested object with the corresponding expected test result, if the test result is consistent with the corresponding expected test result, the test target is completed, and if all the test targets are completed, the tested object passes the test; if the test result is inconsistent with the corresponding expected test result, the test target is not completed, and the tested object fails the test.
In the embodiment, the differences of the test excitation are described from the aspects of defining the test excitation, the description sequence, the time interval, the initialization flow and the characteristics of the tested object, so that the method has wide coverage and can be applied to application scenes of various tested objects; and generating target codes by defining the universal macro names and character strings and compiling the universal test excitation files and macro definition files, and further realizing the test excitation distinguished in multiple aspects by executing the target codes.
Example III
Fig. 3 is a schematic structural diagram of a test stimulus multi-platform multiplexing device in a third embodiment of the invention. The embodiment is applicable to the case of testing a plurality of objects to be tested with similar test stimuli, the similar test stimuli including the same test stimulus and different test stimuli between the plurality of objects to be tested. As shown in fig. 3, the test stimulus multi-platform multiplexing device is applied to an apparatus for providing a test service, and includes:
the acquiring module 310 is configured to acquire universal test excitation files corresponding to a plurality of objects to be tested, and macro definition files corresponding to the objects to be tested respectively; the universal test excitation file is used for describing the same test excitation among all the tested objects, and the macro definition file is used for describing different test excitation among all the tested objects;
The test module 320 is configured to drive each corresponding object to be tested by using the universal test excitation file and the macro definition file, so as to test each object to be tested under the comprehensive test excitation; the integrated test stimulus includes the same test stimulus between each object under test and different test stimulus between each object under test and other objects under test.
In the embodiment of the invention, the universal test excitation file is used for describing the same test excitation among all the tested objects, and the universal test excitation file is adopted to drive all the tested objects, so that the same universal test excitation file is multiplexed among different tested objects, namely, the multiplexing of the test excitation is realized; the macro definition file is used for describing different test excitation among all the tested objects, the universal test excitation file and the macro definition file are adopted to drive the corresponding tested objects respectively so as to test all the tested objects under the comprehensive test excitation, a set of complete test excitation is not required to be written for all the tested objects, the top-layer excitation description is the same, the bottom-layer excitation is driven in different modes, the same test excitation is realized, multiplexing among different test objects is realized, the coding amount and the coding time are reduced, the coding efficiency is improved, almost no repetitive description exists, and the maintenance of the test excitation is facilitated; in addition, different test excitation is abstracted and described in a macro-definition mode, and abstract excitation description similar in multiple aspects is integrated, so that the test excitation description is simpler and more convenient, man-machine interaction is facilitated, the coding efficiency is further improved, and the efficient completion of test work is facilitated.
Further, the test module 320 further includes: the loading unit is used for loading the universal test excitation file and the macro definition file into the compiling environment of each corresponding tested object; the compiling unit is used for compiling the universal test excitation file and the macro definition file in a compiling environment to generate an object code; the test unit is used for executing the target code, generating comprehensive test excitation, and testing all the tested objects under the comprehensive test excitation to obtain test results of all the tested objects; and the comparison unit is used for comparing the test result of each tested object with the corresponding expected test result to obtain a test conclusion.
Further, the macro definition file includes: defining a universal macro name of the test stimulus, and expanding a character string of the test stimulus which is extended from the universal macro name and defines the tested object;
accordingly, the compiling unit may be specifically configured to: in the compiling environment, when compiling the universal macro name of the test excitation in the universal test excitation file, calling the character string of the test excitation which extends from the universal macro name and defines the tested object in the macro definition file, and replacing the universal macro name of the test excitation in the universal test excitation file to generate an object code.
Further, the macro definition file includes: defining a universal macro name of the description sequence and extending a character string of the description sequence of the tested object, which is extended from the universal macro name;
accordingly, the compiling unit may be further configured to: in a compiling environment, when compiling a universal macro name of a description sequence in the universal test excitation file, calling a character string which extends from the universal macro name and defines the description sequence of the tested object in the macro definition file, and replacing the universal macro name of the description sequence in the universal test excitation file to generate an object code; the description sequence is obtained by arranging a preset number of basic excitation units according to a set sequence and is used for describing different test flows of each tested object.
Further, the macro definition file includes: a universal macro name defining a time slot, and a character string extending from the universal macro name and defining the time slot of the object to be measured;
accordingly, the compiling unit may be further configured to: in a compiling environment, when compiling the universal macro names of the time slots in the universal test excitation file, calling the character strings which extend from the universal macro names and define the time slots of the tested objects in the macro definition file, and replacing the universal macro names of the time slots in the universal test excitation file to generate target codes; the character string of the time interval is used for establishing the time interval which is matched with the corresponding tested object and used for sending the excitation.
Further, the macro definition file includes: defining a universal macro name of an initialization flow and expanding a character string which is from the universal macro name and defines the initialization flow of the tested object;
accordingly, the compiling unit may be further configured to: in a compiling environment, when compiling a universal macro name of an initialization flow in the universal test excitation file, calling a character string which extends from the universal macro name and defines the initialization flow of a tested object in the macro definition file, and replacing the universal macro name of the initialization flow in the universal test excitation file to generate a target code; the initialization flow is used for initializing the configuration flow of the tested object.
Further, the macro definition file includes: a universal macro name defining the characteristics of the object to be measured, and a character string extending from the universal macro name and defining the characteristics of the object to be measured;
accordingly, the compiling unit may be further configured to: in a compiling environment, when compiling a universal macro name of the characteristics of the tested object in the universal test excitation file, calling a character string which extends from the universal macro name and defines the characteristics of the tested object in the macro definition file, and replacing the universal macro name of the characteristics of the tested object in the universal test excitation file to generate an object code; wherein the measured object characteristics include access depth and/or access width.
The test excitation multi-platform multiplexing device provided by the embodiment of the invention can execute the test excitation multi-platform multiplexing method applied to the equipment for providing the test service provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Referring to fig. 4, fig. 4 is a schematic structural diagram of a test apparatus according to a fourth embodiment of the present invention, and as shown in fig. 4, the test apparatus includes a processor 410, a memory 420, an input device 430, and an output device 440; the number of processors 410 in the test apparatus may be one or more, one processor 410 being taken as an example in fig. 4; the processor 410, memory 420, input means 430 and output means 440 in the test apparatus may be connected by a bus or other means, for example by a bus connection in fig. 4.
The memory 420 is used as a computer readable storage medium for storing software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the test stimulus multi-platform multiplexing method in the embodiment of the present invention (e.g., the acquisition module 310 and the test module 320 in the test stimulus multi-platform multiplexing device). The processor 410 executes various functional applications and data processing of the test equipment by running software programs, instructions and modules stored in the memory 420, i.e., implements the test stimulus multi-platform multiplexing method described above.
Memory 420 may include primarily a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application program required for functionality; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 420 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 420 may further include memory remotely located with respect to processor 410, which may be connected to the test equipment through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 430 may be used to receive entered numeric or character information and to generate key signal inputs related to user settings and function control of the test equipment. The output 440 may include a display device such as a display screen.
Example five
A fifth embodiment of the present invention provides a computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, implement a test stimulus multi-platform multiplexing method, the test stimulus multi-platform multiplexing method comprising:
Obtaining universal test excitation files corresponding to a plurality of tested objects and macro definition files corresponding to the tested objects respectively; the universal test excitation file is used for describing the same test excitation among all the tested objects, and the macro definition file is used for describing different test excitation among all the tested objects;
driving each corresponding tested object by adopting the universal test excitation file and the macro definition file respectively so as to test each tested object under comprehensive test excitation; the integrated test stimulus includes the same test stimulus between each object under test and different test stimulus between each object under test and other objects under test.
Of course, the computer-readable storage medium provided by the embodiments of the present invention may have computer instructions capable of executing the related operations in the test stimulus multi-platform multiplexing method provided by any of the embodiments of the present invention, not limited to the above method operations.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., including several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to execute the method of the embodiments of the present invention.
It should be noted that, in the embodiment of the test excitation multi-platform multiplexing device, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (9)

1. A test stimulus multi-platform multiplexing method, comprising:
judging whether the test excitation of the plurality of tested objects comprises at least two types of test excitation;
If yes, carrying out similarity division on the plurality of tested objects in advance according to whether the test excitation has the same main flow or not;
dividing the tested objects with the same main flow of the test excitation as similar tested objects into the same similar object set;
obtaining a universal test excitation file corresponding to a similar object set to which the plurality of tested objects belong and macro definition files corresponding to the tested objects respectively; the universal test excitation file is used for describing the same test excitation among all the tested objects, and the macro definition file is used for describing different test excitation among all the tested objects; the characteristics of the detected objects are similar, and the driving interfaces are similar;
loading the universal test excitation file and the macro definition file into the compiling environment of each corresponding tested object;
compiling the universal test excitation file and the macro definition file in a compiling environment to generate an object code;
executing the target code, generating comprehensive test excitation, and testing each tested object under the comprehensive test excitation to obtain a test result of each tested object; wherein the comprehensive test stimulus comprises the same test stimulus among all tested objects and different test stimulus among all tested objects and other tested objects;
And comparing the test result of each tested object with the corresponding expected test result to obtain a test conclusion.
2. The method of claim 1, wherein the macro definition file comprises: defining a universal macro name of the test stimulus, and expanding a character string which is extended from the universal macro name and defines the test stimulus of the tested object;
correspondingly, in the compiling environment, compiling the universal test excitation file and the macro definition file to generate target codes, and the method comprises the following steps:
in the compiling environment, when compiling the universal macro name of the test excitation in the universal test excitation file, calling the character string of the test excitation which extends from the universal macro name and defines the tested object in the macro definition file, and replacing the universal macro name of the test excitation in the universal test excitation file to generate an object code.
3. The method of claim 1, wherein the macro definition file comprises: defining a universal macro name of a description sequence and extending a character string of the description sequence of the tested object, which is extended from the universal macro name;
correspondingly, in the compiling environment, compiling the universal test excitation file and the macro definition file to generate target codes, and the method comprises the following steps:
In a compiling environment, when compiling a universal macro name of a description sequence in the universal test excitation file, calling a character string which extends from the universal macro name and defines the description sequence of the tested object in the macro definition file, and replacing the universal macro name of the description sequence in the universal test excitation file to generate an object code;
the description sequence is obtained by arranging a preset number of basic excitation units according to a set sequence and is used for describing different test flows among all tested objects.
4. The method of claim 1, wherein the macro definition file comprises: a universal macro name defining a time slot, and a character string extending from the universal macro name and defining the time slot of the object to be measured;
correspondingly, in the compiling environment, compiling the universal test excitation file and the macro definition file to generate target codes, and the method comprises the following steps:
in a compiling environment, when compiling the universal macro names of the time slots in the universal test excitation file, calling the character strings which extend from the universal macro names and define the time slots of the tested objects in the macro definition file, and replacing the universal macro names of the time slots in the universal test excitation file to generate target codes;
The character string of the time interval is used for establishing the time interval which is matched with the corresponding tested object and used for sending the excitation.
5. The method of claim 1, wherein the macro definition file comprises: a general macro name defining an initialization flow and a character string extending from the general macro name and defining the initialization flow of the object to be tested;
correspondingly, in the compiling environment, compiling the universal test excitation file and the macro definition file to generate target codes, and the method comprises the following steps:
in a compiling environment, when compiling a universal macro name of an initialization flow in the universal test excitation file, calling a character string which extends from the universal macro name and defines the initialization flow of a tested object in the macro definition file, and replacing the universal macro name of the initialization flow in the universal test excitation file to generate a target code;
the initialization process is used for initializing the configuration process of the tested object.
6. The method of claim 1, wherein the macro definition file comprises: a universal macro name defining the characteristics of the measured object, and a character string extending from the universal macro name and defining the characteristics of the measured object;
Correspondingly, in the compiling environment, compiling the universal test excitation file and the macro definition file to generate target codes, and the method comprises the following steps:
in a compiling environment, when compiling a universal macro name of the characteristics of the tested object in the universal test excitation file, calling a character string which extends from the universal macro name and defines the characteristics of the tested object in the macro definition file, and replacing the universal macro name of the characteristics of the tested object in the universal test excitation file to generate an object code;
wherein the measured object characteristics include access depth and/or access width.
7. A test stimulus multi-platform multiplexing device, comprising:
the dividing module is used for judging whether the test excitation of the plurality of tested objects comprises at least two types of test excitation; if yes, carrying out similarity division on the plurality of tested objects in advance according to whether the test excitation has the same main flow or not; dividing the tested objects with the same main flow of the test excitation as similar tested objects into the same similar object set;
the acquisition module is used for acquiring the universal test excitation files corresponding to the similar object sets to which the plurality of tested objects belong and macro definition files corresponding to the tested objects respectively; the universal test excitation file is used for describing the same test excitation among all the tested objects, and the macro definition file is used for describing different test excitation among all the tested objects; the characteristics of the detected objects are similar, and the driving interfaces are similar;
A test module, comprising:
the loading unit is used for loading the universal test excitation file and the macro definition file into the compiling environment of each corresponding tested object;
the compiling unit is used for compiling the universal test excitation file and the macro definition file in a compiling environment to generate an object code;
the test unit is used for executing the target code, generating comprehensive test excitation, and testing all the tested objects under the comprehensive test excitation to obtain test results of all the tested objects; wherein the comprehensive test stimulus comprises the same test stimulus among all tested objects and different test stimulus among all tested objects and other tested objects;
and the comparison unit is used for comparing the test result of each tested object with the corresponding expected test result to obtain a test conclusion.
8. An electronic device, the electronic device comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the test stimulus multi-platform multiplexing method of any of claims 1-6.
9. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a test stimulus multi-platform multiplexing method according to any of claims 1-6.
CN201910465583.8A 2019-05-30 2019-05-30 Test excitation multi-platform multiplexing method, device, equipment and storage medium Active CN112015633B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910465583.8A CN112015633B (en) 2019-05-30 2019-05-30 Test excitation multi-platform multiplexing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910465583.8A CN112015633B (en) 2019-05-30 2019-05-30 Test excitation multi-platform multiplexing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112015633A CN112015633A (en) 2020-12-01
CN112015633B true CN112015633B (en) 2023-11-17

Family

ID=73501064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910465583.8A Active CN112015633B (en) 2019-05-30 2019-05-30 Test excitation multi-platform multiplexing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112015633B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114580344B (en) * 2022-04-24 2022-08-16 飞腾信息技术有限公司 Test excitation generation method, verification system and related equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0081653A2 (en) * 1981-11-30 1983-06-22 International Business Machines Corporation Method of recording and reading optimum density bar code
CN104881396A (en) * 2015-06-05 2015-09-02 南京南瑞继保电气有限公司 Graphical-program compile file forming method
CN108845952A (en) * 2018-08-17 2018-11-20 成都成电光信科技股份有限公司 A kind of avionics FC data stimuli method based on test case script

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7209851B2 (en) * 2003-02-14 2007-04-24 Advantest America R&D Center, Inc. Method and structure to develop a test program for semiconductor integrated circuits
US20170277836A1 (en) * 2016-03-22 2017-09-28 International Business Machines Corporation Identifying Professional Incentive Goal Progress and Contacts for Achieving Goal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0081653A2 (en) * 1981-11-30 1983-06-22 International Business Machines Corporation Method of recording and reading optimum density bar code
CN104881396A (en) * 2015-06-05 2015-09-02 南京南瑞继保电气有限公司 Graphical-program compile file forming method
CN108845952A (en) * 2018-08-17 2018-11-20 成都成电光信科技股份有限公司 A kind of avionics FC data stimuli method based on test case script

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于谐振腔的模式激励研究;田成辉;《中国优秀硕士学位论文全文数据库 (信息科技辑)》(第03期);I135-90 *

Also Published As

Publication number Publication date
CN112015633A (en) 2020-12-01

Similar Documents

Publication Publication Date Title
JP6307140B2 (en) System and method for safety critical software automatic requirement based test case generation
US7810070B2 (en) System and method for software testing
US9477581B2 (en) Integrated system and method for validating the functionality and performance of software applications
CN106354645B (en) Test method and test platform based on background system service or interface
CN109901834B (en) Document page generation method, device, computer equipment and storage medium
US7797684B2 (en) Automatic failure analysis of code development options
KR20080068385A (en) Program test system, method and computer readable medium on which program for executing the method is recorded
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN108111364B (en) Service system testing method and device
CN112416318B (en) Micro-service development method and device, storage medium and electronic equipment
CN105095059A (en) Method and device for automated testing
CN105302717A (en) Detection method and apparatus for big data platform
CN114546738B (en) Universal test method, system, terminal and storage medium for server
US20150286555A1 (en) System and method for converting the business processes to test-centric activity diagrams
CN108491321A (en) test case range determining method, device and storage medium
CN111538659B (en) Interface testing method, system, electronic equipment and storage medium of business scene
Liu et al. A General Framework to Identify Software Components from Execution Data.
CN112015633B (en) Test excitation multi-platform multiplexing method, device, equipment and storage medium
CN108897678B (en) Static code detection method, static code detection system and storage device
CN111459796A (en) Automatic testing method and device, computer equipment and storage medium
CN116467188A (en) Universal local reproduction system and method under multi-environment scene
CN113886221B (en) Test script generation method and device, storage medium and electronic equipment
CN111966597B (en) Test data generation method and device
CN113986768A (en) Application stability testing method, device, equipment and medium
CN113726610A (en) Routing protocol-based UI (user interface) automatic testing method, device, equipment and medium

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
GR01 Patent grant
GR01 Patent grant