Layout constraint testing method, device, equipment and storage medium

By building test scenario files and target test projects, and automatically performing layout constraint testing, the problems of low testing efficiency and accuracy in the existing technology are solved, and more efficient layout constraint testing is achieved.

CN120278113BActive Publication Date: 2025-09-02SUZHOU YIGE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510735161.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-09-02
Estimated Expiration
2045-06-04

AI Technical Summary

Technical Problem

In the prior art, the testing of layout constraints is inefficient and low accuracy, mainly due to manual writing of verification files.

Method used

The test scenario file is constructed based on the control operation information of the target software and the test scenario information of the test cases, and the target test projects are created, and the test cases are automatically executed based on the test scenario file to realize automated testing of layout constraints.

Benefits of technology

It improves the testing efficiency and accuracy of layout constraints, reduces the need to manually write verification files, and improves the degree of automation of tests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120278113B_ABST
    Figure CN120278113B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of circuit design technology, and discloses a layout constraint testing method, apparatus, device, and storage medium. The present invention constructs a test scenario file based on control operation information of target software and test scenario information of a test case; the test case corresponds to at least one layout constraint; a target test project is created based on the target test case; and the target test project is executed based on the test scenario file to obtain a test result corresponding to the target test case. In this way, the test scenario file is constructed based on the control operation information and the test scenario information, the test process of the test case is configured using the test scenario file, the target test project is created based on the target test case, and the target test project is executed based on the test scenario file, thereby automatically executing the test of the layout constraints corresponding to the target test case according to the set test process, thereby improving the testing efficiency and accuracy of the layout constraints.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of circuit design, and in particular to a layout constraint testing method, device, equipment and storage medium. Background Art

[0002] In EDA (Electronic Design Automation) software, layout constraints, such as fence constraints, are often used to control the placement of logic units or functional modules, thereby isolating different functional modules. Currently, to ensure the correctness of fence constraints, testers typically manually write verification files to test fence constraints. This is not only inefficient but also prone to errors, resulting in low test accuracy. Summary of the Invention

[0003] In view of this, the present invention provides a layout constraint testing method, apparatus, device and storage medium to solve the problems of low efficiency and low accuracy in testing layout constraints.

[0004] In a first aspect, the present invention provides a layout constraint testing method, the method comprising:

[0005] Constructing a test scenario file based on the control operation information of the target software and the test scenario information of the test case; the test case corresponds to at least one layout constraint;

[0006] Create target test projects based on target test cases;

[0007] Based on the test scenario file, execute the target test project and obtain the test results corresponding to the target test case.

[0008] In an optional implementation, a test scenario file is constructed based on the control operation information of the target software and the test scenario information of the test case, including:

[0009] Generate an initial test file based on the control operation information; the initial test file is used to characterize the test process for layout constraints;

[0010] Based on the test scenario information, the execution method of each step in the test process is configured in the initial test file to obtain a test scenario file.

[0011] In an optional implementation, creating a target test project based on a target test case includes:

[0012] Create an initial project in the target software;

[0013] Import the register transfer level file corresponding to the target test case into the initial project to obtain the target test project.

[0014] In an optional embodiment, executing a target test project based on a test scenario file to obtain test results corresponding to target test cases includes:

[0015] Based on the target execution method corresponding to the target test case in the test scenario file, configure the target layout constraints corresponding to the target test case in the target test project; the target execution method is used to represent the configuration method of the layout constraints corresponding to the target test case;

[0016] Based on the test steps included in the test scenario file, the target layout constraints are tested to obtain the test results corresponding to the target test case.

[0017] In an optional embodiment, based on the target execution method corresponding to the target test case in the test scenario file, configuring the target layout constraint corresponding to the target test case in the target test project includes:

[0018] Based on the region configuration method in the target execution method, select the target region in the graphical selection interface of the target test project and use the target region as the constraint region;

[0019] Based on the module configuration method in the target execution method, a target module is selected in the target test project, and the target module is associated with the constraint region.

[0020] In an optional implementation, the target layout constraints are tested based on the test steps included in the test scenario file to obtain a test result corresponding to the target test case, including:

[0021] If the test process includes a test step based on the target software, the target function in the target software is called to test the target layout constraint and obtain the test result;

[0022] If the test process includes a test step based on a constraint verification file, the constraint verification file is called to test the target layout constraints and obtain a test result.

[0023] In an optional implementation, if the test process includes a test step based on a constraint verification file, the method further includes:

[0024] Generate target constraint file based on target layout constraints;

[0025] Generates a constraint verification file based on the target constraint file.

[0026] In a second aspect, the present invention provides a layout constraint testing device, the device comprising:

[0027] A test scenario file construction module is used to construct a test scenario file based on the control operation information of the target software and the test scenario information of the test case; the test case corresponds to at least one layout constraint;

[0028] Target test project building module, used to create target test projects based on target test cases;

[0029] The target test project execution module is used to execute the target test project based on the test scenario file and obtain the test results corresponding to the target test case.

[0030] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the layout constraint testing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0031] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the layout constraint testing method of the first aspect or any corresponding embodiment thereof.

[0032] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the layout constraint testing method of the first aspect or any corresponding embodiment thereof.

[0033] The layout constraint testing method provided by an embodiment of the present invention constructs a test scenario file through control operation information and test scenario information, configures the test process of the test case through the test scenario file, creates a target test project based on the target test case, and executes the target test project based on the test scenario file, thereby automatically executing the test of the layout constraints corresponding to the target test case according to the set test process, thereby improving the testing efficiency and accuracy of the layout constraints. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0035] Figure 1 is a flow chart of a layout constraint testing method according to an embodiment of the present invention;

[0036] Figure 2is a flow chart of another layout constraint testing method according to an embodiment of the present invention;

[0037] Figure 3 is a flow chart of another layout constraint testing method according to an embodiment of the present invention;

[0038] Figure 4 is a structural block diagram of a layout constraint testing device according to an embodiment of the present invention;

[0039] Figure 5 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0040] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0041] In EDA (Electronic Design Automation) software, layout constraints, such as fence constraints, are often used to control the placement of logic units or functional modules, thereby isolating different functional modules. Currently, to ensure the correctness of fence constraints, testers typically manually write verification files to test fence constraints. This is not only inefficient but also prone to errors, resulting in low test accuracy.

[0042] Based on this, the present invention provides a layout constraint testing method. A test scenario file is constructed based on the control operation information of the target software and the test scenario information of the test case. The test case corresponds to at least one layout constraint. A target test project is created based on the target test case. The target test project is executed based on the test scenario file to obtain a test result corresponding to the target test case. In this way, the test scenario file is constructed based on the control operation information and the test scenario information. The test process of the test case is configured using the test scenario file. The target test project is created based on the target test case. The target test project is executed based on the test scenario file. Thus, the layout constraint corresponding to the target test case is automatically tested according to the set test process, thereby improving the efficiency and accuracy of layout constraint testing.

[0043] The layout constraint testing method provided by the embodiment of the present invention can be applied to any EDA software, and can automatically verify and test the layout constraints involved in the software, thereby improving the testing efficiency and accuracy of the layout constraints.

[0044] According to an embodiment of the present invention, an embodiment of a layout constraint testing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0045] In this embodiment, a layout constraint testing method is provided, which can be used in any of the above-mentioned EDA software. Figure 1 is a flow chart of a layout constraint testing method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0046] Step S101: construct a test scenario file based on the control operation information of the target software and the test scenario information of the test case.

[0047] In this embodiment of the present invention, the target software is the electronic design software used to implement the layout constraints corresponding to the test case. The target software's control operation information includes the target software controls selected or operated during the test, such as Window, Custom, Button, Tree, and TreeItem controls, as well as the actions and sequence of these controls. Based on this target software control operation information, the specific test steps of the entire test process can be determined.

[0048] In an embodiment of the present invention, a test case corresponds to at least one layout constraint, and one test case corresponds to one test scenario; depending on the number of layout constraints corresponding to the test case, in the EDA software, only one layout constraint can be tested, or multiple layout constraints can be tested at the same time. The test scenario information of the test case includes the method class adopted by each test step corresponding to the test case, and each method class can be distinguished and identified using a modifier; accordingly, for different test cases, the method class adopted by the test step for configuring the layout constraint, that is, the layout method class can be different, and the method class adopted by other test steps can be the same; that is, for different test cases, the same test process can be used for testing, and the difference lies in the different methods for configuring the layout constraints.

[0049] In the embodiment of the present invention, an automated test script is written by combining control operation information and test scenario information to obtain a test scenario file. The test scenario file may include the operation flow of the test layout constraints corresponding to multiple test cases.

[0050] In an optional implementation, control operation information can be stored and used in a string file. This string file can be automatically generated by recording the test process based on the recorded content, thereby adding Qt objects to the string file in batches. Alternatively, Qt objects can be added to the string file manually, thereby adjusting and modifying the string file based on the original string file, thereby modifying and maintaining the test process for layout constraint testing.

[0051] Step S102: Create a target test project based on the target test case.

[0052] In an embodiment of the present invention, a target test project corresponding to a target test case is created in the target software, so that the layout constraints corresponding to the target test case are tested based on the hardware design corresponding to the target test case to ensure the accuracy of the test of the layout constraints.

[0053] In one optional implementation, each test case has a corresponding register-transfer level (RTL) file. When creating a target test project, you can create an initial project in the target software and then import the RTL file corresponding to the target test case into the initial project to obtain the target test project. The resulting target test project is consistent with the hardware design corresponding to the target test case.

[0054] Step S103: executing the target test project based on the test scenario file to obtain the test results corresponding to the target test case.

[0055] In an embodiment of the present invention, a target test project is executed based on a test scenario file, target layout constraints corresponding to target test cases are configured in the target test project, and the target layout constraints are tested to obtain test results corresponding to the target test cases. This automatically completes the test of the layout constraints without manually writing a verification file, thereby improving the test efficiency and accuracy of the layout constraints.

[0056] The layout constraint testing method provided by an embodiment of the present invention constructs a test scenario file through control operation information and test scenario information, configures the test process of the test case through the test scenario file, creates a target test project based on the target test case, and executes the target test project based on the test scenario file, thereby automatically executing the test of the layout constraints corresponding to the target test case according to the set test process, thereby improving the testing efficiency and accuracy of the layout constraints.

[0057] In this embodiment, a layout constraint testing method is provided, which can be used in any of the above-mentioned EDA software. Figure 2 is a flow chart of another layout constraint testing method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0058] Step S201: construct a test scenario file based on the control operation information of the target software and the test scenario information of the test case.

[0059] Specifically, step S201 includes:

[0060] Step S2011: Generate an initial test file based on the control operation information.

[0061] In the embodiment of the present invention, the initial test file is used to represent the test process for the layout constraint. The initial test file is obtained by generating a script file according to the information represented by the control operation information through an automated test script.

[0062] Step S2012: Based on the test scenario information, configure the execution method of each step in the test process in the initial test file to obtain a test scenario file.

[0063] In this embodiment of the present invention, the execution method for each step of the test flow is configured in the initial test file based on test scenario information. The execution method for each step refers to the specific operation and method performed in that step. Each test case has corresponding test scenario information. Therefore, the initial test file can be configured with test scenarios corresponding to different test cases. This allows the test scenario file to contain layout constraints corresponding to multiple test cases, allowing multiple layout constraints to be tested in a single test.

[0064] Step S202: Create a target test project based on the target test case. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0065] Step S203: Based on the test scenario file, execute the target test project to obtain the test results corresponding to the target test case. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0066] In this embodiment, a layout constraint testing method is provided, which can be used in any of the above-mentioned EDA software. Figure 3 FIG. 1 is a flow chart of another layout constraint testing method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0067] Step S301: Based on the control operation information of the target software and the test scenario information of the test case, a test scenario file is constructed. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0068] Step S302: Create a target test project based on the target test case. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0069] Step S303: Execute the target test project based on the test scenario file to obtain the test results corresponding to the target test case.

[0070] Specifically, step S303 includes:

[0071] Step S3031 : Based on the target execution method corresponding to the target test case in the test scenario file, configure the target layout constraint corresponding to the target test case in the target test project.

[0072] In an embodiment of the present invention, a target execution method is used to represent a method for configuring layout constraints corresponding to a target test case. When testing a target layout constraint corresponding to a target test case, the relevant steps or processes prior to the layout constraint are first executed step by step according to the test scenario file. Then, a target execution method corresponding to the target test case is selected from the test scenario file, and the target layout constraint corresponding to the target test case is configured in the target test project.

[0073] In an optional implementation, if each test case performs layout constraint testing according to a different test process, then in the test scenario file, each test scenario, that is, the test process of each test case is different. In this case, the relevant execution method corresponding to the target test case is directly selected from the test scenario file, and these execution methods are executed step by step according to the test process to complete the configuration of the target layout constraint.

[0074] In an optional embodiment, when configuring the target layout constraints corresponding to the target test case in the target test project, first, based on the area configuration method in the target execution method, select the target area in the graphical selection interface of the target test project, and use the target area as the constraint area; wherein, the target area can be used to limit the placement area of ​​the modules associated with it to ensure that these modules do not exceed the boundary of the target area; the selection of the target area by the area configuration method can be manually selected by the operator when configuring the test scenario file through the test scenario information, or it can be automatically generated by a script. Then, based on the module configuration method in the target execution method, select the target module in the target test project, and associate the target module with the constraint area; wherein, the target module can be any logical unit, module or functional block, and is selected specifically according to the layout requirements.

[0075] Step S3032: Based on the test steps included in the test scenario file, the target layout constraints are tested to obtain a test result corresponding to the target test case.

[0076] In the embodiment of the present invention, based on the test steps related to the test verification of the layout constraints included in the test scenario file, the target layout constraints are tested, thereby obtaining the test results corresponding to the target test case.

[0077] In an optional embodiment, the test verification of the target layout constraints may include two types, the first is test verification based on the implementation function of the target software itself, and the second is test verification based on the constraint verification file. Specifically, if the test process includes test steps based on the target software, the target function in the target software is called to test the target layout constraints to obtain test results; when the module or unit associated with the constraint area is placed outside the constraint area, the target software will report an error, indicating a constraint conflict. If the test process includes test steps based on the constraint verification file, the constraint verification file is called to test the target layout constraints to obtain test results; when the module or unit associated with the constraint area is placed outside the constraint area, in the target software, the command line interface corresponding to the constraint verification file will report an error, indicating a constraint conflict.

[0078] In an optional embodiment, if the test process includes test steps based on a constraint verification file, that is, the test scenario file includes test steps corresponding to the second type of test verification mentioned above, the test scenario file will also include relevant test steps for generating a constraint verification file. Then, when testing the target layout constraints, a target constraint file will be generated based on the target layout constraints, and a constraint verification file will be generated based on the target constraint file; that is, the target layout constraints will be saved to obtain the target constraint file, and then the constraint verification file of the corresponding target module will be written based on the target constraint file.

[0079] This embodiment also provides a layout constraint testing device for implementing the above-mentioned embodiments and preferred implementations. Details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0080] This embodiment provides a layout constraint testing device, such as Figure 4 Shown, including:

[0081] The test scenario file construction module 401 is used to construct a test scenario file based on the control operation information of the target software and the test scenario information of the test case; the test case corresponds to at least one layout constraint;

[0082] A target test project construction module 402 is used to create a target test project based on a target test case;

[0083] The target test project execution module 403 is used to execute the target test project based on the test scenario file and obtain the test results corresponding to the target test case.

[0084] In an optional implementation, the test scenario file construction module 401 includes:

[0085] A test file generation unit is used to generate an initial test file based on control operation information; the initial test file is used to characterize the test process for layout constraints;

[0086] The execution method configuration unit is used to configure the execution method of each step in the test process in the initial test file based on the test scenario information to obtain a test scenario file.

[0087] In an optional embodiment, the target test project construction module 402 includes:

[0088] An initial project creation unit, used for creating an initial project in the target software;

[0089] The file import unit is used to import the register transfer level file corresponding to the target test case into the initial project to obtain the target test project.

[0090] In an optional embodiment, the target test project execution module 403 includes:

[0091] A layout constraint configuration unit is used to configure target layout constraints corresponding to target test cases in a target test project based on a target execution method corresponding to the target test cases in a test scenario file; the target execution method is used to represent a configuration method for layout constraints corresponding to the target test cases;

[0092] The layout constraint test unit is used to test the target layout constraints based on the test steps included in the test scenario file and obtain the test results corresponding to the target test case.

[0093] In an optional implementation, the layout constraint configuration unit includes:

[0094] The constraint region determination subunit is used to select a target region in a graphical selection interface of a target test project based on a region configuration method in a target execution method, and use the target region as a constraint region;

[0095] The module association subunit is used to select a target module in a target test project based on a module configuration method in a target execution method, and associate the target module with a constraint region.

[0096] In an optional implementation, the layout constraint test unit includes:

[0097] The software testing subunit is configured to, if the test process includes a test step based on the target software, call the target function in the target software, test the target layout constraints, and obtain the test results;

[0098] The file verification subunit is used to call the constraint verification file if the test process includes a test step based on the constraint verification file, test the target layout constraints, and obtain the test results.

[0099] In an optional embodiment, if the test process includes a test step based on a constraint verification file, the apparatus further includes:

[0100] A constraint file generation module, used to generate a target constraint file based on target layout constraints;

[0101] The verification file generation module is used to generate a constraint verification file based on the target constraint file.

[0102] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0103] The layout constraint test device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0104] The embodiment of the present invention also provides a computer device having the above Figure 4 The layout constraints of the test setup are shown.

[0105] See also Figure 5 , Figure 5 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 5As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0106] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0107] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0108] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0109] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0110] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0111] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0112] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0113] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations shall all fall within the scope defined by the present invention.

Claims

1. A layout constraint testing method, characterized in that: The method comprises: Based on the control operation information of the target software and the test scenario information of the test case, a test scenario file is constructed; the control operation information is the control of the target software selected or operated during the test process, as well as the operation action and the operation sequence of the control; the test scenario information includes the method class adopted by each test step corresponding to the test case; the test case corresponds to at least one layout constraint; the test scenario file is constructed based on the control operation information of the target software and the test scenario information of the test case, including: generating an initial test file based on the control operation information; the initial test file is used to represent the test process for the layout constraint; based on the test scenario information, configuring the execution method of each step in the test process in the initial test file to obtain the test scenario file; Create target test projects based on target test cases; Based on the test scenario file, the target test project is executed to obtain the test results corresponding to the target test case.

2. The method according to claim 1, characterized in that The target test project is created based on the target test case, including: Creating an initial project in the target software; The register transfer level file corresponding to the target test case is imported into the initial project to obtain the target test project.

3. The method according to claim 1, characterized in that The step of executing the target test project based on the test scenario file to obtain the test result corresponding to the target test case includes: Based on the target execution method corresponding to the target test case in the test scenario file, configuring the target layout constraints corresponding to the target test case in the target test project; the target execution method is used to represent the configuration method of the layout constraints corresponding to the target test case; Based on the test steps included in the test scenario file, the target layout constraints are tested to obtain a test result corresponding to the target test case.

4. The method according to claim 3, characterized in that The target execution method corresponding to the target test case in the test scenario file, configuring the target layout constraints corresponding to the target test case in the target test project, includes: Based on the region configuration method in the target execution method, selecting a target region in the graphical selection interface of the target test project, and using the target region as a constraint region; Based on the module configuration method in the target execution method, a target module is selected in the target test project, and the target module is associated with the constraint area.

5. The method according to claim 3, characterized in that The testing of the target layout constraints based on the test steps included in the test scenario file to obtain a test result corresponding to the target test case includes: If the test process includes a test step based on the target software, calling a target function in the target software, testing the target layout constraint, and obtaining the test result; If the test process includes a test step based on a constraint verification file, the constraint verification file is called to test the target layout constraints to obtain the test result.

6. The method according to claim 5, characterized in that If the test process includes a test step based on a constraint verification file, the method further includes: generating a target constraint file based on the target layout constraint; The constraint verification file is generated based on the target constraint file.

7. A layout constraint testing device, characterized in that: The device comprises: A test scenario file construction module is used to construct a test scenario file based on the control operation information of the target software and the test scenario information of the test case; the test case corresponds to at least one layout constraint; the control operation information is the control of the target software selected or operated during the test process, as well as the operation action and operation sequence of the control; the test scenario information includes the method class adopted by each test step corresponding to the test case; the construction of the test scenario file based on the control operation information of the target software and the test scenario information of the test case includes: generating an initial test file based on the control operation information; the initial test file is used to represent the test process for the layout constraint; based on the test scenario information, configuring the execution method of each step in the test process in the initial test file to obtain the test scenario file; Target test project building module, used to create target test projects based on target test cases; The target test project execution module is used to execute the target test project based on the test scenario file to obtain the test results corresponding to the target test case.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the layout constraint testing method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the layout constraint testing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Software testing method and device and computer readable storage medium

    CN110874318A

  • Method and device for generating test case, server and medium

    CN114253855A