CN116702668A - Regression testing method and device, electronic equipment and storage medium - Google Patents

Regression testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116702668A
CN116702668A CN202310702375.1A CN202310702375A CN116702668A CN 116702668 A CN116702668 A CN 116702668A CN 202310702375 A CN202310702375 A CN 202310702375A CN 116702668 A CN116702668 A CN 116702668A
Authority
CN
China
Prior art keywords
test
file
user
command line
line
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
CN202310702375.1A
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.)
Taichu Wuxi Electronic Technology Co ltd
Original Assignee
Taichu Wuxi Electronic 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 Taichu Wuxi Electronic Technology Co ltd filed Critical Taichu Wuxi Electronic Technology Co ltd
Priority to CN202310702375.1A priority Critical patent/CN116702668A/en
Publication of CN116702668A publication Critical patent/CN116702668A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/32Circuit design at the digital level
    • G06F30/33Design verification, e.g. functional simulation or model checking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing

Landscapes

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

Abstract

The invention discloses a regression testing method, a regression testing device, electronic equipment and a storage medium, and relates to the technical field of chip testing, wherein the regression testing method comprises the following steps: responding to the acquired user command line, acquiring a test file through a user main file; the user main file is inherited to the system main file; acquiring a test command line set of a test file through a user main file and an analysis execution file; and carrying out regression testing on the test command line set through the user master file and the simulation execution file according to the user command line. According to the technical scheme, batch testing of a plurality of test command lines is achieved, regression testing efficiency is improved, the user main files are inherited in the system main files, the fact that when each user carries out regression testing, the regression testing can be completed by using test logic which is built in advance by the system main files is guaranteed, personalized testing requirements under a multi-user scene are achieved, and modification of the system main files by each user is avoided.

Description

Regression testing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of chip testing technologies, and in particular, to a regression testing method, apparatus, electronic device, and storage medium.
Background
The regression test is used as an important test link in front-end verification of the chip, and effectively verifies whether a new error is introduced into the updated chip program or other codes are caused to generate errors.
For the execution of regression test, the existing EDA (Electronic design automation ) tools, such as IRUN and VCS, only provide a single compiling simulation function, and for the running simulation scene of multiple test cases, multiple items of test are required to be manually completed by a tester, so that the test efficiency is low.
In addition, the existing regression test script cannot adapt to personalized test requirements of different users in a multi-user scene, and has a single test function.
Disclosure of Invention
The invention provides a regression testing method, a regression testing device, electronic equipment and a storage medium, which are used for solving the problem of low regression testing efficiency.
According to an aspect of the present invention, there is provided a regression testing method including:
responding to the acquired user command line, acquiring a test file through a user main file; wherein, the user master file inherits from the system master file;
acquiring a test command line set of the test file through the user main file and the analysis execution file; wherein the set of test command lines includes at least one test command line;
And carrying out regression testing on the test command line set through the user main file and the simulation execution file according to the user command line.
According to another aspect of the present invention, there is provided a regression testing apparatus including:
the test file acquisition module is used for responding to the acquisition of the user command line and acquiring a test file through the user main file; wherein, the user master file inherits from the system master file;
the test command line acquisition module is used for acquiring a test command line set of the test file through the user main file and the analysis execution file; wherein the set of test command lines includes at least one test command line;
and the regression test execution module is used for carrying out regression test on the test command line set through the user main file and the simulation execution file according to the user command line.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the regression testing method of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute the regression testing method according to any one of the embodiments of the present invention.
According to the technical scheme, the test file is obtained through the user main file in response to the obtained user command line, the test command line set of the test file is obtained through the user main file and the analysis execution file, and then the regression test is carried out on the test command line set according to the user command line through the user main file and the simulation execution file, so that not only is the batch test of a plurality of test command lines realized, but also the regression test efficiency improved, and the user main file inherited to the system main file is ensured, the regression test can be completed by using the test logic which is built in advance by using the system main file when each user carries out the regression test, the personalized test requirement under a multi-user scene is realized, and the modification of each user to the system main file is avoided.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a regression testing method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of another regression testing method according to the second embodiment of the present invention;
FIG. 3 is a flow chart of yet another regression testing method provided in accordance with the third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a regression testing apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing the regression testing method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a regression testing method according to a first embodiment of the present invention, where the method may be applied to a case of executing a regression test on a test file according to an acquired user command line, and the method may be executed by a regression testing device, where the regression testing device may be implemented in a hardware and/or software form, and the regression testing device is configured in a regression testing system, where the regression testing system may be configured in an electronic device such as a server. As shown in fig. 1, the method includes:
S101, responding to acquisition of a user command line, and acquiring a test file through a user main file; wherein the user master file is inherited from the system master file.
The user command line is a user instruction issued by a user and used for executing a regression test; the user command line records the address of the test file to be subjected to regression test and the command line parameters of the test file; the command line parameters may include, among other things, execution mode (e.g., execution in parallel or serial between command lines) and execution mode (e.g., execution in foreground or background for command lines). The test file is a code file for executing regression test, the test file records one or more test command lines, and the test command lines are test objects for actually executing the regression test; after the regression testing system acquires the testing command line, the regression testing system executes the corresponding simulation test on the testing command line.
The system main file is a main script file stored in the regression testing system and is used for scheduling and controlling the whole regression testing flow, and is also an entry for executing the regression testing by the regression testing system aiming at the acquired testing file and the user command line, namely an initial file which is started first when the regression testing is executed; in the embodiment of the invention, the regression testing system can be written based on the Python language, so that each script file which is written in advance in the regression testing system can be used as a name suffix by 'py'; meanwhile, the name of the regression testing system can be used as the name prefix of each script file; for example, the system master file may be named "rt_main.py"; where "rt" represents the name of the regression testing system, "main" represents the name of the system master file, and "py" represents that the system master file is written based on the Python language.
The user master file is a user file inherited from the system master file, and takes the system master file named as rt_main.py as an example, and the user master file can be named as user_rt_main.py; the system main file can be stored in a fixed position in the regression testing system and is not allowed to be accessed and modified by a user; the user master files can be stored in any directory of the user, and different user master files can be created for different users, namely, a plurality of user master files are allowed to exist simultaneously; when a user performs a regression test, access is only allowed to their corresponding user master file. For the user master file inherited from the system master file, the system master file has the complete test function of the system master file, so that the regression test can be finished by using the test logic which is built in advance by the system master file when each user carries out the regression test, and the modification of each user to the system master file is avoided.
S102, acquiring a test command line set of the test file through the user main file and the analysis execution file; wherein the set of test command lines includes at least one test command line.
The analysis execution file is an extraction tool for analyzing the acquired test file to extract each test command line; after acquiring a user command line and completing analysis of the user command line, determining a test file to be tested, and reading the test file; then, the user master file analyzes the test file by calling the analysis execution file so as to obtain a specific test command line in the test file; for example, the test file may consist of annotation information and a test command line; the annotation information may be identified with a specified annotation identifier as a start identifier, e.g., with "#" or "//" as annotation identifiers, and placed before all test command lines; the test command line represents a line of code for which a simulation test is to be performed. Taking the above technical solution as an example, the parsing execution file may be named as "rt_partner.py"; where "parser" represents the name of the resolution execution file.
In addition, in order to ensure that the user main file and the analysis execution file call the general method when executing corresponding processing logic, the general method required by the user main file and the analysis execution file when executing the own code logic can be recorded through configuring the completed common library file, and the general method required by the user main file when calling the analysis execution file is recorded; the analysis execution file and the public library file, like the system master file, can also be stored in a fixed position in the regression testing system, and the user is not allowed to directly access and modify.
Optionally, in an embodiment of the present invention, the test file includes a test list file, and the test list file includes at least one of a test command line, a nested list line, and a nested command line; the nested list lines are matched with an associated list file, and the associated list file comprises a plurality of test command lines; the nested command lines are matched with an associated command file that includes a test command line.
Specifically, the test list file is used for regression testing of multiple test command lines, and can include nested list lines and nested command lines in addition to annotation information and test command lines; wherein nested list lines record the address of a list file (i.e., associated list file) indicating that the current command line is not a real test command line but is directed to a list file; if the user master file determines that the current command behavior is nested in the list row, reading an associated list file according to the list file address, wherein a plurality of test command rows are recorded in the associated list file; nested command lines, which record the address of a command file (i.e., associated command file), also indicate that the current command line is not a real test command line, but points to a command file; if the user master file determines that the current command line is a nested column command line, the user master file reads the associated command file according to the address of the command file, and a test command line is recorded in the associated command file.
For example, table 1 is a schematic structural diagram of a test list file, and lines 1 and 2 represent annotation information of the test list file; line 3 represents a nested list line, i.e., the test list file is nested with a list file named "eg2. Lis"; line 4 represents a nested command line, i.e., the test list file is nested with a command file named "demo. Run"; lines 5 and 6 represent a test command line, respectively.
TABLE 1 schematic structural diagram of test list files
In particular, whether the test list file, the nested list file or the nested command file, the recorded test command lines of the nested list file, each test command line only executes one regression test and does not have an iterative execution function; "loop=4" and "loop=6" in the test command line in table 1 refer to the number of LOOP calls to the internal data when the test command line performs the regression test, and not to the number of LOOPs of the test command line itself. Therefore, one or more of the test command line, the nested list file and the nested command file are configured in one test list file, so that the regression test system can execute the regression test of multiple test command lines based on one test list file only aiming at the scattered code file, and the convenience of the regression test is improved.
Optionally, in an embodiment of the present invention, the test file includes a test group file; the test group file comprises at least one test group and test parameters which are matched with the test group one by one; the test set includes at least one test command line; the test parameters include iteration number and/or seed options.
Specifically, in some test scenarios, a tester may need to perform multiple tests on one test command line, i.e., perform a regression test in an iterative manner, where the regression test may be performed in the form of a test set; the test group is to group a plurality of test command lines which need to execute the cyclic test in a concentrated way; each test group includes one or more test command lines; each test group comprises a corresponding iteration number and/or seed option; the iteration times refer to the iteration times of each test command line, and the same iteration times can be configured for each test command line, or can be configured for different test command lines one by one; seed options, which are test excitation values for each test command line; the seed option can be set to be automatic, namely the excitation values are randomly generated, and the excitation values of all the test command lines can be set to be the same fixed value; seed options for each test command line may also be set piece by piece.
For example, table 2 is a schematic structural diagram of a test group file, and line 1 is the name of the test group; line 2 is descriptive information of the test group; line 3 is the number of iterations of the test set, "iter: [ n ] "represents that the iteration number of each test command line in the current test group is set to n times; "iter: [ x, y, z ] "represents the iteration number of three test command lines in the current test group, and is set as x, y, z in turn; line 4 is the seed option for the test group, "seed: auto represents random generation of stimulus values for each test command line; "seed: [ n ] "represents that the excitation value of each test command line is set to n; "seed: [ x, y, z ] "means that the excitation values of three test command lines are sequentially set to x, y, z; line 5 is the execution identification; lines 6 to 8 are three command test lines, respectively.
TABLE 2 schematic structural diagram of test group files
1 test_group1
2 desc:this is a demo test group#group description
3 iter:[]
4 seed:[]
5 run:
6 ./run-timescale 1ns/1ps-isq../sti/demo.vtm-def LOOP=10
7 ./run-timescale 1ns/1ps-isq../sti/demo.vtm-def LOOP=40
8 ./run-timescale 1ns/1ps-isq../sti/demo.vtm-def LOOP=50
Therefore, each test command line with the iterative test requirement is configured as a test group, and the test command lines are further provided for the regression test system in the form of a test group file, so that the regression test system can realize the excitation test of multiple test command lines only based on one test group file, and the convenience of the regression test is further improved.
S103, carrying out regression testing on the test command line set through the user main file and the simulation execution file according to the user command line.
The simulation execution file is used for starting and managing each process and each thread for executing the simulation test; after the test command line set is obtained, the user main file starts one or more processes (or threads) through the simulation execution file according to the execution mode recorded in the user command line, and then the simulation test of each test command line is executed in a parallel or serial mode through the processes or threads, so that the test result of each test command line is obtained; each test command line with abnormal error reporting is recorded in the test result.
In addition, in order to ensure that the simulation execution file calls the general method when managing processes and threads, the general method required by the simulation execution file when executing the self code logic can be recorded through configuring the completed common library file, and the general method required by the user main file when calling the simulation execution file can be recorded; the simulation execution file, like the system master file, can also be stored in a fixed location in the regression testing system, and does not allow direct access and modification by the user.
Optionally, in an embodiment of the present invention, the test file further includes a test management file, where the test management file is matched with a plurality of first type files; the first type file comprises a second type file or a plurality of test list files or a plurality of test group files; the second type of files includes at least one test list file and at least one test group file.
Specifically, the test file may also exist in the form of a test management file, where the test management file is a file set of a previous level of test list files and test group files, and is associated with at least two test list files, or is associated with at least two test group files, or is associated with at least one test list file and at least one test group file at the same time; for example, table 3 is a schematic structural diagram of a test management file, which records two test list files, namely a "… … reg.lis" file and a "… … reg2.lis" file; when the regression testing system acquires the test management file, the two test list files are respectively read based on the analysis address, and then the test command lines in the two test list files are added into the test command line set.
TABLE 3 schematic structural diagram of test management files
1 $FILE{……/sti/reg.lis}$OPT{-idx[1,2]-all_log}
2 $FILE{……/sti/reg2.lis}$OPT{-idx[3,4]}
By configuring a plurality of test list files and/or test group files in one test management file, the regression test system can execute the regression test of multiple test command lines based on one test management file only aiming at more scattered code files, and the convenience of the regression test is further improved.
According to the technical scheme, the test file is obtained through the user main file in response to the obtained user command line, the test command line set of the test file is obtained through the user main file and the analysis execution file, and then the regression test is carried out on the test command line set according to the user command line through the user main file and the simulation execution file, so that not only is the batch test of a plurality of test command lines realized, but also the regression test efficiency improved, and the user main file inherited to the system main file is ensured, the regression test can be completed by using the test logic which is built in advance by using the system main file when each user carries out the regression test, the personalized test requirement under a multi-user scene is realized, and the modification of each user to the system main file is avoided.
Example two
Fig. 2 is a flowchart of a regression testing method according to a second embodiment of the present invention, where the relationship between the present embodiment and the above embodiments is that the test files in the test file set are composed of a test command line, a nested list line, a nested command line, and a test group. As shown in fig. 2, the method includes:
s201, responding to the acquisition of a user command line, and acquiring a test file through a user main file; wherein, the user master file inherits from the system master file; the test file includes a test command line, a nested list line, a nested command line neutralization test set.
S202, sequentially reading all command lines in the test file through the user main file and the analysis execution file; if the current data behavior test command line is determined, adding the current data line into a test command line set; if the current data line nesting list line is determined, acquiring an association list file matched with the current data line, and adding each test command line in the association list file into a test command line set; if the current data behavior nesting command line is determined, acquiring an associated command file matched with the current data line, and adding a test command line in the associated command file into a test command line set; if the current data behavior test group is determined, assigning a value to each test command line of the test group according to the test parameters of the test group, and adding the assigned test command line into a test command set.
The test file may not distinguish between the test list file and the test group file, but the test command line, the nested list line, the nested command line and the test group are all configured in one test file, and when the regression test system analyzes the test file through analyzing the execution file, if determining that the current data line is the test command line, for example, detecting that the current data line has "/run" characters, namely, adding the current data line into the test command line set; if it is determined that the current data row has a nested list of data rows, for example, the presence of the ". Lis" character is detected for the current data row, the test command row in the associated list file that matches the current data row is added to the test command row set.
If the current data line is determined to be nested in the command line, for example, the fact that the current data line has a 'run' character is detected, namely, the test command line in the associated command file matched with the current data line is added into a test command line set; if the current data behavior test group is determined, for example, a test character is detected to exist in the current data line, assigning a value to each test command line of the test group according to the test parameters of the test group, and adding the assigned test command line into the test command set.
S203, carrying out regression testing on the test command line set through the user main file and the simulation execution file according to the user command line.
According to the technical scheme, the test command line, the nested list file and the nested command file and the test group with the iterative test requirement are configured in one test file, so that the regression test system can execute multi-item regression tests according to the scattered code files and the current test files, and can execute multi-item excitation tests according to the test files, and the diversity and the integrity of the regression tests are ensured.
Example III
Fig. 3 is a flowchart of a regression testing method according to a third embodiment of the present invention, where the relationship between the present embodiment and the above embodiments is that after a user command line is obtained, a user master file is constructed through each configuration interface corresponding to a system master file. As shown in fig. 3, the method includes:
s301, responding to the acquired user command line, acquiring user configuration parameters through each configuration interface corresponding to the system main file, acquiring the user main file according to the user configuration parameters, and acquiring the test file through the user main file.
S302, acquiring a test command line set of the test file through the user main file and the analysis execution file; wherein the set of test command lines includes at least one test command line.
S303, carrying out regression testing on the test command line set through the user main file and the simulation execution file according to the user command line.
The system main file provides a plurality of configuration interfaces, configuration parameters of the system main file can be modified and updated through different configuration interfaces, so that the user main file is different from the system main file in a test mode, and therefore personalized test requirements of users are met, and personalized user main file generation is realized on the premise that the system main file stored in the regression test system is not changed. For example, table 4 provides a configuration interface for a system master file; the default simulation tool configuration interface can configure simulation parameter settings of different test command lines, such as vcs, irun, xrun and the like, and configure names of default check simulation logs, such as vcs, irun, log, xrun, and the like, according to different default simulators; and configuring interfaces by default of the maximum parallel regression quantity, namely configuring the maximum simulation process quantity running simultaneously when the interfaces are used for executing the parallel test mode.
The default parallel regression starting mode configuration interface can be used for configuring the starting mode into a multi-process mode or a multi-thread mode; wherein, the multi-process mode can use the sub-process module of python to create a plurality of sub-processes, and the multi-thread mode can use the thread module of python to create a plurality of sub-threads; the default parallel regression scheduling mode configuration interface can be used for configuring the scheduling mode into a unified scheduling mode or an independent scheduling mode; if the maximum parallel quantity of the configuration is N, starting N processes each time in a unified scheduling mode, waiting for N processes to be executed and checking the completion, and starting N processes in the next round; in the independent scheduling mode, firstly, starting N processes, checking whether a released completed process exists in the N processes or not every a period of time, and if the released completed process is detected, running a simulation test of a new test command line by using the process.
The log automatic cleaning switch configuration interface can be used for automatically cleaning the log of the command test line checked to be free of errors after the configuration simulation is finished so as to save the hard disk space, and the log of the command test line with errors needs to be reserved; the default timeout configuration interface can be used for configuring a timer in running for each command test line, if the timer exceeds the default timeout, the process needs to be forcibly terminated, error information is reported, and resources are released for new test command lines, so that the existence of the test command lines which are trapped into dead loops or abnormal blocking in the regression test process is avoided.
Table 4 configuration interface for system master files
Configuring interface names Configuring interface functions
Default simulation tool configuration interface Configuring simulation parameter settings for different test command lines
Default maximum parallel regression quantity configuration interface Configuring the maximum number of simulation processes running simultaneously
Default parallel regression initiation mode configuration interface Configuring multi-process mode or multi-threaded mode
Default parallel regression scheduling mode configuration interface Configuring a unified scheduling mode or an independent scheduling mode
Automatic log cleaning switch configuration interface Configuring automatic cleaning hard disk space
Default timeout time configuration interface Forced termination of a process
Optionally, in an embodiment of the present invention, after obtaining the user master file according to the user configuration parameter, the method further includes: and updating the user master file according to the command line parameters in the user command line.
Specifically, when the user master file is created, or after the user master file is created, the test parameters of the test command line are modified through the configuration interface, and when the user command line is input, the modified test parameters can be recorded in the user command line, so that the configuration parameters of the user master file are directly updated through the read user command line, thereby avoiding the complicated process of modifying the configuration parameters of the user master file one by one through each configuration interface, simplifying the regression test flow, and further improving the regression test efficiency. For example, table 5 is a command line parameter that may be used in a user command line.
TABLE 5 Command line parameters for user Command lines
According to the technical scheme, the user configuration parameters are obtained through the configuration interfaces corresponding to the system main files, after the user main files are obtained according to the user configuration parameters, the regression test of the test command line set is executed based on the user main files, personalized user main file generation is realized on the premise that the system main files stored in the regression test system are not changed, and the test type diversity of the regression test is expanded.
Example IV
Fig. 4 is a block diagram of a regression testing apparatus according to a fourth embodiment of the present invention, which specifically includes:
a test file obtaining module 401, configured to obtain a test file through a user main file in response to obtaining a user command line; wherein, the user master file inherits from the system master file;
a test command line acquisition module 402, configured to acquire a test command line set of the test file through the user main file and the parsing execution file; wherein the set of test command lines includes at least one test command line;
and the regression test execution module 403 is configured to perform a regression test on the test command line set according to the user command line through the user main file and the simulation execution file.
According to the technical scheme, the test file is obtained through the user main file in response to the obtained user command line, the test command line set of the test file is obtained through the user main file and the analysis execution file, and then the regression test is carried out on the test command line set according to the user command line through the user main file and the simulation execution file, so that not only is the batch test of a plurality of test command lines realized, but also the regression test efficiency improved, and the user main file inherited to the system main file is ensured, the regression test can be completed by using the test logic which is built in advance by using the system main file when each user carries out the regression test, the personalized test requirement under a multi-user scene is realized, and the modification of each user to the system main file is avoided.
Optionally, the test file includes a test list file, the test list file including at least one of a test command line, a nested list line, and a nested command line; the nested list lines are matched with an associated list file, and the associated list file comprises a plurality of test command lines; the nested command lines are matched with an associated command file that includes a test command line.
Optionally, the test file includes a test group file; the test group file comprises at least one test group and test parameters which are matched with the test group one by one; the test set includes at least one test command line; the test parameters include iteration number and/or seed options.
Optionally, the test file includes a test command line, a nested list line, a nested command line neutralization test group.
The test command line acquisition module 402 is specifically configured to sequentially read each data line in the test file through the user main file and the parsing execution file; if the current data behavior test command line is determined, adding the current data line into a test command line set; if the current data line nesting list line is determined, acquiring an association list file matched with the current data line, and adding each test command line in the association list file into a test command line set; if the current data behavior nesting command line is determined, acquiring an associated command file matched with the current data line, and adding a test command line in the associated command file into a test command line set; if the current data behavior test group is determined, assigning a value to each test command line of the test group according to the test parameters of the test group, and adding the assigned test command line into a test command set.
Optionally, the test file further includes a test management file, and the test management file is matched with the plurality of first type files; the first type file comprises a second type file or a plurality of test list files or a plurality of test group files; the second type of files includes at least one test list file and at least one test group file.
Optionally, the test file obtaining module 401 is specifically configured to obtain user configuration parameters through each configuration interface corresponding to the system main file, and obtain the user main file according to the user configuration parameters.
Optionally, the test file obtaining module 401 is specifically further configured to update the user master file according to a command line parameter in the user command line.
The device can execute the regression testing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be found in the regression testing method provided in any embodiment of the present invention.
Example five
Fig. 5 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the regression testing method.
In some embodiments, the regression testing method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and/or installed onto the heterogeneous hardware accelerator via the ROM and/or the communication unit. When the computer program is loaded into RAM and executed by the processor, one or more steps of the regression testing method described above may be performed. Alternatively, in other embodiments, the processor may be configured to perform the regression testing method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a heterogeneous hardware accelerator having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or a trackball) through which a user can provide input to the heterogeneous hardware accelerator. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A regression testing method, comprising:
responding to the acquired user command line, acquiring a test file through a user main file; wherein, the user master file inherits from the system master file;
acquiring a test command line set of the test file through the user main file and the analysis execution file; wherein the set of test command lines includes at least one test command line;
and carrying out regression testing on the test command line set through the user main file and the simulation execution file according to the user command line.
2. The method of claim 1, wherein the test file comprises a test list file comprising at least one of a test command line, a nested list line, and a nested command line; the nested list lines are matched with an associated list file, and the associated list file comprises a plurality of test command lines; the nested command lines are matched with an associated command file that includes a test command line.
3. The method of claim 1, wherein the test file comprises a test group file; the test group file comprises at least one test group and test parameters which are matched with the test group one by one; the test set includes at least one test command line; the test parameters include iteration number and/or seed options.
4. The method of claim 1, wherein the test file comprises a test command line, a nested list line, a nested command line neutralization test set;
the step of obtaining the test command line set of the test file through the user main file and the analysis execution file comprises the following steps:
sequentially reading each data row in the test file through the user main file and the analysis execution file;
If the current data behavior test command line is determined, adding the current data line into a test command line set;
if the current data line nesting list line is determined, acquiring an association list file matched with the current data line, and adding each test command line in the association list file into a test command line set;
if the current data behavior nesting command line is determined, acquiring an associated command file matched with the current data line, and adding a test command line in the associated command file into a test command line set;
if the current data behavior test group is determined, assigning a value to each test command line of the test group according to the test parameters of the test group, and adding the assigned test command line into a test command set.
5. The method of claim 1, wherein the test files further comprise a test management file, the test management file matching the plurality of first type files; the first type file comprises a second type file or a plurality of test list files or a plurality of test group files; the second type of files includes at least one test list file and at least one test group file.
6. The method according to claim 1, wherein the obtaining the test file by the user master file specifically comprises:
And acquiring user configuration parameters through each configuration interface corresponding to the system main file, and acquiring the user main file according to the user configuration parameters.
7. The method of claim 6, further comprising, after obtaining a user profile based on the user configuration parameters:
and updating the user master file according to the command line parameters in the user command line.
8. A regression testing apparatus, comprising:
the test file acquisition module is used for responding to the acquisition of the user command line and acquiring a test file through the user main file; wherein, the user master file inherits from the system master file;
the test command line acquisition module is used for acquiring a test command line set of the test file through the user main file and the analysis execution file; wherein the set of test command lines includes at least one test command line;
and the regression test execution module is used for carrying out regression test on the test command line set through the user main file and the simulation execution file according to the user command line.
9. An electronic device, the electronic device comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the regression testing method of any one of claims 1-7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores computer instructions for causing a processor to implement the regression testing method of any one of claims 1-7 when executed.
CN202310702375.1A 2023-06-13 2023-06-13 Regression testing method and device, electronic equipment and storage medium Pending CN116702668A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310702375.1A CN116702668A (en) 2023-06-13 2023-06-13 Regression testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310702375.1A CN116702668A (en) 2023-06-13 2023-06-13 Regression testing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116702668A true CN116702668A (en) 2023-09-05

Family

ID=87823504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310702375.1A Pending CN116702668A (en) 2023-06-13 2023-06-13 Regression testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116702668A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117422281A (en) * 2023-12-18 2024-01-19 深圳赛桥生物创新技术有限公司 Process file testing method and device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117422281A (en) * 2023-12-18 2024-01-19 深圳赛桥生物创新技术有限公司 Process file testing method and device, computer equipment and storage medium
CN117422281B (en) * 2023-12-18 2024-03-22 深圳赛桥生物创新技术有限公司 Process file testing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110765026A (en) Automatic testing method and device, storage medium and equipment
CN110554938B (en) BIOS (basic input output System) testing method, system, terminal and storage medium based on script set
CN116702668A (en) Regression testing method and device, electronic equipment and storage medium
CN113434396A (en) Interface test method, device, equipment, storage medium and program product
CN116303013A (en) Source code analysis method, device, electronic equipment and storage medium
CN116089265A (en) Testing method and device for basic input/output system and storage medium
CN111966551A (en) Method, system, terminal and storage medium for verifying remote command execution result
CN116401113B (en) Environment verification method, device and medium for heterogeneous many-core architecture acceleration card
CN117724980A (en) Method and device for testing software framework performance, electronic equipment and storage medium
CN112632174A (en) Data inspection method, device and system
CN116126719A (en) Interface testing method and device, electronic equipment and storage medium
CN115794525A (en) BMC (baseboard management controller) pressure testing method, device, equipment and storage medium
CN115080382A (en) Code testing method, device, equipment and medium
CN114003497A (en) Method, device and equipment for testing service system and storage medium
CN112667498B (en) Server building method, device, computer equipment and readable storage medium
CN117076332B (en) Test case testing method and device, electronic equipment and storage medium
CN116719719A (en) Test method, test device, electronic equipment and storage medium
CN117407258A (en) Initialization process time consumption statistical method and device, electronic equipment and storage medium
CN117762760B (en) Method, device and medium for obtaining hardware performance test score of server
CN116431499A (en) Automatic test method and device, electronic equipment and storage medium
CN116627820A (en) Data creation method, device, equipment and medium
CN112667498A (en) Server building method and device, computer equipment and readable storage medium
CN118484398A (en) Simulation method, device, equipment and program for test case
CN115374010A (en) Function testing method, device, equipment and storage medium
CN117609064A (en) Unit test method and device, electronic equipment and storage 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
CB03 Change of inventor or designer information

Inventor after: Pei Zuxiang

Inventor after: Tian Bin

Inventor before: Pei Zuxiang

Inventor before: Ye Nan

Inventor before: Tian Bin