Test precondition data derivation apparatus and test precondition data derivation method

The test premise data derivation device uses machine learning to automate the generation of SQL statements and file storage for test preparation, addressing the inefficiencies of manual creation and reducing testing time for large-scale systems.

JP2025170862APending Publication Date: 2025-11-20NEC CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024075661
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-05-08
Publication Date
2025-11-20

AI Technical Summary

Technical Problem

Creating test premise data, such as SQL statements and files, for a system under test is time-consuming and labor-intensive, especially for large-scale systems, as it requires manual determination of data registration and storage locations based on test content.

Method used

A test premise data derivation device and method utilizing machine learning to generate a model for deriving test premise data, including SQL statements and file storage, based on teacher data and input test cases.

Benefits of technology

Facilitates easy and efficient derivation of test premise data, reducing testing time and requiring minimal database knowledge, even for complex systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025170862000001_ABST
    Figure 2025170862000001_ABST
Patent Text Reader

Abstract

To provide a test precondition data derivation apparatus capable of easily deriving test precondition data corresponding to a test case.SOLUTION: Teacher data storage means stores teacher data used when generating, by machine learning, a model for deriving test precondition data that is either an SQL statement for registering data in a database of a system under test before execution of a test, or a file to be stored in a predetermined folder of the system under test before execution of the test, or both. Machine learning means generates a model for deriving the test precondition data by machine learning using the teacher data. Test precondition data derivation means derives test precondition data corresponding to a test case by applying the input test case to the model.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to a test premise data derivation device, a test premise data derivation method, and a test premise data derivation program. [Background technology]

[0002] Patent Document 1 describes a test support system that generates test data that is data that a test program inputs into a system. [Prior art documents] [Patent documents]

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

[0004] A test case includes, for example, what should be checked in the test, the procedure for executing the test, and the test results that should be obtained.

[0005] Furthermore, before a test is executed, data must be registered in a database of the system under test, or a file must be stored in a predetermined folder of the system under test.

[0006] Either or both of the SQL (Structured Query Language) statements for registering data in the database of the system under test before executing a test, or the files that should be stored in a specified folder of the system under test before executing a test, are referred to as test premise data. In other words, "test premise data" is defined as either or both of the SQL statements for registering data in the database of the system under test before executing a test, or the files that should be stored in a specified folder of the system under test before executing a test.

[0007] The SQL statement includes the data to be registered in the database.

[0008] The data to be registered in the database using SQL statements that correspond to the test premise data and the files to be stored in the specified folder depend on the content of the test. Also, whether data needs to be registered in the database of the system under test before the test is executed, whether files need to be stored in the specified folder, or whether data needs to be registered in the database and files need to be stored in the specified folder also depends on the content of the test.

[0009] The file formats of the files to be stored in the predetermined folder include, for example, PDF format, TXT format, JPEG format, etc., but the file formats are not limited to these examples.

[0010] Generally, the test premise data is created by an operator after the test cases are created. Creating the test premise data by an operator takes time due to the large scale of the system under test, etc.

[0011] Furthermore, when the test premise data is an SQL statement, it takes time to determine which data should be registered in which table in the database, so creating the test premise data is particularly time-consuming.

[0012] Furthermore, Patent Document 1 does not disclose a technique for generating premise test data.

[0013] Therefore, an object of the present disclosure is to provide a test premise data derivation device, a test premise data derivation method, and a test premise data derivation program that can easily derive test premise data according to a test case. [Means for solving the problem]

[0014] The test premise data derivation device according to the present disclosure is characterized by comprising a teacher data storage means for storing teacher data used when generating, by machine learning, a model for deriving test premise data, which is either an SQL (Structured Query Language) statement for registering data in a database of a system to be tested before a test is executed, or a file to be stored in a specified folder of the system to be tested before a test is executed, or both; a machine learning means for generating, by machine learning, a model for deriving test premise data using the teacher data; and a test premise data derivation means for deriving test premise data corresponding to a test case by applying an input test case to the model.

[0015] The test premise data derivation method disclosed herein is characterized in that a computer equipped with a training data storage means for storing training data used when generating, by machine learning, a model for deriving test premise data, which is either an SQL (Structured Query Language) statement for registering data in a database of a system under test before a test is executed, or a file to be stored in a specified folder of the system under test before a test is executed, or both, uses the training data to generate, by machine learning, a model for deriving test premise data, and derives test premise data corresponding to the test case by applying an input test case to the model.

[0016] The test premise data derivation program of the present disclosure causes a computer equipped with a teacher data storage means for storing teacher data used when generating, by machine learning, a model for deriving test premise data, which is either an SQL (Structured Query Language) statement for registering data in a database of a system to be tested before a test is executed, or a file to be stored in a specified folder of the system to be tested before a test is executed, or both, to execute a machine learning process that uses the teacher data to generate, by machine learning, a model for deriving test premise data, and a test premise data derivation process that derives test premise data corresponding to a test case by applying an input test case to the model. [Effects of the Invention]

[0017] According to the present disclosure, test premise data corresponding to a test case can be easily derived. [Brief explanation of the drawings]

[0018] [Figure 1] 1 is a block diagram illustrating a configuration example of a test premise data derivation device according to the present disclosure. [Figure 2] 10 is a flowchart illustrating an example of a process flow of the test premise data derivation device according to the present disclosure. [Figure 3] FIG. 1 is a schematic block diagram illustrating an example of the configuration of a computer related to a test premise data derivation device. [Figure 4] 1 is a block diagram showing an overview of a test premise data derivation device according to the present disclosure; DETAILED DESCRIPTION OF THE INVENTION

[0019] Hereinafter, embodiments according to the present disclosure will be described with reference to the drawings.

[0020] First, let's talk about the system under test. The system under test is the system that will be tested. Before the test is executed, the system under test has a database where data is registered using SQL statements that correspond to the test premise data, and a folder where files that correspond to the test premise data are stored. The system under test may also be a system consisting of multiple systems.

[0021] A test premise data derivation device according to the present disclosure derives test premise data. An operator registers data in a database of a system under test using an SQL statement corresponding to the test premise data derived by the test premise data derivation device, or stores a file corresponding to the test premise data derived by the test premise data derivation device in a predetermined folder of the system under test. Then, a test is executed in the system under test according to the test case.

[0022] 1 is a block diagram showing an example of the configuration of a test premise data derivation device according to the present disclosure. The test premise data derivation device 10 includes a teacher data storage unit 1, a machine learning unit 2, an input unit 3, a test premise data derivation unit 4, and an output unit 5.

[0023] The teacher data storage unit 1 is a storage device that stores teacher data.

[0024] The training data in the present disclosure is training data used when generating, by machine learning, a model for deriving test premise data when a test case is applied.

[0025] The training data includes a set of test premise data created by an operator for the system under test, a test case corresponding to the test premise data, test execution data which is data input into the system under test when the test is executed, and test results.

[0026] The test cases include test cases for checking normal operation and test cases for checking abnormal operation.

[0027] For example, to log in successfully, a string consisting of only alphanumeric characters must be entered into the login screen. In this case, for example, test cases for checking the behavior when a string is entered into the login screen include a test case in which a string consisting of only alphanumeric characters is entered into the login screen, and a test case in which a string including hiragana is entered into the login screen. The former is a test case for checking normal behavior, and the latter is a test case for checking abnormal behavior. Furthermore, the test execution data (data entered into the system under test when the test is executed) corresponding to the former test case is a string consisting of only alphanumeric characters, and the test execution data corresponding to the latter test case is a string including hiragana.

[0028] As described above, the training data includes sets of "test premise data," "test cases," "test execution data," and "test results." In this case, the training data includes sets corresponding to test cases for confirming normal behavior and sets corresponding to test cases for confirming abnormal behavior. Both sets are data created by an operator for the system under test.

[0029] The test premise data derivation device according to the present disclosure is a device that derives test premise data, but the test premise data included in the training data is created by an operator.

[0030] The training data further includes source code and configuration files of a program for operating the system under test.

[0031] The training data also includes the schema of the database provided in the system under test.

[0032] Furthermore, if the system under test is a system consisting of multiple systems, the training data also includes API (Application Programming Interface) specifications between the multiple systems.

[0033] The above-mentioned teacher data is prepared in advance by an operator and stored in the teacher data storage unit 1 in advance.

[0034] The machine learning unit 2 generates a model for deriving premise test data through machine learning using the training data stored in the training data storage unit 1. The machine learning unit 2 generates the model when, for example, an operator inputs a command to generate the model.

[0035] Test cases created by an operator are input to the input unit 3. The input unit 3 may be realized by, for example, a data reading device that reads test cases recorded on a data recording medium such as an optical disk. However, the input unit 3 is not limited to such a data reading device, and may be an input device such as a keyboard that allows the operator to input test cases.

[0036] The test premise data derivation unit 4 applies the test case input via the input unit 3 to the model generated by the machine learning unit 2, thereby deriving test premise data corresponding to the test case.

[0037] The test premise data derivation unit 4 stores a pair of an input test case and the test premise data corresponding to that test case in the teacher data storage unit 1. This pair of test case and test premise data is accumulated as part of the teacher data in the teacher data storage unit 1. When a certain number of pairs of test cases and test premise data have been accumulated in the teacher data storage unit 1, the machine learning unit 2 may re-learn the model by machine learning in accordance with an instruction from an operator.

[0038] The output unit 5 is, for example, a data writing device that writes the test premise data derived by the test premise data derivation unit 4 onto a data recording medium such as an optical disk. Note that the method for outputting the test premise data may be a method other than the method of writing the test premise data onto a data recording medium.

[0039] If the test premise data output by the output unit 5 includes an SQL statement, the operator uses the SQL statement to register the data in the database of the system under test. If the test premise data includes a file, the operator stores the file in a specified folder in the system under test. The operator then performs a test in the system under test according to the test case (the test case input to the input unit 3).

[0040] The machine learning unit 2 and the test premise data derivation unit 4 are realized by, for example, a central processing unit (CPU) of a computer that operates according to a test premise data derivation program. The CPU reads the test premise data derivation program from a program recording medium such as a program storage device of the computer, and operates as the machine learning unit 2 and the test premise data derivation unit 4 according to the test premise data derivation program.

[0041] The teacher data storage unit 1 is realized by, for example, a storage device provided in the computer.

[0042] Next, the process flow of the test premise data derivation device 10 according to the present disclosure will be described. Fig. 2 is a flowchart showing an example of the process flow of the test premise data derivation device 10 according to the present disclosure. Note that detailed description of matters that have already been described will be omitted.

[0043] It is also assumed that the teacher data storage unit 1 stores teacher data prepared by an operator.

[0044] First, the machine learning unit 2 generates a model for deriving test premise data by machine learning using the training data stored in the training data storage unit 1 (step S1).

[0045] When a test case is input to the input unit 3, the test premise data derivation unit 4 derives test premise data corresponding to the test case by applying the input test case to the model generated in step S1 (step S2).

[0046] Then, the test premise data derivation unit 4 stores the set of the test case and the test premise data in the teacher data storage unit 1 (step S3).

[0047] Next, the output unit 5 writes the test premise data derived in step S2 onto a data recording medium (step S4).

[0048] According to this embodiment, the test premise data derivation unit 4 derives test premise data corresponding to an input test case by applying the input test case to a model. Therefore, test premise data corresponding to the test case can be easily derived.

[0049] Therefore, even if the system under test is large in scale and has many test items, the test premise data can be easily obtained, thereby reducing the time required for testing.

[0050] Furthermore, even an operator with little knowledge of the database provided in the system under test can easily obtain test premise data by creating a test case.

[0051] However, as mentioned above, the test premise data included in the training data is created by the operator.

[0052] 3 is a schematic block diagram showing an example of the configuration of a computer related to the test premise data derivation device. The computer 2000 includes, for example, a CPU 2001, a main memory device 2002, an auxiliary memory device 2003, an interface 2004, a data reading device 2005, and a data writing device 2006.

[0053] The test premise data derivation device according to the present disclosure is realized, for example, by a computer 2000. The operation of the test premise data derivation device is stored in the form of a program (test premise data derivation program) in an auxiliary storage device 2003. A CPU 2001 reads the program from the auxiliary storage device 2003, loads the program into a main storage device 2002, and executes the processing described in the above embodiment in accordance with the program.

[0054] The auxiliary storage device 2003 is an example of a non-transitory tangible medium. Other examples of non-transitory tangible media include a magnetic disk, a magneto-optical disk, a CD-ROM (Compact Disk Read Only Memory), a DVD-ROM (Digital Versatile Disk Read Only Memory), and a semiconductor memory connected via the interface 2004.

[0055] Next, an overview of the test premise data derivation device according to the present disclosure will be described. Fig. 4 is a block diagram showing an overview of the test premise data derivation device according to the present disclosure. The test premise data derivation device includes teacher data storage means 71, machine learning means 72, and test premise data derivation means 74.

[0056] The teacher data storage means 71 (e.g., teacher data storage unit 1) stores teacher data used when generating a model by machine learning to derive test premise data, which is either an SQL statement for registering data in a database of the system under test before executing a test, or a file that should be stored in a specified folder of the system under test before executing a test, or both.

[0057] The machine learning means 72 (for example, the machine learning unit 2) uses the training data to generate a model for deriving premise test data through machine learning.

[0058] The test premise data derivation means 74 (for example, the test premise data derivation unit 4) applies the input test case to the model, thereby deriving test premise data corresponding to the test case.

[0059] With such a configuration, test premise data corresponding to a test case can be easily derived.

[0060] The above embodiment can also be described as follows, but is not limited to the following:

[0061] (Appendix 1) a training data storage means for storing training data used when generating a model by machine learning to derive test premise data, which is either an SQL (Structured Query Language) statement for registering data in a database of a system under test before a test is executed, or a file to be stored in a predetermined folder of the system under test before a test is executed, or both; a machine learning means for generating the model for deriving the test premise data by machine learning using the teacher data; a test premise data derivation means for applying an input test case to the model to derive the test premise data corresponding to the test case; A test premise data derivation device characterized by:

[0062] (Appendix 2) The teacher data is The test data includes a set of test premise data created by an operator for the system under test, a test case corresponding to the test premise data, test execution data which is data input to the system under test when the test is executed, and a test result. 2. The test premise data derivation device according to claim 1.

[0063] (Appendix 3) The teacher data further includes: The source code and configuration files of the program for operating the system under test are included. 3. The test premise data derivation device according to claim 2.

[0064] (Appendix 4) The teacher data further includes: Contains the schema of the database 4. The test premise data derivation device according to claim 3.

[0065] (Appendix 5) A computer having a training data storage means for storing training data used when generating a model by machine learning to derive test premise data, which is either an SQL (Structured Query Language) statement for registering data in a database of a system under test before executing a test, or a file to be stored in a predetermined folder of the system under test before executing a test, or both, generating the model for deriving the test premise data by machine learning using the teacher data; The test premise data corresponding to the input test case is derived by applying the input test case to the model. A test premise data deriving method comprising:

[0066] (Appendix 6) A computer having a training data storage means for storing training data used when generating a model by machine learning to derive test premise data, which is either an SQL (Structured Query Language) statement for registering data in a database of a system under test before a test is executed, or a file to be stored in a predetermined folder of the system under test before a test is executed, or both, a machine learning process for generating the model for deriving the test premise data by machine learning using the teacher data; and A test premise data derivation process for deriving the test premise data corresponding to an input test case by applying the input test case to the model. A test premise data derivation program for executing the above.

[0067] Some or all of the configurations described in Supplementary Notes 2 to 4, which are dependent on Supplementary Note 1, may also be dependent on Supplementary Notes 5 and 6 in the same dependent relationship as Supplementary Notes 2 to 4. Furthermore, not limited to Supplementary Notes 1, 5, and 6, some or all of the configurations described as Supplements may be made dependent on various hardware, software, various recording means for recording software, or systems, within the scope of the above-described embodiment.

[0068] Although the present disclosure has been described above with reference to the embodiments, the present disclosure is not limited to the above-described embodiments. Various modifications that can be understood by those skilled in the art can be made to the configuration and details of the present disclosure within the scope of the present disclosure. [Explanation of symbols]

[0069] 1. Teacher data storage unit 2. Machine Learning Department 3 Input section 4 Test premise data derivation part 5 Output section 10 Test premise data derivation device

Claims

1. a training data storage means for storing training data used when generating a model by machine learning to derive test premise data, which is either or both of an SQL (Structured Query Language) statement for registering data in a database of a system under test before a test is executed, or a file to be stored in a predetermined folder of the system under test before a test is executed; a machine learning means for generating the model for deriving the test premise data by machine learning using the teacher data; a test premise data derivation means for applying an input test case to the model to derive the test premise data corresponding to the test case; A test premise data derivation device characterized by:

2. The teacher data is The test data includes a set of test premise data created by an operator for the system under test, a test case corresponding to the test premise data, test execution data which is data input to the system under test when the test is executed, and a test result. The test premise data deriving device according to claim 1 .

3. The teacher data further includes: The source code and configuration files of the program for operating the system under test are included. The test premise data deriving device according to claim 2 .

4. The teacher data further includes: Contains the schema of the database The test premise data deriving device according to claim 3 .

5. A computer having a training data storage means for storing training data used when generating a model by machine learning to derive test premise data, which is either one or both of an SQL (Structured Query Language) statement for registering data in a database of a system under test before executing a test, or a file to be stored in a predetermined folder of the system under test before executing a test, generating the model for deriving the test premise data by machine learning using the teacher data; The test premise data corresponding to the input test case is derived by applying the input test case to the model. A test premise data deriving method comprising:

6. A computer having a training data storage means for storing training data used when generating a model by machine learning to derive test premise data, which is either one or both of an SQL (Structured Query Language) statement for registering data in a database of a system under test before executing a test, or a file to be stored in a predetermined folder of the system under test before executing a test, a machine learning process for generating the model for deriving the test premise data by machine learning using the teacher data; and A test premise data derivation process for deriving the test premise data corresponding to an input test case by applying the input test case to the model. A test premise data derivation program for executing the above.

Citation Information

Patent Citations

  • Test support system, test support method and program

    JP2022129520A