JP2014126900A - Program analysis device, program analysis method, and program analysis program - Google Patents
Program analysis device, program analysis method, and program analysis program Download PDFInfo
- Publication number
- JP2014126900A JP2014126900A JP2012280814A JP2012280814A JP2014126900A JP 2014126900 A JP2014126900 A JP 2014126900A JP 2012280814 A JP2012280814 A JP 2012280814A JP 2012280814 A JP2012280814 A JP 2012280814A JP 2014126900 A JP2014126900 A JP 2014126900A
- Authority
- JP
- Japan
- Prior art keywords
- program
- change
- test
- post
- changed
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、テストの実行結果を利用してプログラムの差分を抽出するプログラム解析装置、プログラム解析方法、及び、プログラム解析プログラムに関する。 The present invention relates to a program analysis apparatus, a program analysis method, and a program analysis program that extract program differences using test execution results.
ソフトウェア開発では、新規開発だけでなく、既存システムの保守・改善開発がなされることが多い。保守・改善開発では、保守・改善によって仕様が変わらない箇所が、ソフトウェアの変更前と変更後とで同じ動作をすることを確認しなければならない。そのため、変更前に実施したものと同じテスト項目が、変更後にも実施されることがある。このようなテストは、回帰テスト(リグレッションテスト)と呼ばれる。 In software development, not only new development but also maintenance / improvement development of existing systems are often performed. In maintenance / improvement development, it is necessary to confirm that the parts whose specifications do not change due to maintenance / improvement operate the same before and after the software change. For this reason, the same test items as those performed before the change may be performed after the change. Such a test is called a regression test.
回帰テストは、テスト支援ツール等を使うことにより自動化されることが多い。このとき、テスト結果を確認し、テスト結果がエラーになった原因を特定する作業(デバッグ作業)は人手で行われる必要がある。そのため、エラーが多く発生した場合は、デバッグ作業に大きな時間を要するという問題があった。 The regression test is often automated by using a test support tool or the like. At this time, work (debugging work) for confirming the test result and identifying the cause of the error in the test result needs to be performed manually. Therefore, when many errors occur, there is a problem that a long time is required for debugging work.
デバッグ支援技術の一例が、特許文献1に開示されている。特許文献1のデバッグ支援技術では、正常に動作していたソースコードと、正常に動作していたソースコードに変更が加えられ、実行時にエラーを発生するようになったソースコードとの差分情報を提示することにより、テスト結果がエラーになった原因である変更箇所を特定する作業の効率化を図っている。
An example of the debugging support technique is disclosed in
デバッグ支援技術の別の一例が、特許文献2に開示されている。特許文献2のテスト支援システムは、ソースコード比較手段と、修正前ソースコード記憶手段と、修正後ソースコード記憶手段と、通過モジュール情報記憶手段と、テスト項目抽出手段と、通過モジュール情報記憶手段とを備える。特許文献2のテスト支援システムは、以下のように動作する。
Another example of the debugging support technique is disclosed in
ソースコード比較手段は、修正前ソースコード記憶手段が記憶する修正前ソースコードと、修正後ソースコード記憶手段が記憶する修正後のソースコードとを比較し、変更が行われたモジュールを特定する。通過モジュール情報記憶手段は、修正前のソースコードに対して複数のテスト項目のテストを実行した際に、実行すべき対象を示す指示が通過する、すなわち実行対象として呼び出され実行されるモジュールを、テスト項目と対応付けて記憶する。テスト項目抽出手段は、通過モジュール情報記憶手段を参照し、変更が行われたモジュールを通過するテスト項目を抽出する。 The source code comparison means compares the pre-correction source code stored in the pre-correction source code storage means with the corrected source code stored in the post-correction source code storage means, and identifies the module in which the change has been made. The passing module information storage means, when a test of a plurality of test items is executed on the source code before correction, an instruction indicating a target to be executed passes, that is, a module that is called and executed as an execution target, Store in association with the test item. The test item extraction unit refers to the passing module information storage unit and extracts a test item that passes through the changed module.
以上のように、「実行対象の位置を示す指示が移動すること」を「処理が通過する」という。したがって、「通過位置」とは、「過去に実行対象として指定された位置」を意味する。又、プログラムを構成する部分処理が実行対象としてたどられるときの通過位置の並びを、以降、「実行経路」という。 As described above, “the instruction indicating the execution target position moves” is referred to as “the process passes”. Therefore, “passing position” means “a position designated as an execution target in the past”. In addition, the sequence of passage positions when the partial processes constituting the program are traced as execution targets are hereinafter referred to as “execution paths”.
上記の動作の結果、このテスト支援システムでは、プログラムの詳細な解析を必要とせず、また、ユーザが変更箇所を指定しなくても、修正後のソースコードについて実行すべきテスト項目を抽出できる。 As a result of the above operation, this test support system does not require detailed analysis of the program, and can extract test items to be executed on the modified source code without the user specifying a changed portion.
特許文献1に開示されている技術では、テスト結果がエラーになったテスト項目に関係ない情報も差分情報に含まれるため、関係する部分だけを抽出するという作業が必要となるという問題がある。
The technique disclosed in
特許文献2に開示されているテスト支援システムでは、プログラムの詳細な解析を必要とせず、また、ユーザが変更箇所を指定しなくても、修正後のソースコードについて実行すべきテスト項目を抽出できる。
The test support system disclosed in
ところで、プログラムを変更した場合は、変更後のプログラムの、変更された部分のみ、すなわちプログラムの差分に着目して、変更後のプログラムの妥当性を検証することができれば、効率的である。ところが、特許文献2のテスト支援システムは、修正前及び修正後のソースコードの差分に着目した処理を行わない。特許文献2のテスト支援システムは、そもそも、修正後のソースコードについて実行したテスト結果を利用していない。
By the way, when the program is changed, it is efficient if the validity of the changed program can be verified by paying attention to only the changed part of the changed program, that is, the difference of the program. However, the test support system of
本発明の目的は、プログラムを変更した場合の、変更後のプログラムの妥当性の検証を効率化できる、プログラム解析装置、プログラム解析方法、及び、プログラム解析プログラムを提供することにある。 An object of the present invention is to provide a program analysis apparatus, a program analysis method, and a program analysis program that can efficiently verify the validity of a program after the change when the program is changed.
本発明のプログラム解析装置は、第1のプログラムについて行われたテストの結果がエラーになったテスト項目に関する、第1のプログラム上の実行経路に基づいて、第1のプログラムと共通のコードを含む第2のプログラムに、実行経路上の第1の通過位置に対応する第2の通過位置が含まれるかどうかを検索する検索手段と、変更後通過位置に対応する第1のプログラムの第1の部分と、変更前通過位置に対応する第2のプログラムの第2の部分との差分の有無に基づいて、第1の部分又は第2の部分を出力する出力手段と、を備えることを特徴とする。 The program analysis apparatus of the present invention includes a code common to the first program based on the execution path on the first program regarding the test item in which the result of the test performed on the first program results in an error. Search means for searching whether or not the second program includes a second passing position corresponding to the first passing position on the execution path, and a first program of the first program corresponding to the changed passing position Output means for outputting the first part or the second part based on whether there is a difference between the part and the second part of the second program corresponding to the pre-change passing position, To do.
本発明のプログラム解析方法は、第1のプログラムについて行われたテストの結果がエラーになったテスト項目に関する、第1のプログラム上の実行経路に基づいて、第1のプログラムと共通のコードを含む第2のプログラムに、実行経路上の第1の通過位置に対応する第2の通過位置が含まれるかどうかを検索し、変更後通過位置に対応する第1のプログラムの第1の部分と、第2の通過位置に対応する第2のプログラムの第2の部分との差分の有無に基づいて、第1の部分又は第2の部分を出力することを特徴とする。 The program analysis method of the present invention includes a code common to the first program based on the execution path on the first program regarding the test item in which the result of the test performed on the first program results in an error. The second program searches for whether or not the second passage position corresponding to the first passage position on the execution path is included, and the first part of the first program corresponding to the changed passage position; The first part or the second part is output based on the presence or absence of a difference from the second part of the second program corresponding to the second passage position.
本発明のプログラム解析プログラムは、プログラム解析装置が備えるコンピュータを、
第1のプログラムについて行われたテストの結果がエラーになったテスト項目に関する、第1のプログラム上の実行経路に基づいて、第1のプログラムと共通のコードを含む第2のプログラムに、実行経路上の第1の通過位置に対応する第2の通過位置が含まれるかどうかを検索する検索手段と、変更後通過位置に対応する第1のプログラムの第1の部分と、第2の通過位置に対応する第2のプログラムの第2の部分との差分の有無に基づいて、第1の部分又は第2の部分を出力する出力手段、として機能させることを特徴とする。
The program analysis program of the present invention includes a computer included in the program analysis device,
Based on the execution path on the first program regarding the test item in which the result of the test performed on the first program is an error, the execution path is transferred to the second program including the code common to the first program. Search means for searching whether or not the second passage position corresponding to the first passage position above is included, the first part of the first program corresponding to the changed passage position, and the second passage position Based on the presence or absence of a difference from the second part of the second program corresponding to, the output part outputs the first part or the second part.
本発明によれば、プログラムを変更した場合の、変更後のプログラムの妥当性の検証を効率化できるという効果がある。 According to the present invention, there is an effect that it is possible to efficiently verify the validity of the changed program when the program is changed.
以下、本発明の実施形態について図面を参照して詳細に説明する。尚、すべての図面において、同様な構成要素には同様の符号を付し、適宜説明を省略する。
(第1の実施形態)
図1は、本発明の第1の実施形態におけるプログラム解析装置の構成を示すブロック図である。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In all the drawings, the same reference numerals are given to the same components, and the description will be omitted as appropriate.
(First embodiment)
FIG. 1 is a block diagram showing a configuration of a program analysis apparatus according to the first embodiment of the present invention.
まず、プログラム解析装置の構成を説明するための前提について説明する。 First, the premise for demonstrating the structure of a program analysis apparatus is demonstrated.
あるコンピュータプログラム(以下、「変更前プログラム」という。)がコンピュータ上で動作可能であるものとする。尚、変更前プログラム130が、ソースコードである場合等、そのままではコンピュータ上で動作可能ではないときには、変更前プログラム130を実行可能形式に変換後に、コンピュータ上で動作させてもよい。変更前プログラム130は、一群のテスト項目に対して、正常に動作することが確認されている。
It is assumed that a certain computer program (hereinafter referred to as “pre-change program”) is operable on the computer. When the
図2は、本実施形態における変更前プログラムの一例を示す図である。 FIG. 2 is a diagram illustrating an example of a pre-change program in the present embodiment.
1〜10行において“Main.func”メソッドが、11〜16行において“SubA.m”メソッドが、17〜22行において“SubB.m”メソッドが、定義されている。
The “Main.func” method is defined in
変更前プログラム130に変更が加えられた、別のプログラム(以下、「変更後プログラム」という。)が存在し、コンピュータ上で動作可能であるものとする。尚、変更後プログラム150も、そのままではコンピュータ上で動作可能ではないときには、変更後プログラム150を実行可能形式に変換後に、コンピュータ上で動作させてもよい。なお、変更前プログラム130、変更後プログラム150のそれぞれの記述に用いられる言語は、共通の言語であってもよいし、別個の言語であってもよい。
It is assumed that there is another program (hereinafter referred to as “program after change”) in which a change is made to the
図3は、本実施形態における変更後プログラムの一例を示す図である。 FIG. 3 is a diagram showing an example of the changed program in the present embodiment.
“Main.func”メソッドは変更されておらず、14行において“SubA.m”メソッドが変更され、20行において“SubB.m”メソッドが変更され、23〜32行において“SubC.m”メソッドが新たに定義されている。
The “Main.func” method is not changed, the “SubA.m” method is changed in
尚、ここでは、変更前プログラムが変更されて、変更後プログラムが作成されたものとして説明した。しかし、変更後プログラムは、変更前プログラムが変更されて、作成されたものには限定されない。第1のプログラムが、一群のテスト項目に対して、正常に動作することが確認されていて、かつ、第2のプログラムが、第1のプログラムに対して、コードが一致する部分と、コードが一致しない部分とに分割できれば、第1のプログラムが変更されて、第2のプログラムが作成されたものとみなすことができる。従って、第1のプログラムと第2のプログラムとが、独立して作られた2つのプログラムであってもよい。 Here, the description has been made assuming that the pre-change program is changed and the post-change program is created. However, the post-change program is not limited to a program created by changing the pre-change program. The first program has been confirmed to operate normally for a group of test items, and the second program has a portion where the code matches the first program and the code is If it can be divided into parts that do not match, it can be considered that the first program is changed and the second program is created. Accordingly, the first program and the second program may be two programs created independently.
変更前プログラムと変更後プログラムは、例えば、1つのアプリケーション・プログラミング・インタフェース仕様に従って、共通するメソッドの名称及び機能を含むように、独立して作られた2つのプログラムであってもよい。この場合、どちらか一方のプログラムが、一群のテスト項目に対して、正常に動作することが確認されていれば、一方のプログラムは、他方のプログラムが変更されて作成されたものとみなすことができる。 The pre-change program and the post-change program may be, for example, two programs created independently so as to include common method names and functions according to one application programming interface specification. In this case, if one of the programs is confirmed to operate normally for a group of test items, one program may be regarded as having been created by changing the other program. it can.
例えば、第1のアプリケーション・プログラミング・インタフェース仕様に規定されるメソッドの名称及び機能を含むように作られた第1のプログラムがあるものとする。又、第1のアプリケーション・プログラミング・インタフェース仕様と共通するメソッドの名称及び機能を含む第2のアプリケーション・プログラミング・インタフェース仕様があるものとする。更に、第2のアプリケーション・プログラミング・インタフェース仕様に規定されたメソッドの名称及び機能を含むように、第1のプログラムとは独立して作られた第2のプログラムがあるものとする。このとき、第1のプログラムと第2のプログラムのどちらか一方が、一群のテスト項目に対して、正常に動作することが確認されていれば、一方のプログラムは、他方のプログラムが変更されて作成されたものとみなすことができる。 For example, it is assumed that there is a first program created to include the method names and functions defined in the first application programming interface specification. It is also assumed that there is a second application programming interface specification that includes method names and functions in common with the first application programming interface specification. Further, it is assumed that there is a second program created independently of the first program so as to include the method names and functions defined in the second application programming interface specification. At this time, if one of the first program and the second program is confirmed to operate normally with respect to a group of test items, one program is changed to the other program. It can be considered as created.
変更後プログラム150は、変更前プログラム130が正常に動作した一群のテスト項目の一部項目(以下、「回帰テスト項目」という。)に対して、正常又は異常に動作することが確認されている。回帰テスト項目170の各テスト項目は、例えば、テスト内容と、テスト内容を実行したときの期待結果と、各テスト項目を識別するためのテスト項目名を含んでもよい。
It has been confirmed that the
図4は、本実施形態における回帰テスト項目の一例を示す図である。 FIG. 4 is a diagram illustrating an example of regression test items in the present embodiment.
図4の回帰テスト項目170は、3番目のテスト項目は、テスト項目名が“3”で、テスト内容が“Main.func”メソッドに引数“−1”を与えて実行するテストで、期待結果が“Main.func”メソッドの戻り値が“2”であることを示している。
In the
回帰テスト項目170を実行するときの変更後プログラム150上の実行経路を示す実行経路情報180は、異常に動作したテスト項目毎に記録されている。実行経路情報180によって示される実行経路は、回帰テスト項目170の実行時に、変更後プログラム150が実行された、変更後プログラム150上の一連の部分(以下、「変更後通過位置」という。)を1個以上含む。各変更後通過位置は、テスト項目の実行時に実行された変更後プログラム150上のメソッド名、関数名、ラベル名、デバッグ命令文、行番号、行番号の範囲、又は、コメント等により識別されてもよい。又、実行経路情報180は、テスト項目名等を更に含んでもよい。
The
例えば、図3に示した変更後プログラム150中の、3行、13行、19行、25行にある“System.out.println”メッソドが実行されることにより、実行されたメソッド名が出力される。異常に動作したテスト項目について、メソッド名のリストを記録することで、実行経路情報180を得ることができる。
For example, the name of the executed method is output by executing the “System.out.println” method in
あるいは、例えば、プログラミング言語にJava(登録商標)を用いる場合、JUnit等のテストツールを用いることができる。この場合には、jcoverage等のカバレッジツールを用いて、実行経路情報180を得ることができる。
Alternatively, for example, when Java (registered trademark) is used as a programming language, a test tool such as JUnit can be used. In this case, the
図5は、本実施形態における実行経路情報180の一例を示す図である。
FIG. 5 is a diagram illustrating an example of the
図5の実行経路情報180は、テスト項目名が“3”のテスト項目に対応する、“Main.func”、“SubB.m”、“SubC.m”メソッドの変更後通過位置を含む実行経路であることを示す。
The
実行経路情報180は、変更後プログラム150が異常に動作したテスト項目に対してのみ生成されてもよいし、あるいは、変更後プログラム150が正常又は異常に動作したテスト項目に対して生成され、動作が正常又は異常のどちらかの情報(以下、「テスト結果」という。)を含んでもよい。
The
図6は、本実施形態における実行経路情報の別の一例を示す図である。 FIG. 6 is a diagram illustrating another example of the execution path information in the present embodiment.
図6の実行経路情報180は、テスト項目名が“3”のテスト項目に対応し、テスト結果が“NG”で、“Main.func”、“SubB.m”、“SubC.m”メソッドの変更後通過位置を含む実行経路であることを示す。
The
以上の前提のもとに、プログラム解析装置の構成について説明する。 Based on the above assumptions, the configuration of the program analysis apparatus will be described.
本実施形態のプログラム解析装置100は、通過位置検索手段110と、差分出力手段120とを備える。
The
通過位置検索手段110は、入力された実行経路情報180に基づいて、実行経路情報180に含まれる各変更後通過位置について、入力された変更前プログラム130から、変更後通過位置に対応する変更前プログラム130上の通過位置(以下、「変更前通過位置」という。)を検索して、変更後通過位置と変更前通過位置との組を出力する。尚、通過位置検索手段110は、変更後プログラム150が正常に動作したテスト項目に対する実行経路情報を無視する。又、変更後通過位置に対応する変更前通過位置は、変更前プログラム130上に、変更後通過位置と同じ、メソッド名、関数名、ラベル名、デバッグ命令文、行番号、行番号の範囲、又は、コメント等をもつ部分があるか否か等に基づいて検索されてもよい。又、変更後通過位置に対応する変更前通過位置が見つからなかったときは、通過位置検索手段110は、変更前通過位置として、「空」であることを示す値を出力する。
Based on the input
差分出力手段120は、まず、変更後通過位置と変更前通過位置との組と、変更後プログラム150と、変更前プログラム130とに基づいて、変更前通過位置に対応する変更前プログラム130の部分と、変更後通過位置に対応する変更後プログラム150の部分とに差分があるか否かを検査する。差分出力手段120は、つづいて、差分があれば、変更後通過位置に対応する変更後プログラム150の部分を含む差分情報190を出力する。尚、入力された変更前通過位置の値が“空”のときは、変更後通過位置に対応する変更後プログラム150の部分を出力する。又、差分情報190には、変更前通過位置に対応する変更前プログラム130の部分や、テスト項目名等が更に含まれてもよい。
First, the difference output means 120 is a part of the
尚、差分出力手段120は、変更前プログラム130と変更後プログラム150のコードの部分が、完全に一致しなくても、差分がないと判定してもよい。例えば、コード中のコメント、スペース、タブ、改行等の、プログラムの実行結果に影響しないコードの違いは無視してもよい。
The difference output means 120 may determine that there is no difference even if the code portions of the
又、差分情報190に含まれる、変更後通過位置に対応する変更後プログラム150の部分や、変更前通過位置に対応する変更前プログラム130の部分は、コードの差分がある部分のみでなくてもよい。例えば、差分情報190には、コードの差分があるメソッドの定義全体が含まれてもよい。
Further, the part of the
図7は、本実施形態における差分情報の一例を示す図である。 FIG. 7 is a diagram illustrating an example of difference information in the present embodiment.
図7の差分情報190は、1番目の差分情報は、テスト項目名が“3”のテスト項目に対応し、変更後通過位置“Main.func”、“SubB.m”、“SubC.m”メソッドのうち、変更前通過位置に対応する変更前プログラム130の部分と、変更後通過位置に対応する変更後プログラム150の部分とに差分がある“SubB.m”及び“SubC.m”メソッドに対応する変更後プログラム150の部分を含んでいる。
In the
図8は、本実施形態における差分情報の別の一例を示す図である。 FIG. 8 is a diagram illustrating another example of difference information in the present embodiment.
図8の差分情報190は、1番目の差分情報は、テスト項目名が“3”のテスト項目に対応し、変更後通過位置“Main.func”、“SubB.m”、“SubC.m”メソッドのうち、変更前通過位置に対応する変更前プログラム130の部分と、変更後通過位置に対応する変更後プログラム150の部分とに差分がある“SubB.m”及び“SubC.m”メソッドに対応する変更後プログラム150の部分、並びに、変更前通過位置に対応する変更前プログラム130の部分と、変更後通過位置に対応する変更後プログラム150の部分とに差分がある“SubB.m”メソッドに対応する変更前プログラム130の部分を含んでいる。
In the
図9は、本実施形態におけるプログラム解析装置のハードウェア構成の一例を示すブロック図である。 FIG. 9 is a block diagram illustrating an example of a hardware configuration of the program analysis apparatus according to the present embodiment.
プログラム解析装置907は、記憶装置902と、CPU(Central Processing Unit)903と、キーボード904と、モニタ905と、I/O(Input/Output)908とを備え、これらが内部バス906で接続されている。記憶装置902は、差分出力手段120等のCPU903の動作プログラムを格納する。CPU903は、プログラム解析装置907全体を制御し、記憶装置902に格納された動作プログラムを実行し、I/O908を介して差分出力手段120等のプログラムの実行やデータの送受信を行なう。なお、上記のプログラム解析装置907の内部構成は一例である。プログラム解析装置907は、CPU903のみを備え、外部に備えられた、記憶装置902、キーボード904、モニタ905、及びI/O908を用いて動作してもよい。
The
次に、本実施形態の動作を説明する。 Next, the operation of this embodiment will be described.
図10は、本実施形態におけるプログラム解析装置の動作を示すフローチャートである。但し、実行経路情報180に含まれる1個の変更後通過位置に対する動作を示す。実行経路情報180に複数の変更後通過位置が含まれる場合には、1個の変更後通過位置に対する動作が繰り返される。
FIG. 10 is a flowchart showing the operation of the program analysis apparatus according to this embodiment. However, an operation for one post-change passing position included in the
通過位置検索手段110は、入力された実行経路情報180に含まれる各変更後通過位置について、入力された変更前プログラム130から、変更後通過位置に対応する変更前通過位置を検索して、変更後通過位置と変更前通過位置との組を出力する(ステップS110)。
The passage position search means 110 searches the changed pre-change passage position corresponding to the post-change passage position from the input
差分出力手段120は、変更前通過位置の有無を調べる(ステップS120)。 The difference output means 120 checks the presence / absence of the pre-change passing position (step S120).
差分出力手段120は、変更前通過位置がなければ(ステップS120:No)、次のステップS150へ進む。 If there is no pre-change passing position (step S120: No), the difference output means 120 proceeds to the next step S150.
変更前通過位置があれば(ステップS120:Yes)、差分出力手段120は、変更前通過位置に対応する変更前プログラム130の部分と、変更後通過位置に対応する変更後プログラム150の部分とに差分があるか否かを検査する(ステップS130)。
If there is a pre-change passing position (step S120: Yes), the difference output means 120 will convert the
差分出力手段120は、差分がなければ(ステップS140:No)、その変更後通過位置に対する処理を終了する。 If there is no difference (step S140: No), the difference output means 120 ends the process for the changed passing position.
差分出力手段120は、差分があれば(ステップS140:Yes)、変更後通過位置に対応する変更後プログラム150の部分を含む差分情報190を出力する。
If there is a difference (step S140: Yes), the difference output means 120 outputs the
以上説明したように、本実施形態におけるプログラム解析装置100は、回帰テストの特定のテスト項目でエラーが発生したとき、変更前後でのプログラムの差分の情報のうち、特定のテスト項目の実行経路に含まれるプログラムの差分の情報のみを抽出できる。その理由は、通過位置検索手段110が、特定のテスト項目に関連したプログラムの部分を検索し、差分出力手段120が、特定のテスト項目に関連したプログラムの部分から、プログラムの変更前後で差分がある部分を抽出するからである。
As described above, when an error occurs in a specific test item of the regression test, the
又、本実施形態におけるプログラム解析装置100は、回帰テストの特定のテスト項目でエラーが発生したとき、変更後プログラムのデバッグ作業の支援に利用できる。その理由は、プログラム解析装置100が、回帰テストの特定のテスト項目でエラーが発生したとき、特定のテスト項目に関連した変更前後でのプログラムの差分の情報のみを抽出し、デバッグ作業者は、バグが存在する差分の情報を参照できるからである。
In addition, the
尚、本実施形態では、差分情報190は、変更後通過位置に対応する変更後プログラム150の部分を含むものとして説明した。しかし、差分情報190は、変更後通過位置に対応する変更後プログラム150の部分を含むものには限定されない。すなわち、差分情報190は、変更後通過位置に対応する変更前プログラム130の部分を含むものでもよい。この場合、プログラム解析装置100は、バグが存在する変更後プログラム150の部分に対応する、バグが存在しない変更前プログラム130の部分を抽出できる。従って、差分情報190は、変更後通過位置に対応する変更前プログラム130の部分を含むものでもよい。
In the present embodiment, the
尚、本実施例では、プログラムを記述するプログラミング言語として、Java(登録商標)を用いた例を挙げたが、これに限られず、C、アセンブリ言語等の任意の手続き型プログラミング言語であってもよい。 In this embodiment, an example in which Java (registered trademark) is used as a programming language for describing a program has been described. However, the present invention is not limited to this, and any procedural programming language such as C or assembly language may be used. Good.
尚、本願発明は、上述の実施形態に限定されるものではなく、本願発明の要旨を逸脱しない範囲で種々変更、変形して実施することができる。 In addition, this invention is not limited to the above-mentioned embodiment, It can implement in various changes and deformation | transformation in the range which does not deviate from the summary of this invention.
Claims (6)
前記変更後通過位置に対応する前記第1のプログラムの第1の部分と、前記第2の通過位置に対応する前記第2のプログラムの第2の部分との差分の有無に基づいて、前記第1の部分又は前記第2の部分を出力する出力手段と、
を備えることを特徴とするプログラム解析装置。 Based on the execution path on the first program related to the test item in which the result of the test performed on the first program results in an error, the second program including a code common to the first program, Search means for searching whether a second passage position corresponding to the first passage position on the execution path is included;
Based on the presence / absence of a difference between the first part of the first program corresponding to the post-change passing position and the second part of the second program corresponding to the second passing position, Output means for outputting the first part or the second part;
A program analysis apparatus comprising:
ことを特徴とする請求項1に記載のプログラム解析装置。 The program analysis apparatus according to claim 1, wherein the changed passage position is a definition part of a first method included in the first program.
ことを特徴とする請求項1又は2に記載のプログラム解析装置。 The program analysis apparatus according to claim 1, wherein the pre-change passing position is a definition part of a second method included in the second program.
ことを特徴とする請求項3に記載のプログラム解析装置。 4. The program analysis apparatus according to claim 3, wherein the pre-change passing position corresponding to the post-change passing position is a definition part of the second method having the same name as the first method.
前記変更後通過位置に対応する前記第1のプログラムの第1の部分と、前記第2の通過位置に対応する前記第2のプログラムの第2の部分との差分の有無に基づいて、前記第1の部分又は前記第2の部分を出力する
ことを特徴とするプログラム解析方法。 Based on the execution path on the first program related to the test item in which the result of the test performed on the first program results in an error, the second program including a code common to the first program, Searching whether a second passage position corresponding to the first passage position on the execution path is included;
Based on the presence / absence of a difference between the first part of the first program corresponding to the post-change passing position and the second part of the second program corresponding to the second passing position, A program analysis method comprising: outputting one part or the second part.
第1のプログラムについて行われたテストの結果がエラーになったテスト項目に関する、前記第1のプログラム上の実行経路に基づいて、前記第1のプログラムと共通のコードを含む第2のプログラムに、前記実行経路上の第1の通過位置に対応する第2の通過位置が含まれるかどうかを検索する検索手段と、
前記変更後通過位置に対応する前記第1のプログラムの第1の部分と、前記第2の通過位置に対応する前記第2のプログラムの第2の部分との差分の有無に基づいて、前記第1の部分又は前記第2の部分を出力する出力手段と、
として機能させるためのプログラム解析プログラム。 A computer included in the program analysis device,
Based on the execution path on the first program related to the test item in which the result of the test performed on the first program results in an error, the second program including a code common to the first program, Search means for searching whether a second passage position corresponding to the first passage position on the execution path is included;
Based on the presence / absence of a difference between the first part of the first program corresponding to the post-change passing position and the second part of the second program corresponding to the second passing position, Output means for outputting the first part or the second part;
Program analysis program to function as
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012280814A JP2014126900A (en) | 2012-12-25 | 2012-12-25 | Program analysis device, program analysis method, and program analysis program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012280814A JP2014126900A (en) | 2012-12-25 | 2012-12-25 | Program analysis device, program analysis method, and program analysis program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2014126900A true JP2014126900A (en) | 2014-07-07 |
Family
ID=51406375
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012280814A Pending JP2014126900A (en) | 2012-12-25 | 2012-12-25 | Program analysis device, program analysis method, and program analysis program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2014126900A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016110419A (en) * | 2014-12-08 | 2016-06-20 | 富士通株式会社 | Program, information processor, and information processing method |
JP2019057118A (en) * | 2017-09-21 | 2019-04-11 | 株式会社東芝 | Debug support device and debug support program |
CN112114993A (en) * | 2020-09-28 | 2020-12-22 | 中国建设银行股份有限公司 | Configuration information processing method and device of application system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007004255A (en) * | 2005-06-21 | 2007-01-11 | Fujitsu Ltd | Program for debug support |
JP2009104252A (en) * | 2007-10-19 | 2009-05-14 | Toshiba Corp | Debugging support device and debugging support method |
JP2010067188A (en) * | 2008-09-12 | 2010-03-25 | Internatl Business Mach Corp <Ibm> | Information processor for supporting programming, information processing system, and programming support method and program |
JP2011048714A (en) * | 2009-08-28 | 2011-03-10 | Fujitsu Ltd | Test support method and test support apparatus |
-
2012
- 2012-12-25 JP JP2012280814A patent/JP2014126900A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007004255A (en) * | 2005-06-21 | 2007-01-11 | Fujitsu Ltd | Program for debug support |
JP2009104252A (en) * | 2007-10-19 | 2009-05-14 | Toshiba Corp | Debugging support device and debugging support method |
JP2010067188A (en) * | 2008-09-12 | 2010-03-25 | Internatl Business Mach Corp <Ibm> | Information processor for supporting programming, information processing system, and programming support method and program |
JP2011048714A (en) * | 2009-08-28 | 2011-03-10 | Fujitsu Ltd | Test support method and test support apparatus |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016110419A (en) * | 2014-12-08 | 2016-06-20 | 富士通株式会社 | Program, information processor, and information processing method |
JP2019057118A (en) * | 2017-09-21 | 2019-04-11 | 株式会社東芝 | Debug support device and debug support program |
CN112114993A (en) * | 2020-09-28 | 2020-12-22 | 中国建设银行股份有限公司 | Configuration information processing method and device of application system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8370816B2 (en) | Device, method and computer program product for evaluating a debugger script | |
US9898387B2 (en) | Development tools for logging and analyzing software bugs | |
WO2016177124A1 (en) | Method and device for implementing continuous integration test | |
CN106506283B (en) | Business test method and device of bank and enterprise docking system | |
US20130179863A1 (en) | Bug variant detection using program analysis and pattern identification | |
US20080126867A1 (en) | Method and system for selective regression testing | |
US9639454B2 (en) | Computer-readable recording medium storing therein test data generating program, test data generating method, test data generating apparatus and information processing system | |
US20110126179A1 (en) | Method and System for Dynamic Patching Software Using Source Code | |
JP2015011372A (en) | Debug support system, method, program, and recording medium | |
JP2016115175A (en) | Software test apparatus and software test program | |
US8898649B2 (en) | Application program analysis method, analysis system and recording medium for identifying a contributing factor for an invalid operation of an application program | |
JP2015204065A (en) | Test case generation device and test case generation method | |
JP2014126900A (en) | Program analysis device, program analysis method, and program analysis program | |
Prinz et al. | A first step towards a compiler for business processes | |
US8359579B2 (en) | Monitoring dynamic aspect oriented applications at execution time | |
JP6451417B2 (en) | Debug support device, debug support system, debug support method, and debug support program | |
US9396239B2 (en) | Compiling method, storage medium and compiling apparatus | |
JP5811859B2 (en) | Source code static analysis device, system, method, and program therefor | |
US20190286453A1 (en) | System construction assisting apparatus, method, and program | |
JP2016128941A (en) | Output determination device, output determination method, output determination program, and static analysis device | |
CN113051582B (en) | Computer software technology development and debugging system | |
CN115757099A (en) | Automatic test method and device for platform firmware protection recovery function | |
JP7436848B2 (en) | FFU inspection device and FFU inspection program | |
CN114327588A (en) | Method and device for processing code submission log | |
JP6840656B2 (en) | Test script modifiers and programs |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20151117 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160804 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160830 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20170228 |