Test case generation method and equipment

By using preset functional agents and medical large language models to generate test cases covering all functional point information, the problems of inefficient and incomplete testing of medical digital products in the existing technology are solved, and more efficient and accurate testing is achieved .

CN119396720APending Publication Date: 2025-02-07WINNING HEALTH TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411432342.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The prior art is inefficient and prone to errors in functional testing of medical digital products. Randomly generated test cases cannot guarantee the comprehensiveness and accuracy of the test.

Method used

By obtaining the requirements description information for the target medical business system, using the preset functional agent to process the requirements description information, obtain the function point information of the target function and the corresponding test method information, and use the preset medical large language model to generate information covering all functional point information. test cases.

Benefits of technology

Improve the accuracy and efficiency of tests, reduce the workload of manually writing test cases, and ensure that the test cases can cover the function point information of all target functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396720A_ABST
    Figure CN119396720A_ABST
Patent Text Reader

Abstract

The invention provides a test case generation method and equipment, and relates to the technical field of data processing. The method comprises the following steps: acquiring demand description information for a target medical service system, and processing the demand description information by adopting a preset function agent to obtain function point information of at least one target function and information of a target case generation method corresponding to the target function, and then, according to the function point information of each target function and the information of the target test method corresponding to each target function, adopting a preset medical big language model to generate a test case of each target function. According to the method, function point information of at least one target function and information of a target case generation method corresponding to the target function are determined through a preset functional agent, and then a test case is generated by adopting a preset medical big language model, so that the test case can cover the function point information of all the target functions; the test accuracy and the test efficiency are improved, and the workload of manually compiling the test case is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a test case generation method and device. Background Art

[0002] With the development of science and technology, the medical industry is also constantly undergoing digital transformation to improve the quality and efficiency of medical services. In this process, various medical digital products have emerged, such as electronic medical record systems, telemedicine systems, medical data analysis systems, etc. The development and use of these products require strict functional testing to ensure their normal operation and meet user needs. At the same time, the application of artificial intelligence technology in the medical field is becoming more and more extensive, and it can be used to automatically generate test cases and improve test efficiency.

[0003] In the existing technology, testers usually write functional test cases manually. Although this method can realize functional testing of medical digital products, it is inefficient and prone to errors. Another common solution is to use randomly generated test cases, but this method cannot guarantee the comprehensiveness and accuracy of the test. Summary of the invention

[0004] The purpose of the present invention is to provide a test case generation method and device to address the deficiencies in the above-mentioned prior art, so as to generate test cases that can cover the functional point information of all target functions, thereby improving the accuracy and efficiency of the test.

[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0006] In a first aspect, an embodiment of the present application provides a test case generation method, comprising:

[0007] Obtain the requirement description information for the target medical business system;

[0008] Using a preset functional agent to process the requirement description information, obtain function point information of at least one target function, and information of a method for generating a target use case corresponding to the target function;

[0009] According to the function point information of each target function and the information of the target test method corresponding to each target function, a preset medical large language model is used to generate test cases for each target function.

[0010] In an optional implementation manner, the preset function agent is pre-packaged with: a reading agent, an analyzing agent, and a judging agent; the preset function agent is used to process the requirement description information to obtain function point information of at least one target function, and information of a target test method corresponding to the target function, including:

[0011] Using the reading agent, extracting function information from the requirement description information to obtain function description information of the target function;

[0012] Using the analysis agent, analyzing the function description information of the target function to obtain function point information of the target function;

[0013] The judging agent is used to match the function point information of the target function with a plurality of preset test methods to obtain information on the target test method corresponding to the target function.

[0014] In an optional implementation manner, the adopting the analysis agent to analyze the function description information of the target function to obtain the function point information of the target function includes:

[0015] Using the analysis agent, a first analysis is performed on the function description information of the target function to obtain identification information of the target function, expected result information of the target function, and business target information corresponding to the target function;

[0016] Using the analysis agent, perform a second analysis on the function description information of the target function to obtain a plurality of execution action information corresponding to the target function, and arrange the plurality of execution action information to obtain operation step information of the target function;

[0017] The function point information of the target function includes: identification information of the target function, expected result information of the target function, business target information corresponding to the target function, and the operation step information.

[0018] In an optional implementation, the using of the judgment agent to match the function point information of the target function with a plurality of preset test methods to obtain information of the target function corresponding to the target test method includes:

[0019] Using the judgment agent, matching each of the execution action information with the plurality of preset test methods to obtain information on the test method corresponding to each of the execution action information;

[0020] The target test method information includes: information about the use case generation method corresponding to each execution action information.

[0021] In an optional implementation, the using of the judgment agent to match each of the execution action information with the plurality of preset test methods to obtain information of the test method corresponding to each of the execution action information includes:

[0022] The judgment agent is used to match the input and output information corresponding to each execution action information with the input and output conditions corresponding to the multiple preset test methods, and the information of the preset test method corresponding to the input and output conditions matching the input and output information is obtained as the information of the test method corresponding to each execution action information.

[0023] In an optional implementation, the plurality of preset test methods include: an equivalence class partitioning method, a boundary value analysis method, and a cause-effect diagram analysis method;

[0024] The input and output conditions corresponding to the equivalence class partitioning method include: a clear range of input data, a preset format of input data, restrictions on input data, enumerated values ​​of input data, and clear conditions for output results;

[0025] The input and output conditions corresponding to the boundary value analysis method include: numerical input or output, date or time, list or array length, string length, number of loops, enumeration type and preset value;

[0026] The input and output conditions corresponding to the causal graph analysis method include: a logical relationship between multiple input conditions, a dependency relationship between input conditions, a mutually exclusive relationship between input conditions, an output result that depends on a combination of multiple input conditions, and a preset order of input conditions.

[0027] In an optional embodiment, before generating test cases for each of the target functions using a preset medical large language model based on the function point information of each of the target functions and the information of the target test method corresponding to each of the target functions, the method further includes:

[0028] Acquire medical training data, the medical training data including: sample test cases of multiple medical business functions, and text description information of the sample test cases, the text description information of the sample test cases including: sample function point information corresponding to the medical business function and information of the sample test method corresponding to the medical business function;

[0029] The medical training data is used to perform model training to obtain the preset medical large language model.

[0030] In an optional embodiment, the method further comprises:

[0031] According to the preset test case template, the preset output agent is used to process the test case of the target function to generate the test case output file of the target function.

[0032] In an optional implementation manner, the obtaining of requirement description information for the target medical service system includes:

[0033] Obtain the requirement description information of the target medical service system input through the requirement input page.

[0034] In a second aspect, the embodiment of the present application further provides a test case generating device, comprising:

[0035] An acquisition module is used to obtain demand description information for a target medical business system;

[0036] A processing module, used to process the requirement description information using a preset functional agent to obtain function point information of at least one target function and information of a method for generating a target use case corresponding to the target function;

[0037] A generation module is used to generate test cases for each of the target functions based on the function point information of each of the target functions and the information of the target test method corresponding to each of the target functions, using a preset medical large language model.

[0038] In the third aspect, an embodiment of the present application also provides a computer device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the computer device is running, the processor communicates with the storage medium through the bus, and the processor executes the program instructions to perform the steps of the test case generation method as described in any one of the first aspects.

[0039] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the test case generation method as described in any one of the first aspects are executed.

[0040] The beneficial effects of this application are:

[0041] The embodiment of the present application provides a test case generation method and device, the method comprising: obtaining demand description information for a target medical business system, using a preset functional agent to process the demand description information, obtaining function point information of at least one target function, and information of a target case generation method corresponding to the target function, and then using a preset medical large language model to generate test cases for each target function based on the function point information of each target function and the information of a target test method corresponding to each target function. The method of the present application determines the function point information of at least one target function and the information of a target case generation method corresponding to the target function through a preset functional agent, and then uses a preset medical large language model to generate test cases, so that the test cases can cover the function point information of all target functions, thereby improving the accuracy and efficiency of the test and reducing the workload of manually writing test cases. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 One of the flowcharts of a test case generation method provided in an embodiment of the present application;

[0044] Figure 2 A second flow chart of a test case generation method provided in an embodiment of the present application;

[0045] Figure 3 A third flow chart of a test case generation method provided in an embodiment of the present application;

[0046] Figure 4 A fourth flowchart of a test case generation method provided in an embodiment of the present application;

[0047] Figure 5 A schematic diagram of the functional modules of a test case generation device provided in an embodiment of the present application;

[0048] Figure 6 A schematic diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.

[0050] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0051] In the description of the present application, it should be noted that if the terms "upper", "lower", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the drawings, or is the orientation or position relationship in which the product of the application is usually placed when used. It is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application.

[0052] In addition, the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a preset order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0053] It should be noted that, in the absence of conflict, the features in the embodiments of the present application may be combined with each other.

[0054] In order to generate test cases that can cover all function point information and reduce the time for manually writing test cases, the embodiment of the present application provides a test case generation method, which obtains the requirement description information for the target medical business system, adopts a preset functional intelligent agent, processes the requirement description information, obtains the function point information of at least one target function, and the information of the target case generation method corresponding to the target function, and finally, according to the function point information of each target function and the information of the target test method corresponding to each target function, adopts the preset medical large language model to generate test cases for each target function, so that the generated test cases cover all function point information, thereby improving the accuracy of the test.

[0055] The test case generation method provided by the embodiment of the present application is explained in detail by using specific examples in conjunction with the accompanying drawings. The test case generation method provided by the embodiment of the present application can be implemented by a computer device pre-installed with: a test case generation algorithm, by running an algorithm or software. The computer device can be, for example, a server or a terminal, and the terminal can be a user computer. Figure 1 One of the flow charts of a test case generation method provided in an embodiment of the present application; Figure 1 As shown, the method includes:

[0056] S101. Obtain requirement description information for a target medical business system.

[0057] In this embodiment, the requirement description information is the requirement description information determined by the tester based on the test requirements of the target medical business system. The requirement description information can be business description information or function description information, wherein the business description information includes: business background information and product design information. The business background information includes: business status and business demands. The product design information includes: product design process, function description information, developer description information, parameter and value compatibility, database, prototype and other contents.

[0058] If the requirement description information is function description information, for example, the requirement description information is: Personnel A compares the same instrument, sample, project, and different operators (variables), and compares the absolute deviation between the detected project results.

[0059] Optionally, demand description information of the target medical service system input through the demand input page is obtained.

[0060] Specifically, after the operator determines the requirement description information for the target medical business system, the operator can input the requirement description information through the requirement input page, thereby obtaining the requirement description information through the requirement input page.

[0061] S102: Use a preset functional agent to process the requirement description information to obtain function point information of at least one target function and information on a method for generating a target use case corresponding to the target function.

[0062] S103. Based on the function point information of each target function and the information of the target test method corresponding to each target function, a preset medical large language model is used to generate test cases for each target function.

[0063] Specifically, the preset functional agent is used to process the requirement description information, determine the function point information of the target function in the description information, and the corresponding target use case generation method information, and then encapsulate the function point information of the target function and the corresponding target use case generation method information to obtain the target requirement description information.

[0064] The preset medical big language model is used to process the target demand description information, and test cases for each target function in the target demand description information are generated. For example, if the demand description information is: A personnel comparison, the same instrument, sample, project, different operators (variables), compare the relative absolute deviation between the detected project results, then the test case obtained is: Case number: 01; Case name: A personnel comparison; Operation steps: log in to the system, select the same instrument, sample and project, and have two different operators perform the test, and compare the relative deviation between the test results; Expected results: The relative deviation between the test results should be within the allowable range set by the system, and an alarm or reminder should be triggered if it exceeds the range. Note: Make sure that the operator's authority is correct, and check whether the system can accurately calculate the relative deviation.

[0065] In summary, the embodiment of the present application provides a test case generation method, including: obtaining demand description information for a target medical business system, using a preset functional agent to process the demand description information, obtaining function point information of at least one target function, and information on a target case generation method corresponding to the target function, and then using a preset medical large language model to generate test cases for each target function based on the function point information of each target function and the information on a target test method corresponding to each target function. The method of the present application determines the function point information of at least one target function and the information on a target case generation method corresponding to the target function through a preset functional agent, and then uses a preset medical large language model to generate test cases, so that the test cases can cover the function point information of all target functions, thereby improving the accuracy and efficiency of the test and reducing the workload of manually writing test cases.

[0066] On the basis of the above-mentioned embodiments, the embodiments of the present application also provide another possible implementation of the test case generation method, wherein the preset functional agent is pre-packaged with: a reading agent, an analyzing agent and a judging agent. Figure 2 The second flow chart of a test case generation method provided in the embodiment of the present application. Figure 2 As shown, a preset functional agent is used to process the requirement description information to obtain function point information of at least one target function and information of a target test method corresponding to the target function, including:

[0067] S201. Use a reading agent to extract functional information from the requirement description information to obtain functional description information of the target function.

[0068] In this embodiment, the function information in the requirement description information is identified, wherein different preset templates are used and the content of the input requirement description information is also different, as shown in Table 1:

[0069] Table 1 Requirements description information

[0070]

[0071] Among them, the preset templates include: standard templates and simple templates. If the preset template is a standard template, the input demand description information must include: business background information and product design information. The business background information includes: business status and business demands. The product design information includes: product design process, function description information, developer description information, parameter and value compatibility, database, prototype, etc. If the preset template is a simple template, the input demand description information must include: function description information.

[0072] Therefore, the reading agent extracts functional information from the input requirement description information according to different templates, and obtains functional description information of at least one target function in the requirement description information.

[0073] S202: using an analysis agent to analyze the functional description information of the target function to obtain function point information of the target function.

[0074] S203: using a judgment agent to match the function point information of the target function with a plurality of preset test methods, and obtaining information on the target function corresponding to the target test method.

[0075] Specifically, the analysis agent first cleans the functional description information of the target function, removes irrelevant characters, carriage returns, line feeds, punctuation marks, etc. in the functional description information, and then analyzes the cleaned functional description information to determine the functional point information included in the target function.

[0076] The judging agent matches the function point information of the target function according to the matching conditions corresponding to the plurality of preset test methods, and determines the information of the target test method corresponding to the target function.

[0077] In the method provided in this embodiment, the preset function agent is pre-packaged with: a reading agent, an analyzing agent, and a judging agent. The reading agent is used to extract function information from the requirement description information to obtain the function description information of the target function. The analyzing agent is used to analyze the function description information of the target function to obtain the function point information of the target function. The judging agent is used to match the function point information of the target function with multiple preset test methods to obtain the information of the target function corresponding to the target test method. Thus, the function point information of all target functions in the requirement description information is determined according to the preset function agent, so as to avoid missing the function point information of the target function when generating the test case.

[0078] The embodiment of the present application also provides another possible implementation of the test case generation method. Figure 3 The third flow chart of a test case generation method provided in the embodiment of the present application. Figure 3 As shown, an analysis agent is used to analyze the functional description information of the target function to obtain the functional point information of the target function, including:

[0079] S301. Use an analysis agent to perform a first analysis on the functional description information of the target function to obtain identification information of the target function, expected result information of the target function, and business objective information corresponding to the target function.

[0080] S302. Use an analysis agent to perform a second analysis on the functional description information of the target function to obtain a plurality of execution action information corresponding to the target function, and arrange the plurality of execution action information to obtain operation step information of the target function.

[0081] The function point information of the target function includes: identification information of the target function, expected result information of the target function, business target information corresponding to the target function, and operation step information.

[0082] In this embodiment, the analysis agent performs a first analysis on the function description information to determine the identification information of the target function, the expected result information of the target function, and the business goal information corresponding to the target function. For example, if the requirement description information is: A personnel comparison, the same instrument, sample, project, different operators (variables), the relative absolute deviation between the project results detected, then the identification information of the target function obtained by analysis is: A personnel comparison; the expected result information of the target function is: the relative deviation between the test results should be within the allowable range set by the system, and an alarm or reminder should be triggered if it exceeds the range, and the business goal information corresponding to the target function is: determine whether the operator's authority is correct, and check whether the system can accurately calculate the relative deviation.

[0083] Then, a second analysis is performed on the function description information to determine multiple execution action information corresponding to the target function. Specifically, if the function description information of the target function contains the words "add" or "addition", the execution action information corresponding to the target function is determined to be the addition function information; if the function description information of the target function contains the words "modify" or "edit", the execution action information corresponding to the target function is determined to be the editing function information; if the function description information of the target function contains the words "delete", "delete" or "remove", the execution action information corresponding to the target function is determined to be the deletion function information; if the function description information of the target function contains the words "query", the execution action information corresponding to the target function is determined to be the query function information.

[0084] If there are multiple execution action information for the target function, the multiple execution action information are sorted according to the order in which the multiple execution action information are obtained from the function description information to obtain the operation step information of the target function. For example, the operation step information of the target function is: 1. Open the instrument comparison page, 2. Click the Add button, select or enter the comparison instrument information, 3. Edit the added comparison instrument information, 4. Click the Delete button to delete the comparison instrument information.

[0085] Thereby, the identification information of the target function, the expected result information of the target function, the business target information corresponding to the target function and the operation step information are determined, and the function point information of the target function is obtained.

[0086] In the method provided in the embodiment of the present application, an analysis agent is used to perform a first analysis on the function description information of the target function to obtain the identification information of the target function, the expected result information of the target function, and the business target information corresponding to the target function; an analysis agent is used to perform a second analysis on the function description information of the target function to obtain multiple execution action information corresponding to the target function, and the multiple execution action information are arranged to obtain the operation step information of the target function; wherein the function point information of the target function includes: the identification information of the target function, the expected result information of the target function, the business target information corresponding to the target function, and the operation step information. The function description information of the target function is analyzed by the analysis agent to obtain the function point information of the target function.

[0087] The embodiment of the present application also provides another possible implementation of the test case generation method. Using a judgment agent, the function point information of the target function is matched with multiple preset test methods to obtain information about the target function corresponding to the target test method, including:

[0088] A judgment agent is used to match each execution action information with a plurality of preset test methods to obtain information on the test method corresponding to each execution action information.

[0089] The target test method information includes: information about the use case generation method corresponding to each execution action information.

[0090] In this embodiment, the judging intelligent agent is able to match each execution action information with multiple preset test methods to obtain information about the test method corresponding to each execution action information. Specifically, at least one target preset test method is determined from multiple preset test methods to execute action information on the target function and generate a test case.

[0091] Optionally, a judgment agent is used to match the input and output information corresponding to each execution action information with the input and output conditions corresponding to multiple preset test methods, and obtain the information of the preset test method corresponding to the input and output conditions matching the input and output information as the information of the test method corresponding to each execution action information.

[0092] Optionally, the plurality of preset testing methods include: an equivalence class partitioning method, a boundary value analysis method and a cause-effect diagram analysis method.

[0093] Among them, the input and output conditions corresponding to the equivalence class partitioning method include: the input data range is clear, the input data has a preset format, the input data has restrictions, the input data has enumerated values, and the output results have clear conditions.

[0094] The input and output conditions corresponding to the boundary value analysis method include: numerical input or output, date or time, list or array length, string length, number of loops, enumeration type and preset value.

[0095] The input and output conditions corresponding to the causal graph analysis method include: the logical relationship between multiple input conditions, the dependency relationship between input conditions, the mutually exclusive relationship between input conditions, the output result depends on the combination of multiple input conditions, and the input conditions have a preset order.

[0096] Specifically, if the input and output information in the execution action information corresponding to the target function contains date or time, the preset test method matched by the execution action information is determined to be the boundary value analysis method, and the information of the test method corresponding to the execution action information is: use the boundary value analysis method to generate test cases for the target function.

[0097] For example, if the function description information includes: the sample number input mode is a continuous number segment, the judgment agent matches the input and output information corresponding to the execution action information (the sample number input mode is a continuous number segment) with the input and output conditions corresponding to multiple preset test methods, and determines that the input data in the input and output conditions corresponding to the equivalence class division method has a preset format, and then determines that the preset test method matched by the execution action information is the equivalence class division method. Thus, the information of the test method corresponding to each execution action information is determined according to the judgment agent.

[0098] In the method provided in the embodiment of the present application, a judgment agent is used to match each execution action information with multiple preset test methods to obtain information about the test method corresponding to each execution action information, wherein the information about the target test method includes: information about the use case generation method corresponding to each execution action information, thereby determining the information about the test method corresponding to each execution action information.

[0099] The embodiment of the present application also provides another possible implementation of the test case generation method. Figure 4 The fourth flowchart of a test case generation method provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, according to the function point information of each target function and the information of the target test method corresponding to each target function, before generating the test cases of each target function by using the preset medical large language model, the method also includes:

[0100] S401. Obtain medical training data.

[0101] The medical training data includes: sample test cases of multiple medical business functions, and text description information of the sample test cases. The text description information of the sample test cases includes: sample function point information corresponding to the medical business functions and information on sample test methods corresponding to the medical business functions.

[0102] S402: Use medical training data to perform model training to obtain a preset medical large language model.

[0103] In this embodiment, when the model is trained based on medical training data, the model adjusts its own parameters and tries different parameter combinations to minimize the gap between the predicted value and the actual value, thereby gradually improving its adaptability.

[0104] The model continuously optimizes itself through learning, enabling it to better predict new and unseen test cases, and enables the model to deeply understand the patterns of test data and make accurate predictions when new test cases are obtained, thereby training a preset medical large language model that can generate accurate test cases based on the functional point information of each target function and the information of the target test method corresponding to each target function, and improve the efficiency of test case generation.

[0105] The present application embodiment also provides another possible implementation of the test case generation method. The method also includes:

[0106] According to the preset test case template, the preset output agent is used to process the test case of the target function and generate the test case output file of the target function.

[0107] In this embodiment, the preset test case template is shown in Table 2:

[0108] Table 2 Preset test case template

[0109]

[0110]

[0111] Use the preset output agent to process the test cases of the target function and generate the use case output file of the target function. For example, if the requirement description information is: A personnel comparison, the same instrument, sample, project, different operators (variables), compare the relative absolute deviation between the project results detected. The test case obtained is: Case number: 01; Case name: A personnel comparison; Prerequisite: Log in to the system, Operation steps: Select the same instrument, sample and project, and have two different operators perform the test, and compare the relative deviation between the test results; Expected results: The relative deviation between the test results should be within the allowable range set by the system, and an alarm or reminder should be triggered if it exceeds the range. Note: Make sure that the operator's authority is correct and check whether the system can accurately calculate the relative deviation.

[0112] The contents of the use case output file for generating the target function are shown in Table 3:

[0113] Table 3 Test case examples

[0114]

[0115] In the method provided in the embodiment of the present application, according to the preset test case template, a preset output intelligent agent is used to process the test case of the target function, and a case output file of the target function is generated. By using the preset test case template, the test case of the target function is adjusted to obtain test case content that is easy for testers to view, and the case output file containing the adjusted test case is output.

[0116] The following is a corresponding explanation of the test case generation device and computer equipment provided by any of the above embodiments of the present application. The specific implementation process and the technical effects produced are the same as those of the corresponding method embodiments mentioned above. For the sake of brief description, the parts not mentioned in this embodiment can refer to the corresponding contents in the method embodiments.

[0117] Figure 5 A functional module diagram of a test case generation device provided in an embodiment of the present application. Figure 5 As shown, the test case generating device 100 includes:

[0118] An acquisition module 110 is used to acquire demand description information for a target medical service system;

[0119] The processing module 120 is used to process the requirement description information using a preset functional agent to obtain function point information of at least one target function and information of a target use case generation method corresponding to the target function;

[0120] The generation module 130 is used to generate test cases for each target function based on the function point information of each target function and the information of the target test method corresponding to each target function, using a preset medical large language model.

[0121] Optionally, the preset functional agent is pre-packaged with: a reading agent, an analyzing agent and a judging agent; the processing module 120 is also used to use the reading agent to extract functional information from the requirement description information to obtain functional description information of the target function; use the analyzing agent to analyze the functional description information of the target function to obtain functional point information of the target function; use the judging agent to match the functional point information of the target function with multiple preset test methods to obtain information of the target function corresponding to the target test method.

[0122] Optionally, the processing module 120 is also used to use an analysis agent to perform a first analysis on the functional description information of the target function to obtain the identification information of the target function, the expected result information of the target function, and the business objective information corresponding to the target function; use an analysis agent to perform a second analysis on the functional description information of the target function to obtain multiple execution action information corresponding to the target function, and arrange the multiple execution action information to obtain the operation step information of the target function; wherein the function point information of the target function includes: the identification information of the target function, the expected result information of the target function, the business objective information corresponding to the target function, and the operation step information.

[0123] Optionally, the processing module 120 is also used to use a judgment agent to match each execution action information with multiple preset test methods to obtain information about the test method corresponding to each execution action information; wherein the information about the target test method includes: information about the use case generation method corresponding to each execution action information.

[0124] Optionally, the processing module 120 is also used to use a judgment agent to match the input and output information corresponding to each execution action information with the input and output conditions corresponding to multiple preset test methods, and obtain the information of the preset test method corresponding to the input and output conditions matching the input and output information as the information of the test method corresponding to each execution action information.

[0125] Optionally, multiple preset testing methods include: an equivalence class partitioning method, a boundary value analysis method and a causal graph analysis method; wherein, the input and output conditions corresponding to the equivalence class partitioning method include: a clear input data range, input data having a preset format, input data having restrictions, input data having enumeration values ​​and output results having clear conditions; the input and output conditions corresponding to the boundary value analysis method include: numerical input or output, date or time, list or array length, string length, number of loops, enumeration type and preset value; the input and output conditions corresponding to the causal graph analysis method include: logical relationships between multiple input conditions, dependencies between input conditions, mutually exclusive relationships between input conditions, output results depending on a combination of multiple input conditions and input conditions having a preset order.

[0126] Optionally, the device method further comprises:

[0127] The training module is used to obtain medical training data, which includes: sample test cases of multiple medical business functions and text description information of the sample test cases. The text description information of the sample test cases includes: sample function point information corresponding to the medical business function and information on sample test methods corresponding to the medical business function; the medical training data is used to perform model training to obtain a preset medical large language model.

[0128] Optionally, the generation module 130 is further used to process the test case of the target function according to a preset test case template and adopt a preset output agent to generate a test case output file of the target function.

[0129] Optionally, the acquisition module 110 is further configured to acquire requirement description information of the target medical service system input through the requirement input page.

[0130] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0131] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0132] Figure 6 A schematic diagram of a computer device provided in an embodiment of the present application, which can be used for test case generation. Figure 6 As shown, the computer device includes: a processor 210 , a storage medium 220 , and a bus 230 .

[0133] The storage medium 220 stores machine-readable instructions executable by the processor 210. When the computer device is running, the processor 210 communicates with the storage medium 220 via the bus 230, and the processor 210 executes the machine-readable instructions to perform the steps of the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0134] Optionally, the present application further provides a storage medium 220, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method embodiment are executed. The specific implementation method and technical effect are similar and will not be repeated here.

[0135] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0137] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0138] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

[0139] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A test case generation method, characterized in that: include: Obtain the requirement description information for the target medical business system; Using a preset functional agent to process the requirement description information, obtain function point information of at least one target function, and information of a method for generating a target use case corresponding to the target function; According to the function point information of each target function and the information of the target test method corresponding to each target function, a preset medical large language model is used to generate test cases for each target function.

2. The method according to claim 1, characterized in that The preset function agent is pre-packaged with: a reading agent, an analyzing agent, and a judging agent; the preset function agent is used to process the requirement description information to obtain function point information of at least one target function, and information of a target test method corresponding to the target function, including: Using the reading agent, extracting function information from the requirement description information to obtain function description information of the target function; Using the analysis agent, analyzing the function description information of the target function to obtain function point information of the target function; The judging agent is used to match the function point information of the target function with a plurality of preset test methods to obtain information on the target test method corresponding to the target function.

3. The method according to claim 2, characterized in that The adopting the analysis agent to analyze the function description information of the target function to obtain the function point information of the target function includes: Using the analysis agent, a first analysis is performed on the function description information of the target function to obtain identification information of the target function, expected result information of the target function, and business target information corresponding to the target function; Using the analysis agent, perform a second analysis on the function description information of the target function to obtain a plurality of execution action information corresponding to the target function, and arrange the plurality of execution action information to obtain operation step information of the target function; The function point information of the target function includes: identification information of the target function, expected result information of the target function, business target information corresponding to the target function, and the operation step information.

4. The method according to claim 3, characterized in that The using the judgment agent to match the function point information of the target function with a plurality of preset test methods to obtain information of the target function corresponding to the target test method includes: Using the judgment agent, matching each of the execution action information with the plurality of preset test methods to obtain information on the test method corresponding to each of the execution action information; The target test method information includes: information about the use case generation method corresponding to each execution action information.

5. The method according to claim 4, characterized in that The using of the judgment agent to match each of the execution action information with the plurality of preset test methods to obtain information on the test method corresponding to each of the execution action information includes: The judgment agent is used to match the input and output information corresponding to each execution action information with the input and output conditions corresponding to the multiple preset test methods, and the information of the preset test method corresponding to the input and output conditions matching the input and output information is obtained as the information of the test method corresponding to each execution action information.

6. The method according to claim 5, characterized in that The multiple preset testing methods include: an equivalence class partitioning method, a boundary value analysis method, and a cause-effect diagram analysis method; The input and output conditions corresponding to the equivalence class partitioning method include: a clear range of input data, a preset format of input data, restrictions on input data, enumerated values ​​of input data, and clear conditions for output results; The input and output conditions corresponding to the boundary value analysis method include: numerical input or output, date or time, list or array length, string length, number of loops, enumeration type and preset value; The input and output conditions corresponding to the causal graph analysis method include: a logical relationship between multiple input conditions, a dependency relationship between input conditions, a mutually exclusive relationship between input conditions, an output result that depends on a combination of multiple input conditions, and a preset order of input conditions.

7. The method according to claim 1, characterized in that Before generating test cases for each of the target functions based on the function point information of each of the target functions and the information of the target test method corresponding to each of the target functions, using a preset medical large language model, the method further includes: Acquire medical training data, the medical training data including: sample test cases of multiple medical business functions, and text description information of the sample test cases, the text description information of the sample test cases including: sample function point information corresponding to the medical business function and information of the sample test method corresponding to the medical business function; The medical training data is used to perform model training to obtain the preset medical large language model.

8. The method according to claim 1, characterized in that The method further comprises: According to the preset test case template, the preset output agent is used to process the test case of the target function to generate the test case output file of the target function.

9. The method according to claim 1, characterized in that: The obtaining of requirement description information for the target medical service system includes: Obtain the requirement description information of the target medical service system input through the requirement input page.

10. A computer device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the computer device is running, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to perform the steps of the test case generation method as described in any one of claims 1 to 9.