JPH06103113A - Differential test debugging support method - Google Patents
Differential test debugging support methodInfo
- Publication number
- JPH06103113A JPH06103113A JP4252730A JP25273092A JPH06103113A JP H06103113 A JPH06103113 A JP H06103113A JP 4252730 A JP4252730 A JP 4252730A JP 25273092 A JP25273092 A JP 25273092A JP H06103113 A JPH06103113 A JP H06103113A
- Authority
- JP
- Japan
- Prior art keywords
- program
- test
- executed
- statement
- coverage information
- 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
Landscapes
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、プログラムの信頼性を
テストするための差分テストデバッグ支援方法に係り、
特に、既存の完成または半完成のプログラムの再利用や
保守を行う際に、既に信頼性が保証されている部分のテ
ストデバッグを省力化することにより、作業効率の向上
を図るようにした差分テストデバッグ支援方法に関する
ものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a differential test debug support method for testing program reliability,
In particular, when reusing or maintaining an existing completed or semi-completed program, labor saving of the test debug of the part where reliability is already guaranteed, the difference test designed to improve work efficiency. It relates to a debugging support method.
【0002】[0002]
【従来の技術】従来において、作成したプログラムの信
頼性を効率良くテストするための方法の一つとして、
「COBOL85/TD」と呼ばれるテストデバッグ支援用プログ
ラムがある。2. Description of the Related Art Conventionally, as one of the methods for efficiently testing the reliability of a created program,
There is a program for test debug support called "COBOL85 / TD".
【0003】この「COBOL85/TD」には、テストカバレジ
情報を取得し、蓄積する機能がある。テストカバレジ情
報とは、プログラム実行後における各命令文の実行回数
などの情報である。This "COBOL85 / TD" has a function of acquiring and accumulating test coverage information. The test coverage information is information such as the number of times each statement is executed after the program is executed.
【0004】このようなテストデバッグ支援用プログラ
ムを用いたテストでは、テストカバレジ情報を解析し、
被テストプログラムの命令文の実行状況をカバレジメジ
ャとして、デバッグの進捗状態を定量的に表す機能があ
る。そこで、テストデバッグを行う場合、カバレジ情報
を基に、各命令文の実行状況を把握し、今後テストを行
う必要がある命令文を認識することが一般的となってい
る。In a test using such a test debug support program, the test coverage information is analyzed,
It has a function to quantitatively show the progress of debugging by using the execution status of the statement of the program under test as the coverage measurer. Therefore, when performing test debugging, it is general to grasp the execution status of each statement based on the coverage information and recognize the statement that needs to be tested in the future.
【0005】しかし、この場合、プログラムを修正した
場合に、修正以前までのカバレジ情報を蓄積しておくこ
とが重要である。それは、プログラムのごく僅かな部分
の修正によって、既テスト(確認)部分の情報を失う場
合には、プログラムを修正する度に、プログラムの全命
令文に対しテストを行う必要が生じるためである。も
し、修正以前までのカバレジ情報を蓄積しておかなかっ
た場合は、同じ命令文についてのテストを重複して行う
ことを意味するものであり、テストデバッグの効率を向
上させる上で、大きな障害となる。In this case, however, when the program is modified, it is important to store the coverage information before the modification. This is because if the information of the already tested (confirmed) portion is lost by the correction of a very small part of the program, it is necessary to test all the command statements of the program every time the program is modified. If the coverage information before the correction is not stored, it means that the test for the same statement is repeated, which is a major obstacle to improving the efficiency of test debugging. Become.
【0006】この問題を解決する一つの方法として、プ
ログラムを修正した場合、未修正部分のカバレジ情報を
既存情報に加えて蓄積しておき、修正部分のカバレジ情
報についてのみ既存情報と置き換えることによって、未
修正の既実行済み命令文に関しては、そのカバレジ情報
を保存するようにしてテストの重複を防ぎ、テストデバ
ッグの効率を向上させるようにしたものがある。As one method for solving this problem, when the program is modified, the coverage information of the uncorrected portion is stored in addition to the existing information, and only the coverage information of the modified portion is replaced with the existing information. As for an uncorrected and executed statement, there is a statement in which the coverage information is saved to prevent the duplication of the test and improve the efficiency of the test debug.
【0007】一方、プログラムを効率良く開発する方法
の一つとして、データ項目やデータ名称を定義したディ
クシュナリを用いたプログラムジェネレータを使用する
方法がある。On the other hand, as one of the methods for efficiently developing a program, there is a method of using a program generator using a dictionary in which data items and data names are defined.
【0008】一般に、この種のプログラムジェネレータ
は、プログラムの骨格として、標準パターンを用意し、
これを基に、プログラム仕様情報を付加することによ
り、目的とするプログラムを自動的に生成する。Generally, this kind of program generator prepares a standard pattern as a skeleton of a program,
Based on this, by adding the program specification information, the target program is automatically generated.
【0009】しかし、この生成方法では、プログラムの
入出力の単位という点から考えた場合、ファィルおよび
レコード単位の処理の生成は可能であるが、最小単位で
ある項目単位の処理の生成が不可能である。このため、
一般のプログラムジェネレータは、プログラムの自動生
成率が低く、プログラム開発の作業効率を向上させるこ
とが困難である。However, in this generation method, from the viewpoint of the input / output unit of the program, it is possible to generate the processing in file and record units, but it is impossible to generate the processing in item unit, which is the minimum unit. Is. For this reason,
A general program generator has a low rate of automatic program generation, and it is difficult to improve work efficiency of program development.
【0010】この問題を解決する一つの方法として、情
報処理学会第41回(平成2年後期)全国大会講演論文
集第5分冊第5−205頁から第5−206頁において
論じられているように、項目に関する処理を定義するデ
ィクショナリを開発し、プログラム生成時にこのディク
ショナリの情報を取得することによって、項目単位の処
理を自動生成するプログラムジェネレータがある。As one method for solving this problem, the IPSJ 41st (second half of 1990) National Conference Proceedings, 5th volume, pages 5-205 to 5-206, is discussed. There is a program generator that automatically generates a process for each item by developing a dictionary that defines a process related to an item and acquiring information of this dictionary when generating a program.
【0011】このプログラムジェネレータによれば、完
成度が高く、信頼性が高度に保証されたプログラムが生
成される。According to this program generator, a program with a high degree of perfection and a highly reliable guarantee is generated.
【0012】[0012]
【発明が解決しようとする課題】しかしながら、修正部
分のカバレジ情報についてのみ既存情報と置き換えると
いう上記従来のテストデバッグ支援用プログラムによれ
ば、テスト対象の被プログラムが、上記情報処理学会誌
で提案されているようなプログラムジェネレータで生成
された完成度が高く、信頼性が高度に保証された完成ま
たは半完成プログラム、あるいは既存の信頼性が確認さ
れた完成または半完成プログラムを再利用する場合であ
っても、その被生成部および再利用部分の信頼性が既に
保証されているにもかかわらず、テストデバッグの対象
とし、全命令文を実行する必要が生じるため、「保証済
みのプログラムのデバッグを行う」という点では、テス
トデバッグ作業の重複を避けることができなかった。However, according to the conventional test debug support program in which only the coverage information of the corrected portion is replaced with the existing information, the program to be tested is proposed in the Information Processing Society of Japan. For example, when you want to reuse a complete or semi-complete program with a high degree of completeness and a high degree of reliability, which is generated by a program generator such as However, even though the reliability of the generated part and the reusable part is already guaranteed, it is necessary to execute all the statement statements as the target of test debug. In terms of "do", it was impossible to avoid duplication of test debugging work.
【0013】本発明の目的は、既に信頼性が保証されて
いるプログラムの全部または一部分をテストデバッグの
対象から外して効率的にデバッグすることができる差分
テストデバッグ支援方法を提供することである。An object of the present invention is to provide a differential test debug support method capable of efficiently debugging by removing all or part of a program whose reliability is already guaranteed from the target of test debug.
【0014】[0014]
【課題を解決するための手段】上記目的を達成するため
に、本発明の差分テストデバッグ支援方法は、既存の完
成または半完成のプログラムに対し、カバレジ情報蓄積
ファイルを設け、このカバレジ情報蓄積ファイルに全命
令文別にテスト実行済みの情報を設定した後、当該プロ
グラムの変更に対しては、変更部分のカバレジ情報につ
いてのみテスト未実行状態に設定し、変更部分の命令文
のみをテスト対象として実行させるようにしたものであ
る。In order to achieve the above object, the differential test debug support method of the present invention provides a coverage information storage file for an existing completed or semi-finished program, and the coverage information storage file is provided. After setting the information that the test execution has been completed for each command statement, when the program is changed, only the coverage information of the changed part is set to the test unexecuted state, and only the changed statement is executed as the test target. It was made to let.
【0015】[0015]
【作用】上記手段によれば、プログラムの自動生成ある
いは既存プログラムの再利用を行う場合、そのカバレジ
情報蓄積ファイルに、全命令文別にテスト実行済みの情
報が設定される。According to the above means, when the program is automatically generated or the existing program is reused, the information of the test execution has been set for each command statement in the coverage information storage file.
【0016】したがって、生成直後あるいは再利用のた
めに既存プログラムを複写した直後におけるテスト対象
のプログラムのカバレジ情報では、全命令文が実行済み
であると認識され、自動生成部分あるいは未修正部分の
テストは省略される。Therefore, in the coverage information of the test target program immediately after generation or immediately after copying the existing program for reuse, it is recognized that all the command statements have been executed, and the test of the automatically generated portion or unmodified portion is performed. Is omitted.
【0017】この結果、プログラムの自動生成あるいは
既存プログラムの再利用を行う場合のテスト作業の効率
を向上させることが可能になり、ひいては、プログラム
の開発を効率化することができる。As a result, it is possible to improve the efficiency of the test work when the program is automatically generated or the existing program is reused, and it is possible to improve the efficiency of the program development.
【0018】さらに、自動生成したプログラム、または
既存プログラムを複写したプログラムに修正を加えた場
合、未修正部分に対してはこれまでのカバレジ情報を蓄
積しておき、修正部分については、修正の内容に応じ
て、以前までのカバレジ情報を例えば無効、消去、ある
いは追加することによってテスト未実行状態に設定す
る。したがって、プログラム修正後には、修正部分の命
令文のみがカバレジ情報を持たないため、修正部分のみ
の命令文がテスト対象として実行され、テストデバッグ
を効率化、ひいては、プログラム開発を効率化すること
ができる。Furthermore, when a correction is made to an automatically generated program or a program obtained by copying an existing program, the coverage information up to the present is stored for the uncorrected portion, and the correction contents for the corrected portion are stored. Accordingly, the coverage information up to the previous time is set to the test non-execution state by, for example, invalidating, deleting, or adding. Therefore, after the program is modified, only the modified statement does not have coverage information, so the modified statement is executed as a test target, which improves the efficiency of test debugging and, in turn, the efficiency of program development. it can.
【0019】[0019]
【実施例】以下、本発明を図示する実施例に基づいて詳
細に説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail below with reference to illustrated embodiments.
【0020】図1は本発明を実施する計算機の一般的な
機器構成図であり、CPU1,メモリ2、外部記憶装置
3、入力装置4、表示装置5、プリンタ6とから構成さ
れている。FIG. 1 is a general equipment configuration diagram of a computer for carrying out the present invention, which comprises a CPU 1, a memory 2, an external storage device 3, an input device 4, a display device 5, and a printer 6.
【0021】図2は本発明の第1の実施例の処理手順を
示すフローチャートであり、図3は本実施例を実現する
ための機能概要図であり、図2のフロチャートに基づき
図3の各ステップを説明する。FIG. 2 is a flow chart showing the processing procedure of the first embodiment of the present invention, and FIG. 3 is a functional schematic diagram for realizing this embodiment. Based on the flow chart of FIG. Each step will be described.
【0022】まず、オブジェクトモジュール生成ステッ
プ202では、ソースプログラム201を入力情報と
し、既存のコンパイラを用いてオブジェクトモジュール
203を生成する(図2のステップ101)。First, in the object module generation step 202, the source program 201 is used as input information and the object module 203 is generated using an existing compiler (step 101 in FIG. 2).
【0023】次に、カバレジ情報蓄積ファイル生成ステ
ップ204では、オブジェクトモジュール203を入力
情報とし、既存のテストデバッグ支援用プログラムを起
動することにより、カバレジ情報蓄積ファイル205を
生成する(図2のステップ102)。これは、既存のテ
ストデバッグ支援用プログラムに内蔵された「起動時に
被テストプログラムのカバレジ情報蓄積ファイルがない
場合には、これを自動的に生成するという機能」を用い
たものである。Next, in the coverage information storage file generation step 204, the coverage information storage file 205 is generated by starting the existing test debug support program using the object module 203 as input information (step 102 in FIG. 2). ). This uses the "function of automatically generating a coverage information storage file of the program under test when it is started up" built in an existing test debug support program.
【0024】さらに、実行回数セット処理ステップ20
6では、カバレジ情報蓄積ファイル205に、全命令文
に対してその実行回数として、「1」以上の値を命令種
別に応じてセットする(図2のステップ103)。これ
は、カバレジ情報蓄積ファイル205の生成直後におい
て、全命令文に実行済みの情報を設定したことを意味す
る。Further, the execution count setting processing step 20
In step 6, in the coverage information storage file 205, a value of "1" or more is set as the number of times of execution for all command statements according to the command type (step 103 in FIG. 2). This means that the executed information is set in all the command statements immediately after the coverage information storage file 205 is generated.
【0025】そして、プログラムを修正する必要の有無
を判定し(図2のステップ104)、修正の必要がない
場合は終了し、修正の必要がある場合は以下のステップ
に続く。Then, it is judged whether or not the program needs to be modified (step 104 in FIG. 2), and if it does not need to be modified, the process ends, and if it needs to be modified, the following steps are continued.
【0026】まず、ソースプログラムの修正ステップ2
08では、ソースプログラム207を入力情報として、
既存のエディタを用いてソースプログラムを修正する
(図2のステップ105)。First, the correction step 2 of the source program
In 08, the source program 207 is used as input information,
The source program is modified using an existing editor (step 105 in FIG. 2).
【0027】次に、オブジェクトモジュール生成ステッ
プ210では、修正したソースプログラム209を入力
情報として、コンパイラを用いて、修正したプログラム
のオブジェクトモジュール211を生成する(図2のス
テップ106)。Next, in the object module generation step 210, the modified source program 209 is used as input information to generate an object module 211 of the modified program using a compiler (step 106 in FIG. 2).
【0028】本コンパイラ実行時には、コンパイラが持
つ「差分カバレジ機能」を使用する。これにより、オブ
ジェクトモジュール211には、カバレジ情報蓄積ファ
イル205に対して、未修正部分に対しては既存のカバ
レジ情報を保存し、修正部分に対しては既存のカバレジ
情報を削除するという指示情報が生成される。When the compiler is executed, the "differential coverage function" of the compiler is used. As a result, the object module 211 has, in the coverage information storage file 205, instruction information to save the existing coverage information for the uncorrected portion and delete the existing coverage information for the corrected portion. Is generated.
【0029】さらに、テスト実行ステップ212では、
既存のテストデバッグ支援プログラムを用いて、テスト
を行う(図2のステップ107)。この場合、テスト実
行前のカバレジ情報では、オブジェクトモジュール21
1で生成された指示情報により、カバレジ情報蓄積ファ
イル205の生成直後にセットした実行回数の値のう
ち、未修正部分に対するものはコンパイルした後も保存
され、修正部分の命令文に対しては削除されるため、修
正部分の命令文のみが実行される。この結果、テスト実
行後のカバレジ情報蓄積ファイル213では、全命令文
の実行回数の値が「1」以上にセットされ、全て実行済
みの状態とになり、プログラム全体の命令文を既実行と
認識できる。Further, in the test execution step 212,
A test is performed using an existing test debug support program (step 107 in FIG. 2). In this case, in the coverage information before the test execution, the object module 21
According to the instruction information generated in step 1, among the values of the number of executions set immediately after the coverage information storage file 205 is generated, the one for the uncorrected part is saved even after compiling, and the command statement for the corrected part is deleted. Therefore, only the modified statement is executed. As a result, in the coverage information storage file 213 after the test execution, the value of the number of execution times of all the command statements is set to "1" or more, all the commands are executed, and the command statements of the entire program are recognized as already executed. it can.
【0030】最後に、テストデバッグが完了しているか
どうかを判断し(図2のステップ108)、完了してい
れば終了する。Finally, it is judged whether or not the test debug is completed (step 108 in FIG. 2), and if completed, the process is ended.
【0031】テストデバッグが完了していない場合に
は、未実行の命令文がある場合とプログラムの修正をす
る必要がある場合の2つがある。When the test debug is not completed, there are two cases, that is, there is an unexecuted statement, and there is a case where the program needs to be corrected.
【0032】未実行の命令文がある場合には、未実行の
命令文がなくなるまでテストを繰返し、プログラムの修
正が必要である場合は、プログラムの修正からテストに
到る工程を繰り返す。If there is an unexecuted statement, the test is repeated until there is no unexecuted statement, and if the program needs to be modified, the steps from the program modification to the test are repeated.
【0033】図4は、カバレジ情報蓄積ファイル205
の構造例を示す図であり、カバレジ情報蓄積ファイル2
05はマスタテーブル401とカウントテーブル404
の2つのテーブルより構成される。FIG. 4 shows the coverage information storage file 205.
It is a figure which shows the example of a structure of the coverage information storage file 2
05 is a master table 401 and a count table 404
It is composed of two tables.
【0034】このうち、マスタテーブル401は図5に
示すように、プログラム名称501、テスト回数502
といった情報の他に、テストデバッグの進捗状況を示す
情報として、プログラム全体における、実行可能な命令
文の数である実行可能文数503、実行された命令文の
数である実行済文数504、実行可能な分岐の数である
実行可能分岐数505、実行された分岐の数である実行
済分岐数506、実行済文数の実行可能文数に対する割
合であるC0メジャ507、実行済分岐数の実行可能分
岐数に対する割合であるC1メジャ508から構成され
る。Of these, as shown in FIG. 5, the master table 401 has a program name 501 and a test count 502.
In addition to the above information, the number of executable statements 503, which is the number of executable statements in the entire program, the number of executed statements 504, which is the number of executed statements, in the entire program, Number of executable branches 505 that is the number of executable branches, Number of executed branches 506 that is the number of executed branches, C0 measure 507 that is the ratio of the number of executed statements to the number of executable statements, and Number of executed branches It is composed of a C1 major 508 which is a ratio to the number of executable branches.
【0035】一方、カウントテーブル402は図6に示
すように、各命令文毎の情報を格納するエレメント60
1,602…の集合体である。このため、カウントテー
ブル402の大きさは、プログラムの命令文数により左
右されるため、固定ではない。On the other hand, the count table 402, as shown in FIG. 6, is an element 60 for storing information for each statement.
It is an aggregate of 1,602 .... Therefore, the size of the count table 402 is not fixed because it depends on the number of command statements of the program.
【0036】エレメント601は、プログラムにおける
命令文の位置を示すロケーション番号を格納するロケー
ション欄603、命令の種類を示すコードを格納する命
令種別欄604、命令文の実行回数を格納するカウント
エントリ欄605から構成される。カバレジ情報蓄積フ
ァイル205の生成時点におけるカウントエントリ欄6
05には、実行回数の初期値として「0」がセットされ
ている。尚、命令文には、種別によって実行回数をカウ
ントする必要がないものがあり、このような命令文のた
めのエレメント602は、カウントエントリ欄を持た
ず、ロケーション欄606と命令種別欄607のみより
構成される。The element 601 includes a location column 603 for storing a location number indicating the position of an instruction sentence in a program, an instruction type column 604 for storing a code indicating the type of instruction, and a count entry column 605 for storing the number of times the instruction sentence is executed. Composed of. Count entry column 6 at the time of generation of the coverage information storage file 205
In 05, “0” is set as the initial value of the number of executions. Note that some command statements do not need to count the number of executions depending on the type, and the element 602 for such a command statement does not have a count entry column, and only the location column 606 and the instruction type column 607 are used. Composed.
【0037】図7は、ソースプログラムの一例を示すも
のであり、図8は図7のソースプログラムに対するカバ
レジ情報蓄積ファイル205のカウントテーブル402
の例を示すものである。FIG. 7 shows an example of the source program, and FIG. 8 shows the count table 402 of the coverage information storage file 205 for the source program of FIG.
Is an example of.
【0038】この例において、図3の実行回数セット処
理ステップ206では、初期値「0」が設定されたカウ
ントエントリ欄605の値を、ソースプログラムを解析
し、各命令文の命令種別に応じた値にリセットし、図8
に示すようなカウントエントリにする。本処理は、カウ
ントエントリが、実行回数をカウントする必要なある命
令文の実行の有無を判断する際には、カウントエントリ
の値を基にすることに着目したものである。In this example, in the execution count setting processing step 206 of FIG. 3, the source program is analyzed for the value of the count entry column 605 in which the initial value “0” is set, and the value is determined according to the instruction type of each statement. Reset to the value in Figure 8
Make a count entry as shown in. The present processing focuses on the fact that the count entry is based on the value of the count entry when determining whether or not an instruction statement that needs to count the number of executions has been executed.
【0039】例えば、図7においては、9つの命令文7
01〜709がある。このため、図8のカウントテーブ
ルには、9つのエレメント801〜809が生成され
る。この9つのエレメント501〜809のうち、4,
6,8番めのエレメント804,806,808は命令
種別により、実行回数をカウントする必要がないと判断
とれ、カウントエントリ欄を持たない。これ以外のエレ
メント801,802,803,805,807,80
9では、ソースプログラムを解析した上で、各エレメン
トの命令種別欄の値に応じ、「1」以上の値をカウント
エントリ欄に各々設定する。For example, in FIG. 7, nine command statements 7
There are 01 to 709. Therefore, nine elements 801 to 809 are generated in the count table of FIG. Of these nine elements 501-809, 4,
The sixth and eighth elements 804, 806, and 808 have no count entry column because it is determined that it is not necessary to count the number of executions depending on the instruction type. Other elements 801, 802, 803, 805, 807, 80
In 9, after analyzing the source program, a value of "1" or more is set in the count entry column according to the value of the instruction type column of each element.
【0040】本処理により、プログラムのテストを実際
に行なうことなく、全命令文を実行済みと認識できる。By this processing, it is possible to recognize that all the command statements have been executed without actually testing the program.
【0041】図9は、図7に示したソースプログラムを
修正した例を示し、図10は図9のソースプログラムに
対するカバレジ情報蓄積ファイル205のカウントテー
ブル402の内容例を示すものである。FIG. 9 shows an example in which the source program shown in FIG. 7 is modified, and FIG. 10 shows an example of the contents of the count table 402 of the coverage information storage file 205 for the source program shown in FIG.
【0042】図3のオブジェクトモジュール生成処理ス
テップ210では、全命令を既実行と設定した図8のカ
ウントテーブル402の各カウントエントリのうち、修
正した命令文に対応するカウントエントリについては
「未実行」に設定する。In the object module generation processing step 210 of FIG. 3, of the count entries of the count table 402 of FIG. 8 in which all instructions are set as already executed, the count entry corresponding to the modified statement is “not executed”. Set to.
【0043】本発明は、テストデバッグ支援用プログラ
ムが持つ差分カバレジ機能、すなわち「未修正部分のカ
バレジ情報は保存し、修正部分の既存カバレジ情報は削
除あるいは無効にして新たに取得する」ことに着目した
ものである。The present invention focuses on the differential coverage function of the test debug support program, that is, "preserves uncovered coverage information and deletes or invalidates existing coverage information and newly obtains it." It was done.
【0044】例えば、図9のソースプログラムは、図7
のソースプログラムに、2番目の命令文702の削
除、5および7番目の命令文705,707の変更、
8番目の命令文708の後に1命令文を追加する、と
いう修正を加えたものである。For example, the source program shown in FIG.
In the source program, the second statement 702 is deleted, and the fifth and seventh statement 705, 707 are changed.
This is a modification in which one statement is added after the eighth statement 708.
【0045】このプログラムの修正にともない、図8に
示したカウントテーブル402には、2番目のエレメ
ント802の削除、5および7番目のエレメント80
5,807の変更、8番目のエレメントの後に新らた
なエレメントの追加、という変更が生じ、その結果、図
8に示したカウントテーブル402は図10に示すよう
なカウントテーブル402に変更される。With the modification of this program, the count table 402 shown in FIG. 8 is deleted from the second element 802 and the fifth and seventh elements 80.
5, 807 is changed, and a new element is added after the eighth element. As a result, the count table 402 shown in FIG. 8 is changed to the count table 402 shown in FIG. .
【0046】ここで、図8のエレメント1(801),
3(803),4(804),5(805),6(80
6),7(807),8(808),9(809)は、
各々、図10のエレメント1(1001),2(100
2),3(1003),4(1004),5(100
5),6(1006),7(1007),9(100
9)に対応する。Here, the element 1 (801) of FIG.
3 (803), 4 (804), 5 (805), 6 (80
6), 7 (807), 8 (808), 9 (809)
Elements 1 (1001) and 2 (100 in FIG.
2), 3 (1003), 4 (1004), 5 (100
5), 6 (1006), 7 (1007), 9 (100
It corresponds to 9).
【0047】一方、図8のエレメント2(802)に対
応するエレメントは、命令文が削除されたために図10
には存在しない、また、図10のエレメント8(100
8)は、命令文の追加により新たに作成されたものであ
るために、対応するエレメントが図8には存在しない。
そして、図10のカウントテーブル402では、変更お
よび追加された命令文に対するエレメントのカウントエ
ントリの値(1012,1013,1014)が「0」
に設定され、未修正の命令文に対するエレメントのカウ
ントエントリの値(1010,1011,1015)は
保存されている。On the other hand, the element corresponding to the element 2 (802) in FIG.
, And element 8 (100
8) is newly created by the addition of the imperative sentence, the corresponding element does not exist in FIG.
Then, in the count table 402 of FIG. 10, the value (1012, 1013, 1014) of the count entry of the element for the changed and added statement is “0”.
, And the element count entry values (1010, 1011, 1015) for the unmodified statement are stored.
【0048】このように、カウントテーブル402で
は、削除した命令文に対応するエレメントは削除され
る。また、変更した命令文に対応するエレメントのカウ
ントエントリの値は、以前の実行回数の値が無効を示す
値「0」に設定される。さらに、追加した命令文につい
ては、対応するエレメントが新たに作成され、カウント
エントリの値には初期値「0」がセットされる。そし
て、未修正部分のカウントエントリについては、前から
セットされていた情報がそのまま保存される。As described above, in the count table 402, the element corresponding to the deleted statement is deleted. Also, the value of the count entry of the element corresponding to the changed statement is set to the value "0" indicating that the previous execution count value is invalid. Further, with respect to the added statement, a corresponding element is newly created, and the count entry value is set to the initial value “0”. Then, as for the count entry of the uncorrected portion, the information set from before is stored as it is.
【0049】したがって、本処理では、カバレジ情報蓄
積ファイル205の生成直後にセットした実行回数の値
の中で、修正した命令の実行回数の値のみが「0」にな
る。Therefore, in this processing, only the value of the number of executions of the corrected instruction becomes "0" among the values of the number of executions set immediately after the coverage information storage file 205 is generated.
【0050】図11は、図9で示したのソースプログラ
ムのテスト実行後のカウントテーブル402の内容例を
示すものであり、図3のテスト実行ステップ212で
は、テストデバッグ支援用プログラムが持つ差分カバレ
ジ機能により、実際に実行された各命令文の実行回数
を、カウントテーブルの該当する各エレメントのカウン
トエントリに加算する。FIG. 11 shows an example of the contents of the count table 402 after the test execution of the source program shown in FIG. 9. In the test execution step 212 of FIG. 3, the differential coverage of the test debug support program is held. With the function, the number of executions of each actually executed statement is added to the count entry of each corresponding element of the count table.
【0051】例えば、図3のテスト実行ステップ212
により、図9に示した1,2,4,8,9番目の命令文
901,902,904,908,909は1回ずつ実
行され、6番目の命令文906は実行されていない場
合、図10のプログラム修正後のカウントテーブル40
2では、実行された命令文に対応する1,2,4,8,
9番目のエレメント1101,1102,1104,1
108,1109のカウントエントリの値1110,1
111,1112,1114,1115はすべて‘1’
ずつ加算され、実行されていない命令文に対応する6番
目のエレメント1106のカウントエントリの値111
3のみがテスト実行前と変わらず、「0」である。つま
り、図10に示したカウントテーブル402では、修正
部分に相当し、かつ、実際に実行されていない6番目の
命令文906に対応するエレメント1106のカウント
エントリの値1113のみが「0」である。For example, the test execution step 212 of FIG.
, The first, second, fourth, eighth and ninth command statements 901, 902, 904, 908 and 909 shown in FIG. 9 are executed once and the sixth command statement 906 is not executed. Count table 40 after program modification of 10
2, 1, 2, 4, 8, corresponding to the executed statement
9th element 1101, 1102, 1104, 1
Count entry values 1110,1 of 108,1109
111, 1112, 1114, 1115 are all "1"
Value of the count entry of the sixth element 1106 corresponding to the unexecuted statement
Only 3 is “0”, which is the same as before the test execution. That is, in the count table 402 shown in FIG. 10, only the value 1113 of the count entry of the element 1106 corresponding to the modified portion and corresponding to the sixth statement 906 that is not actually executed is “0”. .
【0052】このように、実際にテストを行い、修正部
分に相当する命令文を実行することにより、すべての命
令文に対するエレメントのカウントエントリに‘1’以
上の数値を設定することが可能となる。したがって、修
正部分に相当する命令文のみを実行することにより、全
命令文を既実行と認識できることになる。As described above, by actually performing the test and executing the command statement corresponding to the modified portion, it becomes possible to set the numerical value of "1" or more to the count entry of the element for all the command statements. . Therefore, by executing only the command statement corresponding to the modified part, all the command statements can be recognized as already executed.
【0053】本実施例によれば、テストを実行する前
に、カウントテーブル402の各エレメントのカウント
エントリに命令文の実行回数として‘1’以上の値をセ
ットすることにより、全命令文を既実行と認識させる処
理と、既存の差分カバレジ機能を組み合わせることによ
って、修正した命令文だけを実際に実行するだけで、全
命令文を既実行と認識することが可能になり、プログラ
ム開発におけるテストデバッグの効率化を図ることがで
きる。According to this embodiment, before executing the test, all the command statements are set by setting the count entry of each element of the count table 402 to a value of "1" or more as the execution count of the command statement. By combining the process of making it recognized as execution and the existing differential coverage function, it becomes possible to recognize all the command statements as already executed only by actually executing the modified statement, and test debugging in program development. The efficiency of can be improved.
【0054】図12は第2の実施例を示すフローチャー
トであり、本実施例は、図1の例で示すステップ101
の前のステップとして、ステップ100を追加した以外
は、図1の例で示した実施例と同じである。FIG. 12 is a flow chart showing the second embodiment. This embodiment is step 101 shown in the example of FIG.
This is the same as the embodiment shown in the example of FIG. 1 except that step 100 is added as a step before the step.
【0055】本実施例において、ステップ100は、既
存のプログラム生成ツールである。実施例によれば、既
存のプログラム自動生成ツールと第1の実施例を連動さ
せることによって、プログラムの新規開発において、生
成からテストに到る一連の工程を連動させることによる
操作の省力化を図れ、さらに、プログラムの高い生成率
を活かした効率的なテストデバッグによって開発の効率
化を図ることができる。In this embodiment, step 100 is an existing program generation tool. According to the embodiment, by linking the existing program automatic generation tool with the first embodiment, in the new development of the program, it is possible to save labor by linking a series of steps from generation to testing. In addition, development efficiency can be improved by efficient test debugging utilizing the high program generation rate.
【0056】なお、前述した実施例においては、カウン
トエントリの値を「1」以上にした場合を実行済みとし
たが、フラグによって実行済みかどうかを表わすように
してもよい。In the above-described embodiment, the case where the value of the count entry is set to "1" or more is assumed to have been executed, but it may be indicated by a flag whether or not it has been executed.
【0057】[0057]
【発明の効果】以上説明したように、本発明の差分テス
トデバッグ支援方法は、既に信頼性が保証されているプ
ログラムについては、そのカバレジ情報蓄積ファイルに
全命令文別にテスト実行済みの情報を設定し、当該プロ
グラムに変更を加えた場合、変更部分のカバレジ情報に
ついてのみテスト未実行状態に設定し、変更部分の命令
文のみをテスト対象として実行させるようにしたもので
あるため、プログラムの自動生成あるいは既存プログラ
ムの再利用を行う場合、自動生成部分あるいは未修正部
分のテストは省略され、修正部分のみの命令文がテスト
対象として実行される。この結果、プログラムの自動生
成あるいは既存プログラムの再利用を行う場合のテスト
作業の効率を向上させることができる。As described above, according to the differential test debug support method of the present invention, for a program whose reliability has already been assured, the test execution information is set for each statement in the coverage information storage file. However, when a change is made to the program, only the coverage information of the changed part is set to the test unexecuted state, and only the changed part's statement is executed as the test target. Alternatively, when the existing program is reused, the test of the automatically generated part or the unmodified part is omitted, and the statement of only the modified part is executed as the test target. As a result, it is possible to improve the efficiency of the test work when the program is automatically generated or the existing program is reused.
【図1】 本発明を実施する計算機システムの概略構成
図である。FIG. 1 is a schematic configuration diagram of a computer system that implements the present invention.
【図2】 本発明の第1の実施例における処理手順を示
すフローチャートである。FIG. 2 is a flowchart showing a processing procedure in the first embodiment of the present invention.
【図3】 第1の実施例を実現するためのシステム構成
を示す機能概要図である。FIG. 3 is a functional schematic diagram showing a system configuration for realizing the first embodiment.
【図4】 カバレジ情報蓄積ファイルの構造例を示す説
明図である。FIG. 4 is an explanatory diagram showing a structural example of a coverage information storage file.
【図5】 マスタテーブルの構造例を示す説明図であ
る。FIG. 5 is an explanatory diagram showing a structural example of a master table.
【図6】 カウントテーブルの構造例を示す説明図であ
る。FIG. 6 is an explanatory diagram showing a structure example of a count table.
【図7】 ソースプログラムの例を示す説明図である。FIG. 7 is an explanatory diagram showing an example of a source program.
【図8】 図7のソースプログラムに対するカバレジ情
報蓄積ファイルのカウントテーブルの例を示す説明図で
ある。8 is an explanatory diagram showing an example of a count table of coverage information storage files for the source program of FIG. 7. FIG.
【図9】 修正後のソースプログラムの例を示す説明図
である。FIG. 9 is an explanatory diagram showing an example of a corrected source program.
【図10】 図9のソースプログラムに対するカバレジ
情報蓄積ファイルのカウントテーブルの例を示す説明図
である。10 is an explanatory diagram showing an example of a count table of coverage information storage files for the source program of FIG.
【図11】 テスト実行後のカウントテーブルの例を示
す説明図である。FIG. 11 is an explanatory diagram showing an example of a count table after a test is executed.
【図12】 本発明の第2の実施例における処理手順を
示すフローチャートである。FIG. 12 is a flowchart showing a processing procedure in the second embodiment of the present invention.
201…ソースプログラム、205…カバレジ情報蓄積
ファイル、206…実行回数セット処理ステップ、21
2…テスト実行ステップ、401…マスタテーブル、4
02…カウントテーブル、606,607…カウントエ
ントリ。201 ... Source program, 205 ... Coverage information storage file, 206 ... Execution count setting process step, 21
2 ... Test execution step, 401 ... Master table, 4
02 ... Count table, 606, 607 ... Count entry.
フロントページの続き (72)発明者 森岡 洋介 神奈川県川崎市幸区鹿島田890番地の12 株式会社日立製作所情報システム開発本部 内Front Page Continuation (72) Inventor Yosuke Morioka 12 890 Kashimada, Saiwai-ku, Kawasaki-shi, Kanagawa 12 Information Systems Development Division, Hitachi, Ltd.
Claims (1)
対し、カバレジ情報蓄積ファイルを設け、このカバレジ
情報蓄積ファイルに全命令文別にテスト実行済みの情報
を設定した後、当該プログラムの変更に対しては、変更
部分のカバレジ情報についてのみテスト未実行状態に設
定し、変更部分の命令文のみをテスト対象として実行さ
せることを特徴とする差分テストデバック支援方法。1. A coverage information storage file is provided for an existing completed or semi-completed program, and after the test execution information is set for each command statement in this coverage information storage file, the program is changed. Is a differential test debugging support method characterized in that only the coverage information of the changed portion is set to the test non-execution state, and only the statement of the changed portion is executed as the test target.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4252730A JPH06103113A (en) | 1992-09-22 | 1992-09-22 | Differential test debugging support method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4252730A JPH06103113A (en) | 1992-09-22 | 1992-09-22 | Differential test debugging support method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH06103113A true JPH06103113A (en) | 1994-04-15 |
Family
ID=17241468
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP4252730A Pending JPH06103113A (en) | 1992-09-22 | 1992-09-22 | Differential test debugging support method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH06103113A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009048442A (en) * | 2007-08-21 | 2009-03-05 | Hitachi Software Eng Co Ltd | Constitution management system |
| US9740592B2 (en) | 2011-10-27 | 2017-08-22 | International Business Machines Corporation | Supporting debugging of program and graphical user interface for supporting debugging |
-
1992
- 1992-09-22 JP JP4252730A patent/JPH06103113A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009048442A (en) * | 2007-08-21 | 2009-03-05 | Hitachi Software Eng Co Ltd | Constitution management system |
| US9740592B2 (en) | 2011-10-27 | 2017-08-22 | International Business Machines Corporation | Supporting debugging of program and graphical user interface for supporting debugging |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5918037A (en) | Generating tests for an extended finite state machine using different coverage levels for different submodels | |
| US6954747B1 (en) | Methods for comparing versions of a program | |
| US7178135B2 (en) | Scope-based breakpoint selection and operation | |
| CN106469049B (en) | File scanning method and device | |
| WO2016026328A1 (en) | Information processing method and device and computer storage medium | |
| CN113792026B (en) | Database script deployment method, device and computer-readable storage medium | |
| CN112732300A (en) | Data packet updating method and device, electronic equipment and readable storage medium | |
| US7624381B1 (en) | Portable detection of start and completion of object construction | |
| JP2009104252A (en) | Debugging support apparatus and debugging support method | |
| CN114741360A (en) | Automobile part file reconstruction method and device, terminal equipment and storage medium | |
| JPH06103113A (en) | Differential test debugging support method | |
| JP4675639B2 (en) | Data processing system, method for displaying customization parameters of application program, and computer program product | |
| JPH0667871A (en) | Automatic program updating system | |
| JP3461185B2 (en) | Method and apparatus for registering source code line number to load module | |
| JPH06110733A (en) | Program test case generator | |
| JP4782315B2 (en) | Impact analysis apparatus and method, recording medium, and program | |
| JPH11154093A (en) | Program Compiler and Recording Medium Recording Compiler Program | |
| JPH11338686A (en) | Program development support apparatus, program development support method, and recording medium recording program development support program | |
| JPH0510692B2 (en) | ||
| JP2001216139A (en) | Project content analysis method and system using makeup information analysis, and information recording medium | |
| JPH05274126A (en) | Program synthesis system | |
| JP6888336B2 (en) | Stub generators, methods, and programs | |
| JP3210203B2 (en) | Program test method and SQL simulator | |
| CN116185488A (en) | A method, device, equipment and storage medium for system reconfiguration | |
| JPH09274570A (en) | Compiling method and compiler system |