JP6205965B2 - Test data generation program, test data generation method, and test data generation apparatus - Google Patents
Test data generation program, test data generation method, and test data generation apparatus Download PDFInfo
- Publication number
- JP6205965B2 JP6205965B2 JP2013166860A JP2013166860A JP6205965B2 JP 6205965 B2 JP6205965 B2 JP 6205965B2 JP 2013166860 A JP2013166860 A JP 2013166860A JP 2013166860 A JP2013166860 A JP 2013166860A JP 6205965 B2 JP6205965 B2 JP 6205965B2
- Authority
- JP
- Japan
- Prior art keywords
- program
- test data
- variable
- data generation
- change
- 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.)
- Expired - Fee Related
Links
- 238000012360 testing method Methods 0.000 title claims description 453
- 238000000034 method Methods 0.000 title claims description 203
- 238000012545 processing Methods 0.000 claims description 23
- 238000010586 diagram Methods 0.000 description 31
- 238000012217 deletion Methods 0.000 description 20
- 230000037430 deletion Effects 0.000 description 20
- 230000006870 function Effects 0.000 description 18
- 230000003287 optical effect Effects 0.000 description 15
- 239000000284 extract Substances 0.000 description 14
- 238000005516 engineering process Methods 0.000 description 4
- 238000007796 conventional method Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000012015 optical character recognition Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
Images
Landscapes
- Debugging And Monitoring (AREA)
Description
本発明は、テストデータ生成プログラム、テストデータ生成方法、およびテストデータ生成装置に関する。 The present invention relates to a test data generation program, a test data generation method, and a test data generation apparatus.
従来、プログラム開発において、テストケースを用いて、プログラムの動作をテストする技術がある。テストケースは、プログラムに与えられる入力変数の値を有する。また、プログラムに変更があったとき、プログラムの変更に起因して、変更後のプログラムに不具合が発生していないかどうか判定するリグレッションテストを行う技術がある。リグレッションテストでは、例えば、同一のテストケースを用いて、変更前後のプログラムの動作をテストして、変更前後のプログラムのテスト結果が一致するか否かに基づいて、不具合が発生していないかどうかを判定する。 Conventionally, in program development, there is a technique for testing a program operation using a test case. The test case has the value of the input variable that is given to the program. In addition, there is a technique for performing a regression test for determining whether a problem has occurred in a program after the change due to the change of the program when the program is changed. In the regression test, for example, the same test case is used to test the operation of the program before and after the change, and whether or not a defect has occurred based on whether the test results of the program before and after the change match. Determine.
関連する技術としては、例えば、テスト対象ソースコードを解析して、入出力インターフェースの変更を反映することができ、入力値と出力値を含む入力関係情報または変更後入出力関係情報を作成して、テストケースまたは変更後テストケースを作成するものがある。また、例えば、変更前のプログラムデータにより作成されたテストデータのうち、プログラムの変更にともなって変更された関数に関する箇所を書き換え、かつ、変更されなかった部分は流用して変更後プログラム用のテストデータを作成する技術がある。また、例えば、プログラム中で有効と考えられる箇所と無効と考えられる箇所を静的にかつ、機械的に算出し、調査結果のレポートによるプログラムの分析を支援し、および無効な命令を破棄する技術がある。 As related technologies, for example, the test source code can be analyzed to reflect changes in the input / output interface, and input relationship information including input values and output values or changed input / output relationship information can be created. , Create test cases or modified test cases. Also, for example, in the test data created from the program data before the change, the part related to the function that has been changed due to the program change is rewritten, and the part that has not been changed is diverted and the test for the program after the change is made There is technology to create data. In addition, for example, a technology that statically and mechanically calculates the locations that are considered valid and invalid in the program, supports the analysis of the program by reporting the survey results, and discards invalid instructions There is.
しかしながら、従来技術では、プログラムの変更時に、プログラムの中で用いられる変数が追加、削除あるいは名称変更されると、変更後のプログラムをテストする際に、変更前のプログラムのテストに使用したテストケースをそのまま流用できない場合がある。 However, in the conventional technology, when a variable used in the program is added, deleted, or renamed when the program is changed, the test case used for testing the program before the change when testing the changed program May not be used as is.
1つの側面では、本発明は、変更後のプログラムのリグレッションテストに用いるテストデータを生成することができるテストデータ生成プログラム、テストデータ生成方法、およびテストデータ生成装置を提供することを目的とする。 In one aspect, an object of the present invention is to provide a test data generation program, a test data generation method, and a test data generation apparatus that can generate test data used for a regression test of a program after change.
本発明の一側面によれば、テスト対象のメソッドが規定された第1プログラムにおける前記メソッドに用いられる変数と、前記第1プログラムから前記メソッドの内容が変更された第2プログラムにおける前記メソッドに用いられる変数とを比較した比較結果に基づいて、前記メソッドに用いられる変数の変更パターンを特定し、特定した前記変更パターンに基づいて、前記第1プログラムにおける前記メソッドに用いられる変数を変更した第3プログラムを作成し、作成した前記第3プログラムをシンボリック実行してテストデータを生成するテストデータ生成プログラム、テストデータ生成方法、およびテストデータ生成装置が提案される。 According to one aspect of the present invention, a variable used in the method in the first program in which a method to be tested is defined, and a method in the second program in which the content of the method is changed from the first program are used. A change pattern of a variable used for the method is specified based on a comparison result of comparing with a variable to be changed, and a variable used for the method in the first program is changed based on the specified change pattern. A test data generation program, a test data generation method, and a test data generation device that generate a program and generate test data by symbolically executing the generated third program are proposed.
本発明の一態様によれば、変更後のプログラムのリグレッションテストに用いるテストデータを生成することができるという効果を奏する。 According to one aspect of the present invention, it is possible to generate test data used for a regression test of a program after change.
以下に添付図面を参照して、本発明にかかるテストデータ生成プログラム、テストデータ生成方法、およびテストデータ生成装置の実施の形態を詳細に説明する。 Exemplary embodiments of a test data generation program, a test data generation method, and a test data generation apparatus according to the present invention will be explained below in detail with reference to the accompanying drawings.
(テストデータ生成装置100の動作例)
図1は、実施の形態にかかるテストデータ生成装置100の動作例を示す説明図である。
(Operation example of test data generation apparatus 100)
FIG. 1 is an explanatory diagram of an operation example of the test
テストデータ生成装置100は、テスト対象のメソッドが規定された第1プログラムP1のメソッドの内容が変更された第2プログラムP2のテストケースを生成するコンピュータである。以下の説明では、第1プログラムを「変更前プログラムP1」と表記する場合がある。また、以下の説明では、第2プログラムを「変更後プログラムP2」と表記する場合がある。
The test
メソッドの内容変更には、メソッドに用いられる変数の変更が含まれる。ここで、変数は、プログラムに含まれるメソッドの引数(メソッドパラメータ)として宣言された変数と、メソッドの引数以外としてプログラムに宣言された変数と、を含む。変数は、いわゆるプログラムインターフェースである。以下の説明では、プログラムに含まれるメソッドの引数として宣言された変数を「パラメータ変数」と表記する場合がある。以下の説明では、プログラムに宣言された変数を「プログラム変数」と表記する場合がある。 Changing the contents of a method includes changing a variable used in the method. Here, the variable includes a variable declared as an argument (method parameter) of a method included in the program and a variable declared in the program as a parameter other than the method argument. The variable is a so-called program interface. In the following description, a variable declared as an argument of a method included in a program may be referred to as a “parameter variable”. In the following description, a variable declared in a program may be referred to as a “program variable”.
(1)テストデータ生成装置100は、変更前プログラムP1と変更後プログラムP2とに基づいて、テスト対象のメソッドに用いられる変数の変更パターンを表す差異情報を特定する。差異情報の特定処理の詳細については、図5〜図13を用いて後述する。
(1) The test
(2)テストデータ生成装置100は、差異情報に基づいて、変更前プログラムP1を加工して、変更後プログラムP2のテストデータ作成用のプログラムバリエーションを作成する。プログラムの加工処理の詳細については、図14を用いて後述する。これにより、テストデータ生成装置100は、変更後プログラムP2に対応しうるプログラムバリエーションを作成することができる。
(2) The test
(3)テストデータ生成装置100は、加工後プログラムをシンボリック実行して、複数のテストデータを生成する。シンボリック実行は、記号実行とも呼ばれる。テストデータ生成処理の詳細については、図15および図16を用いて後述する。ここで、テストデータは、テストケースTC1と実行結果R1とのペアを含む。テストケースTC1とは、プログラムの実行条件になる入力変数の値である。実行結果R1とは、プログラムの実行結果になる出力変数の値である。これにより、テストデータ生成装置100は、変更後プログラムP2に対するリグレッションテストに用いうる複数のテストデータを生成することができる。
(3) The test
(4)テストデータ生成装置100は、複数のテストデータをリファクタリングして、テストケース部分が重複する複数のペアを統合して、統合後のテストケースTC1*と実行結果R1*とのペアを有する新たなテストデータを生成する。リファクタリング処理の詳細については、図17〜図21を用いて後述する。これにより、テストデータ生成装置100は、複数のテストデータをまとめて、プログラム変数またはパラメータ変数の変更を含む変更後プログラムP2に対しても、リグレッションテストに用いるテストデータを生成することができる。
(4) The test
このため、例えば、リグレッションテストの実行者が、変更前プログラムP1と変更後プログラムP2と、を参照して、変更後プログラムP2に対するテストデータを作成する場合に比べて、リグレッションテストの実行者の作業量を低減することができる。また、リグレッションテストの実行者によって誤ったテストデータが作成されることを防止することができる。 For this reason, for example, compared with a case where the execution person of the regression test refers to the program P1 before change and the program P2 after change and creates test data for the program P2 after change, the work of the person who executes the regression test The amount can be reduced. Further, it is possible to prevent erroneous test data from being created by a regression tester.
(5)テストデータ生成装置100は、さらに、リファクタリングした新たなテストデータを用いて、リグレッションテストを実行してもよい。リグレッションテストは、回帰テストとも呼ばれる。テストデータ生成装置100は、例えば、リグレッションテストにおいて、テストケースTC1*に対応する実行結果R1*と、テストケースTC1*を実行条件として変更後プログラムP2を実行した場合の実行結果R2とを比較する。テストデータ生成装置100は、比較結果に基づいて、変更後プログラムP2に不具合があるか否かを判定してもよい。リグレッションテストの詳細については、図22を用いて後述する。
(5) The test
これにより、テストデータ生成装置100は、プログラム変数またはパラメータ変数が変更された変更後プログラムP2に対しても、リグレッションテストを実行することができ、リグレッションテストのテスト結果を出力することができる。そして、テストデータ生成装置100の利用者は、リグレッションテストのテスト結果から、変更後プログラムP2に不具合があるか否かを把握することができる。
Thereby, the test
(テストデータ生成装置100のハードウェア構成例)
図2は、テストデータ生成装置100のハードウェア構成例を示すブロック図である。図2において、テストデータ生成装置100は、CPU(Central Processing Unit)201と、ROM(Read Only Memory)202と、RAM(Random Access Memory)203と、磁気ディスクドライブ(Hard Disk Drive)204と、磁気ディスク205と、光ディスクドライブ206と、光ディスク207と、ディスプレイ208と、インターフェース(I/F:Interface)209と、キーボード210と、マウス211と、スキャナ212と、プリンタ213と、を備えている。また、各構成部はバス200によってそれぞれ接続されている。
(Example of hardware configuration of test data generation apparatus 100)
FIG. 2 is a block diagram illustrating a hardware configuration example of the test
ここで、CPU201は、テストデータ生成装置100の全体の制御を司る。ROM202は、ブートプログラムなどのプログラムを記憶している。RAM203は、CPU201のワークエリアとして使用される。磁気ディスクドライブ204は、CPU201の制御に従って磁気ディスク205に対するデータのリード/ライトを制御する。磁気ディスク205は、磁気ディスクドライブ204の制御で書き込まれたデータを記憶する。
Here, the
光ディスクドライブ206は、CPU201の制御に従って光ディスク207に対するデータのリード/ライトを制御する。光ディスク207は、光ディスクドライブ206の制御で書き込まれたデータを記憶したり、光ディスク207に記憶されたデータをコンピュータに読み取らせたりする。
The
ディスプレイ208は、カーソル、アイコンあるいはツールボックスをはじめ、文書、画像、機能情報などのデータを表示する。このディスプレイ208は、例えば、液晶ディスプレイ、プラズマディスプレイなどを採用することができる。
The
I/F209は、通信回線を通じてLAN(Local Area Network)、WAN(Wide Area Network)、インターネットなどのネットワーク214に接続され、このネットワーク214を介して他の装置に接続される。そして、I/F209は、ネットワーク214と内部のインターフェースを司り、外部装置からのデータの入出力を制御する。I/F209には、例えば、モデムやLANアダプタなどを採用することができる。
The I /
キーボード210は、文字、数字、各種指示などの入力のためのキーを備え、データの入力を行う。また、タッチパネル式の入力パッドやテンキーなどであってもよい。マウス211は、カーソルの移動や範囲選択、あるいはウィンドウの移動やサイズの変更などを行う。ポインティングデバイスとして同様に機能を備えるものであれば、トラックボールやジョイスティックなどであってもよい。
The keyboard 210 includes keys for inputting characters, numbers, various instructions, and the like, and inputs data. Moreover, a touch panel type input pad or a numeric keypad may be used. The
スキャナ212は、画像を光学的に読み取り、テストデータ生成装置100内に画像データを取り込む。なお、スキャナ212は、OCR(Optical Character Reader)機能を持たせてもよい。また、プリンタ213は、画像データや文書データを印刷する。プリンタ213には、例えば、レーザプリンタやインクジェットプリンタを採用することができる。また、光ディスクドライブ206、光ディスク207、ディスプレイ208、キーボード210、マウス211、スキャナ212、およびプリンタ213の少なくともいずれか1つは、なくてもよい。
The
(テストデータ生成装置100の機能的構成例)
次に、図3を用いて、テストデータ生成装置100の機能的構成例について説明する。
(Functional configuration example of test data generation apparatus 100)
Next, a functional configuration example of the test
図3は、テストデータ生成装置100の機能的構成例を示すブロック図である。テストデータ生成装置100は、特定部301と、作成部302と、生成部303と、判定部304と、を含む。特定部301と、作成部302と、生成部303と、判定部304とは、例えば、図2に示したROM202、RAM203、磁気ディスク205、光ディスク207などの記憶装置に記憶されたプログラムをCPU201に実行させることにより、または、I/F209により、その機能を実現する。
FIG. 3 is a block diagram illustrating a functional configuration example of the test
特定部301は、テスト対象のメソッドが規定された第1プログラムにおけるメソッドに用いられる変数と、第1プログラムからメソッドの内容が変更された第2プログラムにおけるメソッドに用いられる変数とを比較する。次に、特定部301は、比較結果に基づいて、メソッドに用いられる変数の変更パターンを特定する。ここで、第1プログラムとは、例えば、上述した変更前プログラムP1である。第2プログラムとは、例えば、上述した変更後プログラムP2である。メソッドに用いられる変数は、メソッドの引数になるパラメータ変数またはメソッドの引数以外のプログラム変数である。
The specifying
特定部301は、例えば、メソッドに用いられる変数について、第1〜第3の変更パターンのうちの少なくともいずれかの変更パターンを特定する。第1の変更パターンとは、メソッドの内容の変更後に同一形式の他の変数に変更される変更パターンである。第2の変更パターンとは、メソッドの内容の変更後に削除される変更パターンである。第3の変更パターンとは、メソッドの内容の変更後に追加される変更パターンである。
For example, the identifying
ここで、変更前プログラムP1におけるプログラム変数が「x、b1」かつパラメータ変数が「a、b」、変更後プログラムP2におけるプログラム変数が「i、b2」かつパラメータ変数が「a、c」である場合を一例として挙げる。 Here, the program variables in the pre-change program P1 are “x, b1” and the parameter variables are “a, b”, the program variables in the post-change program P2 are “i, b2”, and the parameter variables are “a, c”. Take the case as an example.
この場合、特定部301は、変更パターンとして、{x→i,x→φ}と、{b1→b2,b1→φ}と、{b→c,b→φ}と、{φ→i,φ→b2,φ→c}と、を特定する。ここで、φは、ダミー変数である。上述した{x→i}は、xからiに変更される変更パターンを表す。上述した{x→φ}は、xが削除される変更パターンを表す。上述した{φ→i}は、iが追加される変更パターンを表す。
In this case, the specifying
これにより、特定部301は、取り得る変更パターンを特定することができる。特定されたデータは、例えば、RAM203、磁気ディスク205、光ディスク207などの記憶領域に記憶される。
Thereby, the specific |
作成部302は、特定した変更パターンに基づいて、第1プログラムにおけるメソッドに用いられる変数を変更した第3プログラムを作成する。第3プログラムとは、第2プログラムのテストデータ生成用のプログラムである。第3プログラムとは、例えば、上述したプログラムバリエーションである。
The
作成部302は、例えば、メソッドに用いられる変数ごとに特定した変更パターンの組み合わせに基づいて、第3プログラムを作成する。作成部302は、具体的には、メソッドに用いられるそれぞれ異なる変数についての変更パターンの組み合わせに基づいて、第3プログラムを作成する。
For example, the
ここで、特定部301によって、変更パターンとして、{x→i,x→φ}と、{b1→b2,b1→φ}と、{b→c,b→φ}と、{φ→i,φ→b2,φ→c}と、が特定された場合を一例として挙げる。
Here, by the specifying
この場合、作成部302は、{x→i}と、{b1→b2}と、{b→c}との組み合わせに基づいて、変更前プログラムP1のxをiに、b1をb2に、bをcに置換して、プログラムバリエーションを作成する。また、作成部302は、{x→φ}と、{b1→b2}と、{b→c}と、{φ→i}との組み合わせに基づいて、変更前プログラムP1のxをx_rに置換し、b1をb2に置換し、bをcに置換し、iを追加して、プログラムバリエーションを作成する。ここで、x_rは、xが削除されることを表す削除用の変数である。
In this case, based on the combination of {x → i}, {b1 → b2}, and {b → c}, the
これにより、作成部302は、変更後プログラムP2のテストデータの生成用のプログラムバリエーションを作成することができる。作成されたデータは、例えば、RAM203、磁気ディスク205、光ディスク207などの記憶領域に記憶される。
Thereby, the
生成部303は、作成した第3プログラムをシンボリック実行してテストデータを生成する。ここで、シンボリック実行とは、記号実行と呼ばれる。シンボリック実行によるテストデータの生成は従来技術のため説明を省略する。
The generating
生成部303は、例えば、作成した第3プログラムにおける命令文の系列の実行条件になる入力変数の値と実行結果になる出力変数の値とを対応付けて有するテストデータを生成する。生成部303は、具体的には、実行条件「i=0、b2=false、a=0、c=0」と実行結果「{0,1}」を対応付けた第1のペアを有するテストデータを生成する。
The
この場合、第1のペアは、実行条件「i=0、b2=false、a=0、c=0」を入力変数として変更前プログラムP1を実行した場合に、実行結果「{0,1}」のいずれかが出力変数の値となることを表す。また、第1のペアは、実行条件「i=0、b2=false、a=0、c=0」を入力変数として変更後プログラムP2を実行した場合に、実行結果「{0,1}」のいずれかが出力変数の期待値となることを表す。 In this case, when the pre-change program P1 is executed with the execution condition “i = 0, b2 = false, a = 0, c = 0” as input variables, the first pair has an execution result “{0, 1}”. "" Indicates that the value of the output variable. Further, the first pair has an execution result “{0, 1}” when the changed program P2 is executed with the execution condition “i = 0, b2 = false, a = 0, c = 0” as input variables. Indicates that one of the values is the expected value of the output variable.
また、テストデータは、さらに、実行条件「i=0、b2=true、a=−1、c=0」と実行結果「0」とを対応付けた第2のペアを有する場合がある。また、テストデータは、さらに、実行条件「i=0、b2=false、a=−1、c=0」と実行結果「0」を対応付けた第3のペアを有する場合がある。 The test data may further include a second pair in which the execution condition “i = 0, b2 = true, a = −1, c = 0” and the execution result “0” are associated with each other. Further, the test data may further include a third pair in which the execution condition “i = 0, b2 = false, a = −1, c = 0” and the execution result “0” are associated with each other.
これにより、生成部303は、変更後プログラムP2のテストデータを生成することができる。生成されたデータは、例えば、RAM203、磁気ディスク205、光ディスク207などの記憶領域に記憶される。
Thereby, the production |
判定部304は、生成したテストデータが有する入力変数の値を実行条件にして第2プログラムを実行した場合の出力変数の値が、テストデータが有する出力変数の値に一致するか否かを判定する。判定部304は、例えば、実行条件「i=0、b2=true、a=−1、c=0」を入力変数として変更後プログラムP2を実行した場合に実行結果が「−1」であって、出力変数の期待値となる実行結果「0」と一致するか否かを判定する。ここで、判定部304は、或る実行条件を入力変数とした場合の実行結果が、テストデータが有する当該実行条件に対応する実行結果と一致しない場合に、メソッドの内容の変更によりメソッドの機能が変更されたと判定してもよい。
The
判定部304は、生成したテストデータが有する入力変数の値を実行条件にして第2プログラムを実行した場合の出力変数の値が、テストデータが有する出力変数の値に含まれるか否かを判定する。判定部304は、例えば、実行条件「i=0、b2=false、a=0、c=0」を入力変数として変更後プログラムP2を実行した場合の実行結果が「−1」であり、出力変数の期待値となる実行結果「{0,1}」のいずれかの値と一致するか否かを判定する。ここで、判定部304は、或る実行条件を入力変数とした場合の実行結果が、テストデータが有する当該実行条件に対応する実行結果に含まれない場合に、メソッドの内容の変更によりメソッドの機能が変更されたと判定してもよい。
The
判定部304は、生成した前記テストデータが有する実行条件と実行結果とを対応付けたペアのうち、実行条件になる入力変数のうちの前記メソッドの変更前後で名称変更されない入力変数の値が同一になり、かつ実行結果が同一になるペアをグループ化する。そして、判定部304は、グループ化したペアのうち、いずれかのペアに含まれる入力変数の値を実行条件にして第2プログラムを実行した場合の出力変数の値が、前記いずれかのペアに含まれる出力変数の値に含まれるか否かを判定する。
The
判定部304は、例えば、実行条件「i=0、b2=true、a=−1、c=0」と実行結果「0」を対応付けたペアと、実行条件「i=0、b2=false、a=−1、c=0」と実行結果「0」を対応付けたペアとをグループ化する。次に、判定部304は、実行条件ごとに、当該実行条件を入力変数として変更後プログラムP2を実行した場合の実行結果が、当該実行条件に対応する実行結果に含まれるか否かを判定する。ここで、判定部304は、グループ化したペアに、或る実行条件を入力変数とした場合の実行結果が、テストデータが有する当該実行条件に対応する実行結果に含まれると判定されたペアがあるか否かを判定してもよい。そして、判定部304は、ペアがない場合に、メソッドの内容の変更によりメソッドの機能が変更されたと判定してもよい。
The
これにより、判定部304は、リグレッションテストを実行することができる。判定結果は、例えば、RAM203、磁気ディスク205、光ディスク207などの記憶領域に記憶される。また、判定部304は、判定結果を出力してもよい。出力形式としては、例えば、ディスプレイ208への表示、プリンタ213への印刷出力、I/F209による外部装置への送信がある。また、RAM203、磁気ディスク205、光ディスク207などの記憶領域に記憶することとしてもよい。これにより、テストデータ生成装置100の利用者は、判定結果から、メソッドの内容の変更によりメソッドの機能が変更されたか否かを判定することができる。
Thereby, the
(プログラムの変更内容の一例)
次に、図4を用いて、プログラムの変更内容の一例について説明する。
(Example of program changes)
Next, an example of program change contents will be described with reference to FIG.
図4は、プログラムの変更内容の一例を示す説明図である。図4の例では、変更前プログラムP1には、int型のプログラム変数「x」と、boolean型のプログラム変数「b1」とが宣言されている。また、変更前プログラムP1には、maxメソッドが規定され、maxメソッドの引数としてint型のパラメータ変数「a」と、int型のパラメータ変数「b」とが宣言されている。 FIG. 4 is an explanatory diagram showing an example of program change contents. In the example of FIG. 4, an int type program variable “x” and a Boolean type program variable “b1” are declared in the pre-change program P1. The pre-change program P1 defines a max method, and declares an int type parameter variable “a” and an int type parameter variable “b” as arguments of the max method.
一方で、変更後プログラムP2には、int型のプログラム変数「x」と、boolean型のプログラム変数「b1」とがなく、int型のプログラム変数「i」と、boolean型のプログラム変数「b2」とが宣言されている。また、変更後プログラムP2には、maxメソッドの引数としてint型のパラメータ変数「a」と、int型のパラメータ変数「c」とが宣言されている。 On the other hand, the changed program P2 does not have the int type program variable “x” and the Boolean type program variable “b1”, but the int type program variable “i” and the Boolean type program variable “b2”. And are declared. In the changed program P2, an int type parameter variable “a” and an int type parameter variable “c” are declared as arguments of the max method.
(差異情報の特定処理の一例)
次に、図5〜図13を用いて、差異情報の特定処理の一例について説明する。
(An example of difference information identification processing)
Next, an example of the difference information specifying process will be described with reference to FIGS.
図5〜図13は、差異情報の特定処理の一例を示す説明図である。図5に示すように、テストデータ生成装置100は、変更前プログラムP1から、プログラム変数の集合V1={x,b1}と、パラメータ変数の集合P1={a,b}と、を抽出する。以下の説明では、抽出したプログラム変数の集合V1とパラメータ変数の集合P1とを合わせて「変更前変数データ500」と表記する場合がある。次に、図6の説明に移行する。
5 to 13 are explanatory diagrams illustrating an example of the difference information specifying process. As shown in FIG. 5, the test
図6に示すように、テストデータ生成装置100は、変更後プログラムP2から、プログラム変数の集合V2={i,b2}と、パラメータ変数の集合P2={a,c}と、を含む変更後変数データを抽出する。以下の説明では、抽出したプログラム変数の集合V2とパラメータ変数の集合P2とを合わせて「変更後変数データ600」と表記する場合がある。次に、図7の説明に移行する。
As illustrated in FIG. 6, the test
図7に示すように、テストデータ生成装置100は、変更前変数データ500と変更後変数データ600とに基づいて、不変名称のプログラム変数の集合V_INV=V2∩V1={}を抽出する。また、テストデータ生成装置100は、変更前変数データ500と変更後変数データ600とに基づいて、不変名称のパラメータ変数の集合P_INV=P2∩P1={a}を抽出する。以下の説明では、抽出した不変名称のプログラム変数の集合V_INVと不変名称のパラメータ変数の集合P_INVとを合わせて「不変変数データ701」と表記する場合がある。
As illustrated in FIG. 7, the test
また、テストデータ生成装置100は、変更前変数データ500と変更後変数データ600とに基づいて、追加候補のプログラム変数の集合V_ADD=V2−V1={i,b2}を抽出する。また、テストデータ生成装置100は、変更前変数データ500と変更後変数データ600とに基づいて、追加候補のパラメータ変数の集合P_ADD=P2−P1={c}を抽出する。以下の説明では、抽出した追加候補のプログラム変数の集合V_ADDと追加候補のパラメータ変数の集合P_ADDとを合わせて「追加候補変数データ702」と表記する場合がある。
Further, the test
また、テストデータ生成装置100は、変更前変数データ500と変更後変数データ600とに基づいて、削除候補のプログラム変数の集合V_REM=V1−V2={x,b1}を抽出する。また、テストデータ生成装置100は、変更前変数データ500と変更後変数データ600とに基づいて、削除候補のパラメータ変数の集合P_REM=P1−P2={b}を抽出する。以下の説明では、抽出した削除候補のプログラム変数の集合V_REMと削除候補のパラメータ変数の集合P_REMとを合わせて「削除候補変数データ703」と表記する場合がある。次に、図8の説明に移行する。
Further, the test
図8に示すように、テストデータ生成装置100は、追加候補変数データ702のプログラム変数の集合V_ADD={i,b2}にダミー変数を追加して、プログラム変数の集合V_ADD={i,b2,φ}にする。また、テストデータ生成装置100は、追加候補変数データ702のパラメータ変数の集合P_ADD={c}にダミー変数を追加して、パラメータ変数の集合P_ADD={c,φ}にする。
As illustrated in FIG. 8, the test
また、テストデータ生成装置100は、削除候補変数データ703のプログラム変数の集合V_REM={x,b1}にダミー変数を追加して、プログラム変数の集合V_REM={x,b1,φ}にする。また、テストデータ生成装置100は、削除候補変数データ703のパラメータ変数の集合P_REM={b}にダミー変数を追加して、パラメータ変数の集合P_REM={b,φ}にする。
Further, the test
そして、テストデータ生成装置100は、ダミー変数を追加した追加候補変数データ702と、ダミー変数を追加した削除候補変数データ703と、を結合する。以下の説明では、ダミー変数を追加した追加候補変数データ702とダミー変数を追加した削除候補変数データ703とを合わせて「結合後データ800」と表記する場合がある。次に、図9の説明に移行する。
Then, the test
図9に示すように、テストデータ生成装置100は、結合後データ800に基づいて、プログラム変数の変更パターンV_PATTERN=V_REM→V_ADD={x→i,x→b2,x→φ,b1→i,b1→b2,b1→φ,φ→i,φ→b2,φ→φ}を特定する。また、テストデータ生成装置100は、結合後データ800に基づいて、パラメータ変数の変更パターンP_PATTERN=P_REM→P_ADD={b→c,b→φ,φ→c,φ→φ}を特定する。以下の説明では、プログラム変数の変更パターンV_PATTERNとパラメータ変数の変更パターンP_PATTERNとを合わせて「組み合わせデータ901」と表記する場合がある。
As shown in FIG. 9, the test
次に、テストデータ生成装置100は、組み合わせデータ901のうちのプログラム変数の変更パターンV_PATTERNからφ→φのペアと、型の異なるペアとを除去して、プログラム変数の変更パターンV_PATTERN={x→i,x→φ,b1→b2,b1→φ,φ→i,φ→b2}にする。また、テストデータ生成装置100は、組み合わせデータ901のうちのパラメータ変数の変更パターンP_PATTERNからφ→φのペアと、型の異なるペアとを除去して、パラメータ変数の変更パターンP_PATTERN={b→c,b→φ,φ→c}にする。
Next, the test
以下の説明では、ペアを除去したプログラム変数の変更パターンV_PATTERNとペアを除去したパラメータ変数の変更パターンP_PATTERNとを合わせて「除去後データ902」と表記する場合がある。次に、図10の説明に移行する。
In the following description, the program variable change pattern V_PATTERN from which the pair has been removed and the parameter variable change pattern P_PATTERN from which the pair has been removed may be collectively referred to as “
図10に示すように、テストデータ生成装置100は、除去後データ902に基づいて、変更前プログラムP1のプログラム変数とパラメータ変数とについての変更パターンV_x={x→i,x→φ}と、V_b1={b1→b2,b1→φ}と、M_b={b→c,b→φ}とを抽出する。また、テストデータ生成装置100は、除去後データ900に基づいて、変更後プログラムP2のプログラム変数とパラメータ変数とについての追加パターンφ={φ→i,φ→b2,φ→c}を抽出する。以下の説明では、抽出した変更パターンV_xと、V_b1と、M_bと、追加パターンφとを合わせて「変更パターンデータ1000」と表記する場合がある。次に、図11の説明に移行する。
As shown in FIG. 10, the test
図11に示すように、テストデータ生成装置100は、変更パターンデータ1000に基づいて、変更バリエーションVARIATION=V_x→V_b1→M_b={{x→i,b1→b2,b→c},{x→i,b1→b2,b→φ},{x→i,b1→φ,b→c},{x→i,b1→φ,b→φ},{x→φ,b1→b2,b→c},{x→φ,b1→b2,b→φ},{x→φ,b1→φ,b→c},{x→φ,b1→φ,b→φ}}を抽出する。以下の説明では、抽出した変更バリエーションを「バリエーションデータ1100」と表記する場合がある。次に、図12の説明に移行する。
As shown in FIG. 11, the test
図12に示すように、テストデータ生成装置100は、バリエーションデータ1100に、変更後プログラムP2のプログラム変数とパラメータ変数とについての変更パターンφを追加して、変更バリエーションVARIATION=V_x→V_b1→M_b={{x→i,b1→b2,b→c},{x→i,b1→b2,b→φ,φ→c},{x→i,b1→φ,b→c,φ→b2},{x→i,b1→φ,b→φ,φ→b2,φ→c},{x→φ,b1→b2,b→c,φ→i},{x→φ,b1→b2,b→φ,φ→i,φ→c},{x→φ,b1→φ,b→c,φ→i,φ→b2},{x→φ,b1→φ,b→φ,φ→i,φ→b2,φ→c}}を作成する。以下の説明では、追加した変更バリエーションを「追加バリエーションデータ1200」と表記する場合がある。次に、図13の説明に移行する。
As shown in FIG. 12, the test
図13に示すように、テストデータ生成装置100は、変更バリエーションから、プログラムの変更内容を特定する。図13の例では、テストデータ生成装置100は、変更バリエーションB1「{x→i,b1→b2,b→c}」から、プログラムの変更内容「xをiに、b1をb2に、bをcに名称変更」を特定する。
As illustrated in FIG. 13, the test
また、テストデータ生成装置100は、変更バリエーションB2「{x→i,b1→b2,b→φ,φ→c}」から、プログラムの変更内容「xをiに、b1をb2に名称変更、bを削除、cを追加」を特定する。
Further, the test
また、テストデータ生成装置100は、変更バリエーションB3「{x→i,b1→φ,b→c,φ→b2}」から、プログラムの変更内容「xをiに、bをcに名称変更、b1を削除、b2を追加」を特定する。
Further, the test
また、テストデータ生成装置100は、変更バリエーションB4「{x→i,b1→φ,b→φ,φ→b2,φ→c}」から、プログラムの変更内容「xをiに名称変更、b1・bを削除、b2・cを追加」を特定する。
Further, the test
また、テストデータ生成装置100は、変更バリエーションB5「{x→φ,b1→b2,b→c,φ→i}」から、プログラムの変更内容「xを削除、iを追加、b1をb2に、bをcに名称変更」を特定する。
Further, the test
また、テストデータ生成装置100は、変更バリエーションB6「{x→φ,b1→b2,b→φ,φ→i,φ→c}」から、プログラムの変更内容「b1をb2に名称変更、x・bを削除、i・cを追加」を特定する。
Further, the test
また、テストデータ生成装置100は、変更バリエーションB7「{x→φ,b1→φ,b→c,φ→i,φ→b2}」から、プログラムの変更内容「bをcに名称変更、x・b1を削除、i・b2を追加」を特定する。
Further, the test
また、テストデータ生成装置100は、変更バリエーションB8「{x→φ,b1→φ,b→φ,φ→i,φ→b2,φ→c}」から、プログラムの変更内容「x・b1・bを削除、i・b2・cを追加」を特定する。
In addition, the test
(プログラムの加工処理の一例)
次に、図14を用いて、プログラムの加工処理の一例について説明する。
(Example of program processing)
Next, an example of program processing will be described with reference to FIG.
図14は、プログラムの加工処理の一例を示す説明図である。図14に示すように、テストデータ生成装置100は、変更前プログラムP1を、変更バリエーションBから特定した変更内容に従って加工して、変更バリエーションB1〜B8に対応するプログラムバリエーションP1−1〜P1−8を作成する。
FIG. 14 is an explanatory diagram showing an example of processing of a program. As shown in FIG. 14, the test
図14の例では、テストデータ生成装置100は、変更バリエーションB1に従って、変更前プログラムP1におけるxをiに、b1をb2に、bをcに置換して、変更バリエーションB1に対応するプログラムバリエーションP1−1を作成する。
In the example of FIG. 14, the test
また、テストデータ生成装置100は、変更バリエーションB2に従って、変更前プログラムP1を加工する。テストデータ生成装置100は、例えば、変更前プログラムP1におけるxをiに、b1をb2に置換し、bを削除したことを表すb_rに置換し、cを追加し、変更バリエーションB2に対応するプログラムバリエーションP1−2を作成する。
Further, the test
また、テストデータ生成装置100は、変更バリエーションB3に従って、変更前プログラムP1を加工する。テストデータ生成装置100は、例えば、変更前プログラムP1におけるxをiに、bをcに置換し、b1を削除したことを表すb1_rに置換し、b2を追加し、変更バリエーションB3に対応するプログラムバリエーションP1−3を作成する。
Further, the test
また、テストデータ生成装置100は、変更バリエーションB4に従って、変更前プログラムP1を加工する。テストデータ生成装置100は、例えば、変更前プログラムP1におけるxをiに置換し、b1・bを削除したことを表すb1_r・b_rに置換し、b2・cを追加し、変更バリエーションB4に対応するプログラムバリエーションP1−4を作成する。
Further, the test
また、テストデータ生成装置100は、変更バリエーションB5に従って、変更前プログラムP1を加工する。テストデータ生成装置100は、例えば、変更前プログラムP1におけるxを削除したことを表すx_rに置換し、iを追加し、b1をb2に、bをcに置換し、変更バリエーションB5に対応するプログラムバリエーションP1−5を作成する。
Further, the test
また、テストデータ生成装置100は、変更バリエーションB6に従って、変更前プログラムP1を加工する。テストデータ生成装置100は、例えば、変更前プログラムP1におけるb1をb2に置換し、x・bを削除したことを表すx_r・b_rに置換し、i・cを追加し、変更バリエーションB6に対応するプログラムバリエーションP1−6を作成する。
Moreover, the test
また、テストデータ生成装置100は、変更バリエーションB7に従って、変更前プログラムP1を加工する。テストデータ生成装置100は、例えば、変更前プログラムP1におけるbをcに置換し、x・b1を削除したことを表すx_r・b1_rに置換し、i・b2を追加し、変更バリエーションB7に対応するプログラムバリエーションP1−7を作成する。
Moreover, the test
また、テストデータ生成装置100は、変更バリエーションB8に従って、変更前プログラムP1を加工する。テストデータ生成装置100は、例えば、変更前プログラムP1におけるx・b1・bを削除したことを表すx_r・b1_r・b_rに置換し、i・b2・cを追加し、変更バリエーションB8に対応するプログラムバリエーションP1−8を作成する。
Further, the test
(テストデータ生成処理の一例)
次に、図15および図16を用いて、テストデータ生成処理の一例について説明する。
(Example of test data generation process)
Next, an example of test data generation processing will be described with reference to FIGS. 15 and 16.
図15および図16は、テストデータ生成処理の一例を示す説明図である。図15および図16に示すように、テストデータ生成装置100は、作成したプログラムバリエーションP1−1〜P1−8をシンボリック実行してテストデータを生成する。テストデータは、シンボリック実行により得られる命令文の系列におけるテストケースになる入力変数の値と実行結果になる出力変数の値とを含む。シンボリック実行によるテストデータの生成については従来技術のため詳細な説明は省略する。
15 and 16 are explanatory diagrams illustrating an example of the test data generation process. As shown in FIGS. 15 and 16, the test
図15の例では、テストデータ生成装置100は、プログラムバリエーションP1−1をシンボリック実行して得られる命令文の系列からテストデータT1を生成する。ここで、テストデータT1は、テストケース「i=0、b2=false、a=0、c=0」と実行結果「0」を対応付けたペアを有する。また、テストデータT1は、テストケース「i=0、b2=true、a=−1、c=0」と実行結果「0」を対応付けたペアを有する。また、テストデータT1は、テストケース「i=0、b2=false、a=0、c=1」と実行結果「−1」を対応付けたペアを有する。
In the example of FIG. 15, the test
また、テストデータ生成装置100は、プログラムバリエーションP1−2をシンボリック実行して得られる命令文の系列からテストデータT2を生成する。ここで、テストデータT2は、テストケース「i=0、b2=false、a=0、b_r=0、c=0」と実行結果「0」を対応付けたペアを有する。また、テストデータT2は、テストケース「i=0、b2=true、a=−1、b_r=0、c=0」と実行結果「0」を対応付けたペアを有する。また、テストデータT2は、テストケース「i=0、b2=false、a=0、b_r=1、c=0」と実行結果「−1」を対応付けたペアを有する。
In addition, the test
また、テストデータ生成装置100は、プログラムバリエーションP1−3をシンボリック実行して得られる命令文の系列からテストデータT3を生成する。ここで、テストデータT3は、テストケース「i=0、b1_r=false、a=0、c=0、b2=false」と実行結果「0」を対応付けたペアを有する。また、テストデータT3は、テストケース「i=0、b1_r=true、a=−1、c=0、b2=false」と実行結果「0」を対応付けたペアを有する。また、テストデータT3は、テストケース「i=0、b1_r=false、a=0、c=1、b2=false」と実行結果「−1」を対応付けたペアを有する。
In addition, the test
また、テストデータ生成装置100は、プログラムバリエーションP1−4をシンボリック実行して得られる命令文の系列からテストデータT4を生成する。ここで、テストデータT4は、テストケース「i=0、b1_r=false、a=0、b_r=0、b2=false、c=0」と実行結果「0」を対応付けたペアを有する。また、テストデータT4は、テストケース「i=0、b1_r=true、a=−1、b_r=0、b2=false、c=0」と実行結果「0」を対応付けたペアを有する。また、テストデータT4は、テストケース「i=0、b1_r=false、a=0、b_r=1、b2=false、c=0」と実行結果「−1」を対応付けたペアを有する。
In addition, the test
図16の例では、テストデータ生成装置100は、プログラムバリエーションP1−5をシンボリック実行して得られる命令文の系列からテストデータT5を生成する。ここで、テストデータT5は、テストケース「x_r=0、b2=false、a=0、c=0、i=0」と実行結果「0」を対応付けたペアを有する。また、テストデータT5は、テストケース「x_r=0、b2=true、a=−1、c=0、i=0」と実行結果「0」を対応付けたペアを有する。また、テストデータT5は、テストケース「x_r=0、b2=false、a=0、c=1、i=0」と実行結果「−1」を対応付けたペアを有する。
In the example of FIG. 16, the test
また、テストデータ生成装置100は、プログラムバリエーションP1−6をシンボリック実行して得られる命令文の系列からテストデータT6を生成する。ここで、テストデータT6は、テストケース「x_r=0、b2=false、a=0、b_r=0、i=0、c=0」と実行結果「0」を対応付けたペアを有する。また、テストデータT6は、テストケース「x_r=0、b2=true、a=−1、b_r=0、i=0、c=0」と実行結果「0」を対応付けたペアを有する。また、テストデータT6は、テストケース「x_r=0、b2=false、a=0、b_r=1、i=0、c=0」と実行結果「−1」を対応付けたペアを有する。
In addition, the test
また、テストデータ生成装置100は、プログラムバリエーションP1−7をシンボリック実行して得られる命令文の系列からテストデータT7を生成する。ここで、テストデータT7は、テストケース「x_r=0、b1_r=false、a=0、c=0、i=0、b2=false」と実行結果「0」を対応付けたペアを有する。また、テストデータT7は、テストケース「x_r=0、b1_r=true、a=−1、c=0、i=0、b2=false」と実行結果「0」を対応付けたペアを有する。また、テストデータT7は、テストケース「x_r=0、b1_r=false、a=0、c=1、i=0、b2=false」と実行結果「−1」を対応付けたペアを有する。
In addition, the test
また、テストデータ生成装置100は、プログラムバリエーションP1−8をシンボリック実行して得られる命令文の系列からテストデータT8を生成する。ここで、テストデータT8は、テストケース「x_r=0、b1_r=false、a=0、b_r=0、i=0、b2=false、c=0」と実行結果「0」を対応付けたペアを有する。また、テストデータT8は、テストケース「x_r=0、b1_r=true、a=−1、b_r=0、i=0、b2=false、c=0」と実行結果「0」を対応付けたペアを有する。また、テストデータT8は、テストケース「x_r=0、b1_r=false、a=0、b_r=1、i=0、b2=false、c=0」と実行結果「−1」を対応付けたペアを有する。
In addition, the test
(リファクタリング処理の一例)
次に、図17〜図21を用いて、リファクタリング処理の一例について説明する。
(Example of refactoring process)
Next, an example of the refactoring process will be described with reference to FIGS.
図17〜図21は、リファクタリング処理の一例を示す説明図である。図17に示すように、テストデータ生成装置100は、テストデータT1〜T8のテストケースから、削除候補のプログラム変数の項目と削除候補のパラメータ変数の項目とを削除する。
17 to 21 are explanatory diagrams illustrating an example of the refactoring process. As shown in FIG. 17, the test
図17の例では、テストデータ生成装置100は、プログラムバリエーションP1−2に対応するテストデータT2から、パラメータ変数b_rについての項目を削除する。また、テストデータ生成装置100は、プログラムバリエーションP1−3に対応するテストデータT3から、プログラム変数b1_rについての項目を削除する。
In the example of FIG. 17, the test
また、テストデータ生成装置100は、プログラムバリエーションP1−4に対応するテストデータT4から、パラメータ変数b_rとプログラム変数b1_rとについての項目を削除する。また、テストデータ生成装置100は、プログラムバリエーションP1−5に対応するテストデータT5から、プログラム変数x_rについての項目を削除する。
In addition, the test
また、テストデータ生成装置100は、プログラムバリエーションP1−6に対応するテストデータT6から、プログラム変数x_rとパラメータ変数b_rとについての項目を削除する。また、テストデータ生成装置100は、プログラムバリエーションP1−7に対応するテストデータT7から、プログラム変数x_rとb1_rとについての項目を削除する。
In addition, the test
また、テストデータ生成装置100は、プログラムバリエーションP1−8に対応するテストデータT8から、プログラム変数x_rとb1_rとパラメータ変数b_rとについての項目を削除する。次に、図18の説明に移行する。
In addition, the test
図18に示すように、テストデータ生成装置100は、テストデータT1〜T8が有するテストケースと実行結果とのペアをマージして、新たなテストデータを作成する。図18の例では、テストデータ生成装置100は、テストデータT1〜T8をマージする際に、実線で囲われたペアや、点線で囲われたペアのように、重複するペアがあれば、一つにまとめてマージして、マージしたテストデータ1800を作成する。次に、図19の説明に移行する。
As illustrated in FIG. 18, the test
図19に示すように、テストデータ生成装置100は、マージしたテストデータ1800のうちで、テストケースが重複するペアがあれば、一つにまとめて、新たなテストデータを作成する。図19の例では、テストデータ生成装置100は、1行目と4行目のペアを一つにまとめて、まとめたテストデータ1900を作成する。次に、図20の説明に移行する。
As shown in FIG. 19, if there is a pair with duplicate test cases in the
図20に示すように、テストデータ生成装置100は、不変変数データ701から不変名称を特定する。次に、テストデータ生成装置100は、テストデータ1900のうち、テストケースのうちの不変名称のプログラム変数とパラメータ変数との項目が同一の値になるペアがあれば、グルーピングする。
As illustrated in FIG. 20, the test
図20の例では、テストデータ生成装置100は、不変変数データ701から不変名称「a」を特定する。次に、テストデータ生成装置100は、テストデータ1900のうち、不変名称のプログラム変数「a」の項目が同一の値になる1行目と3行目のペアをグルーピングする。また、テストデータ生成装置100は、テストデータ1900のうち、不変名称のプログラム変数「a」の項目が同一の値になる2行目と4行目のペアをグルーピングする。以下の説明では、グルーピング結果を「グループデータ2000」と表記する場合がある。次に、図21の説明に移行する。
In the example of FIG. 20, the test
図21に示すように、テストデータ生成装置100は、グループデータ2000が表すグルーピングしたグループのうち、実行結果が一致するグループを抽出する。図21の例では、テストデータ生成装置100は、実行結果がともに「0」で一致する2行目と4行目のペアのグループを抽出する。以下の説明では、抽出したグループを表すデータを「同一判定グループデータ2100」と表記する場合がある。
As illustrated in FIG. 21, the test
(リグレッションテストの一例)
次に、図22を用いて、リグレッションテストの一例について説明する。
(An example of a regression test)
Next, an example of a regression test will be described with reference to FIG.
図22は、リグレッションテストの一例を示す説明図である。図22に示すように、テストデータ生成装置100は、テストデータを用いてリグレッションテストを実行する。次に、テストデータ生成装置100は、テストデータが有する実行結果と、リグレッションテストの実行結果とを比較して、メソッドの機能が変更されているか否かを判定する。
FIG. 22 is an explanatory diagram showing an example of the regression test. As shown in FIG. 22, the test
図22の例では、テストデータ生成装置100は、テストデータが有する1行目〜4行目の各々のペアのテストケースを入力変数として、変更後プログラムP2のリグレッションテストを実行し、1行目〜4行目の各々のペアに対応する実行結果2202「0,0,−1,−1」を取得する。ここで、テストデータ生成装置100は、取得した実行結果2202「0,0,−1,−1」と、テストデータが有する1行目〜4行目の各々のペアの実行結果2201「{0,1}、0,−1,0」とを比較する。
In the example of FIG. 22, the test
ここで、テストデータ生成装置100は、1行目のペアについては取得した実行結果2202が、テストデータが有する実行結果2201に含まれると判定する。このため、テストデータ生成装置100は、1行目のペアに対する判定において、メソッドの機能が変更されたと判定しない。
Here, the test
次に、テストデータ生成装置100は、2行目と3行目のペアについては取得した実行結果2202が、テストデータが有する実行結果2201に一致すると判定する。このため、テストデータ生成装置100は、1行目と3行目の各々のペアに対する判定において、メソッドの機能が変更されたと判定しない。
Next, the test
次に、テストデータ生成装置100は、4行目については取得した実行結果2202が、テストデータが有する実行結果2201に含まれないと判定する。そして、テストデータ生成装置100は、同一判定グループデータ2100を参照して、4行目のペアがグルーピングしたグループに含まれるため、グループに含まれる2行目のペアについての判定結果を参照する。ここで、テストデータ生成装置100は、2行目のペアの判定結果が一致するという判定結果であるため、4行目のペアに対する判定において、メソッドの機能が変更されたと判定しない。
Next, the test
このように、テストデータ生成装置100は、1行目〜4行目の各々のペアに対する判定においてメソッドの機能が変更されたと判定できなかったため、メソッドの機能が変更されていないと判定する。また、テストデータ生成装置100は、1行目〜4行目の各々のペアに対する判定のいずれかの判定においてメソッドの機能が変更されたと判定した場合は、メソッドの機能が変更されたと判定する。これにより、テストデータ生成装置100は、プログラム変数またはパラメータ変数が変更された変更後プログラムP2であっても、リグレッションテストを実行することができる。
As described above, the test
(リグレッションテストの実行処理手順)
次に、図23を用いて、テストデータ生成装置100のリグレッションテストの実行処理手順の一例について説明する。
(Regression test execution procedure)
Next, an example of a regression test execution process procedure of the test
図23は、リグレッションテストの実行処理手順の一例を示すフローチャートである。図23において、テストデータ生成装置100は、変更前プログラムP1と変更後プログラムP2とを取得する(ステップS2301)。次に、テストデータ生成装置100は、図24を用いて後述する特定処理を実行する(ステップS2302)。そして、テストデータ生成装置100は、図25を用いて後述する加工処理を実行する(ステップS2303)。
FIG. 23 is a flowchart illustrating an example of a procedure for executing a regression test. In FIG. 23, the test
次に、テストデータ生成装置100は、図26を用いて後述するテストデータ生成処理を実行する(ステップS2304)。そして、テストデータ生成装置100は、図27を用いて後述するリファクタリング処理を実行する(ステップS2305)。
Next, the test
次に、テストデータ生成装置100は、リグレッションテストを実行する(ステップS2306)。リグレッションテストの内容は、図22に上述したため説明を省略する。そして、テストデータ生成装置100は、実行処理を終了する。これにより、テストデータ生成装置100は、変数が変更された変更後プログラムP2に対しても、リグレッションテストを実行することができる。
Next, the test
(差異情報の特定処理手順)
次に、図24を用いて、テストデータ生成装置100の差異情報の特定処理手順の一例について説明する。
(Difference information specific processing procedure)
Next, an example of the difference information specifying process procedure of the test
図24は、差異情報の特定処理手順の一例を示すフローチャートである。図24において、テストデータ生成装置100は、変更前プログラムP1における、プログラム変数とテスト対象のメソッドのパラメータ変数と、を抽出する(ステップS2401)。次に、テストデータ生成装置100は、変更後プログラムP2における、プログラム変数とテスト対象のメソッドのパラメータ変数と、を抽出する(ステップS2402)。
FIG. 24 is a flowchart illustrating an example of the difference information identification processing procedure. In FIG. 24, the test
そして、テストデータ生成装置100は、ステップS2401〜S2402によって抽出されたプログラム変数とパラメータ変数とから、変更前プログラムP1から変更後プログラムP2への変更前後における不変名称のプログラム変数とパラメータ変数とを抽出する(ステップS2403)。
Then, the test
次に、テストデータ生成装置100は、ステップS2401〜S2402によって抽出されたプログラム変数とパラメータ変数とから、変更前プログラムP1から変更後プログラムP2への変更前後における追加候補のプログラム変数とパラメータ変数とを抽出する(ステップS2404)。
Next, the test
そして、テストデータ生成装置100は、ステップS2401〜S2402によって抽出されたプログラム変数とパラメータ変数とから、変更前プログラムP1から変更後プログラムP2への変更前後における削除候補のプログラム変数とパラメータ変数とを抽出する(ステップS2405)。
Then, the test
次に、テストデータ生成装置100は、ステップS2404〜S2405によって抽出された追加候補のプログラム変数とパラメータ変数との集合と、削除候補のプログラム変数とパラメータ変数との集合に、ダミー変数を追加する(ステップS2406)。
Next, the test
そして、テストデータ生成装置100は、ステップS2406によってダミー変数が追加された、追加候補のプログラム変数とパラメータ変数との集合と、削除候補のプログラム変数とパラメータ変数との集合と、に基づいて、変更パターンを特定する(ステップS2407)。
Then, the test
次に、テストデータ生成装置100は、ステップS2407によって特定された変更パターンのうち、ダミー変数からダミー変数へと変更される変更パターンと、変数から型が異なる別の変数へと変更される変更パターンと、を除去する(ステップS2408)。そして、テストデータ生成装置100は、変更パターンを定義域ごとに分類する(ステップS2409)。
Next, the test
次に、テストデータ生成装置100は、ステップS2409によって定義域ごとに分類された変更パターンのうち、変更前プログラムP1のプログラム変数とパラメータ変数との変更パターンを組み合わせて、すべてのバリエーションを特定する(ステップS2410)。
Next, the test
そして、テストデータ生成装置100は、ステップS2410によって特定された変更バリエーションに、値域が重複しないような変更パターンを追加して(ステップS2411)、特定処理を終了する。これにより、テストデータ生成装置100は、プログラムの変更バリエーションを特定することができる。
Then, the test
(プログラムの加工処理手順)
次に、図25を用いて、テストデータ生成装置100のプログラムの加工処理手順の一例について説明する。
(Program processing procedure)
Next, an example of the processing procedure of the program of the test
図25は、プログラムの加工処理手順の一例を示すフローチャートである。図25において、テストデータ生成装置100は、変更バリエーションを選択する(ステップS2501)。次に、テストデータ生成装置100は、ステップS2501によって選択された変更バリエーションに基づいて、変更前プログラムP1からプログラムバリエーションを作成する(ステップS2502)。
FIG. 25 is a flowchart illustrating an example of a processing procedure of a program. In FIG. 25, the test
そして、テストデータ生成装置100は、未選択の変更バリエーションがあるか否かを判定する(ステップS2503)。ここで、未選択の変更バリエーションがある場合(ステップS2503:Yes)、テストデータ生成装置100は、ステップS2501の処理に戻る。
Then, the test
一方で、未選択の変更バリエーションがない場合(ステップS2503:No)、テストデータ生成装置100は、加工処理を終了する。これにより、テストデータ生成装置100は、プログラムバリエーションを作成することができる。
On the other hand, when there is no unselected change variation (step S2503: No), the test
(テストデータ生成処理手順)
次に、図26を用いて、テストデータ生成装置100のテストデータ生成処理手順の一例について説明する。
(Test data generation processing procedure)
Next, an example of a test data generation process procedure of the test
図26は、テストデータ生成処理手順の一例を示すフローチャートである。図26において、テストデータ生成装置100は、プログラムバリエーションを選択する(ステップS2601)。次に、テストデータ生成装置100は、ステップS2601によって選択されたプログラムバリエーションからテストデータを作成する(ステップS2602)。
FIG. 26 is a flowchart illustrating an example of a test data generation processing procedure. In FIG. 26, the test
そして、テストデータ生成装置100は、未選択のプログラムバリエーションがあるか否かを判定する(ステップS2603)。ここで、未選択のプログラムバリエーションがある場合(ステップS2603:Yes)、テストデータ生成装置100は、ステップS2601の処理に戻る。
Then, the test
一方で、未選択のプログラムバリエーションがない場合(ステップS2603:No)、テストデータ生成装置100は、テストデータ生成処理を終了する。これにより、テストデータ生成装置100は、テストデータを作成することができる。
On the other hand, when there is no unselected program variation (step S2603: No), the test
(リファクタリング処理手順)
次に、図27を用いて、テストデータ生成装置100のリファクタリング処理手順の一例について説明する。
(Refactoring procedure)
Next, an example of the refactoring processing procedure of the test
図27は、リファクタリング処理手順の一例を示すフローチャートである。図27において、テストデータ生成装置100は、テストデータに含まれる削除候補の変数の項目を削除する(ステップS2701)。次に、テストデータ生成装置100は、テストデータが有するテストケースと実行結果のペアをマージする(ステップS2702)。
FIG. 27 is a flowchart illustrating an example of a refactoring processing procedure. In FIG. 27, the test
そして、テストデータ生成装置100は、マージしたテストデータのうち、テストケースが重複するペアを統合する(ステップS2703)。次に、テストデータ生成装置100は、テストケースのうちの不変名称のプログラム変数とパラメータ変数との項目が同一の値になり、実行結果が同一の値になるペアを、グループ化する(ステップS2704)。そして、テストデータ生成装置100は、リファクタリング処理を終了する。
Then, the test
以上説明したように、テストデータ生成装置100によれば、変更前プログラムP1と変更後プログラムP2とから変数の変更パターンを特定し、変更後プログラムP2のテストデータ生成用のプログラムバリエーションを作成することができる。そして、テストデータ生成装置100によれば、プログラムバリエーションに基づいて、変更後プログラムP2のテストデータを生成することができる。
As described above, according to the test
これにより、テストデータ生成装置100は、プログラム変数またはパラメータ変数の変更を含む変更後プログラムP2に対しても、リグレッションテストに用いるテストデータを生成することができる。このため、例えば、リグレッションテストの実行者が、変更前プログラムP1と変更後プログラムP2と、を参照して、変更後プログラムP2に対するテストデータを作成する場合に比べて、リグレッションテストの実行者の作業量を低減することができる。また、リグレッションテストの実行者によって誤ったテストデータが作成されることを防止することができる。
Thereby, the test
また、テストデータ生成装置100によれば、変数から同一形式の他の変数へ変更される変更パターンと、変数が削除される変更パターンと、変数が追加される変更パターンと、の少なくともいずれかを特定することができる。これにより、テストデータ生成装置100は、プログラムバリエーションの作成に用いる変更パターンが重複しないようにして、変数パターンの数を最小限にすることができる。このため、テストデータ生成装置100は、プログラムバリエーションの作成処理の処理量の増加を抑制することができる。
Moreover, according to the test
また、テストデータ生成装置100によれば、複数の変更パターンの組み合わせに基づいて、複数のプログラムバリエーションを作成することができる。これにより、テストデータ生成装置100は、変更後プログラムP2のテストデータ生成用のプログラムバリエーションを作成することができる。また、テストデータ生成装置100によれば、それぞれ異なる変数の変更パターンの組み合わせに基づいて、複数のプログラムバリエーションを作成することができる。これにより、テストデータ生成装置100は、変更パターンの組み合わせの重複を防止することができ、プログラムバリエーションの作成処理の処理量の増加を抑制することができる。
Moreover, according to the test
また、テストデータ生成装置100によれば、プログラムバリエーションをシンボリック実行することにより、自動でテストデータを生成することができる。また、テストデータ生成装置100は、テストデータを用いてリグレッションテストを実行することができる。これにより、テストデータ生成装置100は、プログラム変数またはパラメータ変数が変更された変更後プログラム変更後プログラムP2に対しても、リグレッションテストを実行することができ、リグレッションテストのテスト結果を出力することができる。そして、テストデータ生成装置100の利用者は、リグレッションテストのテスト結果から、変更後プログラムP2に不具合があるか否かを把握することができる。
In addition, according to the test
なお、本実施の形態で説明したテストデータ生成方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。本テストデータ生成プログラムは、ハードディスク、フレキシブルディスク、CD−ROM、MO、DVD等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。また本テストデータ生成プログラムは、インターネット等のネットワークを介して配布してもよい。 Note that the test data generation method described in the present embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. The test data generation program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed by being read from the recording medium by the computer. The test data generation program may be distributed through a network such as the Internet.
上述した実施の形態に関し、さらに以下の付記を開示する。 The following additional notes are disclosed with respect to the embodiment described above.
(付記1)コンピュータに、
テスト対象のメソッドが規定された第1プログラムにおける前記メソッドに用いられる変数と、前記第1プログラムから前記メソッドの内容が変更された第2プログラムにおける前記メソッドに用いられる変数とを比較した比較結果に基づいて、前記メソッドに用いられる変数の変更パターンを特定し、
特定した前記変更パターンに基づいて、前記第1プログラムにおける前記メソッドに用いられる変数を変更した第3プログラムを作成し、
作成した前記第3プログラムをシンボリック実行してテストデータを生成する、
処理を実行させることを特徴とするテストデータ生成プログラム。
(Supplementary note 1)
A comparison result obtained by comparing a variable used for the method in the first program in which the method to be tested is defined with a variable used in the method in the second program in which the content of the method is changed from the first program. Based on the variable change pattern used in the method,
Based on the identified change pattern, create a third program in which variables used for the method in the first program are changed,
Generate test data by executing symbolically the created third program,
A test data generation program characterized by causing a process to be executed.
(付記2)前記特定する処理は、
前記メソッドに用いられる変数について、前記メソッドの内容の変更後に同一形式の他の変数に変更される変更パターンと、前記メソッドの内容の変更後に削除される変更パターンと、前記メソッドの内容の変更後に追加される変更パターンと、のうちの少なくともいずれかの変更パターンを特定することを特徴とする付記1に記載のテストデータ生成プログラム。
(Supplementary note 2)
Regarding variables used in the method, a change pattern that is changed to another variable of the same format after the change of the content of the method, a change pattern that is deleted after the change of the content of the method, and a change of the content of the method The test data generation program according to
(付記3)前記メソッドに用いられる変数は、前記メソッドの引数になるメソッドパラメータまたは前記メソッドの引数以外の変数であることを特徴とする付記1または2に記載のテストデータ生成プログラム。
(Supplementary Note 3) The test data generation program according to
(付記4)前記作成する処理は、
前記メソッドに用いられる変数ごとに特定した変更パターンの組み合わせに基づいて、前記第3プログラムを作成することを特徴とする付記1〜3のいずれか一つに記載のテストデータ生成プログラム。
(Appendix 4) The process to create is
4. The test data generation program according to any one of
(付記5)前記作成する処理は、
前記メソッドに用いられるそれぞれ異なる変数についての変更パターンの組み合わせに基づいて、前記第3プログラムを作成することを特徴とする付記4に記載のテストデータ生成プログラム。
(Appendix 5) The process to create is
The test data generation program according to
(付記6)前記生成する処理は、
作成した前記第3プログラムにおける命令文の系列の実行条件になる入力変数の値と実行結果になる出力変数の値とを対応付けて有するテストデータを生成することを特徴とする付記4または5に記載のテストデータ生成プログラム。
(Appendix 6) The process to generate is
(付記7)前記コンピュータに、
生成した前記テストデータが有する入力変数の値を実行条件にして前記第2プログラムを実行した場合の出力変数の値が、前記テストデータが有する出力変数の値に一致するか否かを判定する、
処理を実行させることを特徴とする付記6に記載のテストデータ生成プログラム。
(Appendix 7)
Determining whether the value of the output variable when the second program is executed using the value of the input variable of the generated test data as an execution condition matches the value of the output variable of the test data;
The test data generation program according to appendix 6, wherein the process is executed.
(付記8)前記判定する処理は、
生成した前記テストデータが有する入力変数の値を実行条件にして前記第2プログラムを実行した場合の出力変数の値が、前記テストデータが有する出力変数の値に含まれるか否かを判定することを特徴とする付記7に記載のテストデータ生成プログラム。
(Supplementary note 8)
Determining whether the value of the output variable when the second program is executed using the value of the input variable of the generated test data as an execution condition is included in the value of the output variable of the test data The test data generation program according to appendix 7, characterized by:
(付記9)前記コンピュータに、
生成した前記テストデータが有する実行条件と実行結果とを対応付けたペアのうち、実行条件になる入力変数のうちの前記メソッドの変更前後で名称変更されない入力変数の値が同一になるペアであって、かつ実行結果が同一になるペアをグループ化する処理を実行させ、
前記判定する処理は、
グループ化したペアのうち、いずれかのペアに含まれる入力変数の値を実行条件にして前記第2プログラムを実行した場合の出力変数の値が、前記いずれかのペアに含まれる出力変数の値に含まれるか否かを判定することを特徴とする付記7または8に記載のテストデータ生成プログラム。
(Supplementary note 9)
Of the pairs that associate the execution conditions and the execution results of the generated test data, the input variables that are not renamed before and after the method change among the input variables that are the execution conditions are the same. And execute the process of grouping pairs with the same execution result,
The determination process is as follows:
Among the grouped pairs, the value of the output variable when the second program is executed using the value of the input variable included in any pair as the execution condition is the value of the output variable included in any of the pairs 9. The test data generation program according to appendix 7 or 8, wherein it is determined whether or not it is included in the test data.
(付記10)コンピュータが、
テスト対象のメソッドが規定された第1プログラムにおける前記メソッドに用いられる変数と、前記第1プログラムから前記メソッドの内容が変更された第2プログラムにおける前記メソッドに用いられる変数とを比較した比較結果に基づいて、前記メソッドに用いられる変数の変更パターンを特定し、
特定した前記変更パターンに基づいて、前記第1プログラムにおける前記メソッドに用いられる変数を変更した第3プログラムを作成し、
作成した前記第3プログラムをシンボリック実行してテストデータを生成する、
処理を実行することを特徴とするテストデータ生成方法。
(Supplementary note 10)
A comparison result obtained by comparing a variable used for the method in the first program in which the method to be tested is defined with a variable used in the method in the second program in which the content of the method is changed from the first program. Based on the variable change pattern used in the method,
Based on the identified change pattern, create a third program in which variables used for the method in the first program are changed,
Generate test data by executing symbolically the created third program,
A test data generation method characterized by executing processing.
(付記11)テスト対象のメソッドが規定された第1プログラムにおける前記メソッドに用いられる変数と、前記第1プログラムから前記メソッドの内容が変更された第2プログラムにおける前記メソッドに用いられる変数とを比較した比較結果に基づいて、前記メソッドに用いられる変数の変更パターンを特定し、特定した前記変更パターンに基づいて、前記第1プログラムにおける前記メソッドに用いられる変数を変更した第3プログラムを作成する作成部と、
前記作成部によって作成された前記第3プログラムをシンボリック実行してテストデータを生成する生成部と、
を有することを特徴とするテストデータ生成装置。
(Additional remark 11) The variable used for the said method in the 1st program in which the test object method was prescribed | regulated, and the variable used for the said method in the 2nd program from which the content of the said method was changed from the said 1st program Creating a third program in which a variable change pattern used in the method is specified based on the comparison result, and a variable used in the method in the first program is changed based on the specified change pattern And
A generating unit that symbolically executes the third program created by the creating unit to generate test data;
A test data generation apparatus comprising:
100 テストデータ生成装置
301 特定部
302 作成部
303 生成部
304 判定部
DESCRIPTION OF
Claims (10)
テスト対象のメソッドが規定された第1プログラムにおける前記メソッドに用いられる変数と、前記第1プログラムから前記メソッドの内容が変更された第2プログラムにおける前記メソッドに用いられる変数とを比較した比較結果に基づいて、前記メソッドに用いられる変数の変更パターンを特定し、
特定した前記変更パターンに基づいて、前記第1プログラムにおける前記メソッドに用いられる変数を変更した第3プログラムを作成し、
作成した前記第3プログラムをシンボリック実行してテストデータを生成する、
処理を実行させることを特徴とするテストデータ生成プログラム。 On the computer,
A comparison result obtained by comparing a variable used for the method in the first program in which the method to be tested is defined with a variable used in the method in the second program in which the content of the method is changed from the first program. Based on the variable change pattern used in the method,
Based on the identified change pattern, create a third program in which variables used for the method in the first program are changed,
Generate test data by executing symbolically the created third program,
A test data generation program characterized by causing a process to be executed.
前記メソッドに用いられる変数について、前記メソッドの内容の変更後に同一形式の他の変数に変更される変更パターンと、前記メソッドの内容の変更後に削除される変更パターンと、前記メソッドの内容の変更後に追加される変更パターンと、のうちの少なくともいずれかの変更パターンを特定することを特徴とする請求項1に記載のテストデータ生成プログラム。 The process to specify is
Regarding variables used in the method, a change pattern that is changed to another variable of the same format after the change of the content of the method, a change pattern that is deleted after the change of the content of the method, and a change of the content of the method 2. The test data generation program according to claim 1, wherein at least one of the change patterns to be added is specified.
前記メソッドに用いられる変数ごとに特定した変更パターンの組み合わせに基づいて、前記第3プログラムを作成することを特徴とする請求項1〜3のいずれか一つに記載のテストデータ生成プログラム。 The process to create is
The test data generation program according to any one of claims 1 to 3, wherein the third program is created based on a combination of change patterns specified for each variable used in the method.
作成した前記第3プログラムにおける命令文の系列の実行条件になる入力変数の値と実行結果になる出力変数の値とを対応付けて有するテストデータを生成することを特徴とする請求項4に記載のテストデータ生成プログラム。 The process to generate is
5. The test data having an input variable value that becomes an execution condition of a sequence of statements in the created third program and an output variable value that becomes an execution result in association with each other is generated. Test data generation program.
生成した前記テストデータが有する入力変数の値を実行条件にして前記第2プログラムを実行した場合の出力変数の値が、前記テストデータが有する出力変数の値に一致するか否かを判定する、
処理を実行させることを特徴とする請求項5に記載のテストデータ生成プログラム。 In the computer,
Determining whether the value of the output variable when the second program is executed using the value of the input variable of the generated test data as an execution condition matches the value of the output variable of the test data;
The test data generation program according to claim 5, wherein the process is executed.
生成した前記テストデータが有する入力変数の値を実行条件にして前記第2プログラムを実行した場合の出力変数の値が、前記テストデータが有する出力変数の値に含まれるか否かを判定することを特徴とする請求項6に記載のテストデータ生成プログラム。 The determination process is as follows:
Determining whether the value of the output variable when the second program is executed using the value of the input variable of the generated test data as an execution condition is included in the value of the output variable of the test data The test data generation program according to claim 6.
生成した前記テストデータが有する実行条件と実行結果とを対応付けたペアのうち、実行条件になる入力変数のうちの前記メソッドの変更前後で名称変更されない入力変数の値が同一になるペアであって、かつ実行結果が同一になるペアをグループ化する処理を実行させ、
前記判定する処理は、
グループ化したペアのうち、いずれかのペアに含まれる入力変数の値を実行条件にして前記第2プログラムを実行した場合の出力変数の値が、前記いずれかのペアに含まれる出力変数の値に含まれるか否かを判定することを特徴とする請求項6または7に記載のテストデータ生成プログラム。 In the computer,
Of the pairs that associate the execution conditions and the execution results of the generated test data, the input variables that are not renamed before and after the method change among the input variables that are the execution conditions are the same. And execute the process of grouping pairs with the same execution result,
The determination process is as follows:
Among the grouped pairs, the value of the output variable when the second program is executed using the value of the input variable included in any pair as the execution condition is the value of the output variable included in any of the pairs The test data generation program according to claim 6, wherein it is determined whether or not it is included in the test data.
テスト対象のメソッドが規定された第1プログラムにおける前記メソッドに用いられる変数と、前記第1プログラムから前記メソッドの内容が変更された第2プログラムにおける前記メソッドに用いられる変数とを比較した比較結果に基づいて、前記メソッドに用いられる変数の変更パターンを特定し、
特定した前記変更パターンに基づいて、前記第1プログラムにおける前記メソッドに用いられる変数を変更した第3プログラムを作成し、
作成した前記第3プログラムをシンボリック実行してテストデータを生成する、
処理を実行することを特徴とするテストデータ生成方法。 Computer
A comparison result obtained by comparing a variable used for the method in the first program in which the method to be tested is defined with a variable used in the method in the second program in which the content of the method is changed from the first program. Based on the variable change pattern used in the method,
Based on the identified change pattern, create a third program in which variables used for the method in the first program are changed,
Generate test data by executing symbolically the created third program,
A test data generation method characterized by executing processing.
前記作成部によって作成された前記第3プログラムをシンボリック実行してテストデータを生成する生成部と、
を有することを特徴とするテストデータ生成装置。 A comparison result obtained by comparing a variable used for the method in the first program in which the method to be tested is defined with a variable used in the method in the second program in which the content of the method is changed from the first program. Based on the specified change pattern of the variable used in the method, based on the specified change pattern, a creation unit that creates a third program that changes the variable used in the method in the first program;
A generating unit that symbolically executes the third program created by the creating unit to generate test data;
A test data generation apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013166860A JP6205965B2 (en) | 2013-08-09 | 2013-08-09 | Test data generation program, test data generation method, and test data generation apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013166860A JP6205965B2 (en) | 2013-08-09 | 2013-08-09 | Test data generation program, test data generation method, and test data generation apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015035185A JP2015035185A (en) | 2015-02-19 |
JP6205965B2 true JP6205965B2 (en) | 2017-10-04 |
Family
ID=52543637
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013166860A Expired - Fee Related JP6205965B2 (en) | 2013-08-09 | 2013-08-09 | Test data generation program, test data generation method, and test data generation apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6205965B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10180897B2 (en) * | 2016-09-26 | 2019-01-15 | Fujitsu Limited | Automated software program repair |
JP6925433B2 (en) | 2017-10-20 | 2021-08-25 | 三菱電機株式会社 | Data validation device, data validation method and data validation program |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000305812A (en) * | 1999-04-19 | 2000-11-02 | Fujitsu Ltd | System for editing retest procedure, system applying retest procedure editing system, and computer-readable recording medium recording retest procedure editing program |
JP5874891B2 (en) * | 2011-03-30 | 2016-03-02 | 日本電気株式会社 | Program test apparatus, program test method, and program |
-
2013
- 2013-08-09 JP JP2013166860A patent/JP6205965B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2015035185A (en) | 2015-02-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Allamanis | The adverse effects of code duplication in machine learning models of code | |
JP5471432B2 (en) | Verification support program and verification support device | |
Angerer et al. | Configuration-aware change impact analysis (t) | |
JP5845888B2 (en) | Software correction apparatus, software correction system, software correction method, and software correction program | |
JP6309795B2 (en) | Information processing apparatus, information processing method, and program | |
JP6205965B2 (en) | Test data generation program, test data generation method, and test data generation apparatus | |
JP6032095B2 (en) | Test case generation method, test case generation apparatus, and test case generation program | |
Bainczyk et al. | Model-based testing without models: the TodoMVC case study | |
JP5825163B2 (en) | Information processing apparatus, information processing method, and information processing program | |
Buinevich et al. | Method and algorithms of visual audit of program interaction. | |
Sun et al. | Poster: Toward automating the generation of malware analysis reports using the sandbox logs | |
JP5772607B2 (en) | Generating device, generating method, and generating program | |
Xu et al. | Mining executable specifications of web applications from selenium ide tests | |
JP6002507B2 (en) | Software verification program and software verification system | |
Le et al. | Refixar: Multi-version reasoning for automated repair of regression errors | |
JP5163308B2 (en) | IP model generation device, IP model generation method, and IP model generation program | |
JP6287436B2 (en) | Information processing apparatus, information processing system, information processing method, and program | |
JP2016099726A (en) | Specification generation method, specification generation device, and program | |
Ghosh et al. | Enabling the selection of cots components | |
JP5900197B2 (en) | Route condition selection apparatus, program, and method | |
WO2015145992A1 (en) | Non-functional-evaluation-parameter extraction device, non-functional-evaluation-parameter extraction method, and storage medium | |
JP6113599B2 (en) | Inspection model generator | |
Hu et al. | Equivalence Checking Between System-Level Descriptions by Identifying Potential Cut-Points | |
JP7024533B2 (en) | Detection pattern evaluation model generation system, method and program | |
JP3796813B2 (en) | Drawing processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160510 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170310 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170321 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170522 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20170808 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170821 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6205965 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |