Entities and a computer-implemented method for generating test cases for testing a technical system, the entity-encompassing system
The method leverages generative artificial intelligence to automate the generation of high-quality test cases, addressing the complexity and time-consuming nature of existing test case creation, enhancing efficiency and usability.
Patent Information
- Authority / Receiving Office
- DE · DE
- Patent Type
- Applications
- Current Assignee / Owner
- ROBERT BOSCH GMBH
- Filing Date
- 2024-10-23
- Publication Date
- 2026-04-23
AI Technical Summary
Generating test cases for technical systems is complex and time-consuming, requiring significant manual effort and verification processes.
A computer-implemented method utilizing a generative artificial intelligence (e.g., ChatGPT) to automatically generate high-quality test cases based on specific technical requirements, integrated with a database and user interaction for request management and validation.
Reduces the complexity and time required for generating test cases while ensuring high-quality output, allowing for efficient and user-friendly generation and verification of test cases.
Smart Images

Figure 00000009_0000 
Figure 00000009_0001 
Figure 00000010_0000
Abstract
Description
State of the art
[0001] The invention relates to entities and a computer-implemented method for generating test cases for testing a technical system, the system comprising entities.
[0002] Generating test cases is very complex and time-consuming. Disclosure of the invention
[0003] The computer-implemented method for generating test cases for testing a technical system provides that a database is provided, wherein the database contains technical requirements specific to the technical system for the test cases, wherein a query is sent from a first entity to a second entity, wherein the query includes an address, the address pointing to at least one request in the database, wherein the at least one request stored at the address in the database is retrieved by the first entity via an interface, or wherein the query includes at least one request from the database, wherein the at least one request is transmitted from the second entity to a third entity, wherein a prompt is generated and sent by the third entity to a generative artificial intelligence, wherein the prompt includes a request to the generative artificial intelligence.The method generates at least one test case for at least one requirement, wherein the third entity captures a response from the generative artificial intelligence and sends it to the first entity, the response comprising the at least one test case, and the first entity stores the at least one test case. The method provides a development environment for automatically generating test cases based on requirements.
[0004] The prompt instructs the generative artificial intelligence, for example, to use state-of-the-art standards for generating test cases and / or to generate one test case per requirement. This ensures that the automatically generated test cases are of high quality. It also reduces the effort required for subsequent verification of the test cases.
[0005] The procedure can provide that the first entity allows a user to view or download at least one test case, for example, as a text-based markup language, in particular as a formatted hypertext markup language page, in a viewer, or to download it as a file in a text-based data format, in particular a JavaScript Object Notation file. Providing it as a text-based markup language allows the user to review it or use it by copying and pasting. Providing it as a file allows it to be used in testing.
[0006] The process can be designed so that the first entity gives a user the option to select whether test cases should be generated, and the request is sent if user input is detected indicating that the user has selected to generate test cases; otherwise, the request is not sent. This allows for ease of use by the user.
[0007] The procedure can provide that the second entity executes a main program depending on the address, wherein the main program is trained to start a subroutine for each request stored at the address in the database or for each test case, wherein the subroutine is trained to request a response generated by the generative artificial intelligence from the third entity, the response comprising the test case.
[0008] The procedure can provide that the first entity allows a user to modify a request stored in the database or to create a new request. The first entity saves the request if it detects user input indicating that the user wishes to save the request; otherwise, the first entity does not save the request. This allows the user to modify existing requests or create new ones.
[0009] The procedure may include checking whether the at least one test case meets a predefined criterion, in particular whether the at least one test case is plausible, whether a test can be performed with the at least one test case, and / or whether the at least one test case fully defines a test. The first entity stores the at least one test case if it is determined that the at least one test case meets the criterion, and otherwise does not store the at least one test case. This ensures that the respective test case is either automatically stored if the criterion is met or discarded otherwise.
[0010] A first entity for generating test cases for testing a technical system provides that the first entity is configured to send a request to a second entity, in particular a Jenkins infrastructure, wherein the request includes an address, the address pointing to at least one request in a database, the database containing test case requirements specific to the technical system, the at least one request stored at the address in the database being retrievable by the first entity via an interface, or wherein the at least one request from the database includes the first entity being configured to receive a response generated by a generative artificial intelligence, the response comprising at least one test case, and the first entity being configured to store the at least one test case.
[0011] The first entity, for example, is designed to give a user the ability to view or download at least one test case, for example as a text-based markup language, in particular as a formatted hypertext markup language page, in a viewer, or to download it as a file in a text-based data format, in particular a JavaScript Object Notation file.
[0012] The first entity, for example, is designed to give a user the option to select that test cases should be generated, and to send the request if user input is detected indicating that the user has selected that test cases should be generated, and otherwise not to send the request.
[0013] The first entity, for example, is designed to allow a user to modify a request stored in the database or to create a request, and to save the request if the first entity detects user input indicating that the user wants to save the request, and otherwise not to save the request.
[0014] The first entity is configured, for example, to store the at least one test case if it is determined that the at least one test case meets a predefined criterion, and not to store the at least one test case otherwise, in particular wherein the at least one test case meets the predefined criterion if the at least one test case is plausible, a test can be performed with the at least one test case, and / or the at least one test case fully defines a test.
[0015] A second entity for generating test cases for testing a technical system provides that the second entity is configured to receive a request, wherein the request includes an address, where the address points to at least one requirement in a database, where the database contains requirements specific to the technical system for the test cases, wherein the second entity is configured to retrieve the at least one requirement stored at the address in the database via an interface from the first entity, or wherein the request includes at least one requirement from the database, and wherein the second entity is configured to transmit at least one requirement from the second entity to a third entity.
[0016] The second entity is, for example, trained to execute a main program depending on the address, wherein the main program is trained to start a subroutine for each request stored at the address in the database or for each test case, wherein the subroutine is trained to request a response generated by the generative artificial intelligence from the third entity, the response comprising the test case.
[0017] A third entity for generating test cases for testing a technical system provides that the third entity is trained to receive at least one requirement specific to the technical system regarding the test cases, to generate and send a prompt to a generative artificial intelligence, wherein the prompt includes a request to the generative artificial intelligence to generate at least one test case for the at least one requirement, in particular wherein the prompt instructs the generative artificial intelligence to use state-of-the-art standards for generating the test cases, and / or to generate one test case for each requirement, wherein the third entity is trained to capture a response from the generative artificial intelligence and send it to the first entity.
[0018] A system for generating test cases to test a technical system stipulates that the system includes the first entity and the third entity.
[0019] A first method, in particular in a first entity, for generating test cases for testing a technical system, wherein a request is sent, in particular to a second entity, wherein the request includes an address, wherein the address points to at least one request in a database, wherein the database contains requirements for the test cases specific to the technical system, wherein the at least one request stored at the address in the database is made available for retrieval via an interface, in particular from the first entity, or wherein the request includes at least one request from the database, wherein a response generated by a generative artificial intelligence is received, wherein the response includes at least one test case, and wherein the at least one test case is stored.
[0020] The first method may provide that a user is given the opportunity to view or download at least one test case, for example as a text-based markup language, in particular as a formatted hypertext markup language page, in a viewer, or to download it as a file in a text-based data format, in particular a JavaScript Object Notation file.
[0021] The first method can provide that a user is given the option to select that test cases should be generated, and the request is sent when user input is detected indicating that the user has selected that test cases should be generated, and otherwise the request is not sent.
[0022] The first method can provide that a user is given the opportunity to modify a request stored in the database or to create a request, whereby the request is saved if user input is detected indicating that the user wants to save the request, and otherwise the request is not saved.
[0023] The first method may provide that the at least one test case is stored if it is determined that the at least one test case meets a predefined criterion, and that the at least one test case is not stored otherwise, in particular where it is determined that the at least one test case meets the predefined criterion if the at least one test case is plausible, a test can be performed with the at least one test case, and / or the at least one test case fully defines a test.
[0024] A second method, particularly in a second entity, for generating test cases for testing a technical system, wherein a request is received, the request comprising an address, the address pointing to at least one request in a database, the database comprising requirements for the test cases specific to the technical system, the at least one request stored at the address in the database being retrieved via an interface, particularly from a first entity, or wherein the request comprises at least one request from the database, and at least one request being transmitted, particularly from the second entity, to a third entity.
[0025] The second method involves executing a main program depending on the address, wherein the main program is trained to start a subroutine for each request stored at the address in the database or for each test case, wherein the subroutine is trained to request a response generated by a generative artificial intelligence from the third entity, the response comprising the test case.
[0026] A third method, in particular in a third entity, for generating test cases for testing a technical system, wherein at least one requirement specific to the technical system for the test cases is received, a prompt is generated and sent to a generative artificial intelligence, wherein the prompt includes a request to the generative artificial intelligence to generate at least one test case for the at least one requirement, in particular wherein the prompt instructs the generative artificial intelligence to use state-of-the-art standards for generating the test cases, and / or to generate one test case for each requirement, wherein a response from the generative artificial intelligence is captured and sent to the first entity.
[0027] Further advantageous embodiments can be found in the following description and the drawing. The drawing shows: Fig. 1. A schematic representation of a system for generating test cases for testing a technical system, Fig. 2. A flowchart of a procedure for generating test cases for testing a technical system.
[0028] In Fig. 1 is a system 100 for generating test cases for testing a technical system 102, shown schematically.
[0029] System 100 includes a first entity 104. The first entity 104 includes, for example, an Engineering Lifecycle Management (ELM).
[0030] System 100 includes a second entity 106. The second entity 106 includes, for example, a Jenkins Infrastructure.
[0031] System 100 includes a third entity, 108. This third entity, 108, includes, for example, an OpenAI service. The OpenAI service is provided, for example, by a cloud computing service.
[0032] System 100 includes a generative artificial intelligence 110. The generative artificial intelligence 110 is, for example, a large language model, e.g., ChatGPT.
[0033] The entities and the generative artificial intelligence 110 are trained to execute a procedure for generating test cases for testing the technical system 102.
[0034] In Fig. Figure 2 shows a flowchart of the procedure.
[0035] In step 200, a database is provided.
[0036] The database includes specific technical requirements for the test cases for the technical system (102).
[0037] In this example, the database is provided for the first entity, 104.
[0038] The database is, for example, part of a requirements management tool.
[0039] It may be intended that the first entity 104 gives a user the ability to modify a request stored in the database.
[0040] It may be intended that the first entity 104 gives a user the ability to generate a new request.
[0041] For example, the first entity 104 stores the modified or new request if the first entity 104 detects user input indicating that the user wants to save the request; otherwise, the request is not stored by the first entity 104.
[0042] In an optional step 202, the first entity 104 gives a user the option to select that test cases should be generated.
[0043] In step 204, a request is sent from the first entity 104 to the second entity 106.
[0044] The query includes an address. The address points to at least one request in the database. The address is, for example, a Uniform Resource Locator (URL).
[0045] The request is sent, for example, when user input is detected indicating that the user has selected the generation of test cases. It may be configured that the request is not sent otherwise.
[0046] In step 206, the second entity 106 retrieves at least one request stored at the address in the database from the first entity 104 via an interface. The interface is, for example, a DOORS Next API.
[0047] This means the process extracts the requirements from the database.
[0048] Step 206 is optional. It can be specified that the request includes at least one request from the database. For example, the request is an HTTP POST request with at least one request in the request body.
[0049] In step 208, at least one request is transmitted from the second entity 106 to the third entity 108.
[0050] For example, the second entity 106 executes a main program, e.g., a master pipeline, depending on the address.
[0051] The main program is designed to start a subroutine, e.g. a pipeline, for each requirement stored at the address in the database or for each test case.
[0052] The subprogram is trained to request the response generated by the generative artificial intelligence from the third entity 108 208.
[0053] The main program and its subprograms include, for example, an algorithm that uses the generative artificial intelligence 110 to generate the test cases. The algorithm is trained to generate the prompt for the generative artificial intelligence 110.
[0054] In step 210, a prompt to a generative artificial intelligence 110 ChatGPT is generated using the third entity 108.
[0055] The prompt includes a request to the generative artificial intelligence 110 to generate at least one test case for the at least one requirement.
[0056] The prompt instructs the generative artificial intelligence 110, for example, to use state-of-the-art standards for generating the test cases, and / or to generate one test case for each requirement.
[0057] In step 212, the prompt is sent to the generative artificial intelligence 110.
[0058] In step 214, the third entity 108 captures a response from the generative artificial intelligence. The response includes at least one test case.
[0059] In step 216, the response is sent to the first entity 104.
[0060] In step 218, the first entity 104 stores at least one test case.
[0061] Optionally, it is checked whether at least one test case meets a predefined criterion or not.
[0062] For example, one criterion is whether at least one test case is plausible.
[0063] For example, one criterion is whether a test can be carried out with at least one test case.
[0064] For example, one criterion is to check whether at least one test case fully defines a test.
[0065] The first entity 104 stores at least one test case, for example, if it is determined that at least one test case meets the criterion. It may be stipulated that the first entity 104 does not store at least one test case otherwise.
[0066] It may be provided that the first entity 104 gives a user the opportunity in step 220 to view or download at least one test case.
[0067] For example, the first entity 104 gives the user the possibility to display at least one test case as a text-based markup language, in particular as a formatted hypertext markup language HTML page, in a display program, e.g. a browser.
[0068] For example, the first entity 104 gives the user the option to download at least one test case as a file in a text-based data format, in particular as a JavaScript Object Notation (JSON) file.
[0069] The user is given these options in the process, for example, via a human-machine interface, which includes a graphical user interface. On the graphical user interface, the user is shown dialog boxes, for example, in which the user is given the respective option. The human-machine interface is designed, for example, to display the dialog boxes according to the respective option to be given to the user and to capture the respective user input.
[0070] An example of a requirement is: When vFzg greater than 300km / h, ground clearance shall be set to 40mm be activating air suspension to stage4.
[0071] Für die Anforderung werden z.B. folgende Testfälle (Test Case) generiert: Test Case 1
[0072] Test Case Description: Test when vFzg is less than 300 km / h and ground clearance is not set to 40 mm
[0073] Pre-conditions: vFzg less than 300 km / h and ground clearance Is not set to 40mm Actions: 1 Set vFzg value to 250km / h 2.Check if ground clearance is set to 40mm
[0074] Expected Result: Ground clearance should not be set to 40mm. Failure Type: INFOTestCase2
[0075] Test Case Description: Test when vFzg is greater than 300 km / h and ground clearance is set to 40mm
[0076] Pre-conditions. vFzg greater than 300 km / h and ground clearance is set to 40mm Actions 1. Set vFzg value to 350km / h 2. Check if ground clearance is set to 40mm
[0077] Expected Result: Ground clearance should be set to 40mm by activating air suspension to stage4
[0078] Failure Type: INFO
Claims
[1] Computer-implemented method for generating test cases for testing a technical system (102), characterized by, that a database is provided (200), wherein the database for the technical system (102) includes specific technical requirements for the test cases, wherein a query is sent from a first entity (104) to a second entity (106) (204), wherein the query includes an address, wherein the address points to at least one request in the database, wherein the at least one request stored at the address in the database is retrieved by the first entity (104) via an interface (206), or wherein the query includes at least one request from the database, wherein the at least one request is transmitted from the second entity (106) to a third entity (108) (208), wherein a prompt to a generative artificial intelligence (110) is generated (210) and sent (212) by the third entity (108), wherein the prompt includes a request to the generative artificial intelligence (110),to generate at least one test case for the at least one requirement, wherein the third entity (108) captures a response from the generative artificial intelligence (214) and sends it to the first entity (104) (216), wherein the response includes the at least one test case, and wherein the first entity (104) stores the at least one test case (218). [2] Method according to claim 1, characterized by , that the prompt instructs the generative artificial intelligence (110) to use state-of-the-art standards for generating the test cases, and / or to generate one test case for each requirement. [3] Method according to any one of the preceding claims, characterized by, that the first entity (104) gives a user the ability (220) to display or download at least one test case, for example as a text-based markup language, in particular as a formatted hypertext markup language page, in a viewer, or to download it as a file in a text-based data format, in particular a JavaScript Object Notation file. [4] Method according to any one of the preceding claims, characterized by , that the first entity (104) gives a user the option (202) to select that test cases should be generated, and the request is sent (204) when user input is detected indicating that the user has selected that test cases should be generated, and otherwise the request is not sent. [5] Method according to any one of the preceding claims, characterized by, that the second entity (106) executes a main program depending on the address, wherein the main program is trained to start a subroutine for each request stored at the address in the database or for each test case, wherein the subroutine is trained to request a response (208) generated by the generative artificial intelligence from the third entity (108), wherein the response includes the test case. [6] Method according to any one of the preceding claims, characterized by , that the first entity (104) gives a user the possibility (200) to modify a request stored in the database or to create a request, wherein the first entity (104) stores the request if the first entity (104) recognizes user input indicating that the user wants to save the request, and otherwise the request is not stored by the first entity (104). [7] Method according to any of the preceding claims, characterized by , that it is checked (218) whether the at least one test case satisfies a given criterion, or not, in particular whether the at least one test case is plausible, whether a test with the at least one test case is feasible, and / or whether the at least one test case fully defines a test, and wherein the first entity (104) stores the at least one test case if it is found that the at least one test case satisfies the criterion, and the first entity (104) does not store the at least one test case otherwise. [8] First entity (104) for generating test cases for testing a technical system (102), characterized bythat the first entity (104) is configured to send a request to a second entity (106), wherein the request includes an address, the address pointing to at least one request in a database (URL), the database containing test case requirements specific to the technical system (102), the at least one request stored at the address in the database being retrievable by the first entity (104) via an interface, or wherein the request includes at least one request from the database, the first entity (104) being configured to receive a response generated by a generative artificial intelligence, the response including at least one test case, and the first entity (104) being configured to store the at least one test case. [9] The first entity (104) according to claim 8, characterized by, that the first entity (104) is designed to enable a user to display or download at least one test case, for example as a text-based markup language, in particular as a formatted hypertext markup language page, in a viewer, or as a file in a text-based data format, in particular a JavaScript Object Notation file. [10] The first entity (104) according to claim 8 or 9, characterized by , that the first entity (104) is trained to give a user the option to select that test cases should be generated, and to send the request when user input is detected indicating that the user has selected that test cases should be generated, and otherwise not to send the request. [11] The first entity (104) according to any one of claims 8 to 10, characterized by, that the first entity (104) is designed to allow a user to modify a request stored in the database or to create a request, and to save the request if the first entity (104) detects user input indicating that the user wants to save the request, and otherwise not to save the request. [12] The first entity (104) according to any one of claims 8 to 11, characterized by , that the first entity (104) is configured to store the at least one test case when it is determined that the at least one test case satisfies a predefined criterion, and not to store the at least one test case otherwise, in particular wherein the at least one test case satisfies the predefined criterion if the at least one test case is plausible, a test can be performed with the at least one test case, and / or the at least one test case fully defines a test. [13] Second entity (106) for generating test cases for testing a technical system (102), characterized by , that the second entity (106) is configured to receive a request, wherein the request includes an address, the address pointing to at least one request in a database, the database containing test case specific requirements for the technical system (102), wherein the second entity (106) is configured to retrieve the at least one request stored at the address in the database via an interface from the first entity (104), or wherein the request includes at least one request from the database, wherein the second entity (106) is configured to transmit at least one request from the second entity (106) to a third entity (108). [14] The second entity (106) according to claim 13, characterized by, that the second entity (106) is trained to execute a main program depending on the address, wherein the main program is trained to start a subroutine for each request stored at the address in the database or for each test case, wherein the subroutine is trained to request a response generated by the generative artificial intelligence from the third entity (109), wherein the response includes the test case. [15] Third entity (108) for generating test cases for testing a technical system (102), characterized by, that the third entity (108) is trained to receive at least one requirement specific to the technical system (102) for the test cases, to generate and send a prompt to a generative artificial intelligence (110), wherein the prompt includes a request to the generative artificial intelligence (110) to generate at least one test case for the at least one requirement, in particular wherein the prompt instructs the generative artificial intelligence (110) to use state-of-the-art standards for generating the test cases, and / or to generate one test case for each requirement, wherein the third entity (108) is trained to capture a response from the generative artificial intelligence and send it to the first entity (104). [16] System (100) for generating test cases for testing a technical system (102), characterized by, that the system (100) comprises the first entity (104) according to any one of claims 8 to 12, the second entity (106) according to any one of claims 13 or 14 and the third entity (108) according to claim 15. [17] Methods, in particular in a first entity (104), for generating test cases for testing a technical system (102), characterized by, that a request is sent in particular to a second entity (106) (204), wherein the request includes an address, the address pointing to at least one request in a database, the database containing specific requirements for the test cases for the technical system (102), the at least one request stored at the address in the database being made available for retrieval via an interface, in particular by the first entity (104) (206), or wherein the request includes at least one request from the database, receiving a response generated by a generative artificial intelligence (216), the response including at least one test case, the at least one test case being stored (218). [18] The method according to claim 17, characterized by, that a user is given the possibility (220) to display or download at least one test case, for example as a text-based markup language, in particular as a formatted hypertext mark-up language page, in a viewer, or to download it as a file in a text-based data format, in particular a JavaScript Object Notation file. [19] The method according to claim 17 or 18, characterized by , that a user is given the option (202) to select that test cases should be generated, and the request is sent (204) when user input is detected indicating that the user has selected that test cases should be generated, and otherwise the request is not sent. [20] The method according to any one of claims 17 to 19, characterized by, that a user is given the possibility (200) to modify a request stored in the database or to create a request, whereby the request is saved if a user input is detected indicating that the user wants to save the request, and otherwise the request is not saved. [21] The method according to any one of claims 17 to 20, characterized by , that the at least one test case is stored (218) if it is determined that the at least one test case satisfies a predefined criterion, and the at least one test case is not stored otherwise, in particular where it is determined that the at least one test case satisfies the predefined criterion if the at least one test case is plausible, a test can be performed with the at least one test case, and / or the at least one test case fully defines a test. [22] Methods, in particular in a second entity (106), for generating test cases for testing a technical system (102), characterized by , that a request is received (204), wherein the request includes an address, the address pointing to at least one request in a database, the database containing specific requirements for the test cases for the technical system (102), the at least one request stored at the address in the database being retrieved via an interface, in particular from a first entity (104) (206), or wherein the request includes at least one request from the database, the at least one request being transmitted, in particular from the second entity (106), in particular to a third entity (108) (208). [23] The method according to claim 22, characterized by, that depending on the address a main program is executed, wherein the main program is trained to start a subroutine for each request stored at the address in the database or for each test case, wherein the subroutine is trained, in particular by the third entity (108), to request a response generated by a generative artificial intelligence (208), wherein the response includes the test case. [24] Methods, in particular in a third entity (108), for generating test cases for testing a technical system (102), characterized by, that at least one requirement specific to the technical system (102) for the test cases is received (208), a prompt to a generative artificial intelligence (110) is generated (210) and sent (212), wherein the prompt includes a request to the generative artificial intelligence (110) to generate at least one test case for the at least one requirement, in particular wherein the prompt instructs the generative artificial intelligence (110) to use state-of-the-art standards for generating the test cases, and / or to generate one test case for each requirement, wherein a response from the generative artificial intelligence is captured (214) and sent, in particular to the first entity (104) (216).