System

The system automates unit testing by using a generative model to analyze and generate test code, improving software quality and efficiency by reducing manual effort and errors.

JP2026028782APending Publication Date: 2026-02-20SOFTBANK GROUP CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024131398
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2026-02-20

AI Technical Summary

Technical Problem

Manual unit testing in software development is time-consuming, labor-intensive, and prone to human errors, leading to reduced software quality and efficiency.

Method used

A system that utilizes a generative model to analyze program code, automatically generate test code, execute the tests, and generate a report, thereby automating the testing process.

Benefits of technology

This system significantly reduces the time and effort required for unit testing, improves quality by preventing human oversights, and ensures efficient identification of test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026028782000001_ABST
    Figure 2026028782000001_ABST
Patent Text Reader

Abstract

A system is provided.SOLUTION: A system comprising: means for analyzing program code using a generative model to automatically generate test code; means for storing the automatically generated test code; means for executing the stored test code and collecting test results; means for automatically generating a results report based on the test results; and means for outputting or delivering the results report.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The technology of the present disclosure relates to a system. [Background technology]

[0002] Patent document 1 discloses a persona chatbot control method performed by at least one processor, the method including the steps of receiving a user utterance, adding the user utterance to a prompt including an instruction sentence related to a description of the chatbot character, encoding the prompt, and inputting the encoded prompt into a language model to generate a chatbot utterance in response to the user utterance. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Publication No. 2022-180282 Summary of the Invention [Problem to be solved by the invention]

[0004] Unit testing has become increasingly important in software development in recent years. However, manual unit testing often requires a lot of time and effort, and the quality of the testing often depends on the skill and experience of the person performing the testing. This makes it easy for errors and omissions to occur, and the amount of work required to maintain high quality is extremely large. Therefore, the present invention aims to solve these problems and provide a means for improving the efficiency and quality of unit testing. [Means for solving the problem]

[0005] The present invention is a system that includes a means for analyzing program code using a generative model and automatically generating test code, a means for saving the automatically generated test code, a means for executing the saved test code and collecting test results, a means for automatically generating a result report based on the test results, and a means for outputting or distributing the result report. This prevents human oversights and enables efficient identification of test cases. Furthermore, by automating the entire process from test execution to result reporting, it is possible to significantly reduce the time and effort required to ensure quality.

[0006] A "generative model" is a model that analyzes program code based on machine learning and artificial intelligence techniques and automatically generates corresponding test code.

[0007] "Program code" is text data containing the set of instructions or logic that make up a software or application.

[0008] "Test code" is additional code created to verify specific functionality or behavior of program code.

[0009] "Automatic generation" is the process by which a specific object (in this case, test code) is generated by a machine or software without manual human intervention.

[0010] "Storage" means storing the test code and result reports generated by the generative model in a storage medium such as a database or file system temporarily or for a long period of time.

[0011] "Test execution" is the process of actually running the generated test code on a computer to check whether the program code operates as expected.

[0012] "Test results" are output data generated during test execution, and are information indicating whether the program code worked correctly or whether an error occurred.

[0013] "Result Report" means a report generated after a Test is executed that contains details of the Test results and pass / fail status.

[0014] "Output" is the process of displaying the results report generated by the system to the user or sending it to another system.

[0015] "Delivery" refers to sending the generated results report to the user via email or other communication means. [Brief explanation of the drawings]

[0016] [Figure 1] 1 is a conceptual diagram showing an example of the configuration of a data processing system according to a first embodiment. [Figure 2] 1 is a conceptual diagram showing an example of main functions of a data processing device and a smart device according to a first embodiment. [Figure 3] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a second embodiment. [Figure 4] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and smart glasses according to a second embodiment. [Figure 5] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a third embodiment. [Figure 6] FIG. 11 is a conceptual diagram showing an example of main functions of a data processing device and a headset-type terminal according to a third embodiment. [Figure 7] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a fourth embodiment. [Figure 8] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and a robot according to a fourth embodiment. [Figure 9] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 10] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 11]FIG. 3 is a sequence diagram showing a processing flow of the data processing system according to the first embodiment. [Figure 12] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 1. [Figure 13] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system according to the second embodiment when an emotion engine is combined. [Figure 14] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 2 when an emotion engine is combined. DETAILED DESCRIPTION OF THE INVENTION

[0017] An example of an embodiment of a system according to the technology of the present disclosure will be described below with reference to the accompanying drawings.

[0018] First, the terms used in the following description will be explained.

[0019] In the following embodiments, a coded processor (hereinafter simply referred to as a "processor") may be a single arithmetic device or a combination of multiple arithmetic devices. Furthermore, a processor may be a single type of arithmetic device or a combination of multiple types of arithmetic devices. Examples of arithmetic devices include a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a GPGPU (General-Purpose computing on Graphics Processing Units), and an APU (Accelerated Processing Unit).

[0020] In the following embodiments, a coded RAM (Random Access Memory) is a memory in which information is temporarily stored and is used as a working memory by a processor.

[0021] In the following embodiments, the coded storage is one or more non-volatile storage devices that store various programs, various parameters, etc. Examples of non-volatile storage devices include flash memory (SSD (Solid State Drive)), magnetic disks (e.g., hard disks), and magnetic tapes.

[0022] In the following embodiments, a communication I / F (Interface) with a symbol is an interface including a communication processor, an antenna, etc. The communication I / F controls communication between multiple computers. Examples of communication standards applied to the communication I / F include wireless communication standards including 5G (5th Generation Mobile Communication System), Wi-Fi (registered trademark), Bluetooth (registered trademark), etc.

[0023] In the following embodiments, "A and / or B" is synonymous with "at least one of A and B." In other words, "A and / or B" means that it may be only A, only B, or a combination of A and B. Furthermore, in this specification, the same concept as "A and / or B" is also applied when three or more things are expressed connected by "and / or."

[0024] [First embodiment]

[0025] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.

[0026] 1, a data processing system 10 includes a data processing device 12 and a smart device 14. An example of the data processing device 12 is a server.

[0027] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0028] The smart device 14 includes a computer 36, a reception device 38, an output device 40, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The reception device 38, the output device 40, and the camera 42 are also connected to the bus 52.

[0029] The reception device 38 includes a touch panel 38A, a microphone 38B, and the like, and receives user input. The touch panel 38A detects contact with an indicator (for example, a pen or a finger) to receive user input by the touch of the indicator. The microphone 38B detects the user's voice to receive user input by voice. The control unit 46A transmits data indicating the user input received by the touch panel 38A and the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the data indicating the user input.

[0030] The output device 40 includes a display 40A and a speaker 40B, and presents data to the user 20 by outputting the data in a form of expression that the user 20 can perceive (for example, audio and / or text). The display 40A displays visible information such as text and images in accordance with instructions from the processor 46. The speaker 40B outputs audio in accordance with instructions from the processor 46. The camera 42 is a compact digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor.

[0031] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 control the exchange of various information between the processor 46 and the processor 28 via the network 54.

[0032] FIG. 2 shows an example of the main functions of the data processing device 12 and the smart device 14.

[0033] 2, in the data processing device 12, a specific process is performed by the processor 28. A specific processing program 56 is stored in the storage 32. The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific process is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.

[0034] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[0035] In the smart device 14, the processor 46 performs the reception output process. The storage 50 stores a reception output program 60. The reception output program 60 is used in conjunction with the specific processing program 56 by the data processing system 10. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.

[0036] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0037] The present invention is a system that automates a series of processes, from program code analysis to automatic test code generation, test execution, and result reporting. Each function of this system is realized by three main elements: a server, a terminal, and a user. Specific embodiments of the system are described below.

[0038] 1. Upload the source code

[0039] First, the user uploads the source code from their device to the server. When the user uploads the source code via a web interface or API, the server receives the code and temporarily stores it.

[0040] 2. Source code analysis

[0041] The server inputs the received source code into a generative model for analysis. The generative model analyzes the function and method signatures, dependencies, logic flow, etc. in the program code. Based on this analysis process, the generative model identifies appropriate test cases.

[0042] 3. Automatic generation of test code

[0043] Based on the generated test cases, the generative model automatically generates test code. The test code specifically verifies the input and expected output for each function or method of the target program code. The generated test code is saved in a database or file storage by the server.

[0044] 4. Running the Test

[0045] Next, when the user presses the "Run Test" button on the terminal, the server retrieves the saved test code and automatically runs the test using a test execution tool (e.g., pytest, unittest, etc.) The terminal displays the progress of the test in real time.

[0046] 5. Collecting test results

[0047] The server collects the test results output by the test execution tools, extracts and analyzes the detailed results of the test cases that passed and failed.

[0048] 6. Generate and send results report

[0049] Finally, the server automatically generates a report based on the test results, including the pass / fail status of each test case and detailed error messages, and sends the report to the user's device via email or a web interface.

[0050] Specific examples

[0051] Uploading and analyzing source code

[0052] Suppose a user uploads the following source code:

[0053] python

[0054] def add(a, b):

[0055] return a + b

[0056] The server receives this source code and requests the generative model to analyze it. The generative model generates the following test case from the input and output of the add function:

[0057] Test code generation

[0058] The test code based on the generated test cases is as follows:

[0059] python

[0060] def test_add():

[0061] assert add(1, 2) == 3

[0062] assert add(-1, 1) == 0

[0063] assert add(0, 0) == 0

[0064] The server retrieves this test code from the language model and stores it in a database.

[0065] Running the tests

[0066] When the user presses the "Run Test" button, the server retrieves the saved test code and automatically runs the test using pytest, and the terminal displays the test progress in real time.

[0067] Collecting test results and generating reports

[0068] The server collects the test results and generates a report that states:

[0069] Test Results Report

[0070] -------------------

[0071] All tests were successful.

[0072] The server sends this report to the user's device, where the user can access the report via a web interface or email.

[0073] According to the above embodiment, the present system realizes improved efficiency and quality of unit testing in software development.

[0074] The processing flow will be explained below.

[0075] Step 1:

[0076] The user selects the source code file via a web interface or API to upload the source code from the terminal to the server, clicks the "Upload" button, and the source code is sent to the server.

[0077] Step 2:

[0078] The server temporarily stores the received source code for analysis, and stores the stored source code in a database or temporary file in an appropriate format.

[0079] Step 3:

[0080] The server inputs the saved source code into the generative model and begins analysis, which extracts function and method signatures, dependencies, logic flow, and other information from the program code.

[0081] Step 4:

[0082] The generative model generates test cases based on the analysis results, which specifically define the inputs and expected outputs for each function or method.

[0083] Step 5:

[0084] The server automatically generates test code from the test cases received from the generative model and saves it in a database or file storage. The saved test code is then used for test execution.

[0085] Step 6:

[0086] The user presses the "Test execution" button on the terminal, which sends a request to the server to execute the test.

[0087] Step 7:

[0088] The server retrieves the stored test code, copies it to a test execution environment, and runs it via an appropriate testing tool (e.g., pytest).

[0089] Step 8:

[0090] The server runs the test using a test tool, and while the test is running, it sends data to the device to display the test progress in real time.

[0091] Step 9:

[0092] The server collects the test results, which include the pass or fail status of each test case, error messages, and execution time.

[0093] Step 10:

[0094] The server automatically generates a report based on the collected test results, which includes an overall test score and details of the successful and failed test cases.

[0095] Step 11:

[0096] The server sends the generated results report to the user's terminal, where it can be displayed via a web interface or delivered to the user as an email.

[0097] Through the above steps, this system achieves efficient and high-quality unit test automation.

[0098] Example 1

[0099] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0100] Generating and executing test code in software development is a time-consuming and labor-intensive process. When this process is done manually, there is a risk of human error or incomplete test cases. Furthermore, analyzing test results and creating reports is also a complex and time-consuming process. These issues reduce software quality and development efficiency. Therefore, the present invention aims to solve these problems and provide a system that efficiently performs all processes from automatically generating test code to executing tests, analyzing results, and creating reports.

[0101] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.

[0102] In this invention, the server includes: means for a user to upload source code; means for analyzing program code and extracting test cases using a generative AI model; means for automatically generating test code based on the test cases extracted using the generative AI model; means for saving the automatically generated test code in a database or file storage; means for a user to issue a command to run a test, and for the server to retrieve the saved test code and invoke a test execution tool to automatically run the test; means for collecting test results and automatically generating a result report; and means for outputting or distributing the generated result report to the user's terminal. This automates a series of processes from analyzing source code to extracting test cases, generating test code, running the tests, and collecting and reporting the results, thereby improving the efficiency and quality of software development.

[0103] A "generative AI model" is an artificial intelligence model that analyzes source code and generates appropriate test cases and test code.

[0104] A "test case" refers to a set of conditions or procedures that verify the expected output for a particular input.

[0105] "Test code" is code that is generated based on test cases and is used to verify specific functions and operations of a program.

[0106] A "database" is a system for systematically organizing and storing information and data so that they can be efficiently searched and used as needed.

[0107] "File storage" is a system for storing data files and making them accessible through a web interface, API, etc.

[0108] A "server" is a computer system that provides services over a network and processes and stores data.

[0109] A "terminal" is an electronic device that is operated by a user and communicates with a server to send and receive information.

[0110] "Upload" refers to the act of transferring data or files from a user's device to a server.

[0111] A "test execution tool" is software that automatically executes test code and collects the results. Examples include pytest and unittest.

[0112] A "result report" is a document summarizing the results of a test execution, including the success / failure status of each test case and detailed error messages.

[0113] The present invention is a system that starts with a user uploading source code, analyzes the source code using a generative AI model, and automatically generates test code. This system is explained in detail for each processing step.

[0114] Uploading source code

[0115] First, the user uploads the source code from their device to the server. They enter the source code through a web interface or API and send it by pressing the "Upload" button. The server receives the source code and temporarily stores it in storage.

[0116] Source code analysis

[0117] Next, the server inputs the received source code into a generative AI model for analysis. This analysis process includes the following: The generative AI model analyzes the signatures, dependencies, and logic flow of functions and methods in the source code. Specifically, it lists function names, arguments, and return values ​​and extracts test cases.

[0118] Extraction of test cases and automatic generation of test code

[0119] The generative AI model automatically generates test code based on the extracted test cases. For example, the extracted test case for the function "add" is instantiated as follows:

[0120] Saving test code

[0121] The generated test code is stored by the server in a database or file storage, making it available for later use in the test execution process.

[0122] Running the tests

[0123] Next, the user presses the "Run Test" button on the terminal to instruct the server to run the test. The server retrieves the saved test code and automatically runs the test using a test execution tool (e.g., pytest or unittest). The test progress is displayed on the terminal in real time.

[0124] Collecting and analyzing test results

[0125] The server collects the test results output from the test execution tool, analyzes the successful and failed test cases, extracts error and success messages, and performs detailed analysis.

[0126] Generate and send results reports

[0127] Finally, the server automatically generates a report based on the test results, including the pass / fail status of each test case and detailed error messages. The generated report is sent to the user's terminal via email or a web interface, through which the user can access and review the report.

[0128] Below are some example prompts for a generative AI model:

[0129] Analyze source code and generate test cases and test code.

[0130] Source code:

[0131] def add(a, b):

[0132] return a + b

[0133] This system automates the entire process of software development, from generating test code to running the tests, analyzing the results, and creating reports, thereby improving software quality and development efficiency.

[0134] The flow of the identification process in the first embodiment will be described with reference to FIG.

[0135] Step 1: Upload your source code

[0136] A user uploads source code from their own device to the server. The input is the source code that the user enters via a web interface or API. When the user presses the "upload" button, the source code is sent as an HTTP request. The server receives the request and temporarily stores the sent source code. This stored source code becomes the input for the next processing step.

[0137] Step 2: Analyzing the source code

[0138] The server inputs the temporarily saved source code into the generative AI model for analysis. In this case, the input is the source code saved in the previous step. The generative AI model analyzes the signatures, dependencies, and logic flow of functions and methods in the source code. This process lists function names, arguments, and return values, and extracts test cases. The output is a list of test cases.

[0139] Step 3: Automatically generate test code

[0140] The generative AI model automatically generates test code based on the extracted test cases. The input is a list of test cases generated in the previous step. The generative AI model generates test code based on this list. For example, for the function "add", test code is generated that describes the appropriate input and expected output. The output is the generated test code.

[0141] Step 4: Saving the test code

[0142] The server saves the generated test code in a database or file storage. The input is the test code generated in the previous step. The server saves this test code in a specific folder or registers it in a database. The output is the saved test code.

[0143] Step 5: Test execution instructions

[0144] The user presses the "Test Execution" button on the terminal to instruct the execution of a test. The input is the user's operation instruction. Upon receiving the user's instruction, the server retrieves the saved test code, calls the test execution tool, and automatically executes the test. The output is the start of test execution.

[0145] Step 6: Running the tests

[0146] The server retrieves the saved test code and automatically runs the tests using a test runner (e.g., pytest or unittest). The input is the saved test code, which is executed by the test runner. The output is the test execution result. The execution progress is displayed in real time on the user's terminal.

[0147] Step 7: Collect and analyze test results

[0148] The server collects and analyzes the test results output by the test execution tool. The input is the test results generated by the test execution tool. The server identifies successful and failed test cases and performs detailed analysis. The output is the analyzed test results.

[0149] Step 8: Generate a report of the results

[0150] The server automatically generates a result report based on the test results. The input is the parsed test results. The report contains the pass / fail status of each test case and detailed error messages. The output is the generated result report.

[0151] Step 9: Submit your report

[0152] The server outputs or delivers the generated results report to the user's terminal. The input is the generated results report. The server sends this report to the user via email or a web interface. The output is the report sent to the user's terminal.

[0153] The above are the specific processing steps of the program of this system, which enables users to efficiently and reliably generate test code, execute tests, analyze the results, and receive reports.

[0154] (Application example 1)

[0155] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0156] Robot operation programs in factories are complex and diverse, requiring a significant amount of man-hours to ensure their quality. Traditional manual testing methods can overlook bugs and errors in the programs, potentially leading to serious accidents or reduced production efficiency. Therefore, there is an urgent need to provide a means to efficiently test robot operation programs and improve their quality.

[0157] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.

[0158] In this invention, the server includes means for analyzing the robot's motion control program using the generative model and automatically generating test code, means for saving the automatically generated test code, and means for executing the saved test code and collecting test results, which makes it possible to detect bugs and errors in the robot's motion program early and improve its quality.

[0159] A "generative model" is an artificial intelligence model that analyzes program code and signatures and automatically generates test cases and test code.

[0160] An "operation control program" is a program that gives instructions and controls to operate a mechanical device such as a robot.

[0161] "Test code" is code for verifying the operation of an operation control program, and is used to confirm the expected output for a specific input.

[0162] A "test case" is a specific set of conditions for verifying whether an operation control program operates correctly under specific scenarios or conditions.

[0163] A "test execution tool" is a software tool for executing test code and collecting the results.

[0164] A "result report" is a document summarizing the test results, including the success / failure status of each test case and error messages.

[0165] A "server" is a centralized location or computer system for storing, processing, and communicating data.

[0166] This invention is an automatic test system for efficiently improving the quality of factory operation control programs. This system consists of three elements: a server, a terminal, and a user. A specific embodiment of this system is shown below.

[0167] 1. Upload the program

[0168] The user uploads the robot's motion control program from the terminal to the server. The program is uploaded using a web interface or API. For example, consider the following program:

[0169] def move_arm(x, y, z):

[0170] Arm movement logic

[0171] return True if (x >= 0 and y >= 0 and z >= 0) else False

[0172] 2. Code Analysis

[0173] The server sends the received motion control program to the generative AI model for analysis. The generative AI model analyzes the signatures of the program's functions and methods and automatically generates test cases. In this analysis process, an example of a prompt sentence is as follows:

[0174] Analyze the following robot arm motion program and generate appropriate test cases:

[0175] def move_arm(x, y, z):

[0176] return True if (x >= 0 and y >= 0 and z >= 0) else False

[0177] 3. Automatic test code generation

[0178] The generative AI model generates test cases based on the analysis, and then automatically generates test code based on them. The generated test code is stored in a database or file storage by the server. For example, the generated test code looks like this:

[0179] def test_move_arm():

[0180] assert move_arm(1, 2, 3) == True

[0181] assert move_arm(-1, 2, 3) == False

[0182] assert move_arm(0, 0, 0) == True

[0183] 4. Test execution

[0184] When a user presses the "Run Test" button on the terminal, the server retrieves the saved test code and automatically runs the test using a test execution tool such as pytest. The terminal displays the test progress in real time.

[0185] 5. Collecting test results

[0186] The server collects the test results output from the test execution tools, extracts detailed results of successful and failed test cases, and analyzes them.

[0187] 6. Generate and send results report

[0188] The server automatically generates a report based on the test results, including the pass / fail status of each test case and detailed error messages, and sends the report to the user's terminal via email or a web interface.

[0189] Hardware and software used

[0190] Hardware: Factory robots

[0191] software:

[0192] Generative AI models (e.g., OpenAI GPT-4)

[0193] Test frameworks (e.g. pytest)

[0194] Server environment (e.g. AWS EC2)

[0195] Database (e.g. PostgreSQL)

[0196] Frontend (e.g. React.js)

[0197] As described above, the present invention provides a system that can detect bugs and errors in a robot motion control program at an early stage and improve quality.

[0198] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[0199] Step 1:

[0200] The user uploads the robot's motion control program from the terminal to the server. Specifically, the user uses a web interface or API to select a program file and send it to the server. In this case, the input is the program file, and the output is the program file saved on the server.

[0201] Step 2:

[0202] The server sends the received motion control program to the generative AI model for analysis. Specifically, the server passes the received program code to the generative AI model as a prompt statement and requests the generation of a test case. The input is the program code (prompt statement), and the output is the generated test case.

[0203] Step 3:

[0204] The generative AI model generates test cases based on the analysis, and then automatically generates test code based on them. Specifically, the generative AI model creates test code that includes the input and expected output for each function or method, and the server receives and stores this. The input is the test case, and the output is the test code.

[0205] Step 4:

[0206] The server retrieves the saved test code and automatically runs the tests using a test execution tool such as pytest. This process is triggered by the user pressing the "Run Test" button on the terminal. The input is the test code and the output is the test execution result.

[0207] Step 5:

[0208] The server collects the test results output from the test execution tool and analyzes the successful and failed test cases. Specifically, the server collects each item of the test results and identifies the locations where anomalies or errors occurred. The input is the test execution results, and the output is the analyzed test results.

[0209] Step 6:

[0210] The server automatically generates a result report based on the test results and sends it to the user's device. Specifically, the server creates a report based on the test results and delivers it to the user via email or a web interface. The input is the analyzed test results, and the output is the result report.

[0211] Furthermore, an emotion engine that estimates the user's emotion may be combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59 and perform identification processing using the user's emotion.

[0212] The present invention is a system that automates a series of processes, from analyzing program code to automatically generating test code, executing tests, and reporting results, and further combines it with an emotion engine that analyzes user emotions to provide more personalized feedback. Each function of this system is realized by three main elements: a server, a terminal, and a user. Specific embodiments of the system are described below.

[0213] 1. Upload the source code

[0214] First, the user selects the source code file via a web interface or API to upload the source code from the terminal to the server, and when the user clicks the "Upload" button, the source code is sent to the server.

[0215] 2. Source code analysis

[0216] The server temporarily stores the received source code for analysis. The stored source code is then input into the generative model, which analyzes the function and method signatures, dependencies, logic flow, etc. in the program code. Based on the analysis results, the generative model identifies appropriate test cases.

[0217] 3. Automatic generation of test code

[0218] Based on the generated test cases, the generative model automatically generates test code, which is then stored in a database or file storage by the server and used later for test execution.

[0219] 4. Running the Test

[0220] The user presses the "Run Test" button on the terminal. This sends a request to the server to run the test. The server retrieves the saved test code and runs it using a test execution tool (e.g., pytest). The progress of the test is displayed in real time on the terminal.

[0221] 5. Collecting test results

[0222] The server collects the test results output by the test execution tools, extracts and analyzes the detailed results of the test cases that passed and failed.

[0223] 6. Analysis by Emotion Engine

[0224] Furthermore, the server analyzes the user's emotions using an emotion engine. The emotion engine analyzes the voice and text data entered by the user to identify the user's emotional state. For example, if the user enters text feedback, it can recognize emotions such as joy, surprise, and disappointment from the text.

[0225] 7. Generate and send results report

[0226] The server automatically generates a report based on the test results. This report includes the pass / fail status of each test case and detailed error messages. Furthermore, the report format and content can be customized based on the analysis results of the emotion engine. For example, if the user is disappointed, an encouraging message can be added.

[0227] Finally, the server sends the generated results report to the user's terminal, where it can be displayed via a web interface or delivered to the user as an email.

[0228] Specific examples

[0229] Uploading and analyzing source code

[0230] Suppose a user uploads the following source code:

[0231] python

[0232] def add(a, b):

[0233] return a + b

[0234] The server receives this source code and requests the generative model to analyze it. The generative model generates the following test case from the input and output of the add function:

[0235] Test code generation

[0236] The test code based on the generated test cases is as follows:

[0237] python

[0238] def test_add():

[0239] assert add(1, 2) == 3

[0240] assert add(-1, 1) == 0

[0241] assert add(0, 0) == 0

[0242] The server receives this test code and stores it in a database.

[0243] Test execution and reporting

[0244] When the user presses the "Run Test" button, the server retrieves the saved test code and automatically runs the test using pytest. The test results are displayed as follows:

[0245] Test Results Report

[0246] -------------------

[0247] All tests were successful.

[0248] Analysis and customization with emotion engine

[0249] If the user enters feedback such as "I'm not satisfied with the test results," the server uses an emotion engine to recognize the emotion "disappointment," and adds an encouraging message to the result report.

[0250] Test Results Report

[0251] -------------------

[0252] All tests were successful.

[0253] comment:

[0254] Thank you for your hard work. Let's do our best next time!

[0255] According to the above embodiment, the present system realizes efficient and high-quality automation of unit tests and provides individualized feedback to users.

[0256] The processing flow will be explained below.

[0257] Step 1:

[0258] Users use a web interface or API to upload source code from their device to the server. When the user clicks the "Upload" button, the source code is sent to the server.

[0259] Step 2:

[0260] The server receives the source code sent by the user and temporarily stores it for analysis, using a database or a temporary file system.

[0261] Step 3:

[0262] The server inputs the stored source code into the generative model and begins analyzing the program code. The generative model analyzes the signatures of functions and methods in the program code, dependencies, logic flow, etc.

[0263] Step 4:

[0264] The generative model generates test cases based on the analysis results, where each test case contains the expected output for a particular input.

[0265] Step 5:

[0266] The server automatically generates test code from the generated test cases and saves it in a database or file storage. The saved test code is used in later steps.

[0267] Step 6:

[0268] The user presses the "Test execution" button via the terminal, which sends a test execution request to the server.

[0269] Step 7:

[0270] The server retrieves the stored test code and starts running the test using a test execution tool (e.g., pytest, unittest). The status of the test execution is sent to the terminal in real time.

[0271] Step 8:

[0272] The server collects the test results output by the test execution tools, including the pass / fail status, error messages, and execution time for each test case.

[0273] Step 9:

[0274] The server uses an emotion engine to analyze the user's emotions, analyzing text and voice feedback entered by the user to identify their emotional state.

[0275] Step 10:

[0276] The server automatically generates a report based on the test results and sentiment analysis results, which includes detailed results for each test case as well as customized messages based on the user's sentiment.

[0277] Step 11:

[0278] The server sends the generated results report to the user's terminal, where it can be displayed via a web interface or delivered to the user as an email.

[0279] A specific example is the following flow:

[0280] Upload source code:

[0281] A user uploads the following source code:

[0282] python

[0283] def add(a, b):

[0284] return a + b

[0285] Analyzing source code and generating test code:

[0286] The server analyzes this source code and the generative model generates the following test cases:

[0287] python

[0288] def test_add():

[0289] assert add(1, 2) == 3

[0290] assert add(-1, 1) == 0

[0291] assert add(0, 0) == 0

[0292] The generated test code is stored on the server.

[0293] Run the test and collect the results:

[0294] When the user presses the "Run Test" button, the server runs the tests using pytest and collects the results, which look something like this:

[0295] All test cases were successful.

[0296] Sentiment analysis with emotion engine:

[0297] When a user enters feedback such as "I'm not satisfied with the test results," the server's emotion engine recognizes the emotion "disappointment."

[0298] Results report generation and distribution:

[0299] The server generates a report based on the test results and sentiment analysis results, as shown below.

[0300] Test Results Report

[0301] -------------------

[0302] All tests were successful.

[0303] comment:

[0304] Thank you for your hard work. Let's do our best next time!

[0305] The results report is sent to the user's device and displayed via email or web interface.

[0306] Through the above process, this system achieves efficient and high-quality automation of unit tests and provides individualized feedback to users.

[0307] Example 2

[0308] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0309] Conventional test code generation and test execution systems require manual analysis of program code, creation and execution of test code, which is time-consuming and laborious. Additionally, responses to user feedback are not personalized, which hinders the improvement of the user experience.

[0310] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[0311] In this invention, the server includes means for analyzing program code using a generative model and automatically generating test code, means for saving the automatically generated test code, means for executing the saved test code and collecting test results, means for automatically generating a result report based on the test results, means for outputting or distributing the result report, means for analyzing user emotions, and means for customizing the format and content of the result report based on the emotion analysis results, thereby enabling efficient and high-quality test automation and providing individualized feedback to users.

[0312] A "generative model" is an algorithm or system that uses machine learning or artificial intelligence to analyze program code or data and automatically generate a specific result or output.

[0313] "Program code" is a set of instructions written to cause a computer to perform a particular operation.

[0314] "Test code" is code written to check whether program code works as expected.

[0315] "Auto-generated" refers to a system or algorithm automatically creating a product without human intervention.

[0316] "Test results" are the results obtained when test code is executed, including the success or failure status of each test case.

[0317] A "Result Report" is a document summarizing the test results, including details such as success / failure status and error messages.

[0318] "Sentiment analysis" is the process of identifying an emotional state (e.g., joy, disappointment, surprise, etc.) from a user's input data.

[0319] A "format" defines the structure and layout of a document or data.

[0320] "Customization" refers to adapting or modifying the content or format of a system or document to suit specific needs or requirements.

[0321] "User" refers to a person or entity that uses the system.

[0322] A "server" is a computer system that receives requests from clients and processes data or provides services in response to the requests.

[0323] "Terminal" refers to a device that a user directly operates to interface with a system.

[0324] The present invention is a system that automates a series of processes, from program code analysis to automatic test code generation, test execution, result reporting, and user sentiment analysis. How this system is implemented will be specifically described below.

[0325] Hardware and Software Configuration

[0326] This system is configured using the following hardware and software.

[0327] 1. Server

[0328] It analyzes program code, automatically generates test code, executes tests, automatically generates result reports, and performs sentiment analysis.

[0329] Software used: analysis libraries (e.g., Python's AST module), generative AI models (e.g., GPT), test execution tools (e.g., pytest), sentiment analysis engines (e.g., IBM Watson Tone Analyzer).

[0330] 2. Terminal

[0331] It provides an interface for users to upload source code, run tests, and provide feedback.

[0332] Hardware used: PC, smartphone, tablet, etc.

[0333] Software used: Web browser or API client.

[0334] 3. Users

[0335] Upload source code, run tests, and provide feedback.

[0336] Processing flow and specific examples

[0337] 1. Upload the source code

[0338] The user selects the source code file through a web interface or API provided using the terminal and presses the "Upload" button, which sends the source code to the server as an HTTP POST request.

[0339] 2. Source code analysis

[0340] The server temporarily stores the received source code. The stored source code is then input into a generative AI model, which analyzes the program code's function and method signatures, dependencies, and logic flow. An example of a prompt is as follows:

[0341] Generate a test case for the following code:

[0342] def add(a, b):

[0343] return a + b

[0344] 3. Automatic generation of test code

[0345] The generative AI model generates appropriate test cases based on the analysis results, and the generated test code is stored in a database or file storage by the server.

[0346] 4. Running the Test

[0347] When the user presses the "Run Test" button, the server retrieves the saved test code and runs it using a test execution tool, for example, pytest, and displays the progress in real time on the terminal.

[0348] 5. Collecting test results

[0349] The server collects the test results output by the test execution tools, extracts details of successful and failed test cases, and analyzes them.

[0350] 6. Analysis by Emotion Engine

[0351] The server uses an emotion analysis engine to analyze the feedback entered by the user and identify their emotional state. For example, if the user enters "I'm not satisfied with the test results," the server recognizes the emotion "disappointed."

[0352] 7. Generate and send results report

[0353] The server automatically generates a report based on the test results and sentiment analysis results, customizes the report format and content, and displays the report via a web interface or sends it to the user via email.

[0354] As a result, this system realizes efficient and high-quality automation of unit tests and provides individualized feedback to users.

[0355] The flow of the identification process in the second embodiment will be described with reference to FIG.

[0356] Step 1:

[0357] The user selects a source code file through a web interface or API provided on the terminal and presses the "Upload" button. The input data is the source code file selected by the user, which is sent to the server as an HTTP POST request. At this time, the file data is sent to the server as multipart form data. The output after sending is that the server receives and saves the source code file.

[0358] Step 2:

[0359] The server temporarily stores the received source code. Next, the server inputs this source code into a generative AI model, which analyzes the function and method signatures, dependencies, and logic flow of the program code. The input data is the stored source code, and the server performs syntax analysis using an analysis library (for example, the AST module in Python). It creates and sends the following prompt to the generative AI model:

[0360] Generate a test case for the following code:

[0361] def add(a, b):

[0362] return a + b

[0363] The output is the text data of the test cases returned by the generative AI model.

[0364] Step 3:

[0365] The server automatically generates test code based on the test cases returned by the generative AI model. The input data is the text data of the test cases returned by the generative AI model, and the server saves this as a Python file (e.g., test_code.py). The saved test code is used in subsequent test runs. The output is the saved test code file.

[0366] Step 4:

[0367] The user presses the "Run Test" button on the terminal, requesting the server to run the test. The server retrieves the saved test code and runs it using a test execution tool (e.g., pytest). The input data is the test code file that received the request, and the server executes the following command:

[0368] sh

[0369] pytest test_code.py

[0370] The output is a test result report file generated from the test execution tool.

[0371] Step 5:

[0372] The server collects test results output from the test execution tools. The input data is the report file (e.g., XML or JSON format) generated by the test execution tools, which the server parses to extract details of passed and failed test cases. The output is a dataset of detailed test results.

[0373] Step 6:

[0374] The server uses a sentiment analysis engine to analyze the user's sentiment. The input data is text data entered by the user as feedback, for example, "I'm not satisfied with the test results." The server uses the sentiment analysis engine to identify the emotional state (e.g., disappointment) from this text. The output is the analyzed emotional state data.

[0375] Step 7:

[0376] The server automatically generates a result report based on the test results and the sentiment analysis results. The input data are the detailed test results and the user sentiment analysis results, and the server customizes the format and content of the report based on this. For example, if disappointment is recognized, the server adds an encouraging message such as "Try harder next time!" The generated result report is displayed through a web interface or sent to the user via email. The output is the final result report.

[0377] (Application example 2)

[0378] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0379] Conventional automatic test generation systems perform a series of processes, from analyzing program code to automatically generating test code, executing it, and reporting the results, but they do not provide feedback or customize reports based on the user's emotional state. As a result, they are unable to provide feedback that takes into account how the user feels about the results, which is a problem particularly in environments where errors can have serious consequences, such as electronic devices and factory control systems.

[0380] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.

[0381] In this invention, the server includes means for analyzing program code using a generative model and automatically generating test code, means for saving the automatically generated test code, means for executing the saved test code and collecting test results, means for analyzing user emotions, means for automatically generating a result report based on the test results and the user emotion analysis results, and means for outputting or distributing the result report, thereby enabling the generation of a result report that includes personalized feedback that takes into account the user's emotional state.

[0382] A "generative model" is an artificial intelligence program that analyzes program code and generates appropriate test cases.

[0383] "Program code" is a written instruction or collection of instructions for carrying out a computer program.

[0384] "Test code" is automatically generated verification code for verifying the operation of program code.

[0385] "Storage" means to record data temporarily or permanently on a recording medium.

[0386] "Test results" are the success or failure information and detailed error messages obtained by executing the test code.

[0387] "Emotion analysis" is the process of analyzing voice and text data to identify a user's emotional state.

[0388] "Result Report" means a report automatically generated based on the test results and sentiment analysis results, which includes the success / failure status and detailed error messages.

[0389] "Output or distribution" refers to the act of displaying the result report in a form that can be viewed by the user or sending it by means of e-mail or the like.

[0390] The present invention provides a system that uses a generative model to analyze program code, automates the process from automatically generating test code to executing it, collecting the results, and providing personalized feedback in order to improve the quality check function of factory robots. Specific embodiments of the system are described below.

[0391] 1. Upload the source code

[0392] The user selects the source code file via a web interface or API, which uploads the source code from the terminal to the server. When the user clicks the "Upload" button, the source code is sent to the server.

[0393] 2. Source code analysis

[0394] The server temporarily stores the received source code for analysis, then inputs the stored source code into the generative model, which analyzes the signatures of functions and methods in the program code, dependencies, logic flow, etc. Based on this, the generative model generates appropriate test cases.

[0395] 3. Automatic generation of test code

[0396] Based on the analysis results, the generative model automatically generates test code. The generated test code is stored in a database or file storage by the server. The stored test code is then used later when executing the test.

[0397] 4. Running the Test

[0398] The user presses the "Run Test" button on the terminal. This sends a request to the server to run the test. The server retrieves the saved test code and runs it using a test execution tool (e.g., pytest). The progress of the test is displayed in real time on the terminal.

[0399] 5. Collecting test results

[0400] The server collects the test results output by the test execution tools, extracts and analyzes the detailed results of the test cases that passed and failed.

[0401] 6. Analysis by Emotion Engine

[0402] Furthermore, the server analyzes the user's emotions using an emotion engine. The emotion engine analyzes the voice and text data entered by the user to identify the user's emotional state. For example, if the user enters text feedback, it can recognize emotions such as joy, surprise, and disappointment from the text.

[0403] 7. Generate and send results report

[0404] The server automatically generates a result report based on the test results and sentiment analysis results. The result report includes the success or failure status of each test case and a detailed error message. Furthermore, the report content is customized according to the analysis results of the sentiment engine. For example, if the user is disappointed, an encouraging message is added. Finally, the server sends the generated result report to the user's device. The report can be displayed via a web interface or delivered to the user via email.

[0405] Specific examples

[0406] Uploading and analyzing source code

[0407] Suppose a user uploads the following source code:

[0408] python

[0409] def add(a, b):

[0410] return a + b

[0411] The server receives this source code and requests the generative model to analyze it. The generative model generates the following test case from the input and output of the add function:

[0412] Test code generation

[0413] The test code based on the generated test cases is as follows:

[0414] python

[0415] def test_add():

[0416] assert add(1, 2) == 3

[0417] assert add(-1, 1) == 0

[0418] assert add(0, 0) == 0

[0419] The server receives this test code and stores it in a database.

[0420] Test execution and reporting

[0421] When the user presses the "Run Test" button, the server retrieves the saved test code and automatically runs the test using pytest. The test results are displayed as follows:

[0422] Test Results Report

[0423] -------------------

[0424] All tests were successful.

[0425] Analysis and customization with emotion engine

[0426] If the user enters feedback such as "I'm not satisfied with the test results," the server uses an emotion engine to recognize the emotion "disappointment," and adds an encouraging message to the result report.

[0427] Test Results Report

[0428] -------------------

[0429] All tests were successful.

[0430] comment:

[0431] Thank you for your hard work. Let's do our best next time!

[0432] In this way, the present invention realizes a system that highly automates the quality check process of factory robots and provides feedback according to the user's emotions.

[0433] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[0434] Step 1:

[0435] The user uploads source code from their device to the server by selecting the source code file via the web interface or API and clicking the "Upload" button. The input data is the program code, and the data is temporarily sent to a storage location on the server. The source code is then saved on the server.

[0436] Step 2:

[0437] The server temporarily stores the received source code for analysis. Next, this stored source code is input into a generative model, which analyzes the signatures of functions and methods in the program code, dependencies, logic flow, etc. The input data is the source code, and the output data is the analysis results, and the data is processed using the generative model. This results in the identification of appropriate test cases.

[0438] Step 3:

[0439] The generative model automatically generates test code based on the analysis results. The generated test cases are converted into test code and saved in a database or file storage by the server. The input data is the analysis results, and the output data is the test code. This allows the necessary test code to be automatically generated and saved.

[0440] Step 4:

[0441] The user presses the "Run Test" button on the terminal. This sends a request to the server to run the test. The server retrieves the saved test code and runs the test using a test execution tool (e.g., pytest). The input data is the test code, and the output data is the test results. This executes the test code and obtains the results.

[0442] Step 5:

[0443] The server collects the test results output from the test execution tool. It extracts and analyzes the detailed results of successful and failed test cases. The input data is the test results, and the output data is the analysis results. This allows for detailed analysis of the test results.

[0444] Step 6:

[0445] The server uses an emotion engine to analyze the user's emotions. The emotion engine analyzes the voice or text data input by the user and identifies the user's emotional state. The input data is text or voice data, and the output data is the emotion analysis result. This allows the user's emotional state to be identified.

[0446] Step 7:

[0447] The server automatically generates a result report based on the test results and sentiment analysis results. This result report includes the success / failure status of each test case and detailed error messages. Furthermore, the report content is customized according to the sentiment analysis results. The input data are the test results and sentiment analysis results, and the output data is the result report. This allows for the generation of a personalized result report.

[0448] Step 8:

[0449] The server sends the generated result report to the user's terminal. The report is displayed through a web interface or delivered to the user as an email. The input data is the result report, and the output data is the report the user receives. This is how the result report is delivered.

[0450] The specific processing unit 290 transmits the result of the specific processing to the smart device 14. In the smart device 14, the control unit 46A causes the output device 40 to output the result of the specific processing. The microphone 38B acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.

[0451] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[0452] In the above embodiment, an example in which the specific process is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific process may be performed by the smart device 14.

[0453] [Second embodiment]

[0454] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.

[0455] 3, the data processing system 210 includes the data processing device 12 and smart glasses 214. An example of the data processing device 12 is a server.

[0456] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0457] The smart glasses 214 include a computer 36, a microphone 238, a speaker 240, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, and the camera 42 are also connected to the bus 52.

[0458] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.

[0459] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).

[0460] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.

[0461] Fig. 4 shows an example of the main functions of the data processing device 12 and the smart glasses 214. As shown in Fig. 4, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.

[0462] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.

[0463] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[0464] In the smart glasses 214, the reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.

[0465] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the smart glasses 214 will be referred to as the "terminal."

[0466] The present invention is a system that automates a series of processes, from program code analysis to automatic test code generation, test execution, and result reporting. Each function of this system is realized by three main elements: a server, a terminal, and a user. Specific embodiments of the system are described below.

[0467] 1. Upload the source code

[0468] First, the user uploads the source code from their device to the server. When the user uploads the source code via a web interface or API, the server receives the code and temporarily stores it.

[0469] 2. Source code analysis

[0470] The server inputs the received source code into a generative model for analysis. The generative model analyzes the function and method signatures, dependencies, logic flow, etc. in the program code. Based on this analysis process, the generative model identifies appropriate test cases.

[0471] 3. Automatic generation of test code

[0472] Based on the generated test cases, the generative model automatically generates test code. The test code specifically verifies the input and expected output for each function or method of the target program code. The generated test code is saved in a database or file storage by the server.

[0473] 4. Running the Test

[0474] Next, when the user presses the "Run Test" button on the terminal, the server retrieves the saved test code and automatically runs the test using a test execution tool (e.g., pytest, unittest, etc.) The terminal displays the progress of the test in real time.

[0475] 5. Collecting test results

[0476] The server collects the test results output by the test execution tools, extracts and analyzes the detailed results of the test cases that passed and failed.

[0477] 6. Generate and send results report

[0478] Finally, the server automatically generates a report based on the test results, including the pass / fail status of each test case and detailed error messages, and sends the report to the user's device via email or a web interface.

[0479] Specific examples

[0480] Uploading and analyzing source code

[0481] Suppose a user uploads the following source code:

[0482] python

[0483] def add(a, b):

[0484] return a + b

[0485] The server receives this source code and requests the generative model to analyze it. The generative model generates the following test case from the input and output of the add function:

[0486] Test code generation

[0487] The test code based on the generated test cases is as follows:

[0488] python

[0489] def test_add():

[0490] assert add(1, 2) == 3

[0491] assert add(-1, 1) == 0

[0492] assert add(0, 0) == 0

[0493] The server retrieves this test code from the language model and stores it in a database.

[0494] Running the tests

[0495] When the user presses the "Run Test" button, the server retrieves the saved test code and automatically runs the test using pytest, and the terminal displays the test progress in real time.

[0496] Collecting test results and generating reports

[0497] The server collects the test results and generates a report that states:

[0498] Test Results Report

[0499] -------------------

[0500] All tests were successful.

[0501] The server sends this report to the user's device, where the user can access the report via a web interface or email.

[0502] According to the above embodiment, the present system realizes improved efficiency and quality of unit testing in software development.

[0503] The processing flow will be explained below.

[0504] Step 1:

[0505] The user selects the source code file via a web interface or API to upload the source code from the terminal to the server, clicks the "Upload" button, and the source code is sent to the server.

[0506] Step 2:

[0507] The server temporarily stores the received source code for analysis, and stores the stored source code in a database or temporary file in an appropriate format.

[0508] Step 3:

[0509] The server inputs the saved source code into the generative model and begins analysis, which extracts function and method signatures, dependencies, logic flow, and other information from the program code.

[0510] Step 4:

[0511] The generative model generates test cases based on the analysis results, which specifically define the inputs and expected outputs for each function or method.

[0512] Step 5:

[0513] The server automatically generates test code from the test cases received from the generative model and saves it in a database or file storage. The saved test code is then used for test execution.

[0514] Step 6:

[0515] The user presses the "Test execution" button on the terminal, which sends a request to the server to execute the test.

[0516] Step 7:

[0517] The server retrieves the stored test code, copies it to a test execution environment, and runs it via an appropriate testing tool (e.g., pytest).

[0518] Step 8:

[0519] The server runs the test using a test tool, and while the test is running, it sends data to the device to display the test progress in real time.

[0520] Step 9:

[0521] The server collects the test results, which include the pass or fail status of each test case, error messages, and execution time.

[0522] Step 10:

[0523] The server automatically generates a report based on the collected test results, which includes an overall test score and details of the successful and failed test cases.

[0524] Step 11:

[0525] The server sends the generated results report to the user's terminal, where it can be displayed via a web interface or delivered to the user as an email.

[0526] Through the above steps, this system achieves efficient and high-quality unit test automation.

[0527] Example 1

[0528] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."

[0529] Generating and executing test code in software development is a time-consuming and labor-intensive process. When this process is done manually, there is a risk of human error or incomplete test cases. Furthermore, analyzing test results and creating reports is also a complex and time-consuming process. These issues reduce software quality and development efficiency. Therefore, the present invention aims to solve these problems and provide a system that efficiently performs all processes from automatically generating test code to executing tests, analyzing results, and creating reports.

[0530] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.

[0531] In this invention, the server includes: means for a user to upload source code; means for analyzing program code and extracting test cases using a generative AI model; means for automatically generating test code based on the test cases extracted using the generative AI model; means for saving the automatically generated test code in a database or file storage; means for a user to issue a command to run a test, and for the server to retrieve the saved test code and invoke a test execution tool to automatically run the test; means for collecting test results and automatically generating a result report; and means for outputting or distributing the generated result report to the user's terminal. This automates a series of processes from analyzing source code to extracting test cases, generating test code, running the tests, and collecting and reporting the results, thereby improving the efficiency and quality of software development.

[0532] A "generative AI model" is an artificial intelligence model that analyzes source code and generates appropriate test cases and test code.

[0533] A "test case" refers to a set of conditions or procedures that verify the expected output for a particular input.

[0534] "Test code" is code that is generated based on test cases and is used to verify specific functions and operations of a program.

[0535] A "database" is a system for systematically organizing and storing information and data so that they can be efficiently searched and used as needed.

[0536] "File storage" is a system for storing data files and making them accessible through a web interface, API, etc.

[0537] A "server" is a computer system that provides services over a network and processes and stores data.

[0538] A "terminal" is an electronic device that is operated by a user and communicates with a server to send and receive information.

[0539] "Upload" refers to the act of transferring data or files from a user's device to a server.

[0540] A "test execution tool" is software that automatically executes test code and collects the results. Examples include pytest and unittest.

[0541] A "result report" is a document summarizing the results of a test execution, including the success / failure status of each test case and detailed error messages.

[0542] The present invention is a system that starts with a user uploading source code, analyzes the source code using a generative AI model, and automatically generates test code. This system is explained in detail for each processing step.

[0543] Uploading source code

[0544] First, the user uploads the source code from their device to the server. They enter the source code through a web interface or API and send it by pressing the "Upload" button. The server receives the source code and temporarily stores it in storage.

[0545] Source code analysis

[0546] Next, the server inputs the received source code into a generative AI model for analysis. This analysis process includes the following: The generative AI model analyzes the signatures, dependencies, and logic flow of functions and methods in the source code. Specifically, it lists function names, arguments, and return values ​​and extracts test cases.

[0547] Extraction of test cases and automatic generation of test code

[0548] The generative AI model automatically generates test code based on the extracted test cases. For example, the extracted test case for the function "add" is instantiated as follows:

[0549] Saving test code

[0550] The generated test code is stored by the server in a database or file storage, making it available for later use in the test execution process.

[0551] Running the tests

[0552] Next, the user presses the "Run Test" button on the terminal to instruct the server to run the test. The server retrieves the saved test code and automatically runs the test using a test execution tool (e.g., pytest or unittest). The test progress is displayed on the terminal in real time.

[0553] Collecting and analyzing test results

[0554] The server collects the test results output from the test execution tool, analyzes the successful and failed test cases, extracts error and success messages, and performs detailed analysis.

[0555] Generate and send results reports

[0556] Finally, the server automatically generates a report based on the test results, including the pass / fail status of each test case and detailed error messages. The generated report is sent to the user's terminal via email or a web interface, through which the user can access and review the report.

[0557] Below are some example prompts for a generative AI model:

[0558] Analyze source code and generate test cases and test code.

[0559] Source code:

[0560] def add(a, b):

[0561] return a + b

[0562] This system automates the entire process of software development, from generating test code to running the tests, analyzing the results, and creating reports, thereby improving software quality and development efficiency.

[0563] The flow of the identification process in the first embodiment will be described with reference to FIG.

[0564] Step 1: Upload your source code

[0565] A user uploads source code from their own device to the server. The input is the source code that the user enters via a web interface or API. When the user presses the "upload" button, the source code is sent as an HTTP request. The server receives the request and temporarily stores the sent source code. This stored source code becomes the input for the next processing step.

[0566] Step 2: Analyzing the source code

[0567] The server inputs the temporarily saved source code into the generative AI model for analysis. In this case, the input is the source code saved in the previous step. The generative AI model analyzes the signatures, dependencies, and logic flow of functions and methods in the source code. This process lists function names, arguments, and return values, and extracts test cases. The output is a list of test cases.

[0568] Step 3: Automatically generate test code

[0569] The generative AI model automatically generates test code based on the extracted test cases. The input is a list of test cases generated in the previous step. The generative AI model generates test code based on this list. For example, for the function "add", test code is generated that describes the appropriate input and expected output. The output is the generated test code.

[0570] Step 4: Saving the test code

[0571] The server saves the generated test code in a database or file storage. The input is the test code generated in the previous step. The server saves this test code in a specific folder or registers it in a database. The output is the saved test code.

[0572] Step 5: Test execution instructions

[0573] The user presses the "Test Execution" button on the terminal to instruct the execution of a test. The input is the user's operation instruction. Upon receiving the user's instruction, the server retrieves the saved test code, calls the test execution tool, and automatically executes the test. The output is the start of test execution.

[0574] Step 6: Running the tests

[0575] The server retrieves the saved test code and automatically runs the tests using a test runner (e.g., pytest or unittest). The input is the saved test code, which is executed by the test runner. The output is the test execution result. The execution progress is displayed in real time on the user's terminal.

[0576] Step 7: Collect and analyze test results

[0577] The server collects and analyzes the test results output by the test execution tool. The input is the test results generated by the test execution tool. The server identifies successful and failed test cases and performs detailed analysis. The output is the analyzed test results.

[0578] Step 8: Generate a report of the results

[0579] The server automatically generates a result report based on the test results. The input is the parsed test results. The report contains the pass / fail status of each test case and detailed error messages. The output is the generated result report.

[0580] Step 9: Submit your report

[0581] The server outputs or delivers the generated results report to the user's terminal. The input is the generated results report. The server sends this report to the user via email or a web interface. The output is the report sent to the user's terminal.

[0582] The above are the specific processing steps of the program of this system, which enables users to efficiently and reliably generate test code, execute tests, analyze the results, and receive reports.

[0583] (Application example 1)

[0584] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."

[0585] Robot operation programs in factories are complex and diverse, requiring a significant amount of man-hours to ensure their quality. Traditional manual testing methods can overlook bugs and errors in the programs, potentially leading to serious accidents or reduced production efficiency. Therefore, there is an urgent need to provide a means to efficiently test robot operation programs and improve their quality.

[0586] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.

[0587] In this invention, the server includes means for analyzing the robot's motion control program using the generative model and automatically generating test code, means for saving the automatically generated test code, and means for executing the saved test code and collecting test results, which makes it possible to detect bugs and errors in the robot's motion program early and improve its quality.

[0588] A "generative model" is an artificial intelligence model that analyzes program code and signatures and automatically generates test cases and test code.

[0589] An "operation control program" is a program that gives instructions and controls to operate a mechanical device such as a robot.

[0590] "Test code" is code for verifying the operation of an operation control program, and is used to confirm the expected output for a specific input.

[0591] A "test case" is a specific set of conditions for verifying whether an operation control program operates correctly under specific scenarios or conditions.

[0592] A "test execution tool" is a software tool for executing test code and collecting the results.

[0593] A "result report" is a document summarizing the test results, including the success / failure status of each test case and error messages.

[0594] A "server" is a centralized location or computer system for storing, processing, and communicating data.

[0595] This invention is an automatic test system for efficiently improving the quality of factory operation control programs. This system consists of three elements: a server, a terminal, and a user. A specific embodiment of this system is shown below.

[0596] 1. Upload the program

[0597] The user uploads the robot's motion control program from the terminal to the server. The program is uploaded using a web interface or API. For example, consider the following program:

[0598] def move_arm(x, y, z):

[0599] Arm movement logic

[0600] return True if (x >= 0 and y >= 0 and z >= 0) else False

[0601] 2. Code Analysis

[0602] The server sends the received motion control program to the generative AI model for analysis. The generative AI model analyzes the signatures of the program's functions and methods and automatically generates test cases. In this analysis process, an example of a prompt sentence is as follows:

[0603] Analyze the following robot arm motion program and generate appropriate test cases:

[0604] def move_arm(x, y, z):

[0605] return True if (x >= 0 and y >= 0 and z >= 0) else False

[0606] 3. Automatic test code generation

[0607] The generative AI model generates test cases based on the analysis, and then automatically generates test code based on them. The generated test code is stored in a database or file storage by the server. For example, the generated test code looks like this:

[0608] def test_move_arm():

[0609] assert move_arm(1, 2, 3) == True

[0610] assert move_arm(-1, 2, 3) == False

[0611] assert move_arm(0, 0, 0) == True

[0612] 4. Test execution

[0613] When a user presses the "Run Test" button on the terminal, the server retrieves the saved test code and automatically runs the test using a test execution tool such as pytest. The terminal displays the test progress in real time.

[0614] 5. Collecting test results

[0615] The server collects the test results output from the test execution tools, extracts detailed results of successful and failed test cases, and analyzes them.

[0616] 6. Generate and send results report

[0617] The server automatically generates a report based on the test results, including the pass / fail status of each test case and detailed error messages, and sends the report to the user's terminal via email or a web interface.

[0618] Hardware and software used

[0619] Hardware: Factory robots

[0620] software:

[0621] Generative AI models (e.g., OpenAI GPT-4)

[0622] Test frameworks (e.g. pytest)

[0623] Server environment (e.g. AWS EC2)

[0624] Database (e.g. PostgreSQL)

[0625] Frontend (e.g. React.js)

[0626] As described above, the present invention provides a system that can detect bugs and errors in a robot motion control program at an early stage and improve quality.

[0627] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[0628] Step 1:

[0629] The user uploads the robot's motion control program from the terminal to the server. Specifically, the user uses a web interface or API to select a program file and send it to the server. In this case, the input is the program file, and the output is the program file saved on the server.

[0630] Step 2:

[0631] The server sends the received motion control program to the generative AI model for analysis. Specifically, the server passes the received program code to the generative AI model as a prompt statement and requests the generation of a test case. The input is the program code (prompt statement), and the output is the generated test case.

[0632] Step 3:

[0633] The generative AI model generates test cases based on the analysis, and then automatically generates test code based on them. Specifically, the generative AI model creates test code that includes the input and expected output for each function or method, and the server receives and stores this. The input is the test case, and the output is the test code.

[0634] Step 4:

[0635] The server retrieves the saved test code and automatically runs the tests using a test execution tool such as pytest. This process is triggered by the user pressing the "Run Test" button on the terminal. The input is the test code and the output is the test execution result.

[0636] Step 5:

[0637] The server collects the test results output from the test execution tool and analyzes the successful and failed test cases. Specifically, the server collects each item of the test results and identifies the locations where anomalies or errors occurred. The input is the test execution results, and the output is the analyzed test results.

[0638] Step 6:

[0639] The server automatically generates a result report based on the test results and sends it to the user's device. Specifically, the server creates a report based on the test results and delivers it to the user via email or a web interface. The input is the analyzed test results, and the output is the result report.

[0640] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.

[0641] The present invention is a system that automates a series of processes, from analyzing program code to automatically generating test code, executing tests, and reporting results, and further combines it with an emotion engine that analyzes user emotions to provide more personalized feedback. Each function of this system is realized by three main elements: a server, a terminal, and a user. Specific embodiments of the system are described below.

[0642] 1. Upload the source code

[0643] First, the user selects the source code file via a web interface or API to upload the source code from the terminal to the server, and when the user clicks the "Upload" button, the source code is sent to the server.

[0644] 2. Source code analysis

[0645] The server temporarily stores the received source code for analysis. The stored source code is then input into the generative model, which analyzes the function and method signatures, dependencies, logic flow, etc. in the program code. Based on the analysis results, the generative model identifies appropriate test cases.

[0646] 3. Automatic generation of test code

[0647] Based on the generated test cases, the generative model automatically generates test code, which is then stored in a database or file storage by the server and used later for test execution.

[0648] 4. Running the Test

[0649] The user presses the "Run Test" button on the terminal. This sends a request to the server to run the test. The server retrieves the saved test code and runs it using a test execution tool (e.g., pytest). The progress of the test is displayed in real time on the terminal.

[0650] 5. Collecting test results

[0651] The server collects the test results output by the test execution tools, extracts and analyzes the detailed results of the test cases that passed and failed.

[0652] 6. Analysis by Emotion Engine

[0653] Furthermore, the server analyzes the user's emotions using an emotion engine. The emotion engine analyzes the voice and text data entered by the user to identify the user's emotional state. For example, if the user enters text feedback, it can recognize emotions such as joy, surprise, and disappointment from the text.

[0654] 7. Generate and send results report

[0655] The server automatically generates a report based on the test results. This report includes the pass / fail status of each test case and detailed error messages. Furthermore, the report format and content can be customized based on the analysis results of the emotion engine. For example, if the user is disappointed, an encouraging message can be added.

[0656] Finally, the server sends the generated results report to the user's terminal, where it can be displayed via a web interface or delivered to the user as an email.

[0657] Specific examples

[0658] Uploading and analyzing source code

[0659] Suppose a user uploads the following source code:

[0660] python

[0661] def add(a, b):

[0662] return a + b

[0663] The server receives this source code and requests the generative model to analyze it. The generative model generates the following test case from the input and output of the add function:

[0664] Test code generation

[0665] The test code based on the generated test cases is as follows:

[0666] python

[0667] def test_add():

[0668] assert add(1, 2) == 3

[0669] assert add(-1, 1) == 0

[0670] assert add(0, 0) == 0

[0671] The server receives this test code and stores it in a database.

[0672] Test execution and reporting

[0673] When the user presses the "Run Test" button, the server retrieves the saved test code and automatically runs the test using pytest. The test results are displayed as follows:

[0674] Test Results Report

[0675] -------------------

[0676] All tests were successful.

[0677] Analysis and customization with emotion engine

[0678] If the user enters feedback such as "I'm not satisfied with the test results," the server uses an emotion engine to recognize the emotion "disappointment," and adds an encouraging message to the result report.

[0679] Test Results Report

[0680] -------------------

[0681] All tests were successful.

[0682] comment:

[0683] Thank you for your hard work. Let's do our best next time!

[0684] According to the above embodiment, the present system realizes efficient and high-quality automation of unit tests and provides individualized feedback to users.

[0685] The processing flow will be explained below.

[0686] Step 1:

[0687] Users use a web interface or API to upload source code from their device to the server. When the user clicks the "Upload" button, the source code is sent to the server.

[0688] Step 2:

[0689] The server receives the source code sent by the user and temporarily stores it for analysis, using a database or a temporary file system.

[0690] Step 3:

[0691] The server inputs the stored source code into the generative model and begins analyzing the program code. The generative model analyzes the signatures of functions and methods in the program code, dependencies, logic flow, etc.

[0692] Step 4:

[0693] The generative model generates test cases based on the analysis results, where each test case contains the expected output for a particular input.

[0694] Step 5:

[0695] The server automatically generates test code from the generated test cases and saves it in a database or file storage. The saved test code is used in later steps.

[0696] Step 6:

[0697] The user presses the "Test execution" button via the terminal, which sends a test execution request to the server.

[0698] Step 7:

[0699] The server retrieves the stored test code and starts running the test using a test execution tool (e.g., pytest, unittest). The status of the test execution is sent to the terminal in real time.

[0700] Step 8:

[0701] The server collects the test results output by the test execution tools, including the pass / fail status, error messages, and execution time for each test case.

[0702] Step 9:

[0703] The server uses an emotion engine to analyze the user's emotions, analyzing text and voice feedback entered by the user to identify their emotional state.

[0704] Step 10:

[0705] The server automatically generates a report based on the test results and sentiment analysis results, which includes detailed results for each test case as well as customized messages based on the user's sentiment.

[0706] Step 11:

[0707] The server sends the generated results report to the user's terminal, where it can be displayed via a web interface or delivered to the user as an email.

[0708] A specific example is the following flow:

[0709] Upload source code:

[0710] A user uploads the following source code:

[0711] python

[0712] def add(a, b):

[0713] return a + b

[0714] Analyzing source code and generating test code:

[0715] The server analyzes this source code and the generative model generates the following test cases:

[0716] python

[0717] def test_add():

[0718] assert add(1, 2) == 3

[0719] assert add(-1, 1) == 0

[0720] assert add(0, 0) == 0

[0721] The generated test code is stored on the server.

[0722] Run the test and collect the results:

[0723] When the user presses the "Run Test" button, the server runs the tests using pytest and collects the results, which look something like this:

[0724] All test cases were successful.

[0725] Sentiment analysis with emotion engine:

[0726] When a user enters feedback such as "I'm not satisfied with the test results," the server's emotion engine recognizes the emotion "disappointment."

[0727] Results report generation and distribution:

[0728] The server generates a report based on the test results and sentiment analysis results, as shown below.

[0729] Test Results Report

[0730] -------------------

[0731] All tests were successful.

[0732] comment:

[0733] Thank you for your hard work. Let's do our best next time!

[0734] The results report is sent to the user's device and displayed via email or web interface.

[0735] Through the above process, this system achieves efficient and high-quality automation of unit tests and provides individualized feedback to users.

[0736] Example 2

[0737] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."

[0738] Conventional test code generation and test execution systems require manual analysis of program code, creation and execution of test code, which is time-consuming and laborious. Additionally, responses to user feedback are not personalized, which hinders the improvement of the user experience.

[0739] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[0740] In this invention, the server includes means for analyzing program code using a generative model and automatically generating test code, means for saving the automatically generated test code, means for executing the saved test code and collecting test results, means for automatically generating a result report based on the test results, means for outputting or distributing the result report, means for analyzing user emotions, and means for customizing the format and content of the result report based on the emotion analysis results, thereby enabling efficient and high-quality test automation and providing individualized feedback to users.

[0741] A "generative model" is an algorithm or system that uses machine learning or artificial intelligence to analyze program code or data and automatically generate a specific result or output.

[0742] "Program code" is a set of instructions written to cause a computer to perform a particular operation.

[0743] "Test code" is code written to check whether program code works as expected.

[0744] "Auto-generated" refers to a system or algorithm automatically creating a product without human intervention.

[0745] "Test results" are the results obtained when test code is executed, including the success or failure status of each test case.

[0746] A "Result Report" is a document summarizing the test results, including details such as success / failure status and error messages.

[0747] "Sentiment analysis" is the process of identifying an emotional state (e.g., joy, disappointment, surprise, etc.) from a user's input data.

[0748] A "format" defines the structure and layout of a document or data.

[0749] "Customization" refers to adapting or modifying the content or format of a system or document to suit specific needs or requirements.

[0750] "User" refers to a person or entity that uses the system.

[0751] A "server" is a computer system that receives requests from clients and processes data or provides services in response to the requests.

[0752] "Terminal" refers to a device that a user directly operates to interface with a system.

[0753] The present invention is a system that automates a series of processes, from program code analysis to automatic test code generation, test execution, result reporting, and user sentiment analysis. How this system is implemented will be specifically described below.

[0754] Hardware and Software Configuration

[0755] This system is configured using the following hardware and software.

[0756] 1. Server

[0757] It analyzes program code, automatically generates test code, executes tests, automatically generates result reports, and performs sentiment analysis.

[0758] Software used: analysis libraries (e.g., Python's AST module), generative AI models (e.g., GPT), test execution tools (e.g., pytest), sentiment analysis engines (e.g., IBM Watson Tone Analyzer).

[0759] 2. Terminal

[0760] It provides an interface for users to upload source code, run tests, and provide feedback.

[0761] Hardware used: PC, smartphone, tablet, etc.

[0762] Software used: Web browser or API client.

[0763] 3. Users

[0764] Upload source code, run tests, and provide feedback.

[0765] Processing flow and specific examples

[0766] 1. Upload the source code

[0767] The user selects the source code file through a web interface or API provided using the terminal and presses the "Upload" button, which sends the source code to the server as an HTTP POST request.

[0768] 2. Source code analysis

[0769] The server temporarily stores the received source code. The stored source code is then input into a generative AI model, which analyzes the program code's function and method signatures, dependencies, and logic flow. An example of a prompt is as follows:

[0770] Generate a test case for the following code:

[0771] def add(a, b):

[0772] return a + b

[0773] 3. Automatic generation of test code

[0774] The generative AI model generates appropriate test cases based on the analysis results, and the generated test code is stored in a database or file storage by the server.

[0775] 4. Running the Test

[0776] When the user presses the "Run Test" button, the server retrieves the saved test code and runs it using a test execution tool, for example, pytest, and displays the progress in real time on the terminal.

[0777] 5. Collecting test results

[0778] The server collects the test results output by the test execution tools, extracts details of successful and failed test cases, and analyzes them.

[0779] 6. Analysis by Emotion Engine

[0780] The server uses an emotion analysis engine to analyze the feedback entered by the user and identify their emotional state. For example, if the user enters "I'm not satisfied with the test results," the server recognizes the emotion "disappointed."

[0781] 7. Generate and send results report

[0782] The server automatically generates a report based on the test results and sentiment analysis results, customizes the report format and content, and displays the report via a web interface or sends it to the user via email.

[0783] As a result, this system realizes efficient and high-quality automation of unit tests and provides individualized feedback to users.

[0784] The flow of the identification process in the second embodiment will be described with reference to FIG.

[0785] Step 1:

[0786] The user selects a source code file through a web interface or API provided on the terminal and presses the "Upload" button. The input data is the source code file selected by the user, which is sent to the server as an HTTP POST request. At this time, the file data is sent to the server as multipart form data. The output after sending is that the server receives and saves the source code file.

[0787] Step 2:

[0788] The server temporarily stores the received source code. Next, the server inputs this source code into a generative AI model, which analyzes the function and method signatures, dependencies, and logic flow of the program code. The input data is the stored source code, and the server performs syntax analysis using an analysis library (for example, the AST module in Python). It creates and sends the following prompt to the generative AI model:

[0789] Generate a test case for the following code:

[0790] def add(a, b):

[0791] return a + b

[0792] The output is the text data of the test cases returned by the generative AI model.

[0793] Step 3:

[0794] The server automatically generates test code based on the test cases returned by the generative AI model. The input data is the text data of the test cases returned by the generative AI model, and the server saves this as a Python file (e.g., test_code.py). The saved test code is used in subsequent test runs. The output is the saved test code file.

[0795] Step 4:

[0796] The user presses the "Run Test" button on the terminal, requesting the server to run the test. The server retrieves the saved test code and runs it using a test execution tool (e.g., pytest). The input data is the test code file that received the request, and the server executes the following command:

[0797] sh

[0798] pytest test_code.py

[0799] The output is a test result report file generated from the test execution tool.

[0800] Step 5:

[0801] The server collects test results output from the test execution tools. The input data is the report file (e.g., XML or JSON format) generated by the test execution tools, which the server parses to extract details of passed and failed test cases. The output is a dataset of detailed test results.

[0802] Step 6:

[0803] The server uses a sentiment analysis engine to analyze the user's sentiment. The input data is text data entered by the user as feedback, for example, "I'm not satisfied with the test results." The server uses the sentiment analysis engine to identify the emotional state (e.g., disappointment) from this text. The output is the analyzed emotional state data.

[0804] Step 7:

[0805] The server automatically generates a result report based on the test results and the sentiment analysis results. The input data are the detailed test results and the user sentiment analysis results, and the server customizes the format and content of the report based on this. For example, if disappointment is recognized, the server adds an encouraging message such as "Try harder next time!" The generated result report is displayed through a web interface or sent to the user via email. The output is the final result report.

[0806] (Application example 2)

[0807] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."

[0808] Conventional automatic test generation systems perform a series of processes, from analyzing program code to automatically generating test code, executing it, and reporting the results, but they do not provide feedback or customize reports based on the user's emotional state. As a result, they are unable to provide feedback that takes into account how the user feels about the results, which is a problem particularly in environments where errors can have serious consequences, such as electronic devices and factory control systems.

[0809] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.

[0810] In this invention, the server includes means for analyzing program code using a generative model and automatically generating test code, means for saving the automatically generated test code, means for executing the saved test code and collecting test results, means for analyzing user emotions, means for automatically generating a result report based on the test results and the user emotion analysis results, and means for outputting or distributing the result report, thereby enabling the generation of a result report that includes personalized feedback that takes into account the user's emotional state.

[0811] A "generative model" is an artificial intelligence program that analyzes program code and generates appropriate test cases.

[0812] "Program code" is a written instruction or collection of instructions for carrying out a computer program.

[0813] "Test code" is automatically generated verification code for verifying the operation of program code.

[0814] "Storage" means to record data temporarily or permanently on a recording medium.

[0815] "Test results" are the success or failure information and detailed error messages obtained by executing the test code.

[0816] "Emotion analysis" is the process of analyzing voice and text data to identify a user's emotional state.

[0817] "Result Report" means a report automatically generated based on the test results and sentiment analysis results, which includes the success / failure status and detailed error messages.

[0818] "Output or distribution" refers to the act of displaying the result report in a form that can be viewed by the user or sending it by means of e-mail or the like.

[0819] The present invention provides a system that uses a generative model to analyze program code, automates the process from automatically generating test code to executing it, collecting the results, and providing personalized feedback in order to improve the quality check function of factory robots. Specific embodiments of the system are described below.

[0820] 1. Upload the source code

[0821] The user selects the source code file via a web interface or API, which uploads the source code from the terminal to the server. When the user clicks the "Upload" button, the source code is sent to the server.

[0822] 2. Source code analysis

[0823] The server temporarily stores the received source code for analysis, then inputs the stored source code into the generative model, which analyzes the signatures of functions and methods in the program code, dependencies, logic flow, etc. Based on this, the generative model generates appropriate test cases.

[0824] 3. Automatic generation of test code

[0825] Based on the analysis results, the generative model automatically generates test code. The generated test code is stored in a database or file storage by the server. The stored test code is then used later when executing the test.

[0826] 4. Running the Test

[0827] The user presses the "Run Test" button on the terminal. This sends a request to the server to run the test. The server retrieves the saved test code and runs it using a test execution tool (e.g., pytest). The progress of the test is displayed in real time on the terminal.

[0828] 5. Collecting test results

[0829] The server collects the test results output by the test execution tools, extracts and analyzes the detailed results of the test cases that passed and failed.

[0830] 6. Analysis by Emotion Engine

[0831] Furthermore, the server analyzes the user's emotions using an emotion engine. The emotion engine analyzes the voice and text data entered by the user to identify the user's emotional state. For example, if the user enters text feedback, it can recognize emotions such as joy, surprise, and disappointment from the text.

[0832] 7. Generate and send results report

[0833] The server automatically generates a result report based on the test results and sentiment analysis results. The result report includes the success or failure status of each test case and a detailed error message. Furthermore, the report content is customized according to the analysis results of the sentiment engine. For example, if the user is disappointed, an encouraging message is added. Finally, the server sends the generated result report to the user's device. The report can be displayed via a web interface or delivered to the user via email.

[0834] Specific examples

[0835] Uploading and analyzing source code

[0836] Suppose a user uploads the following source code:

[0837] python

[0838] def add(a, b):

[0839] return a + b

[0840] The server receives this source code and requests the generative model to analyze it. The generative model generates the following test case from the input and output of the add function:

[0841] Test code generation

[0842] The test code based on the generated test cases is as follows:

[0843] python

[0844] def test_add():

[0845] assert add(1, 2) == 3

[0846] assert add(-1, 1) == 0

[0847] assert add(0, 0) == 0

[0848] The server receives this test code and stores it in a database.

[0849] Test execution and reporting

[0850] When the user presses the "Run Test" button, the server retrieves the saved test code and automatically runs the test using pytest. The test results are displayed as follows:

[0851] Test Results Report

[0852] -------------------

[0853] All tests were successful.

[0854] Analysis and customization with emotion engine

[0855] If the user enters feedback such as "I'm not satisfied with the test results," the server uses an emotion engine to recognize the emotion "disappointment," and adds an encouraging message to the result report.

[0856] Test Results Report

[0857] -------------------

[0858] All tests were successful.

[0859] comment:

[0860] Thank you for your hard work. Let's do our best next time!

[0861] In this way, the present invention realizes a system that highly automates the quality check process of factory robots and provides feedback according to the user's emotions.

[0862] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[0863] Step 1:

[0864] The user uploads source code from their device to the server by selecting the source code file via the web interface or API and clicking the "Upload" button. The input data is the program code, and the data is temporarily sent to a storage location on the server. The source code is then saved on the server.

[0865] Step 2:

[0866] The server temporarily stores the received source code for analysis. Next, this stored source code is input into a generative model, which analyzes the signatures of functions and methods in the program code, dependencies, logic flow, etc. The input data is the source code, and the output data is the analysis results, and the data is processed using the generative model. This results in the identification of appropriate test cases.

[0867] Step 3:

[0868] The generative model automatically generates test code based on the analysis results. The generated test cases are converted into test code and saved in a database or file storage by the server. The input data is the analysis results, and the output data is the test code. This allows the necessary test code to be automatically generated and saved.

[0869] Step 4:

[0870] The user presses the "Run Test" button on the terminal. This sends a request to the server to run the test. The server retrieves the saved test code and runs the test using a test execution tool (e.g., pytest). The input data is the test code, and the output data is the test results. This executes the test code and obtains the results.

[0871] Step 5:

[0872] The server collects the test results output from the test execution tool. It extracts and analyzes the detailed results of successful and failed test cases. The input data is the test results, and the output data is the analysis results. This allows for detailed analysis of the test results.

[0873] Step 6:

[0874] The server uses an emotion engine to analyze the user's emotions. The emotion engine analyzes the voice or text data input by the user and identifies the user's emotional state. The input data is text or voice data, and the output data is the emotion analysis result. This allows the user's emotional state to be identified.

[0875] Step 7:

[0876] The server automatically generates a result report based on the test results and sentiment analysis results. This result report includes the success / failure status of each test case and detailed error messages. Furthermore, the report content is customized according to the sentiment analysis results. The input data are the test results and sentiment analysis results, and the output data is the result report. This allows for the generation of a personalized result report.

[0877] Step 8:

[0878] The server sends the generated result report to the user's terminal. The report is displayed through a web interface or delivered to the user as an email. The input data is the result report, and the output data is the report the user receives. This is how the result report is delivered.

[0879] The specific processing unit 290 transmits the result of the specific processing to the smart glasses 214. In the smart glasses 214, the control unit 46A causes the speaker 240 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.

[0880] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[0881] In the above embodiment, an example in which the specific processing is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the smart glasses 214.

[0882] [Third embodiment]

[0883] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.

[0884] 5, the data processing system 310 includes the data processing device 12 and a headset type terminal 314. An example of the data processing device 12 is a server.

[0885] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0886] The headset type terminal 314 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a display 343. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the display 343 are also connected to the bus 52.

[0887] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.

[0888] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).

[0889] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.

[0890] Fig. 6 shows an example of the main functions of the data processing device 12 and the headset type terminal 314. As shown in Fig. 6, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.

[0891] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.

[0892] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[0893] In the headset type terminal 314, a reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.

[0894] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the headset type terminal 314 will be referred to as the "terminal."

[0895] The present invention is a system that automates a series of processes, from program code analysis to automatic test code generation, test execution, and result reporting. Each function of this system is realized by three main elements: a server, a terminal, and a user. Specific embodiments of the system are described below.

[0896] 1. Upload the source code

[0897] First, the user uploads the source code from their device to the server. When the user uploads the source code via a web interface or API, the server receives the code and temporarily stores it.

[0898] 2. Source code analysis

[0899] The server inputs the received source code into a generative model for analysis. The generative model analyzes the function and method signatures, dependencies, logic flow, etc. in the program code. Based on this analysis process, the generative model identifies appropriate test cases.

[0900] 3. Automatic generation of test code

[0901] Based on the generated test cases, the generative model automatically generates test code. The test code specifically verifies the input and expected output for each function or method of the target program code. The generated test code is saved in a database or file storage by the server.

[0902] 4. Running the Test

[0903] Next, when the user presses the "Run Test" button on the terminal, the server retrieves the saved test code and automatically runs the test using a test execution tool (e.g., pytest, unittest, etc.) The terminal displays the progress of the test in real time.

[0904] 5. Collecting test results

[0905] The server collects the test results output by the test execution tools, extracts and analyzes the detailed results of the test cases that passed and failed.

[0906] 6. Generate and send results report

[0907] Finally, the server automatically generates a report based on the test results, including the pass / fail status of each test case and detailed error messages, and sends the report to the user's device via email or a web interface.

[0908] Specific examples

[0909] Uploading and analyzing source code

[0910] Suppose a user uploads the following source code:

[0911] python

[0912] def add(a, b):

[0913] return a + b

[0914] The server receives this source code and requests the generative model to analyze it. The generative model generates the following test case from the input and output of the add function:

[0915] Test code generation

[0916] The test code based on the generated test cases is as follows:

[0917] python

[0918] def test_add():

[0919] assert add(1, 2) == 3

[0920] assert add(-1, 1) == 0

[0921] assert add(0, 0) == 0

[0922] The server retrieves this test code from the language model and stores it in a database.

[0923] Running the tests

[0924] When the user presses the "Run Test" button, the server retrieves the saved test code and automatically runs the test using pytest, and the terminal displays the test progress in real time.

[0925] Collecting test results and generating reports

[0926] The server collects the test results and generates a report that states:

[0927] Test Results Report

[0928] -------------------

[0929] All tests were successful.

[0930] The server sends this report to the user's device, where the user can access the report via a web interface or email.

[0931] According to the above embodiment, the present system realizes improved efficiency and quality of unit testing in software development.

[0932] The processing flow will be explained below.

[0933] Step 1:

[0934] The user selects the source code file via a web interface or API to upload the source code from the terminal to the server, clicks the "Upload" button, and the source code is sent to the server.

[0935] Step 2:

[0936] The server temporarily stores the received source code for analysis, and stores the stored source code in a database or temporary file in an appropriate format.

[0937] Step 3:

[0938] The server inputs the saved source code into the generative model and begins analysis, which extracts function and method signatures, dependencies, logic flow, and other information from the program code.

[0939] Step 4:

[0940] The generative model generates test cases based on the analysis results, which specifically define the inputs and expected outputs for each function or method.

[0941] Step 5:

[0942] The server automatically generates test code from the test cases received from the generative model and saves it in a database or file storage. The saved test code is then used for test execution.

[0943] Step 6:

[0944] The user presses the "Test execution" button on the terminal, which sends a request to the server to execute the test.

[0945] Step 7:

[0946] The server retrieves the stored test code, copies it to a test execution environment, and runs it via an appropriate testing tool (e.g., pytest).

[0947] Step 8:

[0948] The server runs the test using a test tool, and while the test is running, it sends data to the device to display the test progress in real time.

[0949] Step 9:

[0950] The server collects the test results, which include the pass or fail status of each test case, error messages, and execution time.

[0951] Step 10:

[0952] The server automatically generates a report based on the collected test results, which includes an overall test score and details of the successful and failed test cases.

[0953] Step 11:

[0954] The server sends the generated results report to the user's terminal, where it can be displayed via a web interface or delivered to the user as an email.

[0955] Through the above steps, this system achieves efficient and high-quality unit test automation.

[0956] Example 1

[0957] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."

[0958] Generating and executing test code in software development is a time-consuming and labor-intensive process. When this process is done manually, there is a risk of human error or incomplete test cases. Furthermore, analyzing test results and creating reports is also a complex and time-consuming process. These issues reduce software quality and development efficiency. Therefore, the present invention aims to solve these problems and provide a system that efficiently performs all processes from automatically generating test code to executing tests, analyzing results, and creating reports.

[0959] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.

[0960] In this invention, the server includes: means for a user to upload source code; means for analyzing program code and extracting test cases using a generative AI model; means for automatically generating test code based on the test cases extracted using the generative AI model; means for saving the automatically generated test code in a database or file storage; means for a user to issue a command to run a test, and for the server to retrieve the saved test code and invoke a test execution tool to automatically run the test; means for collecting test results and automatically generating a result report; and means for outputting or distributing the generated result report to the user's terminal. This automates a series of processes from analyzing source code to extracting test cases, generating test code, running the tests, and collecting and reporting the results, thereby improving the efficiency and quality of software development.

[0961] A "generative AI model" is an artificial intelligence model that analyzes source code and generates appropriate test cases and test code.

[0962] A "test case" refers to a set of conditions or procedures that verify the expected output for a particular input.

[0963] "Test code" is code that is generated based on test cases and is used to verify specific functions and operations of a program.

[0964] A "database" is a system for systematically organizing and storing information and data so that they can be efficiently searched and used as needed.

[0965] "File storage" is a system for storing data files and making them accessible through a web interface, API, etc.

[0966] A "server" is a computer system that provides services over a network and processes and stores data.

[0967] A "terminal" is an electronic device that is operated by a user and communicates with a server to send and receive information.

[0968] "Upload" refers to the act of transferring data or files from a user's device to a server.

[0969] A "test execution tool" is software that automatically executes test code and collects the results. Examples include pytest and unittest.

[0970] A "result report" is a document summarizing the results of a test execution, including the success / failure status of each test case and detailed error messages.

[0971] The present invention is a system that starts with a user uploading source code, analyzes the source code using a generative AI model, and automatically generates test code. This system is explained in detail for each processing step.

[0972] Uploading source code

[0973] First, the user uploads the source code from their device to the server. They enter the source code through a web interface or API and send it by pressing the "Upload" button. The server receives the source code and temporarily stores it in storage.

[0974] Source code analysis

[0975] Next, the server inputs the received source code into a generative AI model for analysis. This analysis process includes the following: The generative AI model analyzes the signatures, dependencies, and logic flow of functions and methods in the source code. Specifically, it lists function names, arguments, and return values ​​and extracts test cases.

[0976] Extraction of test cases and automatic generation of test code

[0977] The generative AI model automatically generates test code based on the extracted test cases. For example, the extracted test case for the function "add" is instantiated as follows:

[0978] Saving test code

[0979] The generated test code is stored by the server in a database or file storage, making it available for later use in the test execution process.

[0980] Running the tests

[0981] Next, the user presses the "Run Test" button on the terminal to instruct the server to run the test. The server retrieves the saved test code and automatically runs the test using a test execution tool (e.g., pytest or unittest). The test progress is displayed on the terminal in real time.

[0982] Collecting and analyzing test results

[0983] The server collects the test results output from the test execution tool, analyzes the successful and failed test cases, extracts error and success messages, and performs detailed analysis.

[0984] Generate and send results reports

[0985] Finally, the server automatically generates a report based on the test results, including the pass / fail status of each test case and detailed error messages. The generated report is sent to the user's terminal via email or a web interface, through which the user can access and review the report.

[0986] Below are some example prompts for a generative AI model:

[0987] Analyze source code and generate test cases and test code.

[0988] Source code:

[0989] def add(a, b):

[0990] return a + b

[0991] This system automates the entire process of software development, from generating test code to running the tests, analyzing the results, and creating reports, thereby improving software quality and development efficiency.

[0992] The flow of the identification process in the first embodiment will be described with reference to FIG.

[0993] Step 1: Upload your source code

[0994] A user uploads source code from their own device to the server. The input is the source code that the user enters via a web interface or API. When the user presses the "upload" button, the source code is sent as an HTTP request. The server receives the request and temporarily stores the sent source code. This stored source code becomes the input for the next processing step.

[0995] Step 2: Analyzing the source code

[0996] The server inputs the temporarily saved source code into the generative AI model for analysis. In this case, the input is the source code saved in the previous step. The generative AI model analyzes the signatures, dependencies, and logic flow of functions and methods in the source code. This process lists function names, arguments, and return values, and extracts test cases. The output is a list of test cases.

[0997] Step 3: Automatically generate test code

[0998] The generative AI model automatically generates test code based on the extracted test cases. The input is a list of test cases generated in the previous step. The generative AI model generates test code based on this list. For example, for the function "add", test code is generated that describes the appropriate input and expected output. The output is the generated test code.

[0999] Step 4: Saving the test code

[1000] The server saves the generated test code in a database or file storage. The input is the test code generated in the previous step. The server saves this test code in a specific folder or registers it in a database. The output is the saved test code.

[1001] Step 5: Test execution instructions

[1002] The user presses the "Test Execution" button on the terminal to instruct the execution of a test. The input is the user's operation instruction. Upon receiving the user's instruction, the server retrieves the saved test code, calls the test execution tool, and automatically executes the test. The output is the start of test execution.

[1003] Step 6: Running the tests

[1004] The server retrieves the saved test code and automatically runs the tests using a test runner (e.g., pytest or unittest). The input is the saved test code, which is executed by the test runner. The output is the test execution result. The execution progress is displayed in real time on the user's terminal.

[1005] Step 7: Collect and analyze test results

[1006] The server collects and analyzes the test results output by the test execution tool. The input is the test results generated by the test execution tool. The server identifies successful and failed test cases and performs detailed analysis. The output is the analyzed test results.

[1007] Step 8: Generate a report of the results

[1008] The server automatically generates a result report based on the test results. The input is the parsed test results. The report contains the pass / fail status of each test case and detailed error messages. The output is the generated result report.

[1009] Step 9: Submit your report

[1010] The server outputs or delivers the generated results report to the user's terminal. The input is the generated results report. The server sends this report to the user via email or a web interface. The output is the report sent to the user's terminal.

[1011] The above are the specific processing steps of the program of this system, which enables users to efficiently and reliably generate test code, execute tests, analyze the results, and receive reports.

[1012] (Application example 1)

[1013] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."

[1014] Robot operation programs in factories are complex and diverse, requiring a significant amount of man-hours to ensure their quality. Traditional manual testing methods can overlook bugs and errors in the programs, potentially leading to serious accidents or reduced production efficiency. Therefore, there is an urgent need to provide a means to efficiently test robot operation programs and improve their quality.

[1015] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.

[1016] In this invention, the server includes means for analyzing the robot's motion control program using the generative model and automatically generating test code, means for saving the automatically generated test code, and means for executing the saved test code and collecting test results, which makes it possible to detect bugs and errors in the robot's motion program early and improve its quality.

[1017] A "generative model" is an artificial intelligence model that analyzes program code and signatures and automatically generates test cases and test code.

[1018] An "operation control program" is a program that gives instructions and controls to operate a mechanical device such as a robot.

[1019] "Test code" is code for verifying the operation of an operation control program, and is used to confirm the expected output for a specific input.

[1020] A "test case" is a specific set of conditions for verifying whether an operation control program operates correctly under specific scenarios or conditions.

[1021] A "test execution tool" is a software tool for executing test code and collecting the results.

[1022] A "result report" is a document summarizing the test results, including the success / failure status of each test case and error messages.

[1023] A "server" is a centralized location or computer system for storing, processing, and communicating data.

[1024] This invention is an automatic test system for efficiently improving the quality of factory operation control programs. This system consists of three elements: a server, a terminal, and a user. A specific embodiment of this system is shown below.

[1025] 1. Upload the program

[1026] The user uploads the robot's motion control program from the terminal to the server. The program is uploaded using a web interface or API. For example, consider the following program:

[1027] def move_arm(x, y, z):

[1028] Arm movement logic

[1029] return True if (x >= 0 and y >= 0 and z >= 0) else False

[1030] 2. Code Analysis

[1031] The server sends the received motion control program to the generative AI model for analysis. The generative AI model analyzes the signatures of the program's functions and methods and automatically generates test cases. In this analysis process, an example of a prompt sentence is as follows:

[1032] Analyze the following robot arm motion program and generate appropriate test cases:

[1033] def move_arm(x, y, z):

[1034] return True if (x >= 0 and y >= 0 and z >= 0) else False

[1035] 3. Automatic test code generation

[1036] The generative AI model generates test cases based on the analysis, and then automatically generates test code based on them. The generated test code is stored in a database or file storage by the server. For example, the generated test code looks like this:

[1037] def test_move_arm():

[1038] assert move_arm(1, 2, 3) == True

[1039] assert move_arm(-1, 2, 3) == False

[1040] assert move_arm(0, 0, 0) == True

[1041] 4. Test execution

[1042] When a user presses the "Run Test" button on the terminal, the server retrieves the saved test code and automatically runs the test using a test execution tool such as pytest. The terminal displays the test progress in real time.

[1043] 5. Collecting test results

[1044] The server collects the test results output from the test execution tools, extracts detailed results of successful and failed test cases, and analyzes them.

[1045] 6. Generate and send results report

[1046] The server automatically generates a report based on the test results, including the pass / fail status of each test case and detailed error messages, and sends the report to the user's terminal via email or a web interface.

[1047] Hardware and software used

[1048] Hardware: Factory robots

[1049] software:

[1050] Generative AI models (e.g., OpenAI GPT-4)

[1051] Test frameworks (e.g. pytest)

[1052] Server environment (e.g. AWS EC2)

[1053] Database (e.g. PostgreSQL)

[1054] Frontend (e.g. React.js)

[1055] As described above, the present invention provides a system that can detect bugs and errors in a robot motion control program at an early stage and improve quality.

[1056] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[1057] Step 1:

[1058] The user uploads the robot's motion control program from the terminal to the server. Specifically, the user uses a web interface or API to select a program file and send it to the server. In this case, the input is the program file, and the output is the program file saved on the server.

[1059] Step 2:

[1060] The server sends the received motion control program to the generative AI model for analysis. Specifically, the server passes the received program code to the generative AI model as a prompt statement and requests the generation of a test case. The input is the program code (prompt statement), and the output is the generated test case.

[1061] Step 3:

[1062] The generative AI model generates test cases based on the analysis, and then automatically generates test code based on them. Specifically, the generative AI model creates test code that includes the input and expected output for each function or method, and the server receives and stores this. The input is the test case, and the output is the test code.

[1063] Step 4:

[1064] The server retrieves the saved test code and automatically runs the tests using a test execution tool such as pytest. This process is triggered by the user pressing the "Run Test" button on the terminal. The input is the test code and the output is the test execution result.

[1065] Step 5:

[1066] The server collects the test results output from the test execution tool and analyzes the successful and failed test cases. Specifically, the server collects each item of the test results and identifies the locations where anomalies or errors occurred. The input is the test execution results, and the output is the analyzed test results.

[1067] Step 6:

[1068] The server automatically generates a result report based on the test results and sends it to the user's device. Specifically, the server creates a report based on the test results and delivers it to the user via email or a web interface. The input is the analyzed test results, and the output is the result report.

[1069] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.

[1070] The present invention is a system that automates a series of processes, from analyzing program code to automatically generating test code, executing tests, and reporting results, and further combines it with an emotion engine that analyzes user emotions to provide more personalized feedback. Each function of this system is realized by three main elements: a server, a terminal, and a user. Specific embodiments of the system are described below.

[1071] 1. Upload the source code

[1072] First, the user selects the source code file via a web interface or API to upload the source code from the terminal to the server, and when the user clicks the "Upload" button, the source code is sent to the server.

[1073] 2. Source code analysis

[1074] The server temporarily stores the received source code for analysis. The stored source code is then input into the generative model, which analyzes the function and method signatures, dependencies, logic flow, etc. in the program code. Based on the analysis results, the generative model identifies appropriate test cases.

[1075] 3. Automatic generation of test code

[1076] Based on the generated test cases, the generative model automatically generates test code, which is then stored in a database or file storage by the server and used later for test execution.

[1077] 4. Running the Test

[1078] The user presses the "Run Test" button on the terminal. This sends a request to the server to run the test. The server retrieves the saved test code and runs it using a test execution tool (e.g., pytest). The progress of the test is displayed in real time on the terminal.

[1079] 5. Collecting test results

[1080] The server collects the test results output by the test execution tools, extracts and analyzes the detailed results of the test cases that passed and failed.

[1081] 6. Analysis by Emotion Engine

[1082] Furthermore, the server analyzes the user's emotions using an emotion engine. The emotion engine analyzes the voice and text data entered by the user to identify the user's emotional state. For example, if the user enters text feedback, it can recognize emotions such as joy, surprise, and disappointment from the text.

[1083] 7. Generate and send results report

[1084] The server automatically generates a report based on the test results. This report includes the pass / fail status of each test case and detailed error messages. Furthermore, the report format and content can be customized based on the analysis results of the emotion engine. For example, if the user is disappointed, an encouraging message can be added.

[1085] Finally, the server sends the generated results report to the user's terminal, where it can be displayed via a web interface or delivered to the user as an email.

[1086] Specific examples

[1087] Uploading and analyzing source code

[1088] Suppose a user uploads the following source code:

[1089] python

[1090] def add(a, b):

[1091] return a + b

[1092] The server receives this source code and requests the generative model to analyze it. The generative model generates the following test case from the input and output of the add function:

[1093] Test code generation

[1094] The test code based on the generated test cases is as follows:

[1095] python

[1096] def test_add():

[1097] assert add(1, 2) == 3

[1098] assert add(-1, 1) == 0

[1099] assert add(0, 0) == 0

[1100] The server receives this test code and stores it in a database.

[1101] Test execution and reporting

[1102] When the user presses the "Run Test" button, the server retrieves the saved test code and automatically runs the test using pytest. The test results are displayed as follows:

[1103] Test Results Report

[1104] -------------------

[1105] All tests were successful.

[1106] Analysis and customization with emotion engine

[1107] If the user enters feedback such as "I'm not satisfied with the test results," the server uses an emotion engine to recognize the emotion "disappointment," and adds an encouraging message to the result report.

[1108] Test Results Report

[1109] -------------------

[1110] All tests were successful.

[1111] comment:

[1112] Thank you for your hard work. Let's do our best next time!

[1113] According to the above embodiment, the present system realizes efficient and high-quality automation of unit tests and provides individualized feedback to users.

[1114] The processing flow will be explained below.

[1115] Step 1:

[1116] Users use a web interface or API to upload source code from their device to the server. When the user clicks the "Upload" button, the source code is sent to the server.

[1117] Step 2:

[1118] The server receives the source code sent by the user and temporarily stores it for analysis, using a database or a temporary file system.

[1119] Step 3:

[1120] The server inputs the stored source code into the generative model and begins analyzing the program code. The generative model analyzes the signatures of functions and methods in the program code, dependencies, logic flow, etc.

[1121] Step 4:

[1122] The generative model generates test cases based on the analysis results, where each test case contains the expected output for a particular input.

[1123] Step 5:

[1124] The server automatically generates test code from the generated test cases and saves it in a database or file storage. The saved test code is used in later steps.

[1125] Step 6:

[1126] The user presses the "Test execution" button via the terminal, which sends a test execution request to the server.

[1127] Step 7:

[1128] The server retrieves the stored test code and starts running the test using a test execution tool (e.g., pytest, unittest). The status of the test execution is sent to the terminal in real time.

[1129] Step 8:

[1130] The server collects the test results output by the test execution tools, including the pass / fail status, error messages, and execution time for each test case.

[1131] Step 9:

[1132] The server uses an emotion engine to analyze the user's emotions, analyzing text and voice feedback entered by the user to identify their emotional state.

[1133] Step 10:

[1134] The server automatically generates a report based on the test results and sentiment analysis results, which includes detailed results for each test case as well as customized messages based on the user's sentiment.

[1135] Step 11:

[1136] The server sends the generated results report to the user's terminal, where it can be displayed via a web interface or delivered to the user as an email.

[1137] A specific example is the following flow:

[1138] Upload source code:

[1139] A user uploads the following source code:

[1140] python

[1141] def add(a, b):

[1142] return a + b

[1143] Analyzing source code and generating test code:

[1144] The server analyzes this source code and the generative model generates the following test cases:

[1145] python

[1146] def test_add():

[1147] assert add(1, 2) == 3

[1148] assert add(-1, 1) == 0

[1149] assert add(0, 0) == 0

[1150] The generated test code is stored on the server.

[1151] Run the test and collect the results:

[1152] When the user presses the "Run Test" button, the server runs the tests using pytest and collects the results, which look something like this:

[1153] All test cases were successful.

[1154] Sentiment analysis with emotion engine:

[1155] When a user enters feedback such as "I'm not satisfied with the test results," the server's emotion engine recognizes the emotion "disappointment."

[1156] Results report generation and distribution:

[1157] The server generates a report based on the test results and sentiment analysis results, as shown below.

[1158] Test Results Report

[1159] -------------------

[1160] All tests were successful.

[1161] comment:

[1162] Thank you for your hard work. Let's do our best next time!

[1163] The results report is sent to the user's device and displayed via email or web interface.

[1164] Through the above process, this system achieves efficient and high-quality automation of unit tests and provides individualized feedback to users.

[1165] Example 2

[1166] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."

[1167] Conventional test code generation and test execution systems require manual analysis of program code, creation and execution of test code, which is time-consuming and laborious. Additionally, responses to user feedback are not personalized, which hinders the improvement of the user experience.

[1168] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[1169] In this invention, the server includes means for analyzing program code using a generative model and automatically generating test code, means for saving the automatically generated test code, means for executing the saved test code and collecting test results, means for automatically generating a result report based on the test results, means for outputting or distributing the result report, means for analyzing user emotions, and means for customizing the format and content of the result report based on the emotion analysis results, thereby enabling efficient and high-quality test automation and providing individualized feedback to users.

[1170] A "generative model" is an algorithm or system that uses machine learning or artificial intelligence to analyze program code or data and automatically generate a specific result or output.

[1171] "Program code" is a set of instructions written to cause a computer to perform a particular operation.

[1172] "Test code" is code written to check whether program code works as expected.

[1173] "Auto-generated" refers to a system or algorithm automatically creating a product without human intervention.

[1174] "Test results" are the results obtained when test code is executed, including the success or failure status of each test case.

[1175] A "Result Report" is a document summarizing the test results, including details such as success / failure status and error messages.

[1176] "Sentiment analysis" is the process of identifying an emotional state (e.g., joy, disappointment, surprise, etc.) from a user's input data.

[1177] A "format" defines the structure and layout of a document or data.

[1178] "Customization" refers to adapting or modifying the content or format of a system or document to suit specific needs or requirements.

[1179] "User" refers to a person or entity that uses the system.

[1180] A "server" is a computer system that receives requests from clients and processes data or provides services in response to the requests.

[1181] "Terminal" refers to a device that a user directly operates to interface with a system.

[1182] The present invention is a system that automates a series of processes, from program code analysis to automatic test code generation, test execution, result reporting, and user sentiment analysis. How this system is implemented will be specifically described below.

[1183] Hardware and Software Configuration

[1184] This system is configured using the following hardware and software.

[1185] 1. Server

[1186] It analyzes program code, automatically generates test code, executes tests, automatically generates result reports, and performs sentiment analysis.

[1187] Software used: analysis libraries (e.g., Python's AST module), generative AI models (e.g., GPT), test execution tools (e.g., pytest), sentiment analysis engines (e.g., IBM Watson Tone Analyzer).

[1188] 2. Terminal

[1189] It provides an interface for users to upload source code, run tests, and provide feedback.

[1190] Hardware used: PC, smartphone, tablet, etc.

[1191] Software used: Web browser or API client.

[1192] 3. Users

[1193] Upload source code, run tests, and provide feedback.

[1194] Processing flow and specific examples

[1195] 1. Upload the source code

[1196] The user selects the source code file through a web interface or API provided using the terminal and presses the "Upload" button, which sends the source code to the server as an HTTP POST request.

[1197] 2. Source code analysis

[1198] The server temporarily stores the received source code. The stored source code is then input into a generative AI model, which analyzes the program code's function and method signatures, dependencies, and logic flow. An example of a prompt is as follows:

[1199] Generate a test case for the following code:

[1200] def add(a, b):

[1201] return a + b

[1202] 3. Automatic generation of test code

[1203] The generative AI model generates appropriate test cases based on the analysis results, and the generated test code is stored in a database or file storage by the server.

[1204] 4. Running the Test

[1205] When the user presses the "Run Test" button, the server retrieves the saved test code and runs it using a test execution tool, for example, pytest, and displays the progress in real time on the terminal.

[1206] 5. Collecting test results

[1207] The server collects the test results output by the test execution tools, extracts details of successful and failed test cases, and analyzes them.

[1208] 6. Analysis by Emotion Engine

[1209] The server uses an emotion analysis engine to analyze the feedback entered by the user and identify their emotional state. For example, if the user enters "I'm not satisfied with the test results," the server recognizes the emotion "disappointed."

[1210] 7. Generate and send results report

[1211] The server automatically generates a report based on the test results and sentiment analysis results, customizes the report format and content, and displays the report via a web interface or sends it to the user via email.

[1212] As a result, this system realizes efficient and high-quality automation of unit tests and provides individualized feedback to users.

[1213] The flow of the identification process in the second embodiment will be described with reference to FIG.

[1214] Step 1:

[1215] The user selects a source code file through a web interface or API provided on the terminal and presses the "Upload" button. The input data is the source code file selected by the user, which is sent to the server as an HTTP POST request. At this time, the file data is sent to the server as multipart form data. The output after sending is that the server receives and saves the source code file.

[1216] Step 2:

[1217] The server temporarily stores the received source code. Next, the server inputs this source code into a generative AI model, which analyzes the function and method signatures, dependencies, and logic flow of the program code. The input data is the stored source code, and the server performs syntax analysis using an analysis library (for example, the AST module in Python). It creates and sends the following prompt to the generative AI model:

[1218] Generate a test case for the following code:

[1219] def add(a, b):

[1220] return a + b

[1221] The output is the text data of the test cases returned by the generative AI model.

[1222] Step 3:

[1223] The server automatically generates test code based on the test cases returned by the generative AI model. The input data is the text data of the test cases returned by the generative AI model, and the server saves this as a Python file (e.g., test_code.py). The saved test code is used in subsequent test runs. The output is the saved test code file.

[1224] Step 4:

[1225] The user presses the "Run Test" button on the terminal, requesting the server to run the test. The server retrieves the saved test code and runs it using a test execution tool (e.g., pytest). The input data is the test code file that received the request, and the server executes the following command:

[1226] sh

[1227] pytest test_code.py

[1228] The output is a test result report file generated from the test execution tool.

[1229] Step 5:

[1230] The server collects test results output from the test execution tools. The input data is the report file (e.g., XML or JSON format) generated by the test execution tools, which the server parses to extract details of passed and failed test cases. The output is a dataset of detailed test results.

[1231] Step 6:

[1232] The server uses a sentiment analysis engine to analyze the user's sentiment. The input data is text data entered by the user as feedback, for example, "I'm not satisfied with the test results." The server uses the sentiment analysis engine to identify the emotional state (e.g., disappointment) from this text. The output is the analyzed emotional state data.

[1233] Step 7:

[1234] The server automatically generates a result report based on the test results and the sentiment analysis results. The input data are the detailed test results and the user sentiment analysis results, and the server customizes the format and content of the report based on this. For example, if disappointment is recognized, the server adds an encouraging message such as "Try harder next time!" The generated result report is displayed through a web interface or sent to the user via email. The output is the final result report.

[1235] (Application example 2)

[1236] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."

[1237] Conventional automatic test generation systems perform a series of processes, from analyzing program code to automatically generating test code, executing it, and reporting the results, but they do not provide feedback or customize reports based on the user's emotional state. As a result, they are unable to provide feedback that takes into account how the user feels about the results, which is a problem particularly in environments where errors can have serious consequences, such as electronic devices and factory control systems.

[1238] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.

[1239] In this invention, the server includes means for analyzing program code using a generative model and automatically generating test code, means for saving the automatically generated test code, means for executing the saved test code and collecting test results, means for analyzing user emotions, means for automatically generating a result report based on the test results and the user emotion analysis results, and means for outputting or distributing the result report, thereby enabling the generation of a result report that includes personalized feedback that takes into account the user's emotional state.

[1240] A "generative model" is an artificial intelligence program that analyzes program code and generates appropriate test cases.

[1241] "Program code" is a written instruction or collection of instructions for carrying out a computer program.

[1242] "Test code" is automatically generated verification code for verifying the operation of program code.

[1243] "Storage" means to record data temporarily or permanently on a recording medium.

[1244] "Test results" are the success or failure information and detailed error messages obtained by executing the test code.

[1245] "Emotion analysis" is the process of analyzing voice and text data to identify a user's emotional state.

[1246] "Result Report" means a report automatically generated based on the test results and sentiment analysis results, which includes the success / failure status and detailed error messages.

[1247] "Output or distribution" refers to the act of displaying the result report in a form that can be viewed by the user or sending it by means of e-mail or the like.

[1248] The present invention provides a system that uses a generative model to analyze program code, automates the process from automatically generating test code to executing it, collecting the results, and providing personalized feedback in order to improve the quality check function of factory robots. Specific embodiments of the system are described below.

[1249] 1. Upload the source code

[1250] The user selects the source code file via a web interface or API, which uploads the source code from the terminal to the server. When the user clicks the "Upload" button, the source code is sent to the server.

[1251] 2. Source code analysis

[1252] The server temporarily stores the received source code for analysis, then inputs the stored source code into the generative model, which analyzes the signatures of functions and methods in the program code, dependencies, logic flow, etc. Based on this, the generative model generates appropriate test cases.

[1253] 3. Automatic generation of test code

[1254] Based on the analysis results, the generative model automatically generates test code. The generated test code is stored in a database or file storage by the server. The stored test code is then used later when executing the test.

[1255] 4. Running the Test

[1256] The user presses the "Run Test" button on the terminal. This sends a request to the server to run the test. The server retrieves the saved test code and runs it using a test execution tool (e.g., pytest). The progress of the test is displayed in real time on the terminal.

[1257] 5. Collecting test results

[1258] The server collects the test results output by the test execution tools, extracts and analyzes the detailed results of the test cases that passed and failed.

[1259] 6. Analysis by Emotion Engine

[1260] Furthermore, the server analyzes the user's emotions using an emotion engine. The emotion engine analyzes the voice and text data entered by the user to identify the user's emotional state. For example, if the user enters text feedback, it can recognize emotions such as joy, surprise, and disappointment from the text.

[1261] 7. Generate and send results report

[1262] The server automatically generates a result report based on the test results and sentiment analysis results. The result report includes the success or failure status of each test case and a detailed error message. Furthermore, the report content is customized according to the analysis results of the sentiment engine. For example, if the user is disappointed, an encouraging message is added. Finally, the server sends the generated result report to the user's device. The report can be displayed via a web interface or delivered to the user via email.

[1263] Specific examples

[1264] Uploading and analyzing source code

[1265] Suppose a user uploads the following source code:

[1266] python

[1267] def add(a, b):

[1268] return a + b

[1269] The server receives this source code and requests the generative model to analyze it. The generative model generates the following test case from the input and output of the add function:

[1270] Test code generation

[1271] The test code based on the generated test cases is as follows:

[1272] python

[1273] def test_add():

[1274] assert add(1, 2) == 3

[1275] assert add(-1, 1) == 0

[1276] assert add(0, 0) == 0

[1277] The server receives this test code and stores it in a database.

[1278] Test execution and reporting

[1279] When the user presses the "Run Test" button, the server retrieves the saved test code and automatically runs the test using pytest. The test results are displayed as follows:

[1280] Test Results Report

[1281] -------------------

[1282] All tests were successful.

[1283] Analysis and customization with emotion engine

[1284] If the user enters feedback such as "I'm not satisfied with the test results," the server uses an emotion engine to recognize the emotion "disappointment," and adds an encouraging message to the result report.

[1285] Test Results Report

[1286] -------------------

[1287] All tests were successful.

[1288] comment:

[1289] Thank you for your hard work. Let's do our best next time!

[1290] In this way, the present invention realizes a system that highly automates the quality check process of factory robots and provides feedback according to the user's emotions.

[1291] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[1292] Step 1:

[1293] The user uploads source code from their device to the server by selecting the source code file via the web interface or API and clicking the "Upload" button. The input data is the program code, and the data is temporarily sent to a storage location on the server. The source code is then saved on the server.

[1294] Step 2:

[1295] The server temporarily stores the received source code for analysis. Next, this stored source code is input into a generative model, which analyzes the signatures of functions and methods in the program code, dependencies, logic flow, etc. The input data is the source code, and the output data is the analysis results, and the data is processed using the generative model. This results in the identification of appropriate test cases.

[1296] Step 3:

[1297] The generative model automatically generates test code based on the analysis results. The generated test cases are converted into test code and saved in a database or file storage by the server. The input data is the analysis results, and the output data is the test code. This allows the necessary test code to be automatically generated and saved.

[1298] Step 4:

[1299] The user presses the "Run Test" button on the terminal. This sends a request to the server to run the test. The server retrieves the saved test code and runs the test using a test execution tool (e.g., pytest). The input data is the test code, and the output data is the test results. This executes the test code and obtains the results.

[1300] Step 5:

[1301] The server collects the test results output from the test execution tool. It extracts and analyzes the detailed results of successful and failed test cases. The input data is the test results, and the output data is the analysis results. This allows for detailed analysis of the test results.

[1302] Step 6:

[1303] The server uses an emotion engine to analyze the user's emotions. The emotion engine analyzes the voice or text data input by the user and identifies the user's emotional state. The input data is text or voice data, and the output data is the emotion analysis result. This allows the user's emotional state to be identified.

[1304] Step 7:

[1305] The server automatically generates a result report based on the test results and sentiment analysis results. This result report includes the success / failure status of each test case and detailed error messages. Furthermore, the report content is customized according to the sentiment analysis results. The input data are the test results and sentiment analysis results, and the output data is the result report. This allows for the generation of a personalized result report.

[1306] Step 8:

[1307] The server sends the generated result report to the user's terminal. The report is displayed through a web interface or delivered to the user as an email. The input data is the result report, and the output data is the report the user receives. This is how the result report is delivered.

[1308] The specific processing unit 290 transmits the result of the specific processing to the headset type terminal 314. In the headset type terminal 314, the control unit 46A causes the speaker 240 and the display 343 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.

[1309] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[1310] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the headset type terminal 314.

[1311] [Fourth embodiment]

[1312] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.

[1313] 7, a data processing system 410 includes a data processing device 12 and a robot 414. An example of the data processing device 12 is a server.

[1314] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[1315] The robot 414 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a control target 443. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the control target 443 are also connected to the bus 52.

[1316] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.

[1317] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).

[1318] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.

[1319] The control object 443 includes a display device, LEDs in the eyes, and motors for driving the arms, hands, and feet. The posture and gestures of the robot 414 are controlled by controlling the motors of the arms, hands, and feet. Some of the emotions of the robot 414 can be expressed by controlling these motors. In addition, the facial expressions of the robot 414 can also be expressed by controlling the light emission state of the LEDs in the eyes of the robot 414.

[1320] Fig. 8 shows an example of the main functions of the data processing device 12 and the robot 414. As shown in Fig. 8, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.

[1321] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.

[1322] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[1323] In the robot 414, the processor 46 performs the reception output process. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.

[1324] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[1325] The present invention is a system that automates a series of processes, from program code analysis to automatic test code generation, test execution, and result reporting. Each function of this system is realized by three main elements: a server, a terminal, and a user. Specific embodiments of the system are described below.

[1326] 1. Upload the source code

[1327] First, the user uploads the source code from their device to the server. When the user uploads the source code via a web interface or API, the server receives the code and temporarily stores it.

[1328] 2. Source code analysis

[1329] The server inputs the received source code into a generative model for analysis. The generative model analyzes the function and method signatures, dependencies, logic flow, etc. in the program code. Based on this analysis process, the generative model identifies appropriate test cases.

[1330] 3. Automatic generation of test code

[1331] Based on the generated test cases, the generative model automatically generates test code. The test code specifically verifies the input and expected output for each function or method of the target program code. The generated test code is saved in a database or file storage by the server.

[1332] 4. Running the Test

[1333] Next, when the user presses the "Run Test" button on the terminal, the server retrieves the saved test code and automatically runs the test using a test execution tool (e.g., pytest, unittest, etc.) The terminal displays the progress of the test in real time.

[1334] 5. Collecting test results

[1335] The server collects the test results output by the test execution tools, extracts and analyzes the detailed results of the test cases that passed and failed.

[1336] 6. Generate and send results report

[1337] Finally, the server automatically generates a report based on the test results, including the pass / fail status of each test case and detailed error messages, and sends the report to the user's device via email or a web interface.

[1338] Specific examples

[1339] Uploading and analyzing source code

[1340] Suppose a user uploads the following source code:

[1341] python

[1342] def add(a, b):

[1343] return a + b

[1344] The server receives this source code and requests the generative model to analyze it. The generative model generates the following test case from the input and output of the add function:

[1345] Test code generation

[1346] The test code based on the generated test cases is as follows:

[1347] python

[1348] def test_add():

[1349] assert add(1, 2) == 3

[1350] assert add(-1, 1) == 0

[1351] assert add(0, 0) == 0

[1352] The server retrieves this test code from the language model and stores it in a database.

[1353] Running the tests

[1354] When the user presses the "Run Test" button, the server retrieves the saved test code and automatically runs the test using pytest, and the terminal displays the test progress in real time.

[1355] Collecting test results and generating reports

[1356] The server collects the test results and generates a report that states:

[1357] Test Results Report

[1358] -------------------

[1359] All tests were successful.

[1360] The server sends this report to the user's device, where the user can access the report via a web interface or email.

[1361] According to the above embodiment, the present system realizes improved efficiency and quality of unit testing in software development.

[1362] The processing flow will be explained below.

[1363] Step 1:

[1364] The user selects the source code file via a web interface or API to upload the source code from the terminal to the server, clicks the "Upload" button, and the source code is sent to the server.

[1365] Step 2:

[1366] The server temporarily stores the received source code for analysis, and stores the stored source code in a database or temporary file in an appropriate format.

[1367] Step 3:

[1368] The server inputs the saved source code into the generative model and begins analysis, which extracts function and method signatures, dependencies, logic flow, and other information from the program code.

[1369] Step 4:

[1370] The generative model generates test cases based on the analysis results, which specifically define the inputs and expected outputs for each function or method.

[1371] Step 5:

[1372] The server automatically generates test code from the test cases received from the generative model and saves it in a database or file storage. The saved test code is then used for test execution.

[1373] Step 6:

[1374] The user presses the "Test execution" button on the terminal, which sends a request to the server to execute the test.

[1375] Step 7:

[1376] The server retrieves the stored test code, copies it to a test execution environment, and runs it via an appropriate testing tool (e.g., pytest).

[1377] Step 8:

[1378] The server runs the test using a test tool, and while the test is running, it sends data to the device to display the test progress in real time.

[1379] Step 9:

[1380] The server collects the test results, which include the pass or fail status of each test case, error messages, and execution time.

[1381] Step 10:

[1382] The server automatically generates a report based on the collected test results, which includes an overall test score and details of the successful and failed test cases.

[1383] Step 11:

[1384] The server sends the generated results report to the user's terminal, where it can be displayed via a web interface or delivered to the user as an email.

[1385] Through the above steps, this system achieves efficient and high-quality unit test automation.

[1386] Example 1

[1387] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[1388] Generating and executing test code in software development is a time-consuming and labor-intensive process. When this process is done manually, there is a risk of human error or incomplete test cases. Furthermore, analyzing test results and creating reports is also a complex and time-consuming process. These issues reduce software quality and development efficiency. Therefore, the present invention aims to solve these problems and provide a system that efficiently performs all processes from automatically generating test code to executing tests, analyzing results, and creating reports.

[1389] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.

[1390] In this invention, the server includes: means for a user to upload source code; means for analyzing program code and extracting test cases using a generative AI model; means for automatically generating test code based on the test cases extracted using the generative AI model; means for saving the automatically generated test code in a database or file storage; means for a user to issue a command to run a test, and for the server to retrieve the saved test code and invoke a test execution tool to automatically run the test; means for collecting test results and automatically generating a result report; and means for outputting or distributing the generated result report to the user's terminal. This automates a series of processes from analyzing source code to extracting test cases, generating test code, running the tests, and collecting and reporting the results, thereby improving the efficiency and quality of software development.

[1391] A "generative AI model" is an artificial intelligence model that analyzes source code and generates appropriate test cases and test code.

[1392] A "test case" refers to a set of conditions or procedures that verify the expected output for a particular input.

[1393] "Test code" is code that is generated based on test cases and is used to verify specific functions and operations of a program.

[1394] A "database" is a system for systematically organizing and storing information and data so that they can be efficiently searched and used as needed.

[1395] "File storage" is a system for storing data files and making them accessible through a web interface, API, etc.

[1396] A "server" is a computer system that provides services over a network and processes and stores data.

[1397] A "terminal" is an electronic device that is operated by a user and communicates with a server to send and receive information.

[1398] "Upload" refers to the act of transferring data or files from a user's device to a server.

[1399] A "test execution tool" is software that automatically executes test code and collects the results. Examples include pytest and unittest.

[1400] A "result report" is a document summarizing the results of a test execution, including the success / failure status of each test case and detailed error messages.

[1401] The present invention is a system that starts with a user uploading source code, analyzes the source code using a generative AI model, and automatically generates test code. This system is explained in detail for each processing step.

[1402] Uploading source code

[1403] First, the user uploads the source code from their device to the server. They enter the source code through a web interface or API and send it by pressing the "Upload" button. The server receives the source code and temporarily stores it in storage.

[1404] Source code analysis

[1405] Next, the server inputs the received source code into a generative AI model for analysis. This analysis process includes the following: The generative AI model analyzes the signatures, dependencies, and logic flow of functions and methods in the source code. Specifically, it lists function names, arguments, and return values ​​and extracts test cases.

[1406] Extraction of test cases and automatic generation of test code

[1407] The generative AI model automatically generates test code based on the extracted test cases. For example, the extracted test case for the function "add" is instantiated as follows:

[1408] Saving test code

[1409] The generated test code is stored by the server in a database or file storage, making it available for later use in the test execution process.

[1410] Running the tests

[1411] Next, the user presses the "Run Test" button on the terminal to instruct the server to run the test. The server retrieves the saved test code and automatically runs the test using a test execution tool (e.g., pytest or unittest). The test progress is displayed on the terminal in real time.

[1412] Collecting and analyzing test results

[1413] The server collects the test results output from the test execution tool, analyzes the successful and failed test cases, extracts error and success messages, and performs detailed analysis.

[1414] Generate and send results reports

[1415] Finally, the server automatically generates a report based on the test results, including the pass / fail status of each test case and detailed error messages. The generated report is sent to the user's terminal via email or a web interface, through which the user can access and review the report.

[1416] Below are some example prompts for a generative AI model:

[1417] Analyze source code and generate test cases and test code.

[1418] Source code:

[1419] def add(a, b):

[1420] return a + b

[1421] This system automates the entire process of software development, from generating test code to running the tests, analyzing the results, and creating reports, thereby improving software quality and development efficiency.

[1422] The flow of the identification process in the first embodiment will be described with reference to FIG.

[1423] Step 1: Upload your source code

[1424] A user uploads source code from their own device to the server. The input is the source code that the user enters via a web interface or API. When the user presses the "upload" button, the source code is sent as an HTTP request. The server receives the request and temporarily stores the sent source code. This stored source code becomes the input for the next processing step.

[1425] Step 2: Analyzing the source code

[1426] The server inputs the temporarily saved source code into the generative AI model for analysis. In this case, the input is the source code saved in the previous step. The generative AI model analyzes the signatures, dependencies, and logic flow of functions and methods in the source code. This process lists function names, arguments, and return values, and extracts test cases. The output is a list of test cases.

[1427] Step 3: Automatically generate test code

[1428] The generative AI model automatically generates test code based on the extracted test cases. The input is a list of test cases generated in the previous step. The generative AI model generates test code based on this list. For example, for the function "add", test code is generated that describes the appropriate input and expected output. The output is the generated test code.

[1429] Step 4: Saving the test code

[1430] The server saves the generated test code in a database or file storage. The input is the test code generated in the previous step. The server saves this test code in a specific folder or registers it in a database. The output is the saved test code.

[1431] Step 5: Test execution instructions

[1432] The user presses the "Test Execution" button on the terminal to instruct the execution of a test. The input is the user's operation instruction. Upon receiving the user's instruction, the server retrieves the saved test code, calls the test execution tool, and automatically executes the test. The output is the start of test execution.

[1433] Step 6: Running the tests

[1434] The server retrieves the saved test code and automatically runs the tests using a test runner (e.g., pytest or unittest). The input is the saved test code, which is executed by the test runner. The output is the test execution result. The execution progress is displayed in real time on the user's terminal.

[1435] Step 7: Collect and analyze test results

[1436] The server collects and analyzes the test results output by the test execution tool. The input is the test results generated by the test execution tool. The server identifies successful and failed test cases and performs detailed analysis. The output is the analyzed test results.

[1437] Step 8: Generate a report of the results

[1438] The server automatically generates a result report based on the test results. The input is the parsed test results. The report contains the pass / fail status of each test case and detailed error messages. The output is the generated result report.

[1439] Step 9: Submit your report

[1440] The server outputs or delivers the generated results report to the user's terminal. The input is the generated results report. The server sends this report to the user via email or a web interface. The output is the report sent to the user's terminal.

[1441] The above are the specific processing steps of the program of this system, which enables users to efficiently and reliably generate test code, execute tests, analyze the results, and receive reports.

[1442] (Application example 1)

[1443] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[1444] Robot operation programs in factories are complex and diverse, requiring a significant amount of man-hours to ensure their quality. Traditional manual testing methods can overlook bugs and errors in the programs, potentially leading to serious accidents or reduced production efficiency. Therefore, there is an urgent need to provide a means to efficiently test robot operation programs and improve their quality.

[1445] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.

[1446] In this invention, the server includes means for analyzing the robot's motion control program using the generative model and automatically generating test code, means for saving the automatically generated test code, and means for executing the saved test code and collecting test results, which makes it possible to detect bugs and errors in the robot's motion program early and improve its quality.

[1447] A "generative model" is an artificial intelligence model that analyzes program code and signatures and automatically generates test cases and test code.

[1448] An "operation control program" is a program that gives instructions and controls to operate a mechanical device such as a robot.

[1449] "Test code" is code for verifying the operation of an operation control program, and is used to confirm the expected output for a specific input.

[1450] A "test case" is a specific set of conditions for verifying whether an operation control program operates correctly under specific scenarios or conditions.

[1451] A "test execution tool" is a software tool for executing test code and collecting the results.

[1452] A "result report" is a document summarizing the test results, including the success / failure status of each test case and error messages.

[1453] A "server" is a centralized location or computer system for storing, processing, and communicating data.

[1454] This invention is an automatic test system for efficiently improving the quality of factory operation control programs. This system consists of three elements: a server, a terminal, and a user. A specific embodiment of this system is shown below.

[1455] 1. Upload the program

[1456] The user uploads the robot's motion control program from the terminal to the server. The program is uploaded using a web interface or API. For example, consider the following program:

[1457] def move_arm(x, y, z):

[1458] Arm movement logic

[1459] return True if (x >= 0 and y >= 0 and z >= 0) else False

[1460] 2. Code Analysis

[1461] The server sends the received motion control program to the generative AI model for analysis. The generative AI model analyzes the signatures of the program's functions and methods and automatically generates test cases. In this analysis process, an example of a prompt sentence is as follows:

[1462] Analyze the following robot arm motion program and generate appropriate test cases:

[1463] def move_arm(x, y, z):

[1464] return True if (x >= 0 and y >= 0 and z >= 0) else False

[1465] 3. Automatic test code generation

[1466] The generative AI model generates test cases based on the analysis, and then automatically generates test code based on them. The generated test code is stored in a database or file storage by the server. For example, the generated test code looks like this:

[1467] def test_move_arm():

[1468] assert move_arm(1, 2, 3) == True

[1469] assert move_arm(-1, 2, 3) == False

[1470] assert move_arm(0, 0, 0) == True

[1471] 4. Test execution

[1472] When a user presses the "Run Test" button on the terminal, the server retrieves the saved test code and automatically runs the test using a test execution tool such as pytest. The terminal displays the test progress in real time.

[1473] 5. Collecting test results

[1474] The server collects the test results output from the test execution tools, extracts detailed results of successful and failed test cases, and analyzes them.

[1475] 6. Generate and send results report

[1476] The server automatically generates a report based on the test results, including the pass / fail status of each test case and detailed error messages, and sends the report to the user's terminal via email or a web interface.

[1477] Hardware and software used

[1478] Hardware: Factory robots

[1479] software:

[1480] Generative AI models (e.g., OpenAI GPT-4)

[1481] Test frameworks (e.g. pytest)

[1482] Server environment (e.g. AWS EC2)

[1483] Database (e.g. PostgreSQL)

[1484] Frontend (e.g. React.js)

[1485] As described above, the present invention provides a system that can detect bugs and errors in a robot motion control program at an early stage and improve quality.

[1486] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[1487] Step 1:

[1488] The user uploads the robot's motion control program from the terminal to the server. Specifically, the user uses a web interface or API to select a program file and send it to the server. In this case, the input is the program file, and the output is the program file saved on the server.

[1489] Step 2:

[1490] The server sends the received motion control program to the generative AI model for analysis. Specifically, the server passes the received program code to the generative AI model as a prompt statement and requests the generation of a test case. The input is the program code (prompt statement), and the output is the generated test case.

[1491] Step 3:

[1492] The generative AI model generates test cases based on the analysis, and then automatically generates test code based on them. Specifically, the generative AI model creates test code that includes the input and expected output for each function or method, and the server receives and stores this. The input is the test case, and the output is the test code.

[1493] Step 4:

[1494] The server retrieves the saved test code and automatically runs the tests using a test execution tool such as pytest. This process is triggered by the user pressing the "Run Test" button on the terminal. The input is the test code and the output is the test execution result.

[1495] Step 5:

[1496] The server collects the test results output from the test execution tool and analyzes the successful and failed test cases. Specifically, the server collects each item of the test results and identifies the locations where anomalies or errors occurred. The input is the test execution results, and the output is the analyzed test results.

[1497] Step 6:

[1498] The server automatically generates a result report based on the test results and sends it to the user's device. Specifically, the server creates a report based on the test results and delivers it to the user via email or a web interface. The input is the analyzed test results, and the output is the result report.

[1499] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.

[1500] The present invention is a system that automates a series of processes, from analyzing program code to automatically generating test code, executing tests, and reporting results, and further combines it with an emotion engine that analyzes user emotions to provide more personalized feedback. Each function of this system is realized by three main elements: a server, a terminal, and a user. Specific embodiments of the system are described below.

[1501] 1. Upload the source code

[1502] First, the user selects the source code file via a web interface or API to upload the source code from the terminal to the server, and when the user clicks the "Upload" button, the source code is sent to the server.

[1503] 2. Source code analysis

[1504] The server temporarily stores the received source code for analysis. The stored source code is then input into the generative model, which analyzes the function and method signatures, dependencies, logic flow, etc. in the program code. Based on the analysis results, the generative model identifies appropriate test cases.

[1505] 3. Automatic generation of test code

[1506] Based on the generated test cases, the generative model automatically generates test code, which is then stored in a database or file storage by the server and used later for test execution.

[1507] 4. Running the Test

[1508] The user presses the "Run Test" button on the terminal. This sends a request to the server to run the test. The server retrieves the saved test code and runs it using a test execution tool (e.g., pytest). The progress of the test is displayed in real time on the terminal.

[1509] 5. Collecting test results

[1510] The server collects the test results output by the test execution tools, extracts and analyzes the detailed results of the test cases that passed and failed.

[1511] 6. Analysis by Emotion Engine

[1512] Furthermore, the server analyzes the user's emotions using an emotion engine. The emotion engine analyzes the voice and text data entered by the user to identify the user's emotional state. For example, if the user enters text feedback, it can recognize emotions such as joy, surprise, and disappointment from the text.

[1513] 7. Generate and send results report

[1514] The server automatically generates a report based on the test results. This report includes the pass / fail status of each test case and detailed error messages. Furthermore, the report format and content can be customized based on the analysis results of the emotion engine. For example, if the user is disappointed, an encouraging message can be added.

[1515] Finally, the server sends the generated results report to the user's terminal, where it can be displayed via a web interface or delivered to the user as an email.

[1516] Specific examples

[1517] Uploading and analyzing source code

[1518] Suppose a user uploads the following source code:

[1519] python

[1520] def add(a, b):

[1521] return a + b

[1522] The server receives this source code and requests the generative model to analyze it. The generative model generates the following test case from the input and output of the add function:

[1523] Test code generation

[1524] The test code based on the generated test cases is as follows:

[1525] python

[1526] def test_add():

[1527] assert add(1, 2) == 3

[1528] assert add(-1, 1) == 0

[1529] assert add(0, 0) == 0

[1530] The server receives this test code and stores it in a database.

[1531] Test execution and reporting

[1532] When the user presses the "Run Test" button, the server retrieves the saved test code and automatically runs the test using pytest. The test results are displayed as follows:

[1533] Test Results Report

[1534] -------------------

[1535] All tests were successful.

[1536] Analysis and customization with emotion engine

[1537] If the user enters feedback such as "I'm not satisfied with the test results," the server uses an emotion engine to recognize the emotion "disappointment," and adds an encouraging message to the result report.

[1538] Test Results Report

[1539] -------------------

[1540] All tests were successful.

[1541] comment:

[1542] Thank you for your hard work. Let's do our best next time!

[1543] According to the above embodiment, the present system realizes efficient and high-quality automation of unit tests and provides individualized feedback to users.

[1544] The processing flow will be explained below.

[1545] Step 1:

[1546] Users use a web interface or API to upload source code from their device to the server. When the user clicks the "Upload" button, the source code is sent to the server.

[1547] Step 2:

[1548] The server receives the source code sent by the user and temporarily stores it for analysis, using a database or a temporary file system.

[1549] Step 3:

[1550] The server inputs the stored source code into the generative model and begins analyzing the program code. The generative model analyzes the signatures of functions and methods in the program code, dependencies, logic flow, etc.

[1551] Step 4:

[1552] The generative model generates test cases based on the analysis results, where each test case contains the expected output for a particular input.

[1553] Step 5:

[1554] The server automatically generates test code from the generated test cases and saves it in a database or file storage. The saved test code is used in later steps.

[1555] Step 6:

[1556] The user presses the "Test execution" button via the terminal, which sends a test execution request to the server.

[1557] Step 7:

[1558] The server retrieves the stored test code and starts running the test using a test execution tool (e.g., pytest, unittest). The status of the test execution is sent to the terminal in real time.

[1559] Step 8:

[1560] The server collects the test results output by the test execution tools, including the pass / fail status, error messages, and execution time for each test case.

[1561] Step 9:

[1562] The server uses an emotion engine to analyze the user's emotions, analyzing text and voice feedback entered by the user to identify their emotional state.

[1563] Step 10:

[1564] The server automatically generates a report based on the test results and sentiment analysis results, which includes detailed results for each test case as well as customized messages based on the user's sentiment.

[1565] Step 11:

[1566] The server sends the generated results report to the user's terminal, where it can be displayed via a web interface or delivered to the user as an email.

[1567] A specific example is the following flow:

[1568] Upload source code:

[1569] A user uploads the following source code:

[1570] python

[1571] def add(a, b):

[1572] return a + b

[1573] Analyzing source code and generating test code:

[1574] The server analyzes this source code and the generative model generates the following test cases:

[1575] python

[1576] def test_add():

[1577] assert add(1, 2) == 3

[1578] assert add(-1, 1) == 0

[1579] assert add(0, 0) == 0

[1580] The generated test code is stored on the server.

[1581] Run the test and collect the results:

[1582] When the user presses the "Run Test" button, the server runs the tests using pytest and collects the results, which look something like this:

[1583] All test cases were successful.

[1584] Sentiment analysis with emotion engine:

[1585] When a user enters feedback such as "I'm not satisfied with the test results," the server's emotion engine recognizes the emotion "disappointment."

[1586] Results report generation and distribution:

[1587] The server generates a report based on the test results and sentiment analysis results, as shown below.

[1588] Test Results Report

[1589] -------------------

[1590] All tests were successful.

[1591] comment:

[1592] Thank you for your hard work. Let's do our best next time!

[1593] The results report is sent to the user's device and displayed via email or web interface.

[1594] Through the above process, this system achieves efficient and high-quality automation of unit tests and provides individualized feedback to users.

[1595] Example 2

[1596] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[1597] Conventional test code generation and test execution systems require manual analysis of program code, creation and execution of test code, which is time-consuming and laborious. Additionally, responses to user feedback are not personalized, which hinders the improvement of the user experience.

[1598] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[1599] In this invention, the server includes means for analyzing program code using a generative model and automatically generating test code, means for saving the automatically generated test code, means for executing the saved test code and collecting test results, means for automatically generating a result report based on the test results, means for outputting or distributing the result report, means for analyzing user emotions, and means for customizing the format and content of the result report based on the emotion analysis results, thereby enabling efficient and high-quality test automation and providing individualized feedback to users.

[1600] A "generative model" is an algorithm or system that uses machine learning or artificial intelligence to analyze program code or data and automatically generate a specific result or output.

[1601] "Program code" is a set of instructions written to cause a computer to perform a particular operation.

[1602] "Test code" is code written to check whether program code works as expected.

[1603] "Auto-generated" refers to a system or algorithm automatically creating a product without human intervention.

[1604] "Test results" are the results obtained when test code is executed, including the success or failure status of each test case.

[1605] A "Result Report" is a document summarizing the test results, including details such as success / failure status and error messages.

[1606] "Sentiment analysis" is the process of identifying an emotional state (e.g., joy, disappointment, surprise, etc.) from a user's input data.

[1607] A "format" defines the structure and layout of a document or data.

[1608] "Customization" refers to adapting or modifying the content or format of a system or document to suit specific needs or requirements.

[1609] "User" refers to a person or entity that uses the system.

[1610] A "server" is a computer system that receives requests from clients and processes data or provides services in response to the requests.

[1611] "Terminal" refers to a device that a user directly operates to interface with a system.

[1612] The present invention is a system that automates a series of processes, from program code analysis to automatic test code generation, test execution, result reporting, and user sentiment analysis. How this system is implemented will be specifically described below.

[1613] Hardware and Software Configuration

[1614] This system is configured using the following hardware and software.

[1615] 1. Server

[1616] It analyzes program code, automatically generates test code, executes tests, automatically generates result reports, and performs sentiment analysis.

[1617] Software used: analysis libraries (e.g., Python's AST module), generative AI models (e.g., GPT), test execution tools (e.g., pytest), sentiment analysis engines (e.g., IBM Watson Tone Analyzer).

[1618] 2. Terminal

[1619] It provides an interface for users to upload source code, run tests, and provide feedback.

[1620] Hardware used: PC, smartphone, tablet, etc.

[1621] Software used: Web browser or API client.

[1622] 3. Users

[1623] Upload source code, run tests, and provide feedback.

[1624] Processing flow and specific examples

[1625] 1. Upload the source code

[1626] The user selects the source code file through a web interface or API provided using the terminal and presses the "Upload" button, which sends the source code to the server as an HTTP POST request.

[1627] 2. Source code analysis

[1628] The server temporarily stores the received source code. The stored source code is then input into a generative AI model, which analyzes the program code's function and method signatures, dependencies, and logic flow. An example of a prompt is as follows:

[1629] Generate a test case for the following code:

[1630] def add(a, b):

[1631] return a + b

[1632] 3. Automatic generation of test code

[1633] The generative AI model generates appropriate test cases based on the analysis results, and the generated test code is stored in a database or file storage by the server.

[1634] 4. Running the Test

[1635] When the user presses the "Run Test" button, the server retrieves the saved test code and runs it using a test execution tool, for example, pytest, and displays the progress in real time on the terminal.

[1636] 5. Collecting test results

[1637] The server collects the test results output by the test execution tools, extracts details of successful and failed test cases, and analyzes them.

[1638] 6. Analysis by Emotion Engine

[1639] The server uses an emotion analysis engine to analyze the feedback entered by the user and identify their emotional state. For example, if the user enters "I'm not satisfied with the test results," the server recognizes the emotion "disappointed."

[1640] 7. Generate and send results report

[1641] The server automatically generates a report based on the test results and sentiment analysis results, customizes the report format and content, and displays the report via a web interface or sends it to the user via email.

[1642] As a result, this system realizes efficient and high-quality automation of unit tests and provides individualized feedback to users.

[1643] The flow of the identification process in the second embodiment will be described with reference to FIG.

[1644] Step 1:

[1645] The user selects a source code file through a web interface or API provided on the terminal and presses the "Upload" button. The input data is the source code file selected by the user, which is sent to the server as an HTTP POST request. At this time, the file data is sent to the server as multipart form data. The output after sending is that the server receives and saves the source code file.

[1646] Step 2:

[1647] The server temporarily stores the received source code. Next, the server inputs this source code into a generative AI model, which analyzes the function and method signatures, dependencies, and logic flow of the program code. The input data is the stored source code, and the server performs syntax analysis using an analysis library (for example, the AST module in Python). It creates and sends the following prompt to the generative AI model:

[1648] Generate a test case for the following code:

[1649] def add(a, b):

[1650] return a + b

[1651] The output is the text data of the test cases returned by the generative AI model.

[1652] Step 3:

[1653] The server automatically generates test code based on the test cases returned by the generative AI model. The input data is the text data of the test cases returned by the generative AI model, and the server saves this as a Python file (e.g., test_code.py). The saved test code is used in subsequent test runs. The output is the saved test code file.

[1654] Step 4:

[1655] The user presses the "Run Test" button on the terminal, requesting the server to run the test. The server retrieves the saved test code and runs it using a test execution tool (e.g., pytest). The input data is the test code file that received the request, and the server executes the following command:

[1656] sh

[1657] pytest test_code.py

[1658] The output is a test result report file generated from the test execution tool.

[1659] Step 5:

[1660] The server collects test results output from the test execution tools. The input data is the report file (e.g., XML or JSON format) generated by the test execution tools, which the server parses to extract details of passed and failed test cases. The output is a dataset of detailed test results.

[1661] Step 6:

[1662] The server uses a sentiment analysis engine to analyze the user's sentiment. The input data is text data entered by the user as feedback, for example, "I'm not satisfied with the test results." The server uses the sentiment analysis engine to identify the emotional state (e.g., disappointment) from this text. The output is the analyzed emotional state data.

[1663] Step 7:

[1664] The server automatically generates a result report based on the test results and the sentiment analysis results. The input data are the detailed test results and the user sentiment analysis results, and the server customizes the format and content of the report based on this. For example, if disappointment is recognized, the server adds an encouraging message such as "Try harder next time!" The generated result report is displayed through a web interface or sent to the user via email. The output is the final result report.

[1665] (Application example 2)

[1666] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[1667] Conventional automatic test generation systems perform a series of processes, from analyzing program code to automatically generating test code, executing it, and reporting the results, but they do not provide feedback or customize reports based on the user's emotional state. As a result, they are unable to provide feedback that takes into account how the user feels about the results, which is a problem particularly in environments where errors can have serious consequences, such as electronic devices and factory control systems.

[1668] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.

[1669] In this invention, the server includes means for analyzing program code using a generative model and automatically generating test code, means for saving the automatically generated test code, means for executing the saved test code and collecting test results, means for analyzing user emotions, means for automatically generating a result report based on the test results and the user emotion analysis results, and means for outputting or distributing the result report, thereby enabling the generation of a result report that includes personalized feedback that takes into account the user's emotional state.

[1670] A "generative model" is an artificial intelligence program that analyzes program code and generates appropriate test cases.

[1671] "Program code" is a written instruction or collection of instructions for carrying out a computer program.

[1672] "Test code" is automatically generated verification code for verifying the operation of program code.

[1673] "Storage" means to record data temporarily or permanently on a recording medium.

[1674] "Test results" are the success or failure information and detailed error messages obtained by executing the test code.

[1675] "Emotion analysis" is the process of analyzing voice and text data to identify a user's emotional state.

[1676] "Result Report" means a report automatically generated based on the test results and sentiment analysis results, which includes the success / failure status and detailed error messages.

[1677] "Output or distribution" refers to the act of displaying the result report in a form that can be viewed by the user or sending it by means of e-mail or the like.

[1678] The present invention provides a system that uses a generative model to analyze program code, automates the process from automatically generating test code to executing it, collecting the results, and providing personalized feedback in order to improve the quality check function of factory robots. Specific embodiments of the system are described below.

[1679] 1. Upload the source code

[1680] The user selects the source code file via a web interface or API, which uploads the source code from the terminal to the server. When the user clicks the "Upload" button, the source code is sent to the server.

[1681] 2. Source code analysis

[1682] The server temporarily stores the received source code for analysis, then inputs the stored source code into the generative model, which analyzes the signatures of functions and methods in the program code, dependencies, logic flow, etc. Based on this, the generative model generates appropriate test cases.

[1683] 3. Automatic generation of test code

[1684] Based on the analysis results, the generative model automatically generates test code. The generated test code is stored in a database or file storage by the server. The stored test code is then used later when executing the test.

[1685] 4. Running the Test

[1686] The user presses the "Run Test" button on the terminal. This sends a request to the server to run the test. The server retrieves the saved test code and runs it using a test execution tool (e.g., pytest). The progress of the test is displayed in real time on the terminal.

[1687] 5. Collecting test results

[1688] The server collects the test results output by the test execution tools, extracts and analyzes the detailed results of the test cases that passed and failed.

[1689] 6. Analysis by Emotion Engine

[1690] Furthermore, the server analyzes the user's emotions using an emotion engine. The emotion engine analyzes the voice and text data entered by the user to identify the user's emotional state. For example, if the user enters text feedback, it can recognize emotions such as joy, surprise, and disappointment from the text.

[1691] 7. Generate and send results report

[1692] The server automatically generates a result report based on the test results and sentiment analysis results. The result report includes the success or failure status of each test case and a detailed error message. Furthermore, the report content is customized according to the analysis results of the sentiment engine. For example, if the user is disappointed, an encouraging message is added. Finally, the server sends the generated result report to the user's device. The report can be displayed via a web interface or delivered to the user via email.

[1693] Specific examples

[1694] Uploading and analyzing source code

[1695] Suppose a user uploads the following source code:

[1696] python

[1697] def add(a, b):

[1698] return a + b

[1699] The server receives this source code and requests the generative model to analyze it. The generative model generates the following test case from the input and output of the add function:

[1700] Test code generation

[1701] The test code based on the generated test cases is as follows:

[1702] python

[1703] def test_add():

[1704] assert add(1, 2) == 3

[1705] assert add(-1, 1) == 0

[1706] assert add(0, 0) == 0

[1707] The server receives this test code and stores it in a database.

[1708] Test execution and reporting

[1709] When the user presses the "Run Test" button, the server retrieves the saved test code and automatically runs the test using pytest. The test results are displayed as follows:

[1710] Test Results Report

[1711] -------------------

[1712] All tests were successful.

[1713] Analysis and customization with emotion engine

[1714] If the user enters feedback such as "I'm not satisfied with the test results," the server uses an emotion engine to recognize the emotion "disappointment," and adds an encouraging message to the result report.

[1715] Test Results Report

[1716] -------------------

[1717] All tests were successful.

[1718] comment:

[1719] Thank you for your hard work. Let's do our best next time!

[1720] In this way, the present invention realizes a system that highly automates the quality check process of factory robots and provides feedback according to the user's emotions.

[1721] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[1722] Step 1:

[1723] The user uploads source code from their device to the server by selecting the source code file via the web interface or API and clicking the "Upload" button. The input data is the program code, and the data is temporarily sent to a storage location on the server. The source code is then saved on the server.

[1724] Step 2:

[1725] The server temporarily stores the received source code for analysis. Next, this stored source code is input into a generative model, which analyzes the signatures of functions and methods in the program code, dependencies, logic flow, etc. The input data is the source code, and the output data is the analysis results, and the data is processed using the generative model. This results in the identification of appropriate test cases.

[1726] Step 3:

[1727] The generative model automatically generates test code based on the analysis results. The generated test cases are converted into test code and saved in a database or file storage by the server. The input data is the analysis results, and the output data is the test code. This allows the necessary test code to be automatically generated and saved.

[1728] Step 4:

[1729] The user presses the "Run Test" button on the terminal. This sends a request to the server to run the test. The server retrieves the saved test code and runs the test using a test execution tool (e.g., pytest). The input data is the test code, and the output data is the test results. This executes the test code and obtains the results.

[1730] Step 5:

[1731] The server collects the test results output from the test execution tool. It extracts and analyzes the detailed results of successful and failed test cases. The input data is the test results, and the output data is the analysis results. This allows for detailed analysis of the test results.

[1732] Step 6:

[1733] The server uses an emotion engine to analyze the user's emotions. The emotion engine analyzes the voice or text data input by the user and identifies the user's emotional state. The input data is text or voice data, and the output data is the emotion analysis result. This allows the user's emotional state to be identified.

[1734] Step 7:

[1735] The server automatically generates a result report based on the test results and sentiment analysis results. This result report includes the success / failure status of each test case and detailed error messages. Furthermore, the report content is customized according to the sentiment analysis results. The input data are the test results and sentiment analysis results, and the output data is the result report. This allows for the generation of a personalized result report.

[1736] Step 8:

[1737] The server sends the generated result report to the user's terminal. The report is displayed through a web interface or delivered to the user as an email. The input data is the result report, and the output data is the report the user receives. This is how the result report is delivered.

[1738] The specific processing unit 290 transmits the result of the specific processing to the robot 414. In the robot 414, the control unit 46A causes the speaker 240 and the control target 443 to output the result of the specific processing. The microphone 238 acquires voice indicating a user input regarding the result of the specific processing. The control unit 46A transmits voice data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the voice data.

[1739] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[1740] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the robot 414.

[1741] The emotion identification model 59 as an emotion engine may determine the user's emotion according to a specific mapping. Specifically, the emotion identification model 59 may determine the user's emotion according to an emotion map (see FIG. 9), which is a specific mapping. Similarly, the emotion identification model 59 may determine the robot's emotion, and the identification processing unit 290 may perform identification processing using the robot's emotion.

[1742] FIG. 9 is a diagram illustrating an emotion map 400 on which multiple emotions are mapped. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. Emotions closer to the center of the concentric circles are more primitive. Emotions representing states and actions arising from a state of mind are arranged on the outer edges of the concentric circles. The concept of emotion includes both affect and mental states. Emotions generally generated from reactions occurring in the brain are arranged on the left side of the concentric circles. Emotions generally induced by situational judgment are arranged on the right side of the concentric circles. Emotions generally generated from reactions occurring in the brain and induced by situational judgment are arranged on the upper and lower sides of the concentric circles. Furthermore, the emotion of "pleasure" is arranged on the upper side of the concentric circles, and the emotion of "discomfort" is arranged on the lower side. In this way, in the emotion map 400, multiple emotions are mapped based on the structure by which emotions are generated, and emotions that tend to occur simultaneously are mapped close to each other.

[1743] These emotions are distributed in the 3 o'clock direction on emotion map 400, and typically fluctuate between relief and anxiety. In the right half of emotion map 400, situational awareness dominates over internal sensations, resulting in a sense of calm.

[1744] The inside of emotion map 400 represents what is going on in the mind, and the outside of emotion map 400 represents behavior, so the further you go outside emotion map 400, the more visible the emotions become (the more they are expressed in behavior).

[1745] Human emotions are based on various balances, such as posture and blood sugar levels. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. Emotions can also be created for robots, automobiles, and motorcycles, based on various balances, such as posture and remaining battery life. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. An emotion map can be generated, for example, based on Dr. Mitsuyoshi's emotion map (Research on Voice Emotion Recognition and Emotional Brain Physiological Signal Analysis Systems, Tokushima University, Doctoral Dissertation: https: / / ci.nii.ac.jp / naid / 500000375379). The left half of the emotion map lists emotions belonging to the "reaction" domain, where sensation is dominant. The right half of the emotion map lists emotions belonging to the "situation" domain, where situational awareness is dominant.

[1746] The emotion map defines two emotions that promote learning. One is a negative emotion on the situation side, around the middle of "repentance" or "reflection." In other words, this occurs when the robot experiences negative emotions such as "I never want to feel this way again" or "I don't want to be scolded again." The other is a positive emotion on the response side, around "desire." In other words, this occurs when the robot experiences positive feelings such as "I want more" or "I want to know more."

[1747] The emotion identification model 59 inputs user input into a pre-trained neural network, obtains emotion values ​​indicating each emotion shown in the emotion map 400, and determines the user's emotion. This neural network is pre-trained based on multiple pieces of training data that are combinations of user input and emotion values ​​indicating each emotion shown in the emotion map 400. Furthermore, this neural network is trained so that emotions that are located close to each other have similar values, as in the emotion map 900 shown in FIG. 10. FIG. 10 shows an example in which multiple emotions, "relieved," "calm," and "reassuring," have similar emotion values.

[1748] The system according to the present disclosure has been described above mainly with respect to the functions of the data processing device 12, but the system according to the present disclosure is not necessarily implemented on a server. The system according to the present disclosure may be implemented as a general information processing system. The present disclosure may be implemented, for example, as a software program running on a personal computer or an application running on a smartphone, etc. The method according to the present disclosure may be provided to users in the form of SaaS (Software as a Service).

[1749] In the above embodiment, an example was given in which the specific processing is performed by one computer 22, but the technology of the present disclosure is not limited to this, and the specific processing may be distributed and performed by a plurality of computers including the computer 22. For example, the data generation model 58 may be provided in an external device of the data processing device 12, and data may be generated in the external device in accordance with input data.

[1750] In the above embodiment, an example in which the specific processing program 56 is stored in the storage 32 has been described, but the technology of the present disclosure is not limited to this. For example, the specific processing program 56 may be stored in a portable, computer-readable, non-transitory storage medium such as a USB (Universal Serial Bus) memory. The specific processing program 56 stored in the non-transitory storage medium is installed in the computer 22 of the data processing device 12. The processor 28 executes the specific processing in accordance with the specific processing program 56.

[1751] Alternatively, the specific processing program 56 may be stored in a storage device such as a server connected to the data processing device 12 via the network 54, and the specific processing program 56 may be downloaded and installed on the computer 22 in response to a request from the data processing device 12.

[1752] It is not necessary to store all of the specific processing program 56 in a storage device such as a server connected to the data processing device 12 via the network 54, or to store all of the specific processing program 56 in the storage 32; only a portion of the specific processing program 56 may be stored.

[1753] The hardware resource for executing a specific process can be any of the following processors: An example of a processor is a CPU, which is a general-purpose processor that functions as a hardware resource for executing a specific process by executing software, i.e., a program. Another example of a processor is a dedicated electrical circuit, such as an FPGA (Field-Programmable Gate Array), a PLD (Programmable Logic Device), or an ASIC (Application Specific Integrated Circuit), which is a processor with a circuit configuration designed specifically for executing a specific process. Each processor has built-in or connected memory, and each processor uses the memory to execute the specific process.

[1754] The hardware resource that executes the specific processing may be configured with one of these various processors, or may be configured with a combination of two or more processors of the same or different types (for example, a combination of multiple FPGAs, or a combination of a CPU and an FPGA). Also, the hardware resource that executes the specific processing may be a single processor.

[1755] As an example of a system configured with a single processor, first, one processor is configured by combining one or more CPUs and software, and this processor functions as a hardware resource that executes a specific process. Second, there is a system that uses a processor that realizes the functions of an entire system including multiple hardware resources that execute a specific process on a single IC chip, as typified by SoC (System-on-a-chip). In this way, a specific process is realized using one or more of the above-mentioned various processors as hardware resources.

[1756] Furthermore, the hardware structure of these various processors can be, more specifically, an electric circuit that combines circuit elements such as semiconductor devices. The specific processing described above is merely an example. Therefore, it goes without saying that unnecessary steps may be deleted, new steps may be added, or the processing order may be rearranged, without departing from the spirit of the invention.

[1757] The above-described description and illustrations are a detailed explanation of the parts related to the technology of the present disclosure and are merely an example of the technology of the present disclosure. For example, the above description of the configuration, functions, actions, and effects is an explanation of an example of the configuration, functions, actions, and effects of the parts related to the technology of the present disclosure. Therefore, it goes without saying that unnecessary parts may be deleted, new elements may be added, or replacements may be made to the above-described description and illustrations within the scope of the gist of the technology of the present disclosure. Furthermore, to avoid confusion and facilitate understanding of the parts related to the technology of the present disclosure, the above-described description and illustrations omit explanations of common technical knowledge that do not require particular explanation to enable the implementation of the technology of the present disclosure.

[1758] All publications, patent applications, and technical standards mentioned in this specification are herein incorporated by reference to the same extent as if each individual publication, patent application, or technical standard was specifically and individually indicated to be incorporated by reference.

[1759] The following is further disclosed regarding the above embodiment.

[1760] (Claim 1)

[1761] A means for analyzing program code using a generative model and automatically generating test code;

[1762] A means to store the automatically generated test code;

[1763] means for executing the stored test code and collecting test results;

[1764] means for automatically generating a result report based on the test results;

[1765] A system that includes a means for outputting or distributing a result report.

[1766] (Claim 2)

[1767] 2. The system of claim 1, wherein the generative model analyzes function and method signatures of program code and generates appropriate test cases.

[1768] (Claim 3)

[1769] 10. The system of claim 1, further comprising: a test execution tool that uses the generated test code to automatically execute the test.

[1770] (Claim 4)

[1771] 10. The system of claim 1, wherein the results report includes detailed information about successful and failed tests.

[1772] (Claim 5)

[1773] 10. The system of claim 1, further comprising means for storing the stored test code and generated result reports in a database.

[1774] "Example 1"

[1775] (Claim 1)

[1776] a means for users to upload source code;

[1777] A means for analyzing program code using a generative AI model to extract test cases;

[1778] A means for automatically generating test code based on the test cases extracted using the generative AI model;

[1779] A means of storing the automatically generated test code in a database or file storage;

[1780] A means for a user to instruct test execution, and for a server to retrieve the stored test code and call a test execution tool to automatically execute the test;

[1781] a means for collecting test results and automatically generating a report of the results;

[1782] means for outputting or distributing the generated result report to a user's terminal;

[1783] A system including:

[1784] (Claim 2)

[1785] 10. The system of claim 1, wherein the generative AI model analyzes function and method signatures in program code and generates appropriate test cases.

[1786] (Claim 3)

[1787] 10. The system of claim 1, wherein the system generates test code based on the test cases generated by the generative AI model and executes the tests using a test execution tool.

[1788] "Application Example 1"

[1789] Claim Revision

[1790] (Claim 1)

[1791] A means for analyzing a robot's motion control program using the generative model and automatically generating test code;

[1792] A means to store the automatically generated test code;

[1793] means for executing the stored test code and collecting test results;

[1794] means for automatically generating a result report based on the test results;

[1795] A system that includes a means for outputting or distributing a result report.

[1796] (Claim 2)

[1797] 2. The system of claim 1, wherein the generative model analyzes signatures of functions and methods of an operation control program and generates appropriate test cases.

[1798] (Claim 3)

[1799] 10. The system of claim 1, further comprising: a test execution tool that uses the generated test code to automatically execute the test.

[1800] "Example 2: Combining Emotion Engines"

[1801] (Claim 1)

[1802] A means for analyzing program code using a generative model and automatically generating test code;

[1803] A means to store the automatically generated test code;

[1804] means for executing the stored test code and collecting test results;

[1805] means for automatically generating a result report based on the test results;

[1806] a means for outputting or distributing a result report;

[1807] means for analyzing user emotions;

[1808] The system includes a means for customizing the format and content of the results report based on the sentiment analysis results.

[1809] (Claim 2)

[1810] 2. The system of claim 1, wherein the generative model analyzes signatures of functions and methods in program code, generates appropriate test cases, and automatically generates test code based on the generated test cases.

[1811] (Claim 3)

[1812] 10. The system of claim 1, further comprising: means for calling a test execution tool using the generated test code to automatically execute the test; and means for displaying test progress to a user in real time.

[1813] "Application example 2 when combining emotion engines"

[1814] (Claim 1)

[1815] A means for analyzing program code using a generative model and automatically generating test code;

[1816] A means to store the automatically generated test code;

[1817] means for executing the stored test code and collecting test results;

[1818] means for analyzing user emotions;

[1819] means for automatically generating a result report based on the test results and the user's sentiment analysis results;

[1820] A system that includes a means for outputting or distributing a result report.

[1821] (Claim 2)

[1822] 2. The system of claim 1, wherein the generative model analyzes function and method signatures of program code and generates appropriate test cases.

[1823] (Claim 3)

[1824] 10. The system of claim 1, further comprising: a test execution tool that uses the generated test code to automatically execute the test. [Explanation of symbols]

[1825] 10, 210, 310, 410 Data Processing Systems 12 Data Processing Device 14 Smart Devices 214 Smart Glasses 314 Headset-type terminal 414 Robot< / url:> < / url:> < / url:> < / url:>

Claims

1. A means for analyzing program code using a generative model and automatically generating test code; A means to store the automatically generated test code; means for executing the stored test code and collecting test results; means for automatically generating a result report based on the test results; A system that includes a means for outputting or distributing a result report.

2. The system of claim 1 , wherein the generative model analyzes function and method signatures of program code and generates appropriate test cases.

3. The system of claim 1 , further comprising: a test execution tool that uses the generated test code to automatically execute the test.

4. The system of claim 1 , wherein the results report includes detailed information about successful and failed tests.

5. 2. The system of claim 1, further comprising means for storing the stored test code and generated result reports in a database.

Citation Information

Patent Citations

  • Persona chatbot control method and system

    JP2022180282A