JP2008204405A - Software regression test system, regression test program and regression test method - Google Patents

Software regression test system, regression test program and regression test method Download PDF

Info

Publication number
JP2008204405A
JP2008204405A JP2007043023A JP2007043023A JP2008204405A JP 2008204405 A JP2008204405 A JP 2008204405A JP 2007043023 A JP2007043023 A JP 2007043023A JP 2007043023 A JP2007043023 A JP 2007043023A JP 2008204405 A JP2008204405 A JP 2008204405A
Authority
JP
Japan
Prior art keywords
statement
test
test case
dependency
program
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.)
Granted
Application number
JP2007043023A
Other languages
Japanese (ja)
Other versions
JP4939973B2 (en
Inventor
Noriyuki Matsui
宣幸 松井
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2007043023A priority Critical patent/JP4939973B2/en
Publication of JP2008204405A publication Critical patent/JP2008204405A/en
Application granted granted Critical
Publication of JP4939973B2 publication Critical patent/JP4939973B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P20/00Technologies relating to chemical industry
    • Y02P20/50Improvements relating to the production of bulk chemicals
    • Y02P20/52Improvements relating to the production of bulk chemicals using catalysts, e.g. selective catalysts

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To efficiently and automatically perform a regression test by automatically extracting a portion to be preferentially tested according to a changed part so as to avoid an excessive large number of test items when performing the test. <P>SOLUTION: This regression system performs a test by storing information on test cases of the tests performed in the past and combining a dependency relation acquired by analyzing the information and an object program. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、ソフトウェア開発においてプログラムを変更した際に、その変更によって予想外の影響が現れていなかどうか確認するためのリグレッションテスト(回帰テスト)を行うシステム、またはリグレッションテストを行うシステムを実現するためのプログラム、またはリグレッションテストを行う方法に関する。   The present invention realizes a system for performing a regression test (regression test) for confirming whether or not an unexpected influence is caused by a change of a program in software development, or a system for performing a regression test. It is related with the method of performing the program or regression test.

ソフトウェア開発における、ソフトウェアテストの効率化、自動化については、必要なテストの自動生成や、重複するテストの発見、最適化などについての方法、システム等が考案されている。   For software development efficiency and automation in software development, methods, systems, etc. have been devised for automatic generation of necessary tests, discovery of duplicate tests, and optimization.

特許文献1では、予め各テストケースで実行して実行回数を記録しておき、修正の影響をうけるテストケースを抽出することが開示されている。
特許文献2では、プログラムに関する情報を基に、全てのテストケースの中から各テストケースをプログラム全体の機能における重要度順に選択するプログラムテスト装置を開示している。
Japanese Patent Application Laid-Open No. 2004-133830 discloses that the number of executions is recorded in advance in each test case, and test cases that are affected by the correction are extracted.
Patent Document 2 discloses a program test apparatus that selects each test case from all test cases in order of importance in the function of the entire program based on information on the program.

また、プログラムの依存関係について、データ依存や制御依存といった依存の種類や解析方法(非特許文献1)などについて多くの提案がなされている。
特許文献3では、プログラムの修正による影響を受ける変数を分析し、またプログラムの実行順序をたどり計算経路を検出し、プログラムに施した修正の影響を分析する影響分析装置を開示している。
In addition, with regard to program dependency, many types of dependency such as data dependency and control dependency, and an analysis method (Non-patent Document 1) have been proposed.
Patent Document 3 discloses an influence analysis apparatus that analyzes a variable affected by a program modification, detects a calculation path by following the execution order of the program, and analyzes the influence of the modification applied to the program.

また特許文献4では、変数間の代入元と代入先の依存関係を調べてソースプログラムを修正した際の影響範囲を調査することを開示している。
ソフトウェア開発における修正作業(デバッグ)においては、行った修正(変更)が誤っていないか、また行った修正(変更)がそれまでは正常に動作していた他の部分に影響を及ぼし、新たな問題を引き起こすことが無いかどうかを調べるために、リグレッションテストを行うことが必須である。しかし、ソフトウェアの規模が大きくなり、それに伴いテストケースの数が膨大になると、変更のたびに全てのテストを再実行するのは不可能である。
Further, Patent Document 4 discloses investigating the range of influence when a source program is modified by examining the dependency relationship between substitution sources and substitution destinations between variables.
In the correction work (debugging) in software development, whether the correction (change) made is correct, or the correction (change) made affects other parts that have been operating normally until then. It is essential to do a regression test to see if it causes any problems. However, if the scale of the software grows and the number of test cases becomes enormous, it is impossible to re-execute all tests for each change.

そのため変更内容に関連するテストケースを絞り込み、リグレッションテストを行うことが求められる。しかし、ソフトウェアの規模が大きく、テストケースの数も多くなっており、手作業でリグレッションテストに必要なテストケースを絞り込み、実行することは非常に困難である。また、ソフトウェアが複雑化しているために変更の影響が把握しきれず必要なテストケースを見落としてしまうことも問題となっている。
特公平8−1609号公報 特開昭63−116248号公報 特許第2634011号 特開平8−190475号公報 Frank Tip,A Survey of Program Slicing Techniques,Journal of Programming Languages, Vol.3, No.3, pp.121−189,1995
Therefore, it is required to narrow down the test cases related to the change contents and perform a regression test. However, the scale of the software is large and the number of test cases is large, and it is very difficult to narrow down and execute test cases necessary for the regression test manually. Another problem is that because the software is becoming more complex, the impact of the changes cannot be fully understood and necessary test cases are overlooked.
Japanese Patent Publication No.8-1609 JP 63-116248 A Japanese Patent No. 2634011 JP-A-8-190475 Frank Tip, A Survey of Program Slicing Techniques, Journal of Programming Languages, Vol. 3, no. 3, pp. 121-189, 1995

そこで、本発明の課題は、プログラムの変更によって予想外の影響が現れていなかどうか確認するためのリグレッションテストを行う場合に、テスト項目が膨大になってしまわないように、変更した箇所に応じて優先的にテストすべき部分を自動的に抽出し、リグレッションテストを効率的、自動的に行うことを可能にすることにある。   Therefore, the problem of the present invention is that, when a regression test is performed to confirm whether an unexpected influence has occurred due to a change in the program, the test items are not changed to an enormous amount according to the changed part. It is to automatically extract a portion to be preferentially tested, and to enable a regression test to be performed efficiently and automatically.

上述した課題を解決するために、本発明では、過去に行われたテストのテストケースについての情報を保存しておき、その情報と対象プログラムを解析して得られた依存関係を組み合わせることによりテストを行うリグレッションシステムを構成した。   In order to solve the above-described problems, in the present invention, information on test cases of tests performed in the past is stored, and the test is performed by combining the information and the dependency obtained by analyzing the target program. Regression system that performs

すなわち、変更を加えた部分に関連するテストケースに絞り込んでテストを行うためには、
(1)各テストケースにおいてソフトウェアのどの部分が実行されるか、ということと、(2)行われた変更による影響がソフトウェア中のどこに及ぶか、ということが、
分からなければならない。
In other words, in order to narrow down to test cases related to the changed part,
(1) what part of the software will be executed in each test case, and (2) where in the software the impact of the changes made will be.
I have to know.

そこで、本発明では上記(1)を実現するために、各テストケースについてテストを行った際に実行されたStatementをテストケースと関連付け、その情報を保存し、また上記(2)を実現するために、対象となるプログラムを解析し、依存関係を抽出し、該依存関係を用いて、変更された部分と依存関係があり、実行結果が変わると予想される部分を推定するように構成した。   Therefore, in the present invention, in order to realize the above (1), the statement executed when the test is performed for each test case is associated with the test case, the information is stored, and the above (2) is realized. In addition, the program to be analyzed is analyzed, dependency relationships are extracted, and the dependency relationship is used to estimate a portion that has a dependency relationship with the changed portion and is expected to change the execution result.

そして、変更された部分とどの程度強い依存関係があるかを依存の段数や種類から解析し、変更部分と強く依存している、すなわち変更の影響を強く受ける部分について、過去に実行されたテストケースとプログラム中のStatementの対応情報に基づいて該当するテストケースを抽出し、テストを実行するように構成した。   Then, analyze how much dependency there is with the changed part from the number and type of dependency, and test that has been executed in the past for the part that is strongly dependent on the changed part, that is, strongly affected by the change A corresponding test case is extracted based on the correspondence information between the case and the Statement in the program, and the test is executed.

このように構成することにより、変更された部分から依存関係の強いテストケースを確実に潰していくことが可能となり、リグレッションテストの効率化を図ることが可能である。   By configuring in this way, it is possible to reliably crush a test case having a strong dependency from the changed portion, and it is possible to improve the efficiency of the regression test.

本発明によれば、ソフトウェアの開発における修正作業(デバッグ)において、リグレッションテストを効率的、自動的に行うことが可能である。これにより、ソフトウェア開発の効率自体を上げることが可能となる。   According to the present invention, it is possible to efficiently and automatically perform a regression test in correction work (debugging) in software development. As a result, the efficiency of software development itself can be increased.

以下、図面を参照して、本発明の実施の形態について説明する。
図1に、本発明のソフトウェアリグレッションテストシステム101を示す。
リグレッションテストシステム101は、プログラム格納部102、依存関係格納部103、ユーザインタフェース104、プログラム解析部105、テスト実行部106、依存関係解析部107、テストケース格納部108、Statement ID格納部109を備えて成る。
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 shows a software regression test system 101 of the present invention.
The regression test system 101 includes a program storage unit 102, a dependency relationship storage unit 103, a user interface 104, a program analysis unit 105, a test execution unit 106, a dependency relationship analysis unit 107, a test case storage unit 108, and a statement ID storage unit 109. It consists of

プログラム格納部102には、テスト対象プログラムのソースファイルが保存される。
依存関係格納部103は、プログラム中のStatement間の依存関係についての情報を保存するデータベースである。ソースファイルごとに、各Statementについて、影響を受けるStatementと影響を与えるStatementのリストを持
つ。
The program storage unit 102 stores a source file of the test target program.
The dependency relationship storage unit 103 is a database that stores information about dependency relationships between statements in a program. For each source file, each statement has a list of affected statements and a list of affected statements.

図2に依存関係格納部103の概要を示す。また、図2を依存関係格納部103で実現する場合のデータ構造を図3に示す。
また、テストケース格納部108はテストケース実行時に実行されたプログラムの部分についての情報を保存するデータベースである。各テストケースに対し、そのテストケースが実行されたときに、実際に実行されたプログラム中のStatementのリストを持つ。
FIG. 2 shows an outline of the dependency relationship storage unit 103. FIG. 3 shows a data structure when FIG. 2 is realized by the dependency relationship storage unit 103.
The test case storage unit 108 is a database that stores information about a program portion executed when the test case is executed. Each test case has a list of Statements in the program that is actually executed when the test case is executed.

図4にテストケース格納部108の概要を示す。また、図4をテストケース格納部108で実現する場合のデータ構造を図5に示す。
Statement ID格納部109には、テスト対象プログラムの各Statementと識別子(ID)の対応を示したテーブルが保存される。
FIG. 4 shows an outline of the test case storage unit 108. FIG. 5 shows a data structure when FIG. 4 is realized by the test case storage unit 108.
The Statement ID storage unit 109 stores a table indicating correspondence between each Statement of the test target program and an identifier (ID).

ユーザインタフェース104は、ソフトウェア開発者などのユーザからのテスト実行指示などの入力を受け付け、テスト結果を表示して通知するなど、ユーザとシステムの仲介を行う。   The user interface 104 mediates between the user and the system, such as receiving an input such as a test execution instruction from a user such as a software developer, and displaying and notifying a test result.

プログラム解析部105は、テスト対象プログラムを静的に解析して、プログラム中の依存関係を抽出し、依存関係格納部103に出力する。また、プログラムが部分的に修正、変更された際には、修正や変更の行われた部分から関連のある部分について、再度依存関係を抽出し、依存関係格納部103に更新する。   The program analysis unit 105 statically analyzes the test target program, extracts a dependency relationship in the program, and outputs the dependency relationship to the dependency relationship storage unit 103. Further, when the program is partially corrected or changed, the dependency relationship is extracted again for the related portion from the corrected or changed portion, and updated to the dependency relationship storage unit 103.

依存関係解析部107は、テスト実行部106からプログラムの修正、変更された部分についての情報を受け取り、依存関係格納部103に格納された依存関係を用いて、修正、変更された部分に関連のある部分を解析し、その結果をテスト実行部106に出力する。   The dependency relationship analysis unit 107 receives information about the modified and changed part of the program from the test execution unit 106 and uses the dependency relationship stored in the dependency relationship storage unit 103 to relate to the corrected and changed portion. A certain part is analyzed, and the result is output to the test execution unit 106.

テスト実行部106は、依存関係解析部107から出力された結果をもとに、テストケース格納部108から必要なテストケースの選択・実行を行う。
図6に、図1に示したリグレッションテストシステム101において、プログラムが修正、変更された場合に、該修正、変更した部分に関係するテストを選択し、実行する際の処理の流れを示す。
The test execution unit 106 selects and executes a necessary test case from the test case storage unit 108 based on the result output from the dependency relationship analysis unit 107.
FIG. 6 shows a flow of processing when selecting and executing a test related to the corrected / changed part when the program is corrected / changed in the regression test system 101 shown in FIG.

尚、図6が実行される前に、プログラム格納部102に格納されたテスト対象プログラムは、プログラム解析部105によって解析され、依存関係格納部103に依存関係に関わる情報が格納されており、また、過去のテストに関するテストケースについてテストケース格納部108に格納されている。   Before the execution of FIG. 6, the test target program stored in the program storage unit 102 is analyzed by the program analysis unit 105, and information related to the dependency relationship is stored in the dependency relationship storage unit 103. The test cases relating to past tests are stored in the test case storage unit 108.

また、以下の説明では、修正、変更されたStatementとの依存関係の強さを表す指標として「優先度」を用いる。「優先度」は、修正、変更されたStatementとの依存関係を一段挟むごとに、挟まれた依存関係の種類に応じて増加するように設定されたものであり、優先度の値が大きくなれば大きくなるほどそのStatementの依存関係は修正、変更Statementとの関係は低い、ということを意味する。   In the following description, “priority” is used as an index indicating the strength of the dependency relationship with the modified and changed Statement. The “priority” is set to increase according to the type of dependency relationship that has been changed or changed, so that the priority value can be increased. The larger the value, the lower the dependency relationship of the Statement and the lower the relationship with the changed Statement.

また、依存関係の種類とは、少なくともデータ依存、制御依存、関数呼び出しのいずれかであるとする。
まず、S601でテスト実行部106が依存関係解析部107へ、プログラム中の修正、変更されたStatementと、修正、変更されたStatementからどの程度関連が強いStatementまで抽出するかをきめる優先度の閾値を通知する。
Further, it is assumed that the type of dependency relationship is at least one of data dependency, control dependency, and function call.
First, in S601, the test execution unit 106 determines, to the dependency relationship analysis unit 107, the modified / changed Statement in the program and the degree of strong association from the modified / changed Statement to extract the priority level. To be notified.

S602で、依存関係解析部107は、通知された、修正、変更されたStatementと優先度の閾値をもとに、依存関係格納部103に格納された依存関係を用いて、関連するStatementの抽出を行う。この抽出処理の詳細を図7に示す。   In step S <b> 602, the dependency relationship analysis unit 107 extracts related statements using the dependency relationship stored in the dependency relationship storage unit 103 based on the notified modified and changed statement and the priority threshold value. I do. Details of this extraction process are shown in FIG.

図7において、S701でStatementと優先度のペアの集合S1,S2,S3を用意し、すべて空にする。
S702で、プログラム中の修正、変更されたStatementと優先度の値0のペアをS1,S2に入れる。
In FIG. 7, a set S1, S2, and S3 of a pair of Statement and priority is prepared in S701, and all of them are emptied.
In S 702, a pair of the value 0 of the priority and the value of the modified and changed Statement in the program is entered in S 1 and S 2.

S703で、S2に入っているStatementと依存関係にあるStatementと、その優先度のペアをS3に入れる。S703の処理の詳細を図8に示す。
図8において、S801で、Statementと優先度のペアの集合S2’を用意し、S2の内容をコピーする。S802で、S2’が空か否かを判断する。S2’が空(Yes)の場合は図8の処理を終了し、図7のS704に進む。S2’が空でない(No)場合は、S803に進む。
In step S703, a pair of a statement having a dependency relationship with the statement in S2 and its priority are entered in S3. Details of the processing of S703 are shown in FIG.
In FIG. 8, in S801, a set S2 ′ of State and priority pairs is prepared, and the contents of S2 are copied. In S802, it is determined whether S2 ′ is empty. If S2 ′ is empty (Yes), the process of FIG. 8 is terminated, and the process proceeds to S704 of FIG. If S2 ′ is not empty (No), the process proceeds to S803.

S803で、S2’からStatementと優先度のペア(s,p)を一つ取り出す。
S804で、依存関係格納部103に格納された依存関係を用いて、sに依存関係のあるStatement s1、s2、s3、・・・について、pと依存関係の種類から優先度p1、p2、p3、・・・を求める。
In step S803, a single statement / priority pair (s, p) is extracted from S2 ′.
In S804, using the dependency relationship stored in the dependency relationship storage unit 103, for the statements s1, s2, s3,... , ...

S805で、(s1,p1)、(s2,p2)、(s3,p3)、・・・をS3に入れる。この際、S3に既にあるStatementについては、新しいペアの優先度の値が小さい、すなわち依存関係がより強い場合は置き換え、優先度の値が大きい、すなわち依存関係が弱い場合には捨てる。   In S805, (s1, p1), (s2, p2), (s3, p3),... Are put in S3. At this time, the Statement already in S3 is replaced when the priority value of the new pair is small, that is, when the dependency is stronger, and is discarded when the priority value is large, that is, when the dependency is weak.

このように図8の処理により、S2に入っているStatementと依存関係にあるStatementとその優先度のペアをS3に得ることができる。
そして図7のS704に進む。S704で、S3から、優先度が閾値を超えているものを取り除く。S705で、S3に入っているペアのうち、そのStatementがS1に入っており、優先度の値がS3よりもS1のほうが大きいものをS3から取り除く。すなわち、依存関係の弱いものをS3から取り除く。
In this way, by the process of FIG. 8, a pair of a State and its priority having a dependency relationship with the State included in S2 can be obtained in S3.
Then, the process proceeds to S704 in FIG. In S704, those whose priority level exceeds the threshold are removed from S3. In S705, out of the pairs in S3, those whose Statement is in S1 and whose priority value is larger in S1 than in S3 are removed from S3. That is, the weak dependency relationship is removed from S3.

S706で、S3に入っているStatementをS1に入れる。このとき、S1に既に同じStatementについてのペアが入っている場合は、S3のペアで置き換える。   In S706, the Statement contained in S3 is entered in S1. At this time, if a pair for the same Statement already exists in S1, it is replaced with the pair in S3.

次にS707で、S3が空か否かを判断する。S3が空の場合(Yes)、図6に戻り、S603に進む。S3が空でない場合(No)、S708に進み、S2を空にする。そして、S709でS3の中身をS2に入れ、S3を空にし、S703に戻る。   Next, in S707, it is determined whether S3 is empty. If S3 is empty (Yes), the process returns to FIG. 6 and proceeds to S603. If S3 is not empty (No), the process proceeds to S708, and S2 is made empty. In S709, the contents of S3 are put into S2, S3 is emptied, and the process returns to S703.

上述のように図7の処理を行うことで、終了時にS1に入っているStatementが、優先度の閾値を超えない、修正・変更されたStatementから依存関係の強いStatementである、という結果を得る。   By performing the processing of FIG. 7 as described above, the result that the statement entered in S1 at the end does not exceed the priority threshold value, and is a strongly-dependent statement from the modified / changed statement is obtained. .

そして、図6のS603に進む。S603では、依存関係解析部107がテスト実行部106へ、図7、図8の処理の結果である、抽出されたStatementを通知する。そして、S604でテスト実行部106は通知されたStatementと関連付けられ
たテストケースをテストケース格納部108から検索し、見つかったテストケースの実行を行う。この際、図6に示すリグレッションテストのサイクルの中で既に実行されたテストケースについては実行を行わない。また、S605で、実行されたテストケースについて、当該テストケースが行われたことであることを記録し、テストケース格納部108を更新する。
Then, the process proceeds to S603 in FIG. In step S <b> 603, the dependency relationship analysis unit 107 notifies the test execution unit 106 of the extracted statement that is the result of the processing in FIGS. 7 and 8. In step S604, the test execution unit 106 searches the test case storage unit 108 for a test case associated with the notified statement, and executes the found test case. At this time, the test cases that have already been executed in the regression test cycle shown in FIG. 6 are not executed. In step S605, the test case that has been executed is recorded as being performed, and the test case storage unit 108 is updated.

その後、S606で、またテストを続行する時間的余裕があるかどうかを判断し、余裕がある場合(Yes)には、S607に進む。余裕がない場合(No)には、S608に進む。   Thereafter, in S606, it is determined whether or not there is a time allowance for continuing the test. If there is a surplus (Yes), the process proceeds to S607. If there is no room (No), the process proceeds to S608.

S607では、修正、変更されたStatementからどの程度関連が強いStatementまで抽出するかを決定する閾値の値を大きくし(より依存関係の弱いStatementまで抽出するように値を設定)、S601に戻り、図6のフローを繰り返す。   In S607, the threshold value that determines how much of the strongly related State is extracted from the modified / changed State is increased (the value is set so as to extract up to a State having a weaker dependency), and the process returns to S601. The flow of FIG. 6 is repeated.

S608では、十分なリグレッションテストが行われる、もしくはテスト時間に余裕がなくなり、一連のリグレッションテストが終了した後に、プログラム中の修正された箇所について依存関係格納部108の部分更新を行う。   In step S608, after the sufficient regression test is performed or the test time is not sufficient and the series of regression tests is completed, the dependency storage unit 108 is partially updated for the corrected portion in the program.

図9にS608を詳細に説明する。
まず、S901でユーザからプログラムの修正、変更したStatementがユーザインタフェース104を介して指定される。このとき、Statementを新たに追加した場合には、追加したStatementが含まれる関数やソースファイルを指定することにより対応することができる。
FIG. 9 illustrates S608 in detail.
First, in step S <b> 901, a statement that has been modified or changed by the user is designated via the user interface 104. At this time, when a statement is newly added, it can be dealt with by designating a function or source file including the added statement.

次にS902で、プログラム解析部105は、指定された箇所のStatementから直接依存を受けている、もしくは直接依存を及ぼしているStatementについて、依存関係格納部103より検索する。   In step S <b> 902, the program analysis unit 105 searches the dependency storage unit 103 for a statement that is directly dependent on or directly dependent on a statement at a specified location.

この検索されたStatementが含まれるソースファイルについて依存関係抽出処理(後述の、図12、図13参照)を行い、依存関係格納部103の該当エントリのみを更新する。   Dependency extraction processing (see FIGS. 12 and 13 described later) is performed on the source file including the searched Statement, and only the corresponding entry in the dependency storage unit 103 is updated.

以上、図1から図9を参照して本発明のリグレッションテストシステムを詳細に説明した。
以下、本発明のリグレッションテストの動作について、具体的な例を用いて説明する。
The regression test system of the present invention has been described in detail above with reference to FIGS.
Hereinafter, the operation of the regression test of the present invention will be described using specific examples.

今、図10に示したC言語ライクな言語で書かれたサンプルプログラムの修正作業(デバッグ)において、本発明のリグレッションテストシステムを用いているとする。
まず、図10のプログラムについて、プログラム解析部105は依存関係格納部103に依存関係についての情報を格納する。
Assume that the regression test system of the present invention is used in the modification work (debugging) of a sample program written in a C-like language shown in FIG.
First, for the program in FIG. 10, the program analysis unit 105 stores information about the dependency relationship in the dependency relationship storage unit 103.

また、図10のプログラムにおける各StatementとStatement IDとの対応は図11に示すテーブルであるとする。図11に示すテーブルは、Statement ID格納部109に保存される。   Also, the correspondence between each Statement and Statement ID in the program of FIG. 10 is assumed to be the table shown in FIG. The table shown in FIG. 11 is stored in the Statement ID storage unit 109.

図10のプログラムにおける各Statementの依存関係を解析し、該依存関係に関わる情報を生成する処理の詳細については、非特許文献1に開示されている。
今回の例では、注目する依存関係としてデータ依存と制御依存、関数呼び出しを用いる。これらの依存関係は、プログラムのStatemetをノードとし、実行時のStatement間の遷移をエッジとして表現したコントロールフローグラフとして作成し、作
成したコントロールフローグラフを各ノードでの変数の代入と参照、エッジのパスを見ながら辿ることにより求めることができる。
The details of the process of analyzing the dependency relationship of each Statement in the program of FIG. 10 and generating information related to the dependency relationship are disclosed in Non-Patent Document 1.
In this example, data dependency, control dependency, and function call are used as the target dependency. These dependencies are created as control flow graphs that represent the state of the program as a node and transitions between statements at the time of execution as edges, and the created control flow graph is assigned and referenced to variables at each node. It can be obtained by following the path.

図12に、図10のサンプルプログラムから作成されたコントロールフローグラフを示す。
このグラフを用いて、データ依存については、例えばノード(i=1)では、変数iへの代入が行われており、ノード(while(i<=max))では、変数iが参照されていて、かつノード(i=1)からノード(while(i<=max))までの間に、変数iへの代入が行われないパスが存在するため、このノード間にはデータ依存が存在することがわかる。
FIG. 12 shows a control flow graph created from the sample program of FIG.
Using this graph, for data dependence, for example, a node (i = 1) is assigned to a variable i, and a node (while (i <= max)) is referenced to a variable i. In addition, since there is a path from the node (i = 1) to the node (while (i <= max)) that does not assign to the variable i, there must be data dependency between the nodes. I understand.

また、制御依存については、例えばノード(while(i<=max))からはノード(fact = fact * i)へのパス以外にもSTOPへ繋がるパスがあるため、このノード間には制御依存が存在するということがわかる。   As for control dependence, for example, there is a path that leads to STOP in addition to the path from the node (while (i <= max)) to the node (fact = fact * i). You can see that it exists.

このように、プログラムからコントロールフローグラフを作成し、依存関係を解析すると、図13に示すようなプログラム依存関係グラフを得ることができる。このグラフにおいて、実線がデータ依存を、一点鎖線が制御依存を、二点鎖線が関数呼び出しを示している。   Thus, when a control flow graph is created from a program and the dependency relationship is analyzed, a program dependency graph as shown in FIG. 13 can be obtained. In this graph, a solid line indicates data dependence, a one-dot chain line indicates control dependence, and a two-dot chain line indicates a function call.

上述のように作成したプログラム依存関係グラフを、プログラム解析部105は依存関係格納部103に保存する。すなわち、上述したようにプログラム依存関係グラフは図2のように表現することが可能で、図10のサンプルプログラムの依存関係は図14に示す通りとなる。そして、図14は図15に示したデータ構造の形で依存関係格納部103に保存される。   The program analysis unit 105 saves the program dependency relationship graph created as described above in the dependency relationship storage unit 103. That is, as described above, the program dependency relationship graph can be expressed as shown in FIG. 2, and the dependency relationship of the sample program of FIG. 10 is as shown in FIG. 14 is stored in the dependency relationship storage unit 103 in the form of the data structure shown in FIG.

尚、図14、図15については、以下の説明に用いる、Statement ID:0とStatement ID:10の影響を与えるリスト、影響を受けるリストのみを記述している。   14 and 15, only the lists that are affected by the Statement ID: 0 and the Statement ID: 10 and the lists that are affected are described in the following description.

Statement ID:0 の write(int x) については、Statement
ID:9、10のStatementから関数呼び出しされているため、影響を受けるStatementのリストにStatement ID:9、10が登録されている。
For write (int x) with Statement ID: 0,
Since the function is called from the statements of ID: 9 and 10, statement IDs: 9 and 10 are registered in the list of affected statements.

また、Statement ID:10の write(sum) については、Statement ID:0のStatementから関数呼び出しを受けているために、影響を与えるStatementのリストにStatement ID:0が登録されている。また、Statement ID:3、6のStatementからデータ依存を、Statement ID:9のStatementから制御依存を受けているために影響を受けるStatementリストにStatement ID:3,6,9が登録されている。   For write (sum) of Statement ID: 10, since the function call is received from the Statement of Statement ID: 0, Statement ID: 0 is registered in the list of affected Statements. In addition, Statement IDs: 3, 6, and 9 are registered in a Statement list that is affected by data dependence from Statements of Statement IDs: 3 and 6, and control dependence from Statement of Statement ID: 9.

上述のように依存関係が依存関係格納部103に格納されるのと同時に、テストケース格納部108に過去のテストについての情報が格納される。
ここではサンプルとして過去にテストケース1、テストケース2、テストケース3のテストが実行されていたとする。過去の実行では、テストケース1では、Statement ID:0,1,2,3,4,5,6,7,8,9,10,11が実行され、テストケース2ではStatement ID:1,2,3,4,5,9が実行され、テストケース3ではいずれのStatementも実行されなかったとする。このような場合に、図16に示すように、過去のテストの各テストケースにおいて実行されたStatementがリストにされて表現され、図17に示すデータ構造の形でテストケース格納部108
に格納される。
As described above, the dependency relationship is stored in the dependency relationship storage unit 103, and at the same time, information about the past test is stored in the test case storage unit.
Here, it is assumed that tests of test case 1, test case 2, and test case 3 have been executed as samples in the past. In the past execution, in the test case 1, the Statement IDs: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, and 11 are executed. In the test case 2, the Statement ID: 1, 2 , 3, 4, 5 and 9 are executed, and in the test case 3, no Statement is executed. In such a case, as shown in FIG. 16, the statements executed in each test case of the past test are expressed as a list, and the test case storage unit 108 in the form of the data structure shown in FIG.
Stored in

以上のように、依存関係格納部103に図14、図15に示した依存関係が格納され、テストケース格納部108に図16、図17に示した過去のテストで行われた各テストケースとプログラムのStatementとの関係に関わる情報が格納されたところで、リグレッションテストの行う処理の例として、サンプルプログラム中のStatment 「write(sum)」(Statement ID:10)が修正されたときのリグレッションテストの処理について説明する。   As described above, the dependency relationships shown in FIGS. 14 and 15 are stored in the dependency relationship storage unit 103, and the test cases performed in the past tests shown in FIGS. 16 and 17 are stored in the test case storage unit 108. When information related to the relationship with the statement of the program is stored, as an example of the process of performing the regression test, the regression test when the statement “write (sum)” (Statement ID: 10) in the sample program is modified Processing will be described.

本発明のリグレッションテストシステムでは、図6で示したフローに沿って、Statement「write(sum)」から関連が強いStatementを実行するテストケースを探し、実行していく。   In the regression test system of the present invention, along with the flow shown in FIG. 6, a test case for executing a strongly related statement from the statement “write (sum)” is searched and executed.

今回の例では、関連性の指標である優先度は、修正、変更されたStatementとの依存関係としてデータ依存、制御依存、関数呼び出しのいずれかを一段挟むごとに1増加するように設定されたものとする。すなわち、優先度の値は小さいほうが依存関係が強いことを意味する。   In this example, the priority, which is an index of relevance, is set to increase by 1 every time one of data dependency, control dependency, or function call is inserted as a dependency relationship with the modified or changed Statement. Shall. That is, the smaller the priority value, the stronger the dependency.

図18に示すように、例えば図10のサンプルプログラム中の「write(sum)」からの依存関係の強さを考えた場合、データ依存、制御依存、関数呼び出しで直接、関係のある「write(int x)」、「sum=0」、「sum=sum+i」、「if(print)」の優先度は1となり、更にこれら優先度1のStatementを挟んで関係のある「main()」、「i=1」、「while(i<=max)」、「i=i+1」、「write(fact)」の優先度は2となる。   As shown in FIG. 18, for example, when considering the strength of dependency from “write (sum)” in the sample program of FIG. int x) ”,“ sum = 0 ”,“ sum = sum + i ”, and“ if (print) ”have a priority of 1, and“ main () ”that is related by interposing these priority 1 statements. , “I = 1”, “while (i <= max)”, “i = i + 1”, and “write (fact)” have a priority of 2.

さて、図6において、S601でテスト実行部106は、依存関係解析部107に修正、変更されたStatement IDとして「10」と、どの程度依存関係が強いStatementまで抽出するかを決める優先度として「0」を通知する。   In FIG. 6, in S601, the test execution unit 106 sets “10” as the Statement ID modified and changed by the dependency analysis unit 107, and “10” as the priority for determining how much of the strongest dependency is extracted. “0” is notified.

S602で依存関係解析部107は、Statement ID:10と依存関係のあるStatementを抽出する。
図7のS702で、S1=S2={(10,0)}((10,0)はStatement ID:10と優先度の値が0のペアであることを表す。)とし、S703の処理を実行する。
In step S <b> 602, the dependency relationship analysis unit 107 extracts a statement having a dependency relationship with the statement ID: 10.
In S702 of FIG. 7, S1 = S2 = {(10, 0)} ((10, 0) represents a pair with a Statement ID: 10 and a priority value of 0), and the processing of S703 is performed. Execute.

S703の処理は図8のフローで示した処理で、S801で、S2’={(10,0)}となり、S803でStatementと優先度のペア(10,0)をS2’から取り出す。次にS804を実行する。   The processing of S703 is the processing shown in the flow of FIG. 8. In S801, S2 '= {(10, 0)}, and in S803, the State and priority pair (10, 0) is extracted from S2'. Next, S804 is executed.

今回は優先度0のStatement ID:10について注目しており、依存関係データベースを参照すると、Statement ID:10と依存関係があるのはStatement ID:0,3,6,9であり、それぞれ関数呼び出し、データ依存、制御依存で関係しているため、それぞれの優先度は「0(Statement ID:0の優先度)+1(関数呼び出しを一段挟んだときの優先度増加値)=1」、「0+1(データ依存を一段挟んだときの優先度増加値)=1」、「0+1(データ依存を一段挟んだときの優先度増加値)=1」、「0+1(制御依存を一段挟んだときの優先度増加値) =1」となる。   This time, we are focusing on Statement ID: 10 with priority 0, and referring to the dependency database, Statement ID: 10 has a dependency relationship with Statement ID: 0, 3, 6, 9 respectively. , Data dependency, and control dependency, the respective priorities are “0 (priority of Statement ID: 0) +1” (priority increase value when one step of function call is sandwiched) = 1 ”,“ 0 + 1 ” (Priority increase value when data dependency is sandwiched by one level) = 1 ”,“ 0 + 1 (Priority increase value when data dependency is sandwiched by one step) = 1 ”,“ 0 + 1 (Priority when control dependency is sandwiched by one step) Degree increase value) = 1 ”.

次にS805でS3にいれ、S3 = {(0,1),(3,1),(6,1),(9,1)}となる。この後、S802に戻るが、S2’からは(10,0)が取り出されて空になっているため、図8の処理(図7のS703)は終了し、図7のS704に進む。   Next, S3 is entered in S805, and S3 = {(0,1), (3,1), (6,1), (9,1)}. Thereafter, the process returns to S802. Since (10, 0) is extracted from S2 'and is empty, the process in FIG. 8 (S703 in FIG. 7) ends, and the process proceeds to S704 in FIG.

S704では、今回は優先度の閾値が0と設定されており、S3に入っているペアは全て0を超えているために取り除かれ、S3は空となる。このためS705、S706では何も処理は行われず、S707で図7の処理は終了する(図6のS602)。   In S704, the priority threshold is set to 0 this time, and all pairs in S3 are removed because they exceed 0, and S3 becomes empty. For this reason, no processing is performed in S705 and S706, and the processing in FIG. 7 ends in S707 (S602 in FIG. 6).

S602では、S1に入っているStatementが、抽出されたStatementとされ、S603に進む。S603では、依存関係解析部107が抽出したStatementをテスト実行部106に通知する。   In S602, the Statement included in S1 is set as the extracted Statement, and the process proceeds to S603. In step S <b> 603, the test execution unit 106 is notified of the statement extracted by the dependency relationship analysis unit 107.

S604で、S1 = {(10,0)}となっているので、優先度の閾値を0としたときには関連するStatementはStatement ID:10のみとなる。テストケース格納部103を参照すると、(sample.c:10)を通るテストケースはテストケース1のみであるので、このサイクルではテストケース1が実行される。   In S604, since S1 = {(10, 0)}, when the priority threshold is set to 0, the related Statement is only Statement ID: 10. Referring to the test case storage unit 103, since only the test case 1 passes through (sample.c: 10), the test case 1 is executed in this cycle.

そして実行後、S605でテストケース格納部103を更新して、実行したテストケースについて記録する。
テスト時間がまだ存在するので、S607に進み、次に優先度の閾値を1とする。
After execution, the test case storage unit 103 is updated in step S605, and the executed test case is recorded.
Since the test time still exists, the process proceeds to S607, and the priority threshold is set to 1.

図6において、S601でテスト実行部106は、依存関係解析部107に修正、変更されたStatement IDとして「10」と、どの程度依存関係が強いStatementまで抽出するかを決める優先度として「1」を通知する。   In FIG. 6, in S601, the test execution unit 106 corrects and changes to the dependency analysis unit 107 “10”, and “1” as the priority for determining how much of the statement with strong dependency is extracted. To be notified.

S602で依存関係解析部107は、Statement ID:10と依存関係のあるStatementを抽出する。
図7のS702で、S1=S2={(10,0)}とし、S703の処理(図8の処理)を実行する。
In step S <b> 602, the dependency relationship analysis unit 107 extracts a statement having a dependency relationship with the statement ID: 10.
In S702 of FIG. 7, S1 = S2 = {(10, 0)} is set, and the processing of S703 (processing of FIG. 8) is executed.

図8のS801でS2’ = {(10,0)}となり、S803でStatementと優先度のペア(10,0)をS2’から取り出す。次にS804を実行する。今回は優先度0のStatement ID:10について注目しており、依存関係データベースを参照すると、Statement ID:10と依存関係があるのはStatement ID:0,3,6,9であり、それぞれ関数呼び出し、データ依存、データ依存、制御依存で関係しているため、それぞれの優先度は0(Statement ID:0の優先度)+1(関数呼び出しを一段挟んだときの優先度減少値)=1, 0+1(データ依存を一段挟んだときの優先度減少値)=1, 0+1(データ依存を一段挟んだときの優先度減少値) =1, 0+1(制御依存を一段挟んだときの優先度減少値) =1となる。   In S801 in FIG. 8, S2 '= {(10, 0)}, and in S803, the statement and priority pair (10, 0) is extracted from S2'. Next, S804 is executed. This time, we are focusing on Statement ID: 10 with priority 0, and referring to the dependency database, Statement ID: 10 has a dependency relationship with Statement ID: 0, 3, 6, 9 respectively. , Data dependence, data dependence, and control dependence, each priority is 0 (priority of Statement ID: 0) +1 (priority decrease value when one step of function call is sandwiched) = 1, 0 + 1 (Priority decrease value when data dependency is sandwiched by one level) = 1, 0 + 1 (Priority decrease value when data dependency is sandwiched by one step) = 1, 0 + 1 (Priority decrease value when control dependency is sandwiched by one step) = 1.

これをS805でS3にいれ、S3 = {(0,1),(3,1),(6,1),(9,1)}となる。この後S802へ戻るが、S2’からは(10,0)が取り出されて空になっているため、図8で表される処理(図7のS703)は終了する。次のS704において、今回は優先度の閾値が1と設定されており、S3に入っているペアは全て優先度が1以下であるため、取り除かれずそのままとなる。このとき、S1 = {(10,0)}、S3 = {(0,1),(3,1),(6,1),(9,1)}となっており、S1とS3には同じStatementについてのペアは入っていないため、S705,S706でS3に入っているペアをS1へ入れ、S1 = {(10,0),(0,1),(3,1),(6,1),(9,1)}とする。ここでS3は空で無いため、S707で終了せず、S708、S709でS2 ={(0,1),(3,1),(6,1),(9,1)}としてから再びS703で依存関係のあるStatementの探索を行う。   This is entered into S3 in S805, and S3 = {(0,1), (3,1), (6,1), (9,1)}. Thereafter, the process returns to S802. Since (10, 0) is extracted from S2 'and is empty, the process shown in FIG. 8 (S703 in FIG. 7) ends. In the next step S704, the priority threshold is set to 1 this time, and since all the pairs in S3 have a priority of 1 or less, they are not removed and remain as they are. At this time, S1 = {(10,0)}, S3 = {(0,1), (3,1), (6,1), (9,1)}, and S1 and S3 have Since there is no pair for the same Statement, the pair in S3 is entered into S1 in S705 and S706, and S1 = {(10,0), (0,1), (3,1), (6, 1), (9, 1)}. Here, since S3 is not empty, the process does not end in S707. In S708 and S709, S2 = {(0,1), (3,1), (6,1), (9,1)} and again S703. A search for a statement having a dependency relationship is performed.

二回目の図8のS801ではS2’= {(0,1),(3,1),(6,1),(9,1)}となり、含まれる4組のペアについてS803,S804,S805を行っていく。
まず(0,1)について依存関係格納部103を参照して依存関係のあるStatementを検索すると、依存関係があるStatementがStatement ID:10,11であり、関数呼び出しで関係しているので、Statementとその優先度のペアとしてS3 = {(10,2),(11,2)}が得られる。
In S801 of FIG. 8 for the second time, S2 ′ = {(0,1), (3,1), (6,1), (9,1)}, and S803, S804, S805 for the four pairs included. I will go.
First, referring to the dependency storage unit 103 for (0, 1) and searching for a statement having a dependency relationship, the statement having the dependency relationship is a Statement ID: 10, 11 and is related by a function call. And S3 = {(10, 2), (11, 2)} is obtained as a priority pair.

次に(3,1)について検索すると、関係するStatementとその優先度として{(1,2),(6,2),(10,2)}が得られ、前に(0,1)について求めた{(10,2),(11,2)}とS805においてマージされ、S3 = {(1,2),(6,2),(10,2),(11,2)}が得られる。   Next, when searching for (3, 1), we get {(1, 2), (6, 2), (10, 2)} as related statements and their priorities, and before (0, 1) The obtained {(10, 2), (11, 2)} is merged in S805, and S3 = {(1, 2), (6, 2), (10, 2), (11, 2)} is obtained. It is done.

次に(6,1)について検索すると、関係するStatementとその優先度として{(2,2),(3,2),(5,2),(8,2),(10,2)}が得られ、これまでに求められた{(1,2),(6,2),(10,2),(11,2)}とS805においてマージされ、S3 = {(1,2),(2,2),(3,2),(5,2),(6,2),(8,2),(10,2),(11,2)}が得られる。   Next, when searching for (6, 1), the related Statement and its priority are {(2, 2), (3, 2), (5, 2), (8, 2), (10, 2)}. Is obtained and merged in {circle around (1)}, {6,2), (10,2), (11,2)} obtained so far, and S3 = {(1,2), (2, 2), (3, 2), (5, 2), (6, 2), (8, 2), (10, 2), (11, 2)} are obtained.

最後に(9,1)について検索すると、関係するStatementとその優先度として{(1,2),(10,2),(11,2)}が得られ、これまでに求められた{(1,2),(2,2),(3,2),(5,2),(6,2),(8,2),(10,2),(11,2)}とS805においてマージされ、最終的にS3 = {(1,2),(2,2),(3,2),(5,2),(6,2),(8,2),(10,2),(11,2)}となり、図8で表される処理(図7のS703)は終了する。   Finally, when searching for (9,1), {(1,2), (10,2), (11,2)} are obtained as related Statements and their priorities, and the {( 1, 2), (2, 2), (3, 2), (5, 2), (6, 2), (8, 2), (10, 2), (11, 2)} and S805 Finally, S3 = {(1,2), (2,2), (3,2), (5,2), (6,2), (8,2), (10,2) , (11, 2)}, and the processing shown in FIG. 8 (S703 in FIG. 7) ends.

次のS704において、今回は優先度の閾値が1と設定されており、S3に入っているペアは全て優先度が1を超えているために取り除かれ、S3は空となる。このためS705,S706では何も処理が行われず、S707でそのまま終了(図6のS602)する。   In the next step S704, the priority threshold is set to 1 this time, and all the pairs in S3 are removed because the priority exceeds 1, and S3 becomes empty. For this reason, no processing is performed in S705 and S706, and the processing ends in S707 (S602 in FIG. 6).

S602では、S1に入っているStatementが、抽出されたStatementとされ、S603に進む。S603では、依存関係解析部107が抽出したStatementをテスト実行部106に通知する。ここで、S1= {(10,0),(0,1),(3,1),(6,1),(9,1)}となっているので、優先度の閾値を1としたとき、関係するStatementはStatement ID:0,3,6,9,10となる。テストケース格納部103を参照すると、これらのStatementを通るテストケースはテストケース1、2である。テストケース1は前のサイクルで既に実行されているため、このサイクルではテストケース2が実行される。   In S602, the Statement included in S1 is set as the extracted Statement, and the process proceeds to S603. In step S <b> 603, the test execution unit 106 is notified of the statement extracted by the dependency relationship analysis unit 107. Here, since S1 = {(10,0), (0,1), (3,1), (6,1), (9,1)}, the priority threshold is set to 1. At this time, the related Statements are Statement IDs: 0, 3, 6, 9, and 10. Referring to the test case storage unit 103, the test cases that pass through these statements are test cases 1 and 2. Since test case 1 has already been executed in the previous cycle, test case 2 is executed in this cycle.

そして実行後、S605でテストケース格納部103を更新して、実行したテストケースについて記録する。
以上のようなフローで、優先度の閾値を増加させながら、時間がある限り繰り返され、修正、変更されたStatementと依存関係の強いテストケースから順にテストが行われるリグレッションテストが実現される。
After execution, the test case storage unit 103 is updated in step S605, and the executed test case is recorded.
In the flow as described above, a regression test is realized in which the test is repeated in order from the test case having a strong dependency relationship with the modified and changed Statement while increasing the threshold value of the priority, as long as there is time.

そして、十分なリグレッションテストが行われる、もしくはテスト時間に余裕がなくなり、一連のリグレッションテストが終了した後に、プログラム中の修正、変更された箇所について依存関係格納部108の部分更新がS608で行われる。   Then, after a sufficient regression test is performed or the test time runs out and a series of regression tests are completed, partial update of the dependency storage unit 108 is performed in step S608 for corrections and changes in the program. .

S608の依存関係格納部108の部分更新処理は、プログラム解析部105が、指定された箇所のStatementから直接依存を受けている、もしくは直接依存を及ぼしているStatementについて、依存関係格納部103より検索し、該検索されたS
tatementが含まれるソースファイルについて依存関係抽出し、依存関係格納部103の該当エントリのみを更新するものである。依存関係の抽出については図10、図12、図13を用いて説明した通りである。S608では図13のように抽出された依存関係と古い依存関係を比較し、異なる部分のみを更新する。
In the partial update process of the dependency relationship storage unit 108 in S608, the program analysis unit 105 searches the dependency relationship storage unit 103 for a statement that is directly dependent on or has a direct dependency on the specified location. And the retrieved S
A dependency relationship is extracted for a source file including a statement, and only the corresponding entry in the dependency storage unit 103 is updated. The extraction of the dependency relationship is as described with reference to FIGS. 10, 12, and 13. In S608, the extracted dependency relationship is compared with the old dependency relationship as shown in FIG. 13, and only different portions are updated.

以上のように本発明のリグレッションテストシステムについて図1から図18を参照して詳細に説明した。しかしながら、本発明な上述したリグレッションシステムの構成に限定されるものではなく、コンピュータなどの情報処理装置上で動作するソフトウェアプログラムとして実現されてもよい。   As described above, the regression test system of the present invention has been described in detail with reference to FIGS. However, the present invention is not limited to the above-described regression system configuration, and may be realized as a software program that operates on an information processing apparatus such as a computer.

図19に本発明のソフトウェアリグレッションテストシステムを実現する情報処理装置のハードウェア構成を示す。
情報処理装置1900は、CPU1901、メモリ1902、入力装置1903、出力装置1904、外部記憶装置1905、媒体駆動装置1906、及びネットワーク接続装置1907を備え、それらはバス1908により互いに接続されている。
FIG. 19 shows a hardware configuration of an information processing apparatus that implements the software regression test system of the present invention.
The information processing apparatus 1900 includes a CPU 1901, a memory 1902, an input device 1903, an output device 1904, an external storage device 1905, a medium drive device 1906, and a network connection device 1907, which are connected to each other via a bus 1908.

メモリ1902は、例えばROM(Read Only Memory)、RAM(Random Access Memory)等を含み、リグレッションテストシステムを実現するためのプログラムやデータを格納する。   The memory 1902 includes, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), and the like, and stores programs and data for realizing a regression test system.

CPU1901は、メモリ1902を利用してプログラムを実行することによりリグレッションテストシステムを実現する。
入力装置1903は、例えば、キーボード、ポインティングデバイス、タッチパネル等であり利用者からの指示や情報の入力に用いられる。出力装置1904は、例えばディスプレイやプリンタ等であり、情報処理装置1900の利用者への問い合わせ、処理結果等の出力に用いられる。
The CPU 1901 implements a regression test system by executing a program using the memory 1902.
The input device 1903 is, for example, a keyboard, a pointing device, a touch panel, etc., and is used for inputting instructions and information from the user. The output device 1904 is, for example, a display or a printer, and is used for outputting an inquiry to a user of the information processing device 1900, a processing result, and the like.

外部記憶装置1905は、例えば磁気ディスク装置、光ディスク装置、光磁気ディスク装置等である。この外部記憶装置1905にプログラムとデータを保存しておき、必要に応じて、それらをメモリ1902上にロードして使用することもできる。   The external storage device 1905 is, for example, a magnetic disk device, an optical disk device, a magneto-optical disk device, or the like. Programs and data can be stored in the external storage device 1905, and can be loaded onto the memory 1902 and used as necessary.

媒体駆動装置1906は、可搬型記録媒体1909を駆動し、その記録内容にアクセスする。可搬型記録媒体1909としては、メモリカード、メモリスティック、フレキシブルディスク、CD−ROM(Compact Disc Read Only Memory、光ディスク、光磁気ディスク、DVD(Digital Versatile Disk)等、任意のコンピュータで読み取り可能な記録媒体が用いられる。この可搬型記録媒体1909にプログラムとデータを格納しておき、必要に応じて、それらをメモリ1902にロードして使用することもできる。   The medium driving device 1906 drives a portable recording medium 1909 and accesses the recorded contents. As the portable recording medium 1909, an arbitrary computer-readable recording medium such as a memory card, a memory stick, a flexible disk, a CD-ROM (Compact Disc Read Only Memory, an optical disk, a magneto-optical disk, a DVD (Digital Versatile Disk), etc. It is also possible to store programs and data in this portable recording medium 1909 and load them into the memory 1902 and use them if necessary.

ネットワーク接続装置1907は、LAN,WAN等の任意のネットワーク(回線)を介して外部の装置と通信し、通信に伴うデータ変換を行う。また、必要に応じて、プログラムとデータを外部装置から受け取り、それらをメモリ1902にロードして使用することもできる。   The network connection device 1907 communicates with an external device via an arbitrary network (line) such as a LAN or WAN, and performs data conversion accompanying the communication. If necessary, the program and data can be received from an external device and loaded into the memory 1902 for use.

情報処理装置上で動作するプログラムは、情報処理装置のメモリ1902等を用いて、図6、図7、図8、図9のフローを処理するように構成される。
本発明のリグレッションテストシステムが情報処理装置上のプログラムを実行することによって実現される場合に、当該プログラムを情報処理装置へローディングする方法について図20に示しておく。
図20の(a)は、情報処理装置2001のハードディスクなどの外部記憶装置に格納さ
れたプログラムやデータ2002を情報処理装置2001がローディングする方法を示したものである。
A program operating on the information processing apparatus is configured to process the flows of FIGS. 6, 7, 8, and 9 using the memory 1902 of the information processing apparatus.
FIG. 20 shows a method for loading the program into the information processing apparatus when the regression test system of the present invention is realized by executing the program on the information processing apparatus.
FIG. 20A shows a method in which the information processing apparatus 2001 loads programs and data 2002 stored in an external storage device such as a hard disk of the information processing apparatus 2001.

図20の(b)は、CD−ROMやDVDなどの可搬型の記憶媒体に記録されたプログラムやデータ2004が、情報処理装置2001の媒体駆動装置を介してローディングする方法を示したものである。   FIG. 20B shows a method of loading a program or data 2004 recorded on a portable storage medium such as a CD-ROM or DVD via the medium driving device of the information processing apparatus 2001. .

図20の(c)は、ネットワークなどの回線を介して、情報提供者が提供するプログラムやデータ2003を、情報処理装置2001の通信装置を介してローディングする方法を示したものである。   FIG. 20C shows a method of loading a program and data 2003 provided by an information provider via a communication device of the information processing apparatus 2001 via a line such as a network.

以上のように本発明は、上述したシステムの各機能と同様の機能をコンピュータなどの情報処理装置に行わせるためのプログラムとして構成してもよい。また、本発明は、上述した機能と同様の機能をコンピュータなどの情報処理装置に行わせるためのプログラムを記録したコンピュータ読み出し可能記録媒体として構成することもできる。また、本発明は、搬送波に具現化された、上述のプログラムを表現するコンピュータ・データ・シグナルとして構成することもできる。   As described above, the present invention may be configured as a program for causing an information processing apparatus such as a computer to perform the same functions as the functions of the system described above. The present invention can also be configured as a computer-readable recording medium that records a program for causing an information processing apparatus such as a computer to perform the same functions as those described above. The present invention can also be configured as a computer data signal representing the above-described program embodied in a carrier wave.

以上のように、過去に行われたテストのテストケースについての情報を保存しておき、その情報と対象プログラムを解析して得られた依存関係を組み合わせることによりテストを行うように構成した、本発明のリグレッションシステムによれば、変更された部分と依存関係の強いテストケースを優先的に潰していくことが可能となり、リグレッションテストの効率化を図ることが可能である。これにより、ソフトウェア開発の効率自体を上げることが可能となる。   As described above, this book is configured to store information about test cases of tests performed in the past, and to perform tests by combining the dependency obtained by analyzing the information and the target program. According to the regression system of the invention, it is possible to preferentially crush test cases having a strong dependency relationship with the changed portion, and it is possible to improve the efficiency of the regression test. As a result, the efficiency of software development itself can be increased.

(付記1) ソフトウェアプログラムのリグレッションテストシステムを実現するために、情報を記憶する格納手段を備える情報処理装置を、
前記格納手段に格納された、前記ソフトウェアプログラムにおける各Statementの依存関係を参照して、変更されたStatementと関係あるStatementを抽出する、Statement抽出手段と、
前記抽出したStatementと関連付けられたテストケースを、前記格納手段に格納された、過去に実行されたテストケースと前記ソフトウェアプログラムにおける各Statementとの対応についての情報から、前記抽出したStatementと関連のあるテストケースを検出する、テストケース検出手段と、
前記検出されたテストケースの実行を行う、テスト実行手段と、
として機能させるためのプログラム。(1)(図1、図6)
(付記2) 前記Statement抽出手段では、前記変更されたStatementからの関連性の指標として定義された優先度が、指定された閾値を超えないものを選択することでStatementを抽出し、
前記閾値を変動させて、前記Statement抽出手段と、前記テストケース検出手段と、前記テスト実行手段とをテストする時間がある限り繰り返すことを特徴とする請求項1記載のプログラム。(2)(図1、図6、図7、図8)
(付記3) 前記関連性の指標として定義された優先度は、依存関係を一段挟むごとに、挟まれた依存関係の種類に応じて優先度が増加するように設定されたものであり、前記依存関係に基づいて算出されるものであることを特徴とする付記2記載のプログラム。(3)(図1、図6、図7、図8、図18)
(付記4) 更に前記情報処理装置に、前記テスト実行手段において実行されたテストケースについて前記格納手段に記録するテストケース記録手段として機能させることを特徴とする請求項1また請求項2記載のプログラム。(4)
(付記5)更に前記情報処理装置に、テスト時間終了後に、変更されたStatemen
tによって変更された依存関係を、前記格納手段に更新する依存関係更新手段として機能させることを特徴とする請求項2記載のプログラム。(5)(図1、図6、図9)
(付記6) 前記テスト実行手段では、前記テストケース記録手段により記録されたテストケースについては重複してテストを行わないことを特徴とする付記4記載のプログラム。
(付記7) 前記依存関係とは、データ依存、制御依存、関数呼び出しの少なくともいずれかであることを特徴とする付記3記載のプログラム。
(付記8) ソフトウェアのリグレッションテストを行うシステムであって、
前記ソフトウェアプログラムにおけるStatementと該Statementを識別するための識別子の対応テーブルを格納するStatement識別子格納手段と、
Statement識別子を用いて記述された、前記ソフトウェアプログラムにおける各Statementの依存関係を格納する依存関係格納手段と、
過去に行われたテストのテストケースについて、Statement識別子を用いて記述した情報を格納するテストケース格納手段と、
前記依存関係格納手段に格納された依存関係に基づいて、変更されたStatementと関係あるStatementを抽出する依存関係解析手段と、
前記抽出したStatementと関連付けられたテストケースを前記テストケース格納手段から検索し、前記Statement識別子格納手段を参照して該当するプログラム部分を実行しテストを行うテスト実行手段と、
を備えることを特徴とするシステム。(6)(図1、図6)
(付記9) 前記依存関係解析手段では、前記変更されたStatementからの関連性の指標として定義された優先度が、指定された閾値を超えないものを選択することでStatementを抽出し、
テストする時間がある限り、前記閾値を変動させて前記テスト実行手段によるテストを繰り返すことを特徴とする付記8記載のシステム。(図1、図6、図7、図8)
(付記10) 前記関連性の指標として定義された優先度は、依存関係を一段挟むごとに、挟まれた依存関係の種類に応じて優先度が増加するように設定されたものであり、前記依存関係に基づいて算出されるものであることを特徴とする付記9記載のシステム。(図1、図6、図7、図8、図18)
(付記11) 前記テスト実行手段は、テストを行ったテストケースについて前記テストケース格納手段に記録することを特徴とする付記8または付記9記載のシステム。
(付記12) 更に、テスト時間終了後に、変更されたStatementによって変更された依存関係を部分更新する、プログラム解析部を備えることを特徴とする請求項9記載のシステム。
(付記13) 前記テスト実行手段は、前記テストケース格納手段を参照して、一度行ったテストケースについては重複してテストを行わないことを特徴とする付記11記載のシステム。(図1、図6、図9)
(付記14) 前記依存関係とは、データ依存、制御依存、関数呼び出しの少なくともいずれかであることを特徴とする付記10記載のシステム。
(付記15) ソフトウェアプログラムのリグレッションテストを、情報を記憶する格納手段を備える情報処理装置で実行するための方法であって、
該情報処理装置は、
前記格納手段に格納された、前記ソフトウェアプログラムにおける各Statementの依存関係を参照して、変更されたStatementと関係あるStatementを抽出し、
前記抽出したStatementと関連付けられたテストケースを、前記格納手段に格納された、過去に実行されたテストケースと前記ソフトウェアプログラムにおける各Statementとの対応についての情報から、前記抽出したStatementと関連のあるテストケースを検出し、
前記検出されたテストケースの実行を行う、
ことを特徴とする方法。(7)(図1、図6)
(付記16) 前記変更されたStatementと関係あるStatementを抽出する際には、該変更されたStatementからの関連性の指標として定義された優先度が、指定された閾値を超えないものを選択することでSatementを抽出し、
前記閾値を変動させて、テストする時間がある限り前記変更されたStatementと関係あるStatementの抽出と、前記テストケースの検出と、前記テストケースの実行を繰り返すことを特徴とする付記15記載の方法。(図1、図6、図7、図8)
(付記17) 前記関連性の指標として定義された優先度は、データ依存、制御依存などの依存関係を一段挟むごとに、挟まれた依存関係の種類に応じて優先度が増加するように設定されたものであり、前記依存関係に基づいて算出されるものであることを特徴とする付記16記載の方法。(図1、図6、図7、図8、図18)
(付記18) 更に、前記検索されたテストケースのテストを行う際に、実行されたテストケースについて前記格納手段に記録する、ことを特徴とする付記15記載または付記16記載の方法。
(付記19) 更に、テスト時間終了後、変更されたStatementによって変更された依存関係を、前記格納手段に更新する、ことを特徴とする付記16記載の方法。(図1、図6、図9)
(付記20) 前記検索されたテストケースを行う際に、前記格納手段に記録された、既に実行されたテストケースについては重複してテストを行わないことを特徴とする付記18記載の方法。
(付記21) 前記依存関係とは、データ依存、制御依存、関数呼び出しの少なくともいずれかであることを特徴とする付記17記載のシステム。
(付記22)ソフトウェアプログラムのリグレッションテストシステムを実現するために、情報を記憶する格納手段を備える情報処理装置を、
前記格納手段に格納された、前記ソフトウェアプログラムにおける各Statementの依存関係を参照して、変更されたStatementと関係あるStatementを抽出する、Statement抽出手段と、
前記抽出したStatementと関連付けられたテストケースを、前記格納手段に格納された、過去に実行されたテストケースと前記ソフトウェアプログラムにおける各Statementとの対応についての情報から、前記抽出したStatementと関連のあるテストケースを検出する、テストケース検出手段と、
前記検出されたテストケースの実行を行う、テスト実行手段と、
として機能させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。(8)(図1、図6)
(付記23) 前記Statement抽出手段では、前記変更されたStatementからの関連性の指標として定義された優先度が、指定された閾値を超えないものを選択することでStatementを抽出し、
前記閾値を変動させて、前記Statement抽出手段と、前記テストケース検出手段と、前記テスト実行手段とをテストする時間がある限り繰り返すことを特徴とする請求項22記載のプログラムを記録したコンピュータ読み取り可能な記録媒体。(図1、図6、図7、図8)
(付記24) 前記関連性の指標として定義された優先度は、依存関係を一段挟むごとに、挟まれた依存関係の種類に応じて優先度が増加するように設定されたものであり、前記依存関係に基づいて算出されるものであることを特徴とする付記23記載のプログラムを記録したコンピュータ読み取り可能な記憶媒体。(図1、図6、図7、図8、図18)
(付記25) 更に前記情報処理装置に、前記テスト実行手段において実行されたテストケースについて前記格納手段に記録するテストケース記録手段として機能させることを特徴とする請求項22また請求項23記載のプログラムを記録したコンピュータ読み取り可能な記憶媒体。
(付記26)更に前記情報処理装置に、テスト時間終了後に、変更されたStateme
ntによって変更された依存関係を、前記格納手段に更新する依存関係更新手段として機能させることを特徴とする請求項23記載のプログラムを記録したコンピュータ読み取り可能な記憶媒体。(図1、図6、図9)
(付記27) 前記テスト実行手段では、前記テストケース記録手段により記録されたテストケースについては重複してテストを行わないことを特徴とする付記25記載のプログラムを記録したコンピュータ読み取り可能な記憶媒体。
(付記28) 前記依存関係とは、データ依存、制御依存、関数呼び出しの少なくともいずれかであることを特徴とする付記24記載のプログラムを記録したコンピュータ読み取り可能な記憶媒体。
(Additional remark 1) In order to implement | achieve the regression test system of a software program, information processing apparatus provided with the storage means which memorize | stores information,
A Statement extraction means for extracting a Statement related to the changed Statement with reference to the dependency relationship of each Statement in the software program stored in the storage means;
The test case associated with the extracted statement is related to the extracted statement from the information about the correspondence between the test case executed in the past and each statement in the software program stored in the storage means. A test case detection means for detecting a test case;
A test execution means for executing the detected test case;
Program to function as. (1) (FIGS. 1 and 6)
(Supplementary Note 2) The Statement extraction unit extracts a Statement by selecting a priority that is defined as an index of relevance from the changed Statement that does not exceed a specified threshold.
2. The program according to claim 1, wherein the program is repeated as long as there is a time for testing the Statement extraction unit, the test case detection unit, and the test execution unit by changing the threshold value. (2) (FIGS. 1, 6, 7, and 8)
(Supplementary Note 3) The priority defined as the index of relevance is set so that the priority increases according to the type of the sandwiched dependency every time the dependency is sandwiched by one stage. The program according to appendix 2, wherein the program is calculated based on the dependency relationship. (3) (FIGS. 1, 6, 7, 8, and 18)
(Supplementary note 4) The program according to claim 1 or 2, further causing the information processing apparatus to function as test case recording means for recording the test case executed by the test execution means in the storage means. . (4)
(Supplementary Note 5) Further, the information processing apparatus further changes the statemen after the test time is over.
3. The program according to claim 2, wherein the dependency relationship changed by t is caused to function as dependency relationship update means for updating the storage means. (5) (FIGS. 1, 6, and 9)
(Supplementary note 6) The program according to supplementary note 4, wherein the test execution means does not perform a duplicate test on the test cases recorded by the test case recording means.
(Supplementary note 7) The program according to supplementary note 3, wherein the dependency relationship is at least one of data dependency, control dependency, and function call.
(Appendix 8) A system for performing a software regression test,
A statement identifier storage means for storing a correspondence table of statements and identifiers for identifying the statements in the software program;
Dependency storage means for storing the dependency of each Statement in the software program, which is described using a Statement identifier;
Test case storage means for storing information described using a Statement identifier for test cases of tests performed in the past;
Dependency analysis means for extracting a Statement related to the changed Statement based on the dependency stored in the dependency storage;
A test execution unit that searches the test case storage unit for a test case associated with the extracted statement, executes the corresponding program portion with reference to the statement identifier storage unit, and performs a test;
A system comprising: (6) (FIGS. 1 and 6)
(Additional remark 9) In the said dependence relationship analysis means, by selecting the thing whose priority defined as the parameter | index of the relationship from the said changed Statement does not exceed the designated threshold value, a Statement is extracted,
The system according to appendix 8, wherein the test is repeated by changing the threshold value as long as there is a time to test. (FIGS. 1, 6, 7, and 8)
(Supplementary Note 10) The priority defined as the index of relevance is set so that the priority increases according to the type of the sandwiched dependency every time the dependency is sandwiched by one stage. The system according to appendix 9, wherein the system is calculated based on the dependency relationship. (FIGS. 1, 6, 7, 8, and 18)
(Supplementary Note 11) The system according to Supplementary Note 8 or Supplementary Note 9, wherein the test execution unit records a test case in which the test is performed in the test case storage unit.
(Supplementary note 12) The system according to claim 9, further comprising a program analysis unit that partially updates the dependency relationship changed by the changed Statement after the test time is over.
(Supplementary note 13) The system according to supplementary note 11, wherein the test execution unit does not perform a duplicate test on a test case once performed with reference to the test case storage unit. (FIGS. 1, 6, and 9)
(Supplementary note 14) The system according to supplementary note 10, wherein the dependency relationship is at least one of data dependency, control dependency, and function call.
(Supplementary note 15) A method for executing a regression test of a software program on an information processing apparatus including a storage unit for storing information,
The information processing apparatus
Referring to the dependency relationship of each statement in the software program stored in the storage means, extract a statement related to the changed statement,
The test case associated with the extracted statement is related to the extracted statement from the information about the correspondence between the test case executed in the past and each statement in the software program stored in the storage means. Detect test cases,
Performing the detected test case;
A method characterized by that. (7) (FIGS. 1 and 6)
(Supplementary Note 16) When extracting a Statement related to the changed Statement, select the one whose priority defined as an index of relevance from the changed Statement does not exceed the specified threshold To extract the Statement,
16. The method according to claim 15, wherein the threshold value is changed, and as long as there is a test time, the extraction of the State related to the changed State, the detection of the test case, and the execution of the test case are repeated. . (FIGS. 1, 6, 7, and 8)
(Supplementary Note 17) The priority defined as the index of relevance is set so that the priority increases in accordance with the type of dependency relationship that has been inserted each time a dependency relationship such as data dependency or control dependency is inserted one step. The method according to claim 16, wherein the method is calculated based on the dependency relationship. (FIGS. 1, 6, 7, 8, and 18)
(Supplementary note 18) The method according to supplementary note 15 or supplementary note 16, wherein when the test of the searched test case is performed, the executed test case is recorded in the storage means.
(Supplementary note 19) The method according to supplementary note 16, further comprising: updating the dependency relationship changed by the changed Statement after the test time is over in the storage unit. (FIGS. 1, 6, and 9)
(Supplementary note 20) The method according to supplementary note 18, wherein when the searched test case is performed, the already executed test case recorded in the storage means is not duplicated.
(Supplementary note 21) The system according to supplementary note 17, wherein the dependency relationship is at least one of data dependency, control dependency, and function call.
(Additional remark 22) In order to implement | achieve the regression test system of a software program, the information processing apparatus provided with the storage means which memorize | stores information,
A Statement extraction means for extracting a Statement related to the changed Statement with reference to the dependency relationship of each Statement in the software program stored in the storage means;
The test case associated with the extracted statement is related to the extracted statement from the information about the correspondence between the test case executed in the past and each statement in the software program stored in the storage means. A test case detection means for detecting a test case;
A test execution means for executing the detected test case;
A computer-readable recording medium in which a program for functioning as a computer is recorded. (8) (FIGS. 1 and 6)
(Supplementary Note 23) The Statement extraction unit extracts a Statement by selecting a priority that is defined as an index of relevance from the changed Statement that does not exceed a specified threshold.
23. The computer-readable program having recorded thereon the program according to claim 22, wherein the threshold value is changed, and the statement extraction unit, the test case detection unit, and the test execution unit are repeated as long as there is time to test. Recording medium. (FIGS. 1, 6, 7, and 8)
(Supplementary Note 24) The priority defined as the index of relevance is set so that the priority increases according to the type of the sandwiched dependency every time the dependency is sandwiched by one stage. A computer-readable storage medium storing the program according to appendix 23, which is calculated based on the dependency relationship. (FIGS. 1, 6, 7, 8, and 18)
(Supplementary note 25) The program according to claim 22 or 23, further causing the information processing apparatus to function as test case recording means for recording the test case executed by the test execution means in the storage means. A computer-readable storage medium on which is recorded.
(Supplementary Note 26) Further, after the test time is over, the information processing apparatus changes the state
24. The computer-readable recording medium having recorded thereon the program according to claim 23, wherein the dependency relation changed by nt is caused to function as dependency relation update means for updating the storage means. (FIGS. 1, 6, and 9)
(Supplementary note 27) The computer-readable storage medium storing the program according to Supplementary note 25, wherein the test execution unit does not perform a duplicate test on the test case recorded by the test case recording unit.
(Supplementary note 28) The computer-readable storage medium storing the program according to supplementary note 24, wherein the dependency relationship is at least one of data dependency, control dependency, and function call.

本発明のリグレッションテストシステムの構成を示す図である。It is a figure which shows the structure of the regression test system of this invention. 依存関係格納部103の概要を示す図である。3 is a diagram illustrating an outline of a dependency relationship storage unit 103. FIG. 依存関係格納部103のデータ構造を示す図である。4 is a diagram illustrating a data structure of a dependency relationship storage unit 103. FIG. テストケース格納部108の概要を示す図である。2 is a diagram showing an outline of a test case storage unit 108. FIG. テストケース格納図108のデータ構造を示す図である。It is a figure which shows the data structure of test case storage FIG. 本発明のソフトウェアリグレッションテストシステムにおける、テストの選択・実行のフローを示す図である。It is a figure which shows the flow of selection and execution of a test in the software regression test system of this invention. 図6のS602の詳細フローを示す図である。It is a figure which shows the detailed flow of S602 of FIG. 図7のS703の詳細フローを示す図である。It is a figure which shows the detailed flow of S703 of FIG. 図6のS608の詳細フローを示す図である。It is a figure which shows the detailed flow of S608 of FIG. サンプルプログラムを示す図である。It is a figure which shows a sample program. サンプルプログラムのStatementとStatement IDとの関係を定義するテーブルを示す図である。It is a figure which shows the table which defines the relationship between Statement of a sample program, and Statement ID. サンプルプログラムのコントロールフローグラフを示す図である。It is a figure which shows the control flow graph of a sample program. プログラム依存関係グラフを示す図である。It is a figure which shows a program dependence graph. サンプルプログラムの依存関係を示す図である。It is a figure which shows the dependency of a sample program. サンプルプログラムの依存関係を依存関係格納部に格納する場合のデータ構造を示す図である。It is a figure which shows the data structure in the case of storing the dependency relationship of a sample program in a dependency relationship storage part. テストケース格納部に格納された各テストケースとStatementの関係を示す図である。It is a figure which shows the relationship between each test case stored in the test case storage part, and Statement. 図16の関係をテストケース格納部に格納する場合のデータ構造を示す図である。It is a figure which shows the data structure in the case of storing the relationship of FIG. 16 in a test case storage part. 優先度の説明をする図である。It is a figure explaining priority. ソフトウェアリグレッションテストシステムを実現する情報処理装置の構成を示す図である。It is a figure which shows the structure of the information processing apparatus which implement | achieves a software regression test system. プログラムの情報処理装置へのローディングを説明する図である。It is a figure explaining the loading to the information processing apparatus of a program.

符号の説明Explanation of symbols

101 ソフトウェアリグレッションテストシステム
102 プログラム格納部
103 依存関係格納部
104 ユーザインタフェース
105 プログラム解析部
106 テスト実行部
107 依存関係解析部
108 テストケース格納部
109 Statement ID格納部
1900 情報処理装置
1901 CPU
1902 メモリ
1903 入力装置
1904 出力装置
1905 外部記憶装置
1906 媒体駆動装置
1907 ネットワーク接続装置
1908 バス
1909 可搬記録媒体
2001 情報処理装置
2002 外部記憶装置に記録されたプログラムやデータ
2003 情報提供者が提供するプログラムやデータ
2004 可搬記録媒体に記録されたプログラムやデータ
DESCRIPTION OF SYMBOLS 101 Software regression test system 102 Program storage part 103 Dependency storage part 104 User interface 105 Program analysis part 106 Test execution part 107 Dependency analysis part 108 Test case storage part 109 Statement ID storage part 1900 Information processing apparatus 1901 CPU
1902 Memory 1903 Input device 1904 Output device 1905 External storage device 1906 Medium drive device 1907 Network connection device 1908 Bus 1909 Portable recording medium 2001 Information processing device 2002 Program and data recorded in external storage device 2003 Program provided by information provider And data 2004 Programs and data recorded on portable recording media

Claims (8)

ソフトウェアプログラムのリグレッションテストシステムを実現するために、情報を記憶する格納手段を備える情報処理装置を、
前記格納手段に格納された、前記ソフトウェアプログラムにおける各Statementの依存関係を参照して、変更されたStatementと関係あるStatementを抽出する、Statement抽出手段と、
前記抽出したStatementと関連付けられたテストケースを、前記格納手段に格納された、過去に実行されたテストケースと前記ソフトウェアプログラムにおける各Statementとの対応についての情報から、前記抽出したStatementと関連のあるテストケースを検出する、テストケース検出手段と、
前記検出されたテストケースの実行を行う、テスト実行手段と、
として機能させるためのプログラム。
In order to realize a regression test system for a software program, an information processing apparatus including a storage unit for storing information is provided.
A Statement extraction means for extracting a Statement related to the changed Statement with reference to the dependency relationship of each Statement in the software program stored in the storage means;
The test case associated with the extracted statement is related to the extracted statement from the information about the correspondence between the test case executed in the past and each statement in the software program stored in the storage means. A test case detection means for detecting a test case;
A test execution means for executing the detected test case;
Program to function as.
前記Statement抽出手段では、前記変更されたStatementからの関連性の指標として定義された優先度が、指定された閾値を超えないものを選択することでStatementを抽出し、
前記閾値を変動させて、前記Statement抽出手段と、前記テストケース検出手段と、前記テスト実行手段とをテストする時間がある限り繰り返すことを特徴とする請求項1記載のプログラム。
The Statement extraction means extracts a Statement by selecting a priority that does not exceed a specified threshold value as a relevance index from the changed Statement,
2. The program according to claim 1, wherein the program is repeated as long as there is a time for testing the Statement extraction unit, the test case detection unit, and the test execution unit by changing the threshold value.
前記関連性の指標として定義された優先度は、依存関係を一段挟むごとに、挟まれた依存関係の種類に応じて優先度が増加するように設定されたものであり、前記依存関係に基づいて算出されるものであることを特徴とする請求項2記載のプログラム。   The priority defined as the index of relevance is set so that the priority increases according to the type of dependency relationship that has been inserted each time a dependency relationship is inserted, and based on the dependency relationship. 3. The program according to claim 2, wherein the program is calculated as follows. 更に前記情報処理装置に、前記テスト実行手段において実行されたテストケースについて前記格納手段に記録するテストケース記録手段として機能させることを特徴とする請求項1また請求項2記載のプログラム。   3. The program according to claim 1, further comprising causing the information processing apparatus to function as test case recording means for recording the test case executed by the test execution means in the storage means. 更に前記情報処理装置に、テスト時間終了後に、変更されたStatementによって変更された依存関係を、前記格納手段に更新する依存関係更新手段として機能させることを特徴とする請求項2記載のプログラム。   The program according to claim 2, further causing the information processing apparatus to function as a dependency update unit that updates the storage unit with a dependency changed by the changed Statement after the test time is over. ソフトウェアのリグレッションテストを行うシステムであって、
前記ソフトウェアプログラムにおけるStatementと該Statementを識別するための識別子の対応テーブルを格納するStatement識別子格納手段と、
Statement識別子を用いて記述された、前記ソフトウェアプログラムにおける各Statementの依存関係を格納する依存関係格納手段と、
過去に行われたテストのテストケースについて、Statement識別子を用いて記述した情報を格納するテストケース格納手段と、
前記依存関係格納手段に格納された依存関係に基づいて、変更されたStatementと関係あるStatementを抽出する依存関係解析手段と、
前記抽出したStatementと関連付けられたテストケースを前記テストケース格納手段から検索し、前記Statement識別子格納手段を参照して該当するプログラム部分を実行しテストを行うテスト実行手段と、
を備えることを特徴とするシステム。
A system for software regression testing,
A statement identifier storage means for storing a correspondence table of statements and identifiers for identifying the statements in the software program;
Dependency storage means for storing the dependency of each Statement in the software program, which is described using a Statement identifier;
Test case storage means for storing information described using a Statement identifier for test cases of tests performed in the past;
Dependency analysis means for extracting a Statement related to the changed Statement based on the dependency stored in the dependency storage;
A test execution unit that searches the test case storage unit for a test case associated with the extracted statement, executes the corresponding program portion with reference to the statement identifier storage unit, and performs a test;
A system comprising:
ソフトウェアプログラムのリグレッションテストを、情報を記憶する格納手段を備える情報処理装置で実行するための方法であって、
該情報処理装置は、
前記格納手段に格納された、前記ソフトウェアプログラムにおける各Statementの依存関係を参照して、変更されたStatementと関係あるStatementを抽出し、
前記抽出したStatementと関連付けられたテストケースを、前記格納手段に格納された、過去に実行されたテストケースと前記ソフトウェアプログラムにおける各Statementとの対応についての情報から、前記抽出したStatementと関連のあるテストケースを検出し、
前記検出されたテストケースの実行を行う、
ことを特徴とする方法。
A method for executing a regression test of a software program on an information processing apparatus comprising a storage means for storing information,
The information processing apparatus
Referring to the dependency relationship of each statement in the software program stored in the storage means, extract a statement related to the changed statement,
The test case associated with the extracted statement is related to the extracted statement from the information about the correspondence between the test case executed in the past and each statement in the software program stored in the storage means. Detect test cases,
Performing the detected test case;
A method characterized by that.
ソフトウェアプログラムのリグレッションテストシステムを実現するために、情報を記憶する格納手段を備える情報処理装置を、
前記格納手段に格納された、前記ソフトウェアプログラムにおける各Statementの依存関係を参照して、変更されたStatementと関係あるStatementを抽出する、Statement抽出手段と、
前記抽出したStatementと関連付けられたテストケースを、前記格納手段に格納された、過去に実行されたテストケースと前記ソフトウェアプログラムにおける各Statementとの対応についての情報から、前記抽出したStatementと関連のあるテストケースを検出する、テストケース検出手段と、
前記検出されたテストケースの実行を行う、テスト実行手段と、
として機能させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。
In order to realize a regression test system for a software program, an information processing apparatus including a storage unit for storing information is provided.
A Statement extraction means for extracting a Statement related to the changed Statement with reference to the dependency relationship of each Statement in the software program stored in the storage means;
The test case associated with the extracted statement is related to the extracted statement from the information about the correspondence between the test case executed in the past and each statement in the software program stored in the storage means. A test case detection means for detecting a test case;
A test execution means for executing the detected test case;
A computer-readable recording medium in which a program for functioning as a computer is recorded.
JP2007043023A 2007-02-22 2007-02-22 Test control apparatus, test control method, and test control program Expired - Fee Related JP4939973B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007043023A JP4939973B2 (en) 2007-02-22 2007-02-22 Test control apparatus, test control method, and test control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007043023A JP4939973B2 (en) 2007-02-22 2007-02-22 Test control apparatus, test control method, and test control program

Publications (2)

Publication Number Publication Date
JP2008204405A true JP2008204405A (en) 2008-09-04
JP4939973B2 JP4939973B2 (en) 2012-05-30

Family

ID=39781809

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007043023A Expired - Fee Related JP4939973B2 (en) 2007-02-22 2007-02-22 Test control apparatus, test control method, and test control program

Country Status (1)

Country Link
JP (1) JP4939973B2 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013058393A1 (en) * 2011-10-18 2013-04-25 日本電気株式会社 Irregularity-detection device, program, and method
KR101393807B1 (en) 2012-11-22 2014-05-12 슈어소프트테크주식회사 Apparatus for regression testing of software and method thereof
US9329981B2 (en) 2013-07-25 2016-05-03 Fujitsu Limited Testing program, testing method, and testing device
US9703692B2 (en) 2014-07-30 2017-07-11 Hitachi, Ltd. Development supporting system
KR20170127288A (en) * 2016-05-11 2017-11-21 한국전자통신연구원 Apparatus and method for suitability test of virtual network function
JP2018180711A (en) * 2017-04-06 2018-11-15 株式会社日立製作所 Calculator selecting test case and selection method of test case
US10579513B2 (en) 2017-08-03 2020-03-03 Fujitsu Limited Test run control method and apparatus
CN113190442A (en) * 2021-04-27 2021-07-30 上海安畅网络科技股份有限公司 Method and system for measuring test range and checking test coverage

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63116248A (en) * 1986-11-05 1988-05-20 Nippon Atom Ind Group Co Ltd Program testing device
JPH081609B2 (en) * 1986-03-10 1996-01-10 富士通株式会社 Method of determining test cases for preventing regression
JPH08190475A (en) * 1995-01-05 1996-07-23 Fujitsu Ltd Program analyzing device
JP2634011B2 (en) * 1992-11-02 1997-07-23 日本電信電話株式会社 Impact analysis device due to program modification
JPH10320234A (en) * 1997-05-21 1998-12-04 Hitachi Ltd Automatic test method for software
JP2000207248A (en) * 1999-01-14 2000-07-28 Toshiba Corp Device and method for generating behavior or parallel program, and recording medium recorded with software for generating behavior or parallel program
JP2001273169A (en) * 2000-03-24 2001-10-05 Toshiba Corp Device for generating program test specification

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH081609B2 (en) * 1986-03-10 1996-01-10 富士通株式会社 Method of determining test cases for preventing regression
JPS63116248A (en) * 1986-11-05 1988-05-20 Nippon Atom Ind Group Co Ltd Program testing device
JP2634011B2 (en) * 1992-11-02 1997-07-23 日本電信電話株式会社 Impact analysis device due to program modification
JPH08190475A (en) * 1995-01-05 1996-07-23 Fujitsu Ltd Program analyzing device
JPH10320234A (en) * 1997-05-21 1998-12-04 Hitachi Ltd Automatic test method for software
JP2000207248A (en) * 1999-01-14 2000-07-28 Toshiba Corp Device and method for generating behavior or parallel program, and recording medium recorded with software for generating behavior or parallel program
JP2001273169A (en) * 2000-03-24 2001-10-05 Toshiba Corp Device for generating program test specification

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013058393A1 (en) * 2011-10-18 2013-04-25 日本電気株式会社 Irregularity-detection device, program, and method
KR101393807B1 (en) 2012-11-22 2014-05-12 슈어소프트테크주식회사 Apparatus for regression testing of software and method thereof
US9329981B2 (en) 2013-07-25 2016-05-03 Fujitsu Limited Testing program, testing method, and testing device
US9703692B2 (en) 2014-07-30 2017-07-11 Hitachi, Ltd. Development supporting system
KR20170127288A (en) * 2016-05-11 2017-11-21 한국전자통신연구원 Apparatus and method for suitability test of virtual network function
KR102385706B1 (en) 2016-05-11 2022-04-12 한국전자통신연구원 Apparatus and method for suitability test of virtual network function
JP2018180711A (en) * 2017-04-06 2018-11-15 株式会社日立製作所 Calculator selecting test case and selection method of test case
US10579513B2 (en) 2017-08-03 2020-03-03 Fujitsu Limited Test run control method and apparatus
CN113190442A (en) * 2021-04-27 2021-07-30 上海安畅网络科技股份有限公司 Method and system for measuring test range and checking test coverage

Also Published As

Publication number Publication date
JP4939973B2 (en) 2012-05-30

Similar Documents

Publication Publication Date Title
JP4939973B2 (en) Test control apparatus, test control method, and test control program
US9575752B2 (en) Inferring a defect&#39;s cause in updated source code
US9619373B2 (en) Method and apparatus to semantically connect independent build and test processes
US8589884B2 (en) Method and system for identifying regression test cases for a software
US20180300227A1 (en) System and method for detecting an error in software
US7971193B2 (en) Methods for performining cross module context-sensitive security analysis
US20080120601A1 (en) Information processing apparatus, method and program for deciding priority of test case to be carried out in regression test background of the invention
US20050204344A1 (en) Program analysis device, analysis method and program of same
US6938186B2 (en) System and method for performing a path-sensitive verification on a program
US11620111B2 (en) Providing services for assisting programming
Kirbas et al. The relationship between evolutionary coupling and defects in large industrial software
US8584095B2 (en) Test support system, method and computer program product, which optimize test scenarios to minimize total test time
CN112860312A (en) Method and device for detecting item dependency relationship change
US20140317452A1 (en) Error detecting apparatus, program and method
JP2014010699A (en) Update determination program and update determination device
CN114139923A (en) Task relevance analysis method and device and computer readable storage medium
EP1202171A2 (en) Compile method and program recording medium
JP7380851B2 (en) Test script generation device, test script generation method and program
US8843896B2 (en) Metamodeling contextual navigation of computer software applications
US11119761B2 (en) Identifying implicit dependencies between code artifacts
CN111813749A (en) File filtering method and device, electronic equipment and storage medium
JP2017041196A (en) Stub object determination device, method, and program
US9032372B2 (en) Runtime environment and method for non-invasive monitoring of software applications
JP6748357B2 (en) Analysis device, analysis program, and analysis method
US11726792B1 (en) Methods and apparatus for automatically transforming software process recordings into dynamic automation scripts

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091110

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110208

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110920

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111206

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120131

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: 20120221

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120227

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150302

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees