Test case generation method, device and equipment of low-code interface and storage medium

By parsing the source code information and focus order of the low-code interface, and using a large language model to generate test scenarios and cases, the problem of low efficiency in low-code interface testing is solved, and the effect of quickly generating test cases is achieved.

CN122262011APending Publication Date: 2026-06-23CHINA MERCHANTS BANK

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MERCHANTS BANK
Filing Date
2026-05-06
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In low-code interfaces, testers need to repeatedly design test cases and build automated scripts, resulting in low efficiency in test case generation.

Method used

By parsing the source code of the low-code interface, extracting component information and focus order, constructing two rounds of prompts to drive the large language model to generate component test scenarios and process test cases, and populating test data, it replaces the manual repetitive design and writing of test cases.

Benefits of technology

It improves the efficiency of generating test cases with a low-code interface, achieving the goal of quickly generating test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122262011A_ABST
    Figure CN122262011A_ABST
Patent Text Reader

Abstract

The application discloses a low-code interface test case generation method, device and equipment and a storage medium, relates to the technical field of intelligent testing, and the low-code interface test case generation method comprises the following steps: receiving business category information, obtaining source code information according to the business category information; analyzing the source code information, extracting component information and focus order; obtaining component rules of the component information, generating first prompt information according to the component information and the component rules, sending the first prompt information to a large language model, and obtaining component test scene information; obtaining business scene knowledge, generating second prompt information according to the business scene knowledge, the focus order and the component test scene, sending the second prompt information to the large language model, and obtaining a flow test case; filling test data for data fields to be filled in the flow test case, and generating an interface automation test case. The application can improve the test case generation efficiency of the low-code interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent testing technology, and in particular to a method, apparatus, device, and storage medium for generating test cases with a low-code interface. Background Technology

[0002] Currently, the front-end functionality of the counter system is implemented using a low-code approach, with the interface composed of multiple reusable components. However, testers still need to repeatedly design test cases and build automated scripts for the same components in different business scenarios, resulting in low efficiency. Therefore, improving the efficiency of test case generation for low-code interfaces remains a problem that needs to be solved.

[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main objective of this application is to provide a method, apparatus, device, and storage medium for generating test cases with a low-code interface, aiming to solve the technical problem of how to improve the efficiency of generating test cases with a low-code interface.

[0005] To achieve the above objectives, this application proposes a low-code interface test case generation method, the method comprising: Receive business type information, and obtain source code information from the low-code development platform interface based on the business type information; The source code information is parsed to extract the component information and the focus order of component operations in the interface; Obtain the component rules corresponding to the component information, generate first prompt information based on the component information and the component rules, send the first prompt information to the large language model, and receive the component test scenario information returned by the large language model; Acquire business scenario knowledge, generate second prompt information based on the business scenario knowledge, the focus order and the component test scenario, send the second prompt information to the large language model, and receive the process test case returned by the large language model; Fill the data fields to be filled in the process test cases with test data to generate automated interface test cases.

[0006] In one embodiment, the step of parsing the source code information and extracting component information and focus order of component operations in the interface includes: The component tag matching results are extracted from the source code information based on the preset set of component tag names. Based on the component tag matching results, the component information corresponding to each component tag is identified; The shortcut key operation order configuration is extracted from the tag attributes corresponding to each component in the component information to obtain the focus order.

[0007] In one embodiment, the step of generating the first prompt information based on the component information and the component rules includes: Get the first prompt frame, which includes character settings, task description, and output format requirements; The component rules and component information are filled into the first prompt frame to obtain the first prompt information.

[0008] In one embodiment, the step of generating the second prompt information based on the business scenario knowledge, the focus order, and the component testing scenario includes: Obtain a second prompt frame containing end-to-end test role settings and process task descriptions; The business scenario knowledge, the focus order, and the component test scenario are filled into the second prompt frame to obtain the second prompt information.

[0009] In one embodiment, the step of filling the data fields to be filled in the process test case with test data to generate the interface automated test case includes: The intelligent agent program is used to identify the field type and business constraints of the data fields to be populated in the process test case. Based on the field type and business constraints, the matching data generation tool interface is invoked to generate test data that conforms to the specifications; The generated test data is then used to populate the data field to be populated, thus generating an automated test case for the interface.

[0010] In one embodiment, after the step of generating executable interface automated test cases, the method further includes: The automated test cases for the interface are output to the manual confirmation interface; Upon receiving the confirmation instruction, the interface automated test case is pushed to the automated execution platform; Receive the execution results from the automated execution platform and generate an analysis report based on the execution results.

[0011] In one embodiment, after the step of receiving service type information, the method further includes: Determine whether the current service is a multi-page service based on the aforementioned service type information; If it is a multi-page service, the source code information is obtained from the service type information, and the multi-page process information, component information and focus order of component operations are extracted from the source code information. Obtain the component rules corresponding to the component information, generate first prompt information based on the component information and the component rules, send the first prompt information to the large language model, and receive the component test scenario information returned by the large language model; Acquire business scenario knowledge, generate second prompt information based on the multi-page process information, the business scenario knowledge, the focus order and the component test scenario, send the second prompt information to the large language model, and receive the process test case returned by the large language model; Fill the data fields to be filled in the process test cases with test data to generate automated interface test cases.

[0012] Furthermore, to achieve the above objectives, this application also proposes a test case generation apparatus for a low-code interface, the test case generation apparatus for the low-code interface comprising: The receiving module is used to receive business type information and obtain source code information from the low-code development platform interface based on the business type information. The extraction module is used to parse the source code information and extract the component information and focus order of component operations in the interface; The first sending module is used to obtain the component rules corresponding to the component information, generate the first prompt information according to the component information and the component rules, send the first prompt information to the large language model, and receive the component test scenario information returned by the large language model. The second sending module is used to acquire business scenario knowledge, generate second prompt information based on the business scenario knowledge, the focus order and the component test scenario, send the second prompt information to the large language model, and receive the process test case returned by the large language model. The generation module is used to fill the data fields to be filled in the process test cases with test data and generate automated interface test cases.

[0013] Furthermore, to achieve the above objectives, this application also proposes a test case generation device for a low-code interface, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the test case generation method for a low-code interface as described above.

[0014] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the test case generation method for the low-code interface as described above.

[0015] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the test case generation method for the low-code interface as described above.

[0016] This application provides a method for generating test cases for a low-code interface. The method receives business type information, obtains source code information from a low-code development platform interface based on the business type information, parses the source code information, extracts component information and the focus order of component operations, obtains component rules corresponding to the component information, generates a first prompt message based on the component information and the component rules, sends the first prompt message to a large language model, and receives component test scenario information returned by the large language model; obtains business scenario knowledge, generates a second prompt message based on the business scenario knowledge, the focus order, and the component test scenario, sends the second prompt message to the large language model, and receives process test cases returned by the large language model; and fills the data fields to be filled in the process test cases with test data to generate automated interface test cases. This application obtains components and focus order by parsing the source code information of the low-code interface, constructs two rounds of prompt messages to drive the large language model to generate component test scenarios and complete process test cases sequentially, and finally fills in the data, thereby replacing the process of manually designing and writing test cases repeatedly. This allows for rapid test case generation and improves the efficiency of low-code interface test case generation. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A flowchart illustrating the method for generating test cases for the low-code interface of this application; Figure 2 A flowchart illustrating the second embodiment of the method for generating test cases for the low-code interface of this application; Figure 3 This is a flowchart illustrating the test case generation method for the low-code interface of this application, as provided in Embodiment 3. Figure 4A simplified flowchart illustrating the test case generation method for the low-code interface provided in Embodiment 1 of this application; Figure 5 This is a schematic diagram of the module structure of the test case generation device for the low-code interface in an embodiment of this application. Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the test case generation method of the low-code interface in this application embodiment.

[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0021] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0022] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0023] The main solution of this application is to receive business type information, obtain source code information from a low-code development platform interface based on the business type information; parse the source code information to extract component information and focus order of component operations in the interface; obtain component rules corresponding to the component information, generate a first prompt message based on the component information and the component rules, send the first prompt message to a large language model, and receive component test scenario information returned by the large language model; obtain business scenario knowledge, generate a second prompt message based on the business scenario knowledge, the focus order, and the component test scenario, send the second prompt message to the large language model, and receive process test cases returned by the large language model; fill the data fields to be filled in the process test cases with test data, and generate automated interface test cases.

[0024] Currently, the front-end functionality of the counter system is implemented using a low-code approach, with the interface composed of multiple reusable components. However, testers still need to repeatedly design test cases and build automated scripts for the same components in different business scenarios, resulting in low efficiency. Therefore, improving the efficiency of test case generation for low-code interfaces remains a problem that needs to be solved.

[0025] This application obtains the component and focus order by parsing the source code information of the low-code interface, and constructs two rounds of prompt information to drive the large language model to generate component test scenarios and complete process test cases in sequence. Finally, the data is populated, thereby replacing the process of manually designing and writing test cases repeatedly. This can quickly generate test cases and improve the test case generation efficiency of the low-code interface.

[0026] All user-related data involved in this application were obtained with the user's permission or consent; that is, when this application is applied to specific products or technologies, user permission is required to obtain and process the relevant data, and the processing of the relevant data must comply with the relevant laws, regulations and regulatory standards of the relevant countries and regions.

[0027] Based on this, embodiments of this application provide a method for generating test cases with a low-code interface, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the test case generation method for the low-code interface of this application.

[0028] In this embodiment, the test case generation method for the low-code interface includes steps S10 to S50: Step S10: Receive business type information, and obtain source code information from the low-code development platform interface according to the business type information; It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, a low-code interface test case generation device, etc. The following description uses a low-code interface test case generation device as an example to illustrate this embodiment and the subsequent embodiments.

[0029] It should be noted that business type information refers to a code or name used to uniquely identify a specific business function (such as opening an account, transferring funds, closing an account, etc.). Specifically, it can be a business type identifier; for example, the business identifier corresponding to opening a savings account is R001, then R001 is the business type information. When testers need to generate test cases, they can input R001 into the automated test case generation platform. The platform will access the program implementation information of the business corresponding to R001 stored in the low-code development platform through an interface service, and retrieve the source code of the front-end implementation corresponding to that business type. The low-code platform refers to a software development platform that allows for the development of the application's front-end interface through visual drag-and-drop configuration and minimal code. The low-code platform encapsulates interface elements into reusable components and stores page implementation information in the form of structured data (such as JSON format) or code files. The source code information is the raw data returned by the low-code development platform describing the component definitions, layout information, and interaction logic in the current business scenario.

[0030] Step S20: Parse the source code information and extract the component information and focus order of component operations in the interface; It should be noted that component information refers to descriptive data about the type, attributes, hierarchical relationships, and business meanings of various components in the interface. Component information includes two categories: atomic components and composite components. Atomic components are indivisible basic interface elements, such as buttons, input boxes, and date pickers. Composite components are custom components built by stacking multiple atomic components or other composite components, such as an ID card verification component composed of an image display area and an ID card number input box. Focus order refers to the shortcut key operation order preset by the low-code platform for business operation pages. Based on focus shortcut key operations, branch operators can complete business transactions entirely using shortcut keys without using a mouse, thus improving efficiency. The click order between components can only be inferred by obtaining the large focus order model. The source code information can be parsed using methods such as regular expression matching and abstract syntax tree parsing.

[0031] In one feasible approach, the step of parsing the source code information and extracting the component information and focus order of component operations in the interface includes: extracting component tag matching results from the source code information based on a preset set of component tag names; identifying the component information of the component corresponding to each component tag based on the component tag matching results; and extracting the shortcut key operation order configuration from the tag attributes corresponding to each component in the component information to obtain the focus order.

[0032] It should be noted that the preset component tag name set contains the tag names of all atomic and composite components in the low-code platform, referring to a list of all legal component names exported from the low-code platform's component library. After the system reads the source code information, it can use regular expressions to perform global matching on the source code, thereby extracting the starting tags and corresponding attribute strings of all components. The matching results form a list, with each entry containing the tag name and the complete attribute part of that tag. This list is the component tag matching result. Then, the component tag matching results are traversed. For each matching item, the system first searches for the type (atomic component or composite component) corresponding to the tag in the component type library based on the tag name. The component type library is a predefined mapping table that records whether each component tag belongs to an atomic component or a composite component. If it is an atomic component, its component name, tag name, and key attributes parsed from the attributes, such as type, placeholder text, and whether it is required, are directly recorded. If it is a composite component, the system continues to match the tags nested within the current component to further recursively parse its internal sub-components until it expands into a set of atomic components. Finally, the system obtains detailed information for all components, forming a component information list. The system then iterates through each atomic component in the component information, searching its tag attributes for configuration information related to the shortcut key operation order. Low-code platforms typically pre-define the focus navigation order for business operation pages, which can be obtained by parsing specific attributes of each component. The system then compiles a list of orders based on the shortcut key configuration values ​​corresponding to each component or the natural order of the components in the source code; this list represents the focus order.

[0033] Step S30: Obtain the component rules corresponding to the component information, generate first prompt information according to the component information and the component rules, send the first prompt information to the large language model, and receive the component test scenario information returned by the large language model; It should be noted that the component information allows access to a pre-built RAG (Retrieval-Augmented Generation) knowledge document describing the component information. This RAG knowledge document refers to a pre-built document library or knowledge base that stores business rules, requirement information, and other content accumulated by each component during the testing and analysis phase. This knowledge document is the source of the component rules in this solution. For example, the rules for the ID card input box include that the length should be 18 digits, and the last digit can be a number or an uppercase X; the rules for the date input box include that it cannot be later than the current system date; and the rules for the amount input box include that it must be a positive number with a maximum of two decimal places. These component rules are the business constraints and validation logic for specific components obtained from the RAG knowledge document. After reading the rules that match the current component information from the RAG knowledge document, the first prompt message is constructed using the prompt template. The prompt message refers to the natural language instruction text sent to the large language model. The large language model refers to an artificial intelligence neural network model trained on massive amounts of text data, capable of understanding and generating natural language, such as the Generative Pre-trained Transformer (GPT) model and Wenxin Yiyan. The component test scenario refers to a set of test cases designed for a single component, each case including test steps, input conditions, and expected results. The system fills the template with component information and component rules read from the RAG knowledge document, generates complete initial prompt information, and then calls the large language model service interface via the Hypertext Transfer Protocol to send the initial prompt information to the large language model. It also receives the component test scenario information returned by the large language model.

[0034] Step S40: Obtain business scenario knowledge, generate second prompt information based on the business scenario knowledge, the focus order and the component test scenario, send the second prompt information to the large language model, and receive the process test case returned by the large language model; It should be noted that business scenario knowledge refers to the process knowledge of the current business type obtained by the system from a pre-built business scenario RAG knowledge document. The business scenario RAG knowledge document is a knowledge base that stores a complete description of the business operation process, state transition conditions, data dependencies, and business constraints. Its content comes from business process documents, requirement specifications, and the operational experience of operators. Finally, based on the business scenario knowledge, the focus order, and the component test scenario, a second prompt message is generated, which is sent to the large language model, and the system receives the process test cases returned by the large language model.

[0035] Step S50: Fill the data fields to be filled in the process test case with test data to generate an automated interface test case.

[0036] It should be noted that all placeholders (ValueNeedInput) and their respective field contexts are identified from the process test cases. The data fields to be filled refer to input data items in the process test cases that have not yet been assigned values, marked as placeholders within the cases. The test data refers to specific numerical values ​​that conform to the field type and business constraints, such as a valid ID number. The system calls the built-in test data generation module, which automatically generates compliant test data based on the field type and business constraints. After generating the test data, the system replaces the placeholders with specific numerical values, thereby outputting a directly executable automated interface test case. This automated interface test case is a sequence of operation instructions that can be automatically executed by a computer, driving the browser to simulate real user operations, thus verifying the functionality of the low-code interface.

[0037] In one feasible approach, the step of filling test data into the data fields to be filled in the process test case to generate an automated interface test case includes: using an intelligent agent program to identify the field type and business constraints of the data fields to be filled in the process test case; calling a matching data generation tool interface to generate test data that conforms to the specifications based on the field type and business constraints; and filling the generated test data into the data fields to be filled to generate an automated interface test case.

[0038] It should be noted that an agent is a software entity capable of perceiving its environment and autonomously executing tasks to achieve a goal; in this embodiment, it is responsible for scheduling the data generation tools. The agent first parses the process test cases, traversing the strings in each step and identifying all placeholders. For each placeholder, the agent infers the field type and business constraints based on its context. For example, if the step description is "Enter ValueNeedInput in the customer name input box," the inferred field type is "name," and the business constraint is "2 to 4 Chinese characters in length, cannot contain numbers." Similarly, if "Enter ValueNeedInput in the ID card number input box," the inferred field type is "ID card number," and the business constraint is "18 digits, conforming to ID card number encoding rules." Internally, the agent maintains a data generation tool registry, mapping different field types to corresponding data generation tools (Skills). These data generation tools are software modules specifically designed to generate test data that meets specific format requirements. Finally, the agent replaces the original ValueNeedInput placeholders in the process test cases with the obtained test data item by item. After the replacement is complete, the system serializes the entire test case object into a standard format and can convert it into executable script code for a specific testing framework. This output is the directly runnable UI automation test case.

[0039] In one feasible approach, after the step of generating automated interface test cases, the method further includes: outputting the automated interface test cases to a manual confirmation interface; after receiving a confirmation instruction, pushing the automated interface test cases to an automated execution platform; receiving the execution results from the automated execution platform, and generating an analysis report based on the execution results.

[0040] It's important to note that after generating the UI automated test cases, these cases can be displayed to testers using a user-friendly interface (such as a web console). Each test step, input data, and expected result are clearly listed in the case. Testers can review the case's validity and the accuracy of the data. After confirming everything is correct, the tester clicks the "Confirm and Execute" button on the interface. The system receives the confirmation command and pushes the case to the automated test execution platform via the network. The automated execution platform schedules a task to run the case and returns execution logs, execution status, failure screenshots, and other information to this system. The system parses this information and generates an analysis report containing statistics on test pass rate, failed steps, and error types.

[0041] In one feasible approach, after the step of receiving business type information, the method further includes: determining whether the current business is a multi-page business based on the business type information; if it is a multi-page business, obtaining source code information from the business type information, and extracting multi-page process information, component information, and the focus order of component operations from the source code information; obtaining component rules corresponding to the component information, generating first prompt information based on the component information and the component rules, sending the first prompt information to the large language model, and receiving component test scenario information returned by the large language model; obtaining business scenario knowledge, generating second prompt information based on the multi-page process information, the business scenario knowledge, the focus order, and the component test scenario, sending the second prompt information to the large language model, and receiving process test cases returned by the large language model; filling test data into the data fields to be filled in the process test cases, and generating automated interface test cases.

[0042] It should be noted that this embodiment can also determine whether the current business is a multi-page business based on the business type information. If it is determined to be a multi-page business, an additional process step information, namely multi-page process information, is extracted on top of the original steps. This process step information is then used as input when generating subsequent prompt information, resulting in the final generation of a multi-page interface automated test case.

[0043] This embodiment receives business type information, obtains source code information from the low-code development platform interface based on the business type information; parses the source code information, extracts component information and the focus order of component operations in the interface; obtains the component rules corresponding to the component information, generates a first prompt message based on the component information and the component rules, sends the first prompt message to the large language model, and receives the component test scenario information returned by the large language model; obtains business scenario knowledge, generates a second prompt message based on the business scenario knowledge, the focus order, and the component test scenario, sends the second prompt message to the large language model, and receives the process test case returned by the large language model; fills the data fields to be filled in the process test case with test data, generating automated interface test cases. This embodiment obtains components and focus order by parsing the source code information of the low-code interface, constructs two rounds of prompt messages to drive the large language model to generate component test scenarios and complete process test cases in sequence, and finally fills in the data, thereby replacing the process of manually designing and writing test cases repeatedly, which can quickly generate test cases and improve the test case generation efficiency of low-code interfaces.

[0044] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S30 also includes steps S301 to S302: Step S301: Obtain the first prompt frame containing character settings, task description, and output format requirements; It should be noted that the system can read a predefined first prompt framework from local configuration or a database. The first prompt refers to a fixed-structure prompt message template containing placeholders for subsequent dynamic content input. This framework includes role settings, task descriptions, and output format requirements. For example, an example of the role settings for a first prompt framework is: "You are a senior QA architect proficient in front-end automated testing (Selenium / Cypress / Playwright). You excel at translating vague business requirements into precise, executable automated test script logic. You possess strong DOM structure analysis capabilities and can utilize provided XPath locators to build stable element interaction flows." An example of the task description is: "Combining front-end component metadata, business rules retrieved from RAG, and XPath locators derived from source code analysis, generate a highly available and stable automated test scenario. The core objective is to ensure that every interaction action in the generated test steps has explicit XPath support, and that every verification point conforms to the business constraints in RAG." Furthermore, the first prompt framework also includes a RAG business rule context module, which can be used to input RAG business rules. The source code mapping table content section allows you to fill in mapping information, such as ""username_input": " / / input[@name='username']"", and also includes output format requirements.

[0045] Step S302: Fill the component rules and component information into the first prompt frame to obtain the first prompt information.

[0046] It should be noted that after determining the first prompt framework, the component information and component rules are then filled into the corresponding sections according to the placeholder positions in the framework. After filling, the complete first prompt information is formed, which is the text sent to the large language model.

[0047] This embodiment obtains a first prompt framework that includes role settings, task descriptions, and output format requirements; the component rules and component information are then filled into the first prompt framework to obtain the first prompt information. By introducing a structured first prompt framework, this embodiment enables the large language model to generate component test scenarios based on a clearly defined test expert identity and standardized output format, thereby improving the professionalism and consistency of the generated content and ensuring that the output results can be directly used in subsequent processes.

[0048] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 Step S40 also includes steps S401 to S402: Step S401: Obtain the second prompt frame containing end-to-end test role settings and process task descriptions; It's important to note that the end-to-end testing role setting in the second hint framework refers to the configuration of the instruction big language model as an end-to-end testing expert. For example, the end-to-end testing role setting could be: "You are a senior front-end automation test architect, specializing in E2E (end-to-end) testing and integration test scenario design. You are adept at navigating complex user operation paths, connecting discrete front-end components through business logic, and generating stable, executable automation test script logic using provided XPath locators." The task objective of the second hint framework could be: "Based on the business process description, RAG business rules, the list of involved components and XPath mappings, and the focus order, generate a complete set of automated test process cases that are executed in logical order. The core objective is to ensure that test steps flow correctly between components (e.g., from the login page to the homepage, and then to the settings page), and that each operation and assertion has explicit XPath support; where data is needed, ValueNeedInput is temporarily used instead." In addition, the second prompt framework also includes a RAG business rule context section, a component focus mapping table section, a component and XPath registry section, and a data output format section. Each section can be filled with corresponding content to obtain the final prompt information.

[0049] Step S402: Fill the business scenario knowledge, the focus order, and the component test scenario into the second prompt frame to obtain the second prompt information.

[0050] It should be noted that by filling the business scenario knowledge, the focus order, and the component test scenario into the corresponding sections of the second prompt framework, the second prompt information can be obtained.

[0051] This embodiment obtains a second prompt framework that includes end-to-end test role settings and process task descriptions; the business scenario knowledge, the focus order, and the component test scenario are filled into the second prompt framework to obtain the second prompt information. This embodiment uses a second prompt framework that includes end-to-end test role settings and process task descriptions, integrating business scenario knowledge, focus order, and component test scenarios into complete process-level prompt information. This enables the large language model to automatically generate process test cases covering the entire business chain under a clear end-to-end test objective, thereby solving the problem that single component test scenarios cannot be linked into a business process, and improving the completeness and executability of test cases.

[0052] For example, to help understand the implementation process of the low-code interface test case generation method obtained by combining this embodiment with the above embodiment one, please refer to... Figure 4 , Figure 4 A simplified flowchart of a low-code interface test case generation method is provided. Specifically: First, business type information is extracted; then, the source code is parsed, page components are extracted from the source code, and the focus order of the components is obtained. The page components are input into a large language model to generate component test scenarios; then, the component test scenarios and component focus order are input into the large language model to generate process automation cases; next, data flow is assembled for the process automation cases, and after manual review, they can be pushed to the automation execution platform for scheduling and execution; finally, result analysis and automated self-healing are performed.

[0053] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the test case generation method of the low-code interface of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0054] This application also provides a test case generation device with a low-code interface, please refer to... Figure 5 The test case generation device for the low-code interface includes: The receiving module 10 is used to receive business type information and obtain source code information from the low-code development platform interface according to the business type information; Extraction module 20 is used to parse the source code information and extract the component information and focus order of component operations in the interface; The first sending module 30 is used to obtain the component rules corresponding to the component information, generate first prompt information according to the component information and the component rules, send the first prompt information to the large language model, and receive the component test scenario information returned by the large language model. The second sending module 40 is used to acquire business scenario knowledge, generate second prompt information based on the business scenario knowledge, the focus order and the component test scenario, send the second prompt information to the large language model, and receive the process test case returned by the large language model. The generation module 50 is used to fill the data fields to be filled in the process test cases with test data and generate interface automation test cases.

[0055] This application receives business type information, obtains source code information from a low-code development platform interface based on the business type information; parses the source code information, extracts component information and the focus order of component operations in the interface; obtains component rules corresponding to the component information, generates a first prompt message based on the component information and the component rules, sends the first prompt message to a large language model, and receives component test scenario information returned by the large language model; obtains business scenario knowledge, generates a second prompt message based on the business scenario knowledge, the focus order, and the component test scenario, sends the second prompt message to the large language model, and receives process test cases returned by the large language model; fills test data into the data fields to be filled in the process test cases, generating automated interface test cases. This application obtains components and focus order by parsing the source code information of the low-code interface, constructs two rounds of prompt messages to drive the large language model to generate component test scenarios and complete process test cases in sequence, and finally fills in the data, thereby replacing the process of manually designing and writing test cases repeatedly, which can quickly generate test cases and improve the test case generation efficiency of low-code interfaces.

[0056] In one embodiment, the extraction module 20 is further configured to extract component tag matching results from the source code information based on a preset set of component tag names; identify the component information of the component corresponding to each component tag based on the component tag matching results; and extract the shortcut key operation order configuration from the tag attributes corresponding to each component in the component information to obtain the focus order.

[0057] In one embodiment, the first sending module 30 is further configured to obtain a first prompt frame containing role settings, task descriptions, and output format requirements; and fill the component rules and component information into the first prompt frame to obtain first prompt information.

[0058] In one embodiment, the second sending module 40 is further configured to obtain a second prompt frame containing end-to-end test role settings and process task descriptions; fill the business scenario knowledge, the focus order, and the component test scenario into the second prompt frame to obtain the second prompt information.

[0059] In one embodiment, the generation module 50 is further configured to use an intelligent agent program to identify the field type and business constraints of the data field to be filled in the process test case; according to the field type and business constraints, call the matching data generation tool interface to generate test data that conforms to the specifications; and fill the generated test data into the data field to be filled to generate an automated interface test case.

[0060] In one embodiment, the generation module 50 is further configured to output the interface automated test case to the manual confirmation interface; after receiving the confirmation instruction, push the interface automated test case to the automated execution platform; receive the execution result of the automated execution platform, and generate an analysis report based on the execution result.

[0061] In one embodiment, the receiving module 10 is further configured to determine whether the current business is a multi-page business based on the business type information; if it is a multi-page business, it obtains source code information from the business type information and extracts multi-page process information, component information, and focus order of component operations from the source code information; obtains component rules corresponding to the component information, generates first prompt information based on the component information and the component rules, sends the first prompt information to the large language model, and receives component test scenario information returned by the large language model; obtains business scenario knowledge, generates second prompt information based on the multi-page process information, the business scenario knowledge, the focus order, and the component test scenario, sends the second prompt information to the large language model, and receives process test cases returned by the large language model; fills test data into the data fields to be filled in the process test cases, and generates interface automation test cases.

[0062] The low-code interface test case generation apparatus provided in this application, employing the low-code interface test case generation method in the above embodiments, can solve the technical problem of how to improve the efficiency of low-code interface test case generation. Compared with the prior art, the beneficial effects of the low-code interface test case generation apparatus provided in this application are the same as those of the low-code interface test case generation method provided in the above embodiments, and other technical features in the low-code interface test case generation apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0063] This application provides a test case generation device for a low-code interface. The test case generation device for a low-code interface includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the test case generation method for the low-code interface in the first embodiment described above.

[0064] The following is for reference. Figure 6 This document illustrates a schematic diagram of a test case generation device suitable for implementing the low-code interface embodiments of this application. The test case generation device for the low-code interface in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The test case generation device with the low-code interface shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0065] like Figure 6 As shown, the low-code interface test case generation device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the low-code interface test case generation device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the low-code interface test case generation device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows a low-code interface test case generation device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented alternatively.

[0066] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0067] The low-code interface test case generation device provided in this application, employing the low-code interface test case generation method in the above embodiments, can solve the technical problem of how to improve the efficiency of low-code interface test case generation. Compared with the prior art, the beneficial effects of the low-code interface test case generation device provided in this application are the same as the beneficial effects of the low-code interface test case generation method provided in the above embodiments, and other technical features in this low-code interface test case generation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0068] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0069] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0070] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the test case generation method of the low-code interface in the above embodiments.

[0071] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0072] The aforementioned computer-readable storage medium may be included in a test case generation device with a low-code interface; or it may exist independently and not be assembled into a test case generation device with a low-code interface.

[0073] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a low-code interface test case generation device, the low-code interface test case generation device: receives business type information; obtains source code information from a low-code development platform interface based on the business type information; parses the source code information, extracts component information and the focus order of component operations in the interface; obtains component rules corresponding to the component information; generates a first prompt message based on the component information and the component rules; sends the first prompt message to a large language model; and receives component test scenario information returned by the large language model; obtains business scenario knowledge; generates a second prompt message based on the business scenario knowledge, the focus order, and the component test scenario; sends the second prompt message to the large language model; and receives process test cases returned by the large language model; fills test data into the data fields to be filled in the process test cases, and generates automated interface test cases.

[0074] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0075] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0076] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0077] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the test case generation method of the low-code interface described above, thereby solving the technical problem of how to improve the test case generation efficiency of low-code interfaces. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the test case generation method of the low-code interface provided in the above embodiments, and will not be repeated here.

[0078] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the test case generation method for the low-code interface described above.

[0079] The computer program product provided in this application solves the technical problem of how to improve the efficiency of test case generation for low-code interfaces. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the test case generation method for low-code interfaces provided in the above embodiments, and will not be repeated here.

[0080] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for generating test cases with a low-code interface, characterized in that, The method includes: Receive business type information, and obtain source code information from the low-code development platform interface based on the business type information; The source code information is parsed to extract the component information and the focus order of component operations in the interface; Obtain the component rules corresponding to the component information, generate first prompt information based on the component information and the component rules, send the first prompt information to the large language model, and receive the component test scenario information returned by the large language model; Acquire business scenario knowledge, generate second prompt information based on the business scenario knowledge, the focus order and the component test scenario, send the second prompt information to the large language model, and receive the process test case returned by the large language model; Fill the data fields to be filled in the process test cases with test data to generate automated interface test cases.

2. The method as described in claim 1, characterized in that, The steps of parsing the source code information and extracting component information and focus order of component operations in the interface include: The component tag matching results are extracted from the source code information based on the preset set of component tag names. Based on the component tag matching results, the component information corresponding to each component tag is identified; The shortcut key operation order configuration is extracted from the tag attributes corresponding to each component in the component information to obtain the focus order.

3. The method as described in claim 1, characterized in that, The step of generating the first prompt information based on the component information and the component rules includes: Get the first prompt frame, which includes character settings, task description, and output format requirements; The component rules and component information are filled into the first prompt frame to obtain the first prompt information.

4. The method as described in claim 1, characterized in that, The step of generating the second prompt information based on the business scenario knowledge, the focus order, and the component test scenario includes: Obtain a second prompt frame containing end-to-end test role settings and process task descriptions; The business scenario knowledge, the focus order, and the component test scenario are filled into the second prompt frame to obtain the second prompt information.

5. The method as described in claim 1, characterized in that, The steps of filling the data fields to be filled in the process test case with test data to generate the interface automated test case include: The intelligent agent program is used to identify the field type and business constraints of the data fields to be populated in the process test case. Based on the field type and business constraints, the matching data generation tool interface is invoked to generate test data that conforms to the specifications; The generated test data is then used to populate the data field to be populated, thus generating an automated test case for the interface.

6. The method as described in claim 1, characterized in that, Following the step of generating executable automated interface test cases, the method further includes: The automated test cases for the interface are output to the manual confirmation interface; Upon receiving the confirmation instruction, the interface automated test case is pushed to the automated execution platform; Receive the execution results from the automated execution platform and generate an analysis report based on the execution results.

7. The method as described in claim 1, characterized in that, Following the step of receiving service type information, the method further includes: Determine whether the current service is a multi-page service based on the aforementioned service type information; If it is a multi-page service, the source code information is obtained from the service type information, and the multi-page process information, component information and focus order of component operations are extracted from the source code information. Obtain the component rules corresponding to the component information, generate first prompt information based on the component information and the component rules, send the first prompt information to the large language model, and receive the component test scenario information returned by the large language model; Acquire business scenario knowledge, generate second prompt information based on the multi-page process information, the business scenario knowledge, the focus order and the component test scenario, send the second prompt information to the large language model, and receive the process test case returned by the large language model; Fill the data fields to be filled in the process test cases with test data to generate automated interface test cases.

8. A test case generation device with a low-code interface, characterized in that, The device includes: The receiving module is used to receive business type information and obtain source code information from the low-code development platform interface based on the business type information. The extraction module is used to parse the source code information and extract the component information and focus order of component operations in the interface; The first sending module is used to obtain the component rules corresponding to the component information, generate the first prompt information according to the component information and the component rules, send the first prompt information to the large language model, and receive the component test scenario information returned by the large language model. The second sending module is used to acquire business scenario knowledge, generate second prompt information based on the business scenario knowledge, the focus order and the component test scenario, send the second prompt information to the large language model, and receive the process test case returned by the large language model. The generation module is used to fill the data fields to be filled in the process test cases with test data and generate automated interface test cases.

9. A test case generation device with a low-code interface, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the test case generation method for a low-code interface as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the test case generation method of the low-code interface as described in any one of claims 1 to 7.