JP2023042058A - Information processing apparatus and information processing method - Google Patents

Information processing apparatus and information processing method Download PDF

Info

Publication number
JP2023042058A
JP2023042058A JP2021149136A JP2021149136A JP2023042058A JP 2023042058 A JP2023042058 A JP 2023042058A JP 2021149136 A JP2021149136 A JP 2021149136A JP 2021149136 A JP2021149136 A JP 2021149136A JP 2023042058 A JP2023042058 A JP 2023042058A
Authority
JP
Japan
Prior art keywords
test
code
correction
database
execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2021149136A
Other languages
Japanese (ja)
Inventor
達希 中村
Tatsuki Nakamura
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2021149136A priority Critical patent/JP2023042058A/en
Publication of JP2023042058A publication Critical patent/JP2023042058A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a technique capable of suppressing a case where a test target code cannot be corrected appropriately.SOLUTION: An information processing apparatus is provided with a second database for managing malfunctioning candidates in test case execution results in association with one or more pieces of identification information, a third database for managing one or more patterns for correcting a test target code in association with one or more pieces of the identification information, and a modified code generation unit for generating one or more correcting codes for correcting the test target code based on a first database, the second database and the third database.SELECTED DRAWING: Figure 1

Description

本開示は、情報処理装置及び情報処理方法に関する。 The present disclosure relates to an information processing device and an information processing method.

ソフトウェアプログラムは、意図した動作ができない、通常「バグ」と呼ばれる不具合を含むことがある。このため、ソフトウェアプログラムなどのコード内の不具合を修正するコード修正装置が使用されることが多い。 Software programs may contain defects, commonly referred to as "bugs," that prevent them from working as intended. For this reason, code correction devices are often used to correct defects in the code of software programs and the like.

このようなコード修正装置について様々な技術が提案されている。例えば、ソースコード及びテストコードなどのコードと、テストの実行結果とから、人手で解消すべき不具合の特徴を分析する技術が提案されている。また例えば、コードの自動修正を全探索で行うための修正コードを、生成アルゴリズムに従って生成する技術が提案されている。また例えば特許文献1には、既存コードに基づいて修正候補を作成し、既存コードに基づいて修正候補の優先度付けを行う技術が提案されている。 Various techniques have been proposed for such code correction devices. For example, techniques have been proposed for analyzing the characteristics of defects that should be manually resolved from code such as source code and test code, and test execution results. Further, for example, a technique has been proposed for generating corrected code for automatically correcting code by exhaustive search according to a generation algorithm. Further, for example, Patent Literature 1 proposes a technique of creating correction candidates based on an existing code and prioritizing the correction candidates based on the existing code.

特開2020-126603号公報Japanese Patent Application Laid-Open No. 2020-126603

しかしながら、現実のプロジェクトのコードは複雑であるにも関わらず、従来技術では、コードの不具合を修正するために用いられる修正コードの数が十分ではない。このため、テスト対象コードを適切に修正できない場合があるという問題があった。 However, despite the complexity of the code in real projects, the prior art does not use enough corrective code to fix defects in the code. Therefore, there is a problem that the code under test may not be corrected appropriately.

そこで、本開示は、上記のような問題点に鑑みてなされたものであり、テスト対象コードを適切に修正できない場合を抑制可能な技術を提供することを目的とする。 Therefore, the present disclosure has been made in view of the above-described problems, and aims to provide a technology capable of suppressing the case where the test target code cannot be corrected appropriately.

本開示に係る情報処理装置は、テスト対象のコードであるテスト対象コードを実行することよって生成されたテストケースの実行結果を管理する第1データベースと、前記テストケースの実行結果における不具合の候補に、1つ以上の識別情報を対応付けて管理する第2データベースと、前記1つ以上の識別情報に、前記テスト対象コードを修正するための1つ以上のパターンを対応付けて管理する第3データベースと、前記第1データベースと、前記第2データベースと、前記第3データベースとに基づいて、前記テスト対象コードを修正するための1つ以上の修正コードを生成する修正コード生成部とを備える。 An information processing apparatus according to the present disclosure includes a first database that manages test case execution results generated by executing a test target code, and a defect candidate in the test case execution result. , a second database that manages one or more pieces of identification information in association with each other; and a third database that manages the one or more pieces of identification information in association with one or more patterns for correcting the code under test. and a correction code generator that generates one or more correction codes for correcting the code under test based on the first database, the second database, and the third database.

本開示によれば、必要に応じて複数の修正コードを生成することができるので、テスト対象コードを適切に修正できない場合を抑制することができる。 According to the present disclosure, since it is possible to generate a plurality of correction codes as necessary, it is possible to suppress cases where the code under test cannot be corrected appropriately.

実施の形態1に係るテスト実行装置の構成例を示すブロック図である。1 is a block diagram showing a configuration example of a test execution device according to Embodiment 1; FIG. 実施の形態1に係るテスト実行装置の動作を示すフローチャートである。4 is a flowchart showing the operation of the test execution device according to Embodiment 1; 実施の形態1に係るテストケース実行結果データベースの一例を示す図である。FIG. 5 is a diagram showing an example of a test case execution result database according to the first embodiment; FIG. 実施の形態1に係る修正仮説データベースの一例を示す図である。FIG. 4 is a diagram showing an example of a modified hypothesis database according to Embodiment 1; FIG. 実施の形態1に係る修正ロジックデータベースの一例を示す図である。FIG. 4 is a diagram showing an example of a correction logic database according to Embodiment 1; FIG. その他の変形例に係るテスト実行装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware configuration of the test execution apparatus based on another modification. その他の変形例に係るテスト実行装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware configuration of the test execution apparatus based on another modification.

図1は、本実施の形態1に係るテスト実行装置1の構成例を示すブロック図である。テスト実行装置1は、テスト対象のコードであるテスト対象コードをテストする。テスト対象コードは、例えばソースコード及びテストコードなどである。テストは、例えば、テスト対象コードを実行することによって生成された実行結果に不具合があるか否かを確認するためのテストである。 FIG. 1 is a block diagram showing a configuration example of a test execution device 1 according to the first embodiment. The test execution device 1 tests a test target code, which is a test target code. Codes to be tested are, for example, source code and test code. A test is, for example, a test for checking whether there is a problem in the execution result generated by executing the code under test.

図1のテスト実行装置1は、テスト対象コードを格納するコードリポジトリ100と接続されており、ユーザからの操作及び他システムによる命令などを契機として、コードリポジトリ100からのテスト対象コードの取得、及び、テストを行う。テスト実行装置1は、テスト対象コードを修正するコード修正装置2を備えており、テスト対象コードを修正しつつテストすることが可能となっている。以下、情報処理装置はテスト実行装置1であるものとして説明するが、コード修正装置2であってもよい。 The test execution device 1 of FIG. 1 is connected to a code repository 100 that stores code under test, and is triggered by an operation from a user or an instruction from another system to acquire the code under test from the code repository 100, and , do the test. The test execution device 1 includes a code correction device 2 for correcting the code under test, and is capable of testing while correcting the code under test. In the following description, the information processing device is assumed to be the test execution device 1, but it may be the code correction device 2 as well.

テスト実行装置1は、コード修正装置2以外に、テスト対象コードデータベース101と、テスト実行部104と、テスト管理装置108と、ユーザインターフェース部110(以下「UI部110」と記す)とを備える。コード修正装置2は、修正テスト対象コードデータベース102と、コード修正部103と、テストケース実行結果データベース105と、修正コード生成部106と、修正ロジックデータベース107と、修正仮説データベース109とを備える。なお、以下の説明では「データベース」を「DB」と略記することもある。 The test execution device 1 includes, in addition to the code correction device 2, a test target code database 101, a test execution unit 104, a test management device 108, and a user interface unit 110 (hereinafter referred to as "UI unit 110"). The code correction device 2 includes a correction test target code database 102 , a code correction section 103 , a test case execution result database 105 , a correction code generation section 106 , a correction logic database 107 and a correction hypothesis database 109 . In the following description, "database" may be abbreviated as "DB".

次に、コード修正装置2を備えるテスト実行装置1の構成要素について概要に説明する。 Next, the constituent elements of the test execution device 1 including the code correction device 2 will be briefly described.

テスト実行装置1は、コードリポジトリ100からテスト対象コードを取得し、テスト対象コードDB101は、取得されたテスト対象コードを管理する。 The test execution device 1 acquires the code under test from the code repository 100, and the code under test DB 101 manages the acquired code under test.

修正テスト対象コードDB102は、コード修正部103によって修正されたテスト対象コード(以下「修正テスト対象コード」と記すこともある)を管理する。なお、修正テスト対象コードDB102は、修正テスト対象コードが存在しない場合には、テスト対象コードDB101で管理されているテスト対象コードを管理する。以下、まずテスト対象コードに関する処理を主に説明し、その後に修正テスト対象コードに関する処理について説明する。 The corrected test target code DB 102 manages the test target code corrected by the code correction unit 103 (hereinafter also referred to as "corrected test target code"). The correction test target code DB 102 manages the test target code managed by the test target code DB 101 when the correction test target code does not exist. Hereinafter, the processing related to the test target code will be mainly described first, and then the processing related to the modified test target code will be described.

テスト実行部104は、修正テスト対象コードDB102で管理されているテスト対象コードをテストケースごとに実行して、テストケースの実行結果を生成する。 The test execution unit 104 executes the test target code managed by the modified test target code DB 102 for each test case, and generates test case execution results.

第1データベースであるテストケース実行結果DB105は、テスト実行部104でテスト対象コードを実行することによって生成されたテストケースの実行結果を管理する。 The test case execution result DB 105, which is the first database, manages execution results of test cases generated by executing the test target code in the test execution unit 104. FIG.

第2データベースである修正仮説DB109は、テストケースの実行結果における不具合の候補に、1つ以上の識別情報を対応付けて管理する。なお本実施の形態1では、修正仮説DB109は、テストケースの実行結果の不具合を生じさせる原因のうち最も尤度が高い原因の候補も管理する。以下、テストケースの実行結果の不具合を生じさせる原因のうち最も尤度が高い原因を修正仮説と記すこともある。 The corrected hypothesis DB 109, which is the second database, manages one or more pieces of identification information in association with defect candidates in test case execution results. In the first embodiment, the corrected hypothesis DB 109 also manages candidates for the most probable cause among the causes that cause failures in test case execution results. Hereinafter, the cause with the highest likelihood among the causes of failure in test case execution results may be referred to as a modified hypothesis.

第3データベースである修正ロジックDB107は、1つ以上の識別情報に、テスト対象コードを修正するための1つ以上のパターンを対応付けて管理する。 The modification logic DB 107, which is a third database, manages one or more pieces of identification information in association with one or more patterns for modifying the code under test.

修正コード生成部106は、テストケース実行結果DB105と、修正仮説DB109と、修正ロジックDB107とに基づいて、テスト対象コードを修正するための1つ以上の修正コードを生成する。 Correction code generation unit 106 generates one or more correction codes for correcting the test target code based on test case execution result DB 105 , correction hypothesis DB 109 , and correction logic DB 107 .

コード修正部103は、修正コード生成部106で生成された修正コードに基づいて、テスト対象コードを修正する。 The code correction unit 103 corrects the test target code based on the correction code generated by the correction code generation unit 106 .

上述したように、修正テスト対象コードDB102は、コード修正部103によって修正されたテスト対象コード、つまり修正テスト対象コードを管理する。 As described above, the corrected test target code DB 102 manages the test target code corrected by the code correction unit 103, that is, the corrected test target code.

本実施の形態1では、修正テスト対象コードDB102で管理される修正テスト対象コードに、上述したテスト対象コードと同様の処理が行われる。例えば、テスト実行部104は、修正テスト対象コードDB102で管理されている修正テスト対象コードをテストケースごとに実行して、テストケースの実行結果を生成する。そして、テストケース実行結果DB105は、テスト実行部104で生成されたテストケースの実行結果を管理する。 In the first embodiment, the correction test target code managed by the correction test target code DB 102 is subjected to the same processing as the above-described test target code. For example, the test execution unit 104 executes the modified test target code managed in the modified test target code DB 102 for each test case, and generates test case execution results. The test case execution result DB 105 manages execution results of test cases generated by the test execution unit 104 .

つまり本実施の形態1では、テスト実行部104で修正テスト対象コードを実行することによって生成された実行結果が、テスト対象コードを実行することによって生成されたテストケースの実行結果として用いられる。これにより、修正コード生成部106による生成、コード修正部103による修正、及び、テスト実行部104による実行を含む一連の動作が繰り返し行われる。 That is, in the first embodiment, the execution result generated by executing the corrected test target code in the test execution unit 104 is used as the execution result of the test case generated by executing the test target code. As a result, a series of operations including generation by the correction code generation unit 106, correction by the code correction unit 103, and execution by the test execution unit 104 are repeatedly performed.

テスト管理装置108は、テスト実行部104の動作を管理し、テスト実行部104で生成されたテストの実行結果を管理する。例えば、そのような管理の一つとして、テスト管理装置108は、テスト実行部104でテスト対象コードまたは修正テスト対象コードを実行することによって生成された実行結果を含む情報を生成する。 The test management device 108 manages the operation of the test execution unit 104 and manages the execution results of the tests generated by the test execution unit 104 . For example, as one such management, the test management device 108 generates information including execution results generated by executing the code under test or the modified code under test in the test execution unit 104 .

出力部であるUI部110は、テスト管理装置108で生成された情報を、表示及び音声の少なくともいずれかを用いてユーザに出力する。 The UI unit 110, which is an output unit, outputs information generated by the test management device 108 to the user using at least one of display and sound.

次に、コード修正装置2を備えるテスト実行装置1の構成要素について適宜詳細に説明する。 Next, the constituent elements of the test execution device 1 including the code correction device 2 will be described in detail.

コードリポジトリ100は、テスト対象コードを管理するツール及びデータベースである。コードリポジトリ100は、例えばファイルサーバ、及び、バージョン管理ツールなどによって実現される。 Code repository 100 is a tool and database for managing code under test. The code repository 100 is implemented by, for example, a file server and version management tools.

テスト対象コードDB101は、コードリポジトリ100からのテスト対象コード、及び、コード修正部103からの修正テスト対象コードを管理するデータベースである。テスト対象コードDB101は、例えば、テスト対象コードをファイルシステムに直接保存する装置、アーカイブファイルのような設定ファイル、及び、関連データベースのような別の形式で保存する装置などによって実現される。 The test target code DB 101 is a database that manages the test target code from the code repository 100 and the corrected test target code from the code correction unit 103 . The code-to-be-tested DB 101 is implemented by, for example, a device that directly stores the code-to-be-tested in a file system, a configuration file such as an archive file, and a device that stores the code in another format such as a relational database.

修正テスト対象コードDB102は、テスト実行部104で用いられるテスト対象コードまたは修正テスト対象コードを管理するデータベースである。修正テスト対象コードDB102は、例えば、テスト対象コードDB101と同様の装置によって実現される。 The corrected test target code DB 102 is a database that manages the test target code or the corrected test target code used in the test execution unit 104 . The modified test target code DB 102 is implemented by, for example, the same device as the test target code DB 101 .

テスト実行部104は、テスト対象コードまたは修正テスト対象コードを実行してテストケースの実行結果を出力する装置である。例えば、テスト実行部104は、継続的インテグレーションツールと呼ばれる専用のツールと、処理の内容を記述したバッチファイルと、当該バッチファイルを実行する常駐アプリケーションとによって実現される。 The test execution unit 104 is a device that executes a test target code or a modified test target code and outputs test case execution results. For example, the test execution unit 104 is implemented by a dedicated tool called a continuous integration tool, a batch file that describes the details of processing, and a resident application that executes the batch file.

テストケース実行結果DB105は、テスト実行部104が出力したテストケースの実行結果を管理するデータベースであり、テスト実行部104が実行したジョブの実行結果を管理する。ジョブの実行結果は、例えば、テスト実行部104で実行されたテストケースの合否と、当該テストケースの情報と、当該テストケースに紐づく仕様及び機能の情報と、対応するコード及びその変更履歴の情報との少なくともいずれか1つを含む。 The test case execution result DB 105 is a database that manages the test case execution results output by the test execution unit 104 , and manages the job execution results that the test execution unit 104 has executed. The execution result of the job includes, for example, pass/fail of the test cases executed by the test execution unit 104, information on the test cases, information on specifications and functions associated with the test cases, corresponding codes and their change history. and/or information.

テストケース実行結果DB105は、テスト実行部104によって操作されてもよいし、テスト実行部104が出力した情報を加工する別の装置によって操作されてもよいし、またそれらの両方を組み合わせて操作されてもよい。テストケース実行結果DB105は、例えば、テスト対象コードDB101と同様の装置によって実現される。 The test case execution result DB 105 may be operated by the test execution unit 104, may be operated by another device that processes information output by the test execution unit 104, or may be operated by a combination of both. may The test case execution result DB 105 is implemented by, for example, the same device as the test target code DB 101 .

修正仮説DB109は、テストケースの実行結果における不具合の候補に、1つ以上の識別情報を対応付けて管理するデータベースである。識別情報はIDであってもよいし、具体的な対応方法であってもよい。対応方法は、修正ロジックDB107への参照であってもよいし、修正ロジックDB107への参照の組み合わせであってもよい。修正仮説DB109は、例えば、テスト対象コードDB101と同様の装置によって実現される。 The correction hypothesis DB 109 is a database that manages one or more pieces of identification information in association with defect candidates in test case execution results. The identification information may be an ID or a specific handling method. The corresponding method may be a reference to the correction logic DB 107 or a combination of references to the correction logic DB 107 . The corrected hypothesis DB 109 is implemented by, for example, the same device as the test target code DB 101 .

修正ロジックDB107は、1つ以上の識別情報に、テスト対象コードを修正するための1つ以上のパターンを対応付けて管理する。修正ロジックDB107は、例えば、テスト対象コードDB101と同様の装置によって実現される。 The correction logic DB 107 manages one or more pieces of identification information in association with one or more patterns for correcting the test target code. The correction logic DB 107 is implemented by, for example, the same device as the test target code DB 101 .

修正コード生成部106は、テストケースの実行結果に不具合がある場合に、テストケース実行結果DB105と、修正仮説DB109と、修正ロジックDB107とに基づいて、テスト対象コードを修正するための1つ以上の修正コードを生成する。なお、修正コード生成部106は、修正テスト対象コードDB102で管理されているテスト対象コードまたは修正テスト対象コードを参照し、何行目のどの記述を修正すべきかを把握してもよい。このような把握を行うことにより、適切な修正コードを効率的に生成することができる。また、修正コード生成部106で生成される修正コードの数は、利用できる時間及び計算資源に応じて変更されてもよい。修正コードは、修正前後のテスト対象コードの差分に対応するコードであってもよいし、修正後のテスト対象コードそのものに対応するコードであってもよい。 Correction code generation unit 106, when there is a defect in the execution result of the test case, based on the test case execution result DB 105, the correction hypothesis DB 109, and the correction logic DB 107, one or more for correcting the code under test. generate modified code for Note that the correction code generation unit 106 may refer to the test target code or the corrected test target code managed in the correction test target code DB 102 to grasp which line and which description should be corrected. By making such an understanding, it is possible to efficiently generate appropriate correction code. Also, the number of correction codes generated by the correction code generator 106 may be changed according to available time and computational resources. The corrected code may be code corresponding to the difference between the code under test before and after correction, or may be code corresponding to the code under test itself after correction.

コード修正部103は、修正コード生成部106で修正コードが生成された場合に、テスト対象コードをテスト対象コードDB101から取得し、修正コードに基づいてテスト対象コードを修正する。テスト対象コードの修正は、例えば、テスト対象コードに対する正規表現によるパターンマッチを用いた置換方法、テスト対象コードの抽象構文木に対するパターンマッチを用いた置換方法などによって実現される。 The code correction unit 103 acquires the test target code from the test target code DB 101 when the correction code is generated by the correction code generation unit 106, and corrects the test target code based on the correction code. Correction of the code under test is realized, for example, by a replacement method using pattern matching by regular expressions for the code under test, a replacement method using pattern matching for the abstract syntax tree of the code under test, or the like.

テスト管理装置108は、テスト実行部104の動作を管理し、テスト実行部104で生成されたテストの実行結果を管理する。例えば、テスト管理装置108は、テスト実行部104でテスト対象コードまたは修正テスト対象コードを実行することによって生成された実行結果を含む情報を生成する。なお、生成される情報は、テスト実行部104が能動的に出力する情報だけではなく、テスト実行装置1に関する情報を含んでもよい。テスト実行装置1に関する情報は、テストケース実行結果DB105に基づいてテスト実行部104によって能動的に取得される情報、及び、後述するように修正コード生成部106によって特定される修正仮説の情報などを含んでもよい。 The test management device 108 manages the operation of the test execution unit 104 and manages the execution results of the tests generated by the test execution unit 104 . For example, the test management device 108 generates information including execution results generated by executing the code under test or the modified code under test in the test execution unit 104 . Note that the generated information may include not only information actively output by the test execution unit 104 but also information related to the test execution device 1 . The information about the test execution device 1 includes information actively acquired by the test execution unit 104 based on the test case execution result DB 105, and information on correction hypotheses specified by the correction code generation unit 106 as described later. may contain.

UI部110は、テスト管理装置108で生成された情報を、表示及び音声の少なくともいずれかを用いて、テスト実行装置1のユーザに伝える。なお、出力部は、UI部110に限ったものではなく、テスト管理装置108で生成された情報を送信する通信部などであってもよい。 The UI unit 110 communicates information generated by the test management device 108 to the user of the test execution device 1 using at least one of display and sound. Note that the output unit is not limited to the UI unit 110, and may be a communication unit or the like that transmits information generated by the test management device 108. FIG.

<動作>
図2は、テスト実行装置1の動作のうち、修正コード生成部106による生成、コード修正部103による修正、及び、テスト実行部104による実行を含む一連の動作を示すフローチャートである。なお、ステップS1の前には、すでにテスト実行部104がテストケースの実行結果を生成して、テストケース実行結果DB105がテストケースの実行結果を管理しているものとする。
<Action>
FIG. 2 is a flowchart showing a series of operations including generation by the correction code generation unit 106, correction by the code correction unit 103, and execution by the test execution unit 104 among the operations of the test execution device 1. FIG. It is assumed that before step S1, the test execution unit 104 has already generated test case execution results, and the test case execution result DB 105 has managed the test case execution results.

まずステップS1にて、修正コード生成部106は、テストケース実行結果DB105で管理されているテストケースの実行結果に基づいて、当該実行結果における不具合を特定する。そして、修正コード生成部106は、特定された不具合と、修正仮説DB109とに基づいて、テストケースの実行結果の不具合を生じさせる原因のうち最も尤度が高い原因である修正仮説を特定する。以下、図3及び図4を用いて、このことについて説明する。 First, in step S<b>1 , the correction code generation unit 106 identifies defects in the execution results based on the test case execution results managed in the test case execution result DB 105 . Then, based on the identified defect and the correction hypothesis DB 109, the correction code generation unit 106 identifies the correction hypothesis that is the most likely cause of the defect in the execution result of the test case. This will be described below with reference to FIGS. 3 and 4. FIG.

図3は、テストケース実行結果DB105の一例を示す図であり、具体的にはテストケースの実行結果の一例を示す図である。図3の例のテストケースの実行結果は、テストID300と、テスト対象機能301と、テスト対象サブ機能302と、合否303と、予測304と、結果305と、ログ306とを含む。 FIG. 3 is a diagram showing an example of the test case execution result DB 105, and more specifically, a diagram showing an example of test case execution results. The test case execution results of the example of FIG.

テストID300は、テストケースについて一意的に付される識別子である。テスト対象機能301は、テストケースでテストされる機能の名称である。テスト対象サブ機能302は、テスト対象機能301に含まれる機能の名称、例えば、テスト対象機能301の下位概念の機能の名称である。テスト対象サブ機能302によって、テスト対象コードの機能を構造化して管理することが可能となる。 A test ID 300 is an identifier uniquely attached to a test case. The test target function 301 is the name of the function tested by the test case. The sub-function to be tested 302 is the name of a function included in the function to be tested 301 , for example, the name of a function that is a subordinate concept of the function to be tested 301 . The sub-function under test 302 allows the functionality of the code under test to be structured and managed.

合否303は、テストケースにおいて合格と判定されたか、失敗と判定されたかを示す。予測304は、テストケースで想定される正解データを示す。結果305は、テストケースの実行結果を示す。例えば、テストID300が「1」または「2」である場合、予測304と結果305とが異なるため、合否303は失敗であると判定されている。一方、テストID300が「3」である場合、予測304と結果305とが一致するため、合否303は合格であると判定されている。 The pass/fail 303 indicates whether the test case was determined to pass or fail. A prediction 304 indicates correct data assumed in the test case. A result 305 indicates the execution result of the test case. For example, when the test ID 300 is "1" or "2", the prediction 304 and the result 305 are different, so the pass/fail 303 is determined to be a failure. On the other hand, when the test ID 300 is "3", the prediction 304 and the result 305 match, so the pass/fail 303 is judged to pass.

ログ306は、テスト対象コードの実行結果の詳細を示すログ情報を示す。ログ情報は、テスト実行部104が出力する標準出力としてのメッセージであってもよい。 A log 306 indicates log information indicating the details of the execution result of the code under test. The log information may be a message as standard output output by the test execution unit 104 .

図4は、修正仮説DB109の一例を示す図である。図4の例の修正仮説DB109は、修正仮説ID400と、名前401と、修正レイヤ402と、判定条件403と、修正ロジックID404とを含む。 FIG. 4 is a diagram showing an example of the corrected hypothesis DB 109. As shown in FIG. The modified hypothesis DB 109 in the example of FIG. 4 includes a modified hypothesis ID 400, a name 401, a modified layer 402, a determination condition 403, and a modified logic ID 404. FIG.

修正仮説ID400は、テストケースの実行結果の不具合を生じさせる原因のうち最も尤度が高い原因、つまり修正仮説について一意的に付される識別子である。名前401は、修正仮説の名称である。修正仮説DB109では、複数の修正仮説が修正仮説の候補として管理されている。 The modified hypothesis ID 400 is an identifier uniquely attached to the most probable cause, that is, the modified hypothesis, among the causes of failure in test case execution results. Name 401 is the name of the modified hypothesis. The modified hypothesis DB 109 manages a plurality of modified hypotheses as modified hypothesis candidates.

修正レイヤ402は、修正仮説の種別を示す。例えば修正レイヤ402が「記法」であれば、テスト対象コードにおける文法上の間違い、または、打ち間違いなどの不具合の原因の尤度が高いことを示す。例えば修正レイヤ402が「機能」であれば、テスト対象コードにおけるメンバ変数の初期値忘れのような、テスト対象コードの振る舞いに関する誤りなどの不具合の原因の尤度が高いことを示す。例えば修正レイヤ402が「構文」であれば、テスト対象コードにおける関数の誤りなどの不具合の原因の尤度が高いことを示す。 A modification layer 402 indicates the types of modification hypotheses. For example, if the correction layer 402 is "notation", it indicates that the likelihood of a defect such as a grammatical error or a typo in the code under test is high. For example, if the correction layer 402 is "function", it indicates that the likelihood of the cause of a defect such as an error related to the behavior of the code under test, such as forgetting the initial value of a member variable in the code under test, is high. For example, if the correction layer 402 is "syntax", it indicates that the likelihood of the cause of a defect such as a function error in the code under test is high.

判定条件403は、修正仮説を特定するための不具合であり、本実施の形態1では不具合を上位概念化したフォーマットを示す。修正仮説DB109では、複数の不具合のフォーマットが不具合の候補として管理されている。 The determination condition 403 is a defect for specifying a correction hypothesis, and the first embodiment shows a format in which the defect is generalized. The correction hypothesis DB 109 manages a plurality of defect formats as defect candidates.

修正ロジックID404は、修正コード生成部106が修正コードを作成する場合に修正ロジックDB107のうち参照すべき箇所を示す識別子(つまり識別情報)である。 The correction logic ID 404 is an identifier (that is, identification information) indicating a location to be referred to in the correction logic DB 107 when the correction code generation unit 106 creates correction code.

以下、ステップS1における修正コード生成部106の処理の一例について説明する。修正コード生成部106は、テスト実行部104が出力してテストケース実行結果DB105で管理されているテストケースの実行結果から、合格したテストケースと失敗したテストケースとを集計する。修正コード生成部106は、集計結果に基づいて、どのテスト対象機能301機能がどの程度正しく実装されているかを算出し、その算出結果に基づいて、誤りの程度が比較的大きいテスト対象機能301を特定する。修正コード生成部106は、特定されたテスト対象機能301のテスト対象サブ機能302についても同様にして、誤りの程度が比較的大きいテスト対象サブ機能302を特定する。 An example of the processing of the correction code generation unit 106 in step S1 will be described below. The correction code generation unit 106 aggregates passed test cases and failed test cases from the test case execution results output by the test execution unit 104 and managed in the test case execution result DB 105 . Correction code generation unit 106 calculates which test target function 301 function is correctly implemented to what degree based on the aggregated result, and based on the calculation result, selects test target function 301 with a relatively large degree of error. Identify. Correction code generator 106 similarly identifies test target sub-functions 302 of the specified test target function 301 as well as test target sub-functions 302 with relatively large error degrees.

修正コード生成部106は、特定されたテスト対象機能301及びテスト対象サブ機能302に関して、テストケースの実行結果のエラーメッセージ(例えばログ306の情報)を不具合として特定する。なお、修正コード生成部106は、テストケースの仕様を考慮して不具合を特定してもよい。 The correction code generation unit 106 identifies an error message (for example, information in the log 306 ) of the test case execution result as a defect for the identified test target function 301 and test target sub-function 302 . Note that the correction code generation unit 106 may identify the defect in consideration of the specifications of the test case.

ここで、修正コード生成部106が、テスト対象機能301及びテスト対象サブ機能302として、「ユーザのログイン」及び「アプリケーションによるユーザの新規作成」を特定した場合、つまり図3のテストID300の「2」を特定した場合を想定する。そして、テストID300の「2」のテストにおいて、ログ306のように「"this.userRepository" has no such method "getUser"」というエラーメッセージがあった場合を想定する。以上のような場合、修正コード生成部106は、「"this.userRepository" has no such method "getUser"」というエラーメッセージを、不具合として特定する。 Here, when the corrected code generation unit 106 specifies "user login" and "new user creation by application" as the test target function 301 and the test target sub-function 302, that is, when the test ID 300 of FIG. ” is specified. Assume that the test with the test ID 300 of "2" has an error message "this.userRepository" has no such method "getUser" as in the log 306. FIG. In such a case, the correction code generation unit 106 identifies the error message ""this.userRepository" has no such method "getUser"" as a defect.

次に、修正コード生成部106は、特定された不具合と、修正仮説DB109とに基づいて修正仮説を特定する。 Next, correction code generation unit 106 identifies a correction hypothesis based on the identified defect and correction hypothesis DB 109 .

ここで、「"this.userRepository" has no such method "getUser"」というエラーメッセージが不具合として特定された場合を想定する。このエラーメッセージは、図4の修正仮説DB109の判定条件403のうち、修正仮説ID400の「1」に対応付けられた判定条件403、つまり「"this.(.*?)" has no such method "(.*?)"」のフォーマットに該当する。この場合、修正コード生成部106は、修正仮説ID400の「1」に対応付けられた名前401及び修正レイヤ402を修正仮説として特定する。 Here, assume that the error message ""this.userRepository" has no such method "getUser"" is identified as a bug. This error message is the determination condition 403 associated with the modified hypothesis ID 400 of "1" among the determination conditions 403 of the modified hypothesis DB 109 in FIG. (.*?)"" format. In this case, the correction code generation unit 106 identifies the name 401 and the correction layer 402 associated with the correction hypothesis ID 400 of "1" as the correction hypothesis.

図2のステップS2にて、修正コード生成部106は、特定した修正仮説に対応する修正ロジックID404と、修正ロジックDB107とに基づいて、テスト対象コードを修正するための修正ロジックを特定する。 In step S<b>2 of FIG. 2 , correction code generation unit 106 identifies correction logic for correcting the test target code based on correction logic ID 404 corresponding to the identified correction hypothesis and correction logic DB 107 .

図5は、修正ロジックDB107の一例を示す図である。図5の例の修正ロジックDB107は、修正ロジックID500と、名前501と、修正レイヤ502と、修正対象パターン503と、修正後のパターン504とを含む。 FIG. 5 is a diagram showing an example of the correction logic DB 107. As shown in FIG. The correction logic DB 107 in the example of FIG. 5 includes a correction logic ID 500, a name 501, a correction layer 502, a pattern to be corrected 503, and a pattern 504 after correction.

修正ロジックID500は、修正ロジックについて一意的に付される識別子であり、図4の修正ロジックID404と対応している。名前501は、修正ロジックの名称である。修正レイヤ502は、修正ロジックの種別を示し、図4の修正レイヤ402と対応している。 Correction logic ID 500 is an identifier uniquely attached to correction logic, and corresponds to correction logic ID 404 in FIG. Name 501 is the name of the modification logic. A correction layer 502 indicates the type of correction logic and corresponds to the correction layer 402 in FIG.

修正対象パターン503は、テスト対象コードのパターンのうち、修正ロジックを適用すべきパターンを示す。修正後のパターン504は、テスト対象コードのうち修正対象パターン503に対応するパターンに修正ロジックを適用した後のパターンを示す。 The correction target pattern 503 indicates a pattern to which the correction logic is to be applied among the patterns of the test target code. A corrected pattern 504 indicates a pattern after applying the correction logic to the pattern corresponding to the correction target pattern 503 in the test target code.

上述したようにステップS2では、修正コード生成部106は、特定した修正仮説に対応する修正ロジックID404と、修正ロジックDB107とに基づいて、テスト対象コードを修正するための修正ロジックを特定する。 As described above, in step S<b>2 , the correction code generation unit 106 identifies correction logic for correcting the test target code based on the correction logic ID 404 corresponding to the identified correction hypothesis and the correction logic DB 107 .

ここで上述のように、図4の修正仮説ID400の「1」に対応付けられた名前401及び修正レイヤ402が、修正仮説として特定された場合を想定する。この場合、修正仮説に対応する修正ロジックID404は「5」及び「6」であるため、修正コード生成部106は、図5の修正ロジックDB107のうち、修正ロジックID500が「5」及び「6」である2つの修正ロジックを特定する。 Here, as described above, it is assumed that the name 401 and the correction layer 402 associated with "1" of the correction hypothesis ID 400 in FIG. 4 are specified as the correction hypothesis. In this case, since the correction logic IDs 404 corresponding to the correction hypotheses are "5" and "6", the correction code generation unit 106 selects the correction logic IDs 500 of "5" and "6" in the correction logic DB 107 of FIG. Identify two modification logics where

図2のステップS3にて、修正コード生成部106は、特定した修正ロジックに基づいて、修正対象パターン及び修正内容を特定する。例えば、上述のように修正ロジックID500が「5」及び「6」である2つの修正ロジックが特定された場合、修正コード生成部106は、2つの修正ロジックのそれぞれについて修正対象パターン503及び修正後のパターン504を特定する。 In step S3 of FIG. 2, the correction code generation unit 106 identifies the pattern to be corrected and the content of correction based on the identified correction logic. For example, when two correction logics whose correction logic IDs 500 are "5" and "6" are identified as described above, the correction code generation unit 106 generates the correction target pattern 503 and the corrected pattern 503 for each of the two correction logics. identifies the pattern 504 of .

図2のステップS4にて、修正コード生成部106は、特定された修正対象パターン及び修正内容に基づいて修正コードを生成する。例えば、2つの修正ロジックのそれぞれについて修正対象パターン503及び修正後のパターン504が特定された場合、修正コード生成部106は、2つの修正コードを生成する。このように、ステップS3にて複数の修正対象パターン及び修正内容が特定されていた場合には、修正コード生成部106は、複数の修正コードを生成する。 In step S4 of FIG. 2, the correction code generation unit 106 generates a correction code based on the specified correction target pattern and correction content. For example, when the pattern to be corrected 503 and the pattern after correction 504 are specified for each of the two correction logics, the correction code generation unit 106 generates two correction codes. Thus, when a plurality of correction target patterns and correction details are specified in step S3, the correction code generation unit 106 generates a plurality of correction codes.

ステップS5にて、コード修正部103は、修正コード生成部106で生成された修正コードに基づいて、テスト対象コードを修正する。ステップS4にて複数の修正コードが生成されていた場合には、コード修正部103は、複数の修正コードのいずれかに基づいて、テスト対象コードを修正する。 In step S<b>5 , the code correction unit 103 corrects the test target code based on the correction code generated by the correction code generation unit 106 . If a plurality of correction codes have been generated in step S4, the code correction unit 103 corrects the test target code based on any one of the plurality of correction codes.

ステップS6にて、テスト実行部104は、修正テスト対象コードを実行して、テストケースの実行結果を生成する。 In step S6, the test execution unit 104 executes the modified test target code to generate test case execution results.

ステップS7にて、テスト実行部104は、テストケースの実行結果が合格であるか否かを判定する。テストケースの実行結果が合格であると判定された場合には、図2の動作が終了する。テストケースの実行結果が失敗であると判定された場合には、処理がステップS8に進む。 In step S7, the test execution unit 104 determines whether or not the execution result of the test case is passed. If the execution result of the test case is determined to pass, the operation of FIG. 2 ends. If the execution result of the test case is determined to be a failure, the process proceeds to step S8.

ステップS8にて、修正コード生成部106は、修正コード生成部106で生成された修正コードの全てについてステップS5及びステップS6の処理が行われたか否かを判定する。修正コードの全てについて処理が行われたと判定された場合には処理がステップS9に進む。修正コードの全てについて処理が行われていないと判定された場合には処理がステップS5に進み、未処理の修正コードについてステップS5及びステップS6の処理が行われる。 In step S8, the correction code generator 106 determines whether or not the processes of steps S5 and S6 have been performed for all of the correction codes generated by the correction code generator 106. FIG. If it is determined that all correction codes have been processed, the process proceeds to step S9. If it is determined that all correction codes have not been processed, the process proceeds to step S5, and the unprocessed correction codes are processed in steps S5 and S6.

ステップS9にて、修正コード生成部106は、テスト対象コードについての実行結果に基づいて、ステップS1で特定された修正仮説が不具合の原因を正しく反映しているか否かを判定する。 In step S9, the correction code generation unit 106 determines whether or not the correction hypothesis identified in step S1 correctly reflects the cause of the defect, based on the execution result of the test target code.

修正コード生成部106は、合格または失敗したテストケースの数、及び、テストケース毎の依存関係の少なくともいずれかに基づいて、この判定を行ってもよい。例えば、「機能をエラー無く実行できること」という機能と、「機能が指定した出力を与えること」という機能とについて、テストケースの実行結果が生成された場合を想定する。前者の機能は後者の機能にとって基本の機能であるため、修正コード生成部106は、後者の機能のテストが合格であったが前者の機能のテストが失敗であった場合には、ステップS1で特定された修正仮説が不具合の原因を正しく反映していないと判定してもよい。 The modified code generation unit 106 may make this determination based on at least one of the number of passed or failed test cases and the dependency relationship for each test case. For example, it is assumed that test case execution results are generated for the function "to be able to execute the function without error" and the function "to give the output specified by the function". Since the former function is a basic function for the latter function, when the test of the latter function is passed but the test of the former function is unsuccessful, the correction code generation unit 106 It may be determined that the identified correction hypothesis does not correctly reflect the cause of the defect.

ステップS9にて修正仮説が不具合の原因を正しく反映していると判定された場合、つまり修正仮説を変更する必要がないと判定された場合には、処理がステップS10に進む。ステップS9にて修正仮説が不具合の原因を正しく反映していないと判定された場合、つまり修正仮説を変更する必要があると判定された場合には、処理がステップS1に進み、別の修正仮説を特定する。 If it is determined in step S9 that the modified hypothesis correctly reflects the cause of the problem, that is, if it is determined that there is no need to change the modified hypothesis, the process proceeds to step S10. If it is determined in step S9 that the modified hypothesis does not correctly reflect the cause of the defect, that is, if it is determined that the modified hypothesis needs to be changed, the process proceeds to step S1, and another modified hypothesis is used. identify.

ステップS10にて、修正コード生成部106は、修正仮説を変更せずに新たな修正コードを生成する。 In step S10, the modification code generation unit 106 generates a new modification code without changing the modification hypothesis.

修正コード生成部106は、前回生成した修正コードよりも複雑な修正コードを、新たな修正コードとして生成してもよい。また、修正コード生成部106は、前回生成した修正コードに基づいて、新たな修正コードを生成してもよい。例えば、前回生成した修正コードが、「if (!this.member) { return }」という行を追加する修正コードであった場合に、修正コード生成部106は、新たな修正コードとして、「if (!this.member.name) {return;}」という行を追加する修正コードであってもよい。 The correction code generation unit 106 may generate a new correction code that is more complicated than the previously generated correction code. Moreover, the correction code generation unit 106 may generate a new correction code based on the previously generated correction code. For example, if the correction code generated last time is a correction code that adds the line "if (!this.member) { return }", the correction code generation unit 106 generates "if ( !this.member.name) {return;}" can be modified code.

複数の修正コードが生成されていた場合には、修正コード生成部106は、複数の修正コードの中から一定の尺度に従って1つの修正コードを選択し、当該1つの修正コードに基づいて、新たな修正コードを生成してもよい。また、修正コード生成部106は、合格したテストケースの個数と、修正に伴って失敗したテストケースの数と、その親の機能の種別との少なくともいずれかに基づいて、複数の修正コードの中から、新たな修正コードの生成に用いる修正コードを選択してもよい。また、修正コード生成部106は、複数の修正コードを組み合わせて新たな修正コードを生成してもよい。また、修正コード生成部106は、修正コードについて機械学習を行い、学習結果に基づいて新たな修正コードを生成してもよい。ステップS10の後、処理がステップS5に進む。 If a plurality of correction codes have been generated, the correction code generation unit 106 selects one correction code from among the plurality of correction codes according to a certain scale, and creates a new correction code based on the one correction code. Generate modified code. In addition, the correction code generation unit 106 selects one of the plurality of correction codes based on at least one of the number of passed test cases, the number of failed test cases due to correction, and the type of parent function. , a modification code to be used for generating a new modification code may be selected. Further, the correction code generation unit 106 may combine a plurality of correction codes to generate a new correction code. Further, the correction code generation unit 106 may perform machine learning on the correction code and generate a new correction code based on the learning result. After step S10, the process proceeds to step S5.

<実施の形態1のまとめ>
本実施の形態1に係るテスト実行装置1に関連する関連技術として、本実施の形態1に係る修正ロジックをスキーマとして用いる技術が考えられる。しかしながら、現実の開発で求められるコードは複雑であるため、不具合に対して1つの修正コードを生成しても、テスト対象コードを適切に修正できない場合がある。また、人が、ログメッセージや失敗したテストケースを確認して、原因を推定し、修正を重ねることで、修正コードの種類を制限しつつ、複雑かつ正しい修正コードを生成することは可能であるが、人の手間及び人が慣れるまでの時間を要する。
<Summary of Embodiment 1>
As a related technique related to the test execution device 1 according to the first embodiment, a technique using the modification logic according to the first embodiment as a schema can be considered. However, since codes required in actual development are complicated, even if one correction code is generated for a defect, the code under test may not be corrected appropriately. Also, by checking log messages and failed test cases, guessing the cause, and repeating corrections, it is possible to generate complex and correct correction code while limiting the types of correction code. However, it requires human effort and time for people to get used to it.

これに対して、本実施の形態1では、修正コード生成部106が、テストケース実行結果DB105と、修正仮説DB109と、修正ロジックDB107とに基づいて、テスト対象コードを修正するための1つ以上の修正コードを生成する。このような構成によれば、必要に応じて複雑かつ正しい複数の修正コードを自動的に生成することができるので、テスト対象コードを適切に修正できない場合を抑制することができる。また、修正仮説DB109において修正ロジックIDを適切に設定することで、不要な修正コードの生成を抑制することができる。 On the other hand, in the first embodiment, the correction code generation unit 106 generates one or more code for correcting the test target code based on the test case execution result DB 105, the correction hypothesis DB 109, and the correction logic DB 107. generate modified code for According to such a configuration, it is possible to automatically generate a plurality of complicated and correct correction codes as necessary, so it is possible to suppress cases where the code under test cannot be corrected appropriately. Also, by appropriately setting the correction logic ID in the correction hypothesis DB 109, generation of unnecessary correction code can be suppressed.

また本実施の形態1では、コード修正部103は、修正コード生成部106で生成された修正コードに基づいてテスト対象コードを修正するので、テスト対象コードの不具合を自動的に修正することができる。 Further, in the first embodiment, the code correction unit 103 corrects the test target code based on the correction code generated by the correction code generation unit 106, so that defects in the test target code can be automatically corrected. .

また本実施の形態1では、UI部110は、テスト実行部104で修正テスト対象コードを実行することによって生成された実行結果を含む情報を出力するので、例えばユーザは当該情報を確認することができる。 In addition, in the first embodiment, the UI unit 110 outputs information including the execution result generated by executing the modified test target code in the test execution unit 104. Therefore, for example, the user can check the information. can.

また本実施の形態1では、修正コード生成部106による生成、コード修正部103による修正、及び、テスト実行部104による実行を含む一連の動作が繰り返し行われるので、テスト対象コードを適切に修正できない場合をさらに抑制することができる。 In addition, in the first embodiment, since a series of operations including generation by the correction code generation unit 106, correction by the code correction unit 103, and execution by the test execution unit 104 are repeated, the code under test cannot be corrected appropriately. The case can be further suppressed.

<変形例>
テスト実行装置1の動作は、上記に限ったものではない。例えば、以上の説明では、図2のステップS9において、修正仮説が不具合の原因を正しく反映していないと判定されるまで、一つの修正仮説について処理が行われており、複数の修正仮説について直列的に処理が行われた。しかしこれに限ったものではなく、複数の修正仮説について並列的に処理が行われてもよい。例えば、生成可能な修正コードの個数の上限が100個であるとき、そのうち70個を一つの修正仮説に基づく修正コードに割り当て、30個を別の修正仮説に基づく修正コードに割り当てもよい。
<Modification>
The operation of the test execution device 1 is not limited to the above. For example, in the above description, one correction hypothesis is processed until it is determined that the correction hypothesis does not correctly reflect the cause of the defect in step S9 of FIG. processed accordingly. However, the process is not limited to this, and a plurality of correction hypotheses may be processed in parallel. For example, when the upper limit of the number of correction codes that can be generated is 100, 70 of them may be assigned to correction codes based on one correction hypothesis, and 30 of them may be assigned to correction codes based on another correction hypothesis.

また以上の説明では、修正コード生成部106は、特定された不具合と、修正仮説DB109とに基づいて修正仮説を特定し、特定された修正仮説に基づいて1つ以上の修正ロジックID404を特定した。しかしこれに限ったものではなく、修正コード生成部106は、特定された不具合と、修正仮説DB109とに基づいて、修正仮説を特定せずに、1つ以上の修正ロジックID404を直接的に特定してもよい。 Further, in the above description, the correction code generation unit 106 identifies correction hypotheses based on the identified defect and the correction hypothesis DB 109, and identifies one or more correction logic IDs 404 based on the identified correction hypotheses. . However, the modification code generator 106 directly identifies one or more modification logic IDs 404 without identifying modification hypotheses based on the identified defect and the modification hypothesis DB 109. You may

<その他の変形例>
上述した図1の修正コード生成部106は、図6に示す処理回路81により実現される。すなわち、処理回路81は、テストケース実行結果DB105と、修正仮説DB109と、修正ロジックDB107とに基づいて、テスト対象コードを修正するための1つ以上の修正コードを生成する修正コード生成部106を備える。処理回路81には、専用のハードウェアが適用されてもよいし、メモリに格納されるプログラムを実行するプロセッサが適用されてもよい。プロセッサには、例えば、中央処理装置、処理装置、演算装置、マイクロプロセッサ、マイクロコンピュータ、DSP(Digital Signal Processor)などが該当する。
<Other Modifications>
The correction code generator 106 in FIG. 1 described above is implemented by the processing circuit 81 shown in FIG. That is, the processing circuit 81 includes a correction code generation unit 106 that generates one or more correction codes for correcting the code under test based on the test case execution result DB 105, the correction hypothesis DB 109, and the correction logic DB 107. Prepare. Dedicated hardware may be applied to the processing circuit 81, or a processor that executes a program stored in a memory may be applied. Processors include, for example, central processing units, processing units, arithmetic units, microprocessors, microcomputers, and DSPs (Digital Signal Processors).

処理回路81が専用のハードウェアである場合、処理回路81は、例えば、単一回路、複合回路、プログラム化したプロセッサ、並列プログラム化したプロセッサ、ASIC(Application Specific Integrated Circuit)、FPGA(Field Programmable Gate Array)、またはこれらを組み合わせたものが該当する。修正コード生成部106は、処理回路を分散させた回路で実現されてもよいし、各部の機能をまとめて一つの処理回路で実現されてもよい。 When the processing circuit 81 is dedicated hardware, the processing circuit 81 may be, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or a combination of these. The correction code generation unit 106 may be implemented by a circuit in which processing circuits are distributed, or may be implemented by a single processing circuit that integrates the functions of each unit.

処理回路81がプロセッサである場合、修正コード生成部106の機能は、ソフトウェア等との組み合わせにより実現される。なお、ソフトウェア等には、例えば、ソフトウェア、ファームウェア、または、ソフトウェア及びファームウェアが該当する。ソフトウェア等はプログラムとして記述され、メモリに格納される。図7に示すように、処理回路81に適用されるプロセッサ82は、メモリ83に記憶されたプログラムを読み出して実行することにより、各部の機能を実現する。すなわち、テスト実行装置1は、処理回路81により実行されるときに、テストケース実行結果DB105と、修正仮説DB109と、修正ロジックDB107とに基づいて、テスト対象コードを修正するための1つ以上の修正コードを生成するステップ、が結果的に実行されることになるプログラムを格納するためのメモリ83を備える。換言すれば、このプログラムは、修正コード生成部106の手順や方法をコンピュータに実行させるものであるともいえる。ここで、メモリ83は、例えば、RAM(Random Access Memory)、ROM(Read Only Memory)、フラッシュメモリ、EPROM(Erasable Programmable Read Only Memory)、EEPROM(Electrically Erasable Programmable Read Only Memory)などの、不揮発性または揮発性の半導体メモリ、HDD(Hard Disk Drive)、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ミニディスク、DVD(Digital Versatile Disc)、それらのドライブ装置等、または、今後使用されるあらゆる記憶媒体であってもよい。 When the processing circuit 81 is a processor, the function of the correction code generator 106 is realized by combining with software or the like. Software and the like correspond to, for example, software, firmware, or software and firmware. Software or the like is written as a program and stored in memory. As shown in FIG. 7, a processor 82 applied to a processing circuit 81 reads out and executes a program stored in a memory 83 to realize functions of each section. That is, when the test execution device 1 is executed by the processing circuit 81, based on the test case execution result DB 105, the correction hypothesis DB 109, and the correction logic DB 107, one or more A memory 83 is provided for storing the program that will result in the step of generating the modified code. In other words, it can be said that this program causes a computer to execute the procedures and methods of the modification code generation unit 106 . Here, the memory 83 is, for example, a non-volatile or Volatile semiconductor memory, HDD (Hard Disk Drive), magnetic disk, flexible disk, optical disk, compact disk, mini disk, DVD (Digital Versatile Disc), drive devices thereof, etc., or any storage medium that will be used in the future There may be.

以上、修正コード生成部106の機能が、ハードウェア及びソフトウェア等のいずれか一方で実現される構成について説明した。しかしこれに限ったものではなく、修正コード生成部106の一部を専用のハードウェアで実現し、別の一部をソフトウェア等で実現する構成であってもよい。例えば、専用のハードウェアとしての処理回路81及びインターフェースなどで一部の機能を実現し、それ以外についてはプロセッサ82としての処理回路81がメモリ83に格納されたプログラムを読み出して実行することによってその機能を実現することが可能である。 The configuration in which the functions of the correction code generation unit 106 are realized by either hardware or software has been described above. However, the configuration is not limited to this, and a configuration in which part of the correction code generation unit 106 is realized by dedicated hardware and another part is realized by software or the like may be employed. For example, the processing circuit 81 as dedicated hardware and an interface implement some functions, and the processing circuit 81 as the processor 82 reads and executes the program stored in the memory 83 for other functions. It is possible to implement functions.

以上のように、処理回路81は、ハードウェア、ソフトウェア等、またはこれらの組み合わせによって、上述の各機能を実現することができる。なお、以上のことは、コード修正部103及びテスト実行部104についても同様に成り立つ。 As described above, the processing circuit 81 can implement each of the functions described above using hardware, software, etc., or a combination thereof. Note that the above also applies to the code correction unit 103 and the test execution unit 104 as well.

また、以上で説明したテスト実行装置1の各機能あるいは各構成要素は、システムを構築する各機器に分散して配置されてもよいし、いずれかの機器に集中して配置されてもよい。 Moreover, each function or each component of the test execution device 1 described above may be distributed to each device that constructs the system, or may be centrally disposed in any one of the devices.

なお、実施の形態を適宜、変形、省略することが可能である。 In addition, it is possible to modify or omit the embodiments as appropriate.

1 テスト実行装置、103 コード修正部、104 テスト実行部、105 テストケース実行結果DB、106 修正コード生成部、107 修正ロジックDB、109 修正仮説DB、110 UI部。 1 test execution device, 103 code correction unit, 104 test execution unit, 105 test case execution result DB, 106 correction code generation unit, 107 correction logic DB, 109 correction hypothesis DB, 110 UI unit.

Claims (6)

テスト対象のコードであるテスト対象コードを実行することよって生成されたテストケースの実行結果を管理する第1データベースと、
前記テストケースの実行結果における不具合の候補に、1つ以上の識別情報を対応付けて管理する第2データベースと、
前記1つ以上の識別情報に、前記テスト対象コードを修正するための1つ以上のパターンを対応付けて管理する第3データベースと、
前記第1データベースと、前記第2データベースと、前記第3データベースとに基づいて、前記テスト対象コードを修正するための1つ以上の修正コードを生成する修正コード生成部と
を備える、情報処理装置。
a first database that manages execution results of test cases generated by executing the code under test, which is the code under test;
a second database that associates and manages one or more pieces of identification information with defect candidates in the execution results of the test cases;
a third database that manages the one or more pieces of identification information in association with one or more patterns for correcting the code under test;
An information processing device, comprising: a correction code generation unit that generates one or more correction codes for correcting the test target code based on the first database, the second database, and the third database. .
請求項1に記載の情報処理装置であって、
前記修正コード生成部で生成された前記修正コードに基づいて、前記テスト対象コードを修正するコード修正部をさらに備える、情報処理装置。
The information processing device according to claim 1,
The information processing apparatus further comprising a code correction unit that corrects the test target code based on the correction code generated by the correction code generation unit.
請求項2に記載の情報処理装置であって、
前記コード修正部で修正された前記テスト対象コードである修正テスト対象コードを実行するテスト実行装置と、
前記テスト実行装置で前記修正テスト対象コードを実行することによって生成された実行結果を含む情報を出力する出力部と
をさらに備える、情報処理装置。
The information processing device according to claim 2,
a test execution device that executes the modified test target code, which is the test target code modified by the code modification unit;
An information processing apparatus, further comprising an output unit that outputs information including an execution result generated by executing the modified test target code with the test execution apparatus.
請求項3に記載の情報処理装置であって、
前記テスト実行装置で前記修正テスト対象コードを実行することによって生成された実行結果が、前記テストケースの実行結果として用いられる、情報処理装置。
The information processing device according to claim 3,
An information processing device, wherein an execution result generated by executing the modified test target code by the test execution device is used as an execution result of the test case.
請求項4に記載の情報処理装置であって、
前記修正コード生成部による生成、前記コード修正部による修正、及び、前記テスト実行装置による実行を含む一連の動作が繰り返し行われる、情報処理装置。
The information processing device according to claim 4,
An information processing device in which a series of operations including generation by the correction code generation unit, correction by the code correction unit, and execution by the test execution device are repeatedly performed.
第1データベースで、テスト対象のコードであるテスト対象コードを実行することよって生成されたテストケースの実行結果を管理し、
第2データベースで、前記テストケースの実行結果における不具合の候補に、1つ以上の識別情報を対応付けて管理し、
第3データベースで、前記1つ以上の識別情報に、前記テスト対象コードを修正するための1つ以上のパターンを対応付けて管理し、
前記第1データベースと、前記第2データベースと、前記第3データベースとに基づいて、前記テスト対象コードを修正するための1つ以上の修正コードを生成する、情報処理方法。
managing the execution results of the test cases generated by executing the code under test, which is the code under test, in the first database;
in a second database, one or more pieces of identification information are associated with the defect candidates in the execution results of the test cases, and managed;
in a third database, managing the one or more pieces of identification information in association with one or more patterns for correcting the code under test;
An information processing method, wherein one or more correction codes for correcting the code under test are generated based on the first database, the second database, and the third database.
JP2021149136A 2021-09-14 2021-09-14 Information processing apparatus and information processing method Pending JP2023042058A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021149136A JP2023042058A (en) 2021-09-14 2021-09-14 Information processing apparatus and information processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021149136A JP2023042058A (en) 2021-09-14 2021-09-14 Information processing apparatus and information processing method

Publications (1)

Publication Number Publication Date
JP2023042058A true JP2023042058A (en) 2023-03-27

Family

ID=85717246

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021149136A Pending JP2023042058A (en) 2021-09-14 2021-09-14 Information processing apparatus and information processing method

Country Status (1)

Country Link
JP (1) JP2023042058A (en)

Similar Documents

Publication Publication Date Title
US8756460B2 (en) Test selection based on an N-wise combinations coverage
US9032371B2 (en) Method and apparatus for automatic diagnosis of software failures
EP3616066B1 (en) Human-readable, language-independent stack trace summary generation
US8645761B2 (en) Precise fault localization
US11748245B2 (en) Object-oriented regression-candidate filter
JP2018026135A (en) System and method for cause point analysis for effective handling of static analysis alarms
JP2015011372A (en) Debug support system, method, program, and recording medium
US11194703B2 (en) System testing infrastructure for analyzing soft failures in active environment
US10095512B2 (en) Program development support device, non-transitory storage medium storing thereon computer-readable program development support program, and program development support method
CN113535141A (en) Database operation code generation method and device
CN112306568A (en) Service instance configuration method and device, electronic equipment and storage medium
US11132286B1 (en) Dynamic reordering of test case execution
US11609842B2 (en) System testing infrastructure for analyzing and preventing soft failure in active environment
JP2023042058A (en) Information processing apparatus and information processing method
US10481969B2 (en) Configurable system wide tests
CN115176233B (en) Performing tests in deterministic order
WO2023277802A2 (en) Device and method for identifying errors in a software application
US11520689B2 (en) System and method for automatic program repair using fast-result test cases
JP2023092064A (en) Correction place specification device
JP2019194818A (en) Software trouble prediction device
TWI807824B (en) Development system with automatic upgrade function and automatic upgrade method of development system
JP7456843B2 (en) Program modification device, program modification method, and program modification program
CN115858012B (en) Program variable configuration method, device, electronic equipment and storage medium
US10572624B2 (en) Modified design debugging using differential trace back
CN112631650A (en) Plug-in version information checking method, computing device and storage medium