JP4458491B2 - Test command file creation system, method and program - Google Patents
Test command file creation system, method and program Download PDFInfo
- Publication number
- JP4458491B2 JP4458491B2 JP2006082641A JP2006082641A JP4458491B2 JP 4458491 B2 JP4458491 B2 JP 4458491B2 JP 2006082641 A JP2006082641 A JP 2006082641A JP 2006082641 A JP2006082641 A JP 2006082641A JP 4458491 B2 JP4458491 B2 JP 4458491B2
- Authority
- JP
- Japan
- Prior art keywords
- sheet
- analysis result
- result table
- definition
- input
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Description
本発明は、コンピュータが実行するプログラムの動作をデバッガでテストする際に使用するコマンドファイル(テストコマンドファイル)を作成する技術に係り、特に、テストコマンドファイルの作成を容易にするのに好適な技術に関するものである。 The present invention relates to a technique for creating a command file (test command file) used when testing the operation of a program executed by a computer with a debugger, and particularly suitable for facilitating the creation of a test command file. It is about.
従来、プログラムをデバッガを用いて動作の確認テストをする際に使用するテストコマンドファイルの作成は、当該プログラムをコンパイルして出力されるテストコマンドファイルの雛形ファイルに、人手により、機能仕様やプログラム詳細設計を参照しながら、必要なテストコマンドを追記または修正することにより、行っていた。 Conventionally, creating a test command file to be used when checking the operation of a program using a debugger is done manually by creating a test command file template file that is output by compiling the program. It was done by adding or modifying necessary test commands while referring to the design.
このようにして作成されたテストコマンドファイルは、例えば、GNUが提供するデバッガ「gdb」においては、通常はgdbのコマンドプロンプトから入力するコマンドの並びであり、「−x」オプションを使うこと等により、起動時に自動的に読み込ませて実行させることができる。 The test command file created in this way is, for example, a sequence of commands input from the gdb command prompt in the debugger “gdb” provided by GNU. By using the “−x” option, etc. , Can be automatically loaded and executed at startup.
しかしながら、人手により、仕様書類を2冊以上広げてテストコマンドファイルを作成するには、卓上の広さがなかったり、新人などのコマンドファイルを利用してテストを行っていない作業者では、テストコマンドを理解するのに時間がかかってしまい、実際のテストを行うまでに時間がかかってしまう。 However, in order to create a test command file by manually spreading two or more specification documents, a test command file can be used by a worker who does not have a tabletop area or who does not use a command file such as a newcomer. It takes time to understand, and it takes time to do the actual test.
また、テストコマンドファイルの作成元のプログラムを修正すると、当該プログラムのコンパイル上の行番号がずれるために、以前作成したコマンドファイルでの再テストができなくなり、再度、テストコマンドファイルの作成を行う必要があり、時間がかかる。 In addition, if the program that created the test command file is modified, the line numbers on the compilation of the program will be shifted, so it will not be possible to retest with the previously created command file, and it will be necessary to create the test command file again. And takes time.
このようなデバッグ用のテストコマンドの作成を容易とする技術に関しては、例えば、特許文献1〜4に記載の技術がある。
As a technique for facilitating the creation of such a test command for debugging, there are techniques described in
特許文献1では、解決すべき課題を有する従来の第1のテストコマンド生成技術と、この課題を解決するための第2のテストコマンド生成技術が記載されている。
第1のテストコマンド生成技術では、まず、プログラミング言語に従って作成された原始プログラムを、翻訳プログラム(コンパイラ)によって、コンピュータが解読実行可能な機械語の実行形式プログラムに翻訳すると共に、テストコマンドファイルも同時に生成する。しかし、このテストコマンドファイルは、原始プログラムのみが入力されているので情報が不足し、定型的なテストコマンドしか生成されない。 In the first test command generation technique, first, a source program created according to a programming language is translated into a machine language executable program that can be decoded and executed by a computer by a translation program (compiler). Generate. However, since this test command file contains only the source program, there is insufficient information and only standard test commands are generated.
そこで、利用者(プログラマ)は、シンボリックデバッガを使用する前に、ディスプレイ端末から編集プログラムを起動し、テストコマンドファイルのテストコマンドを、テストしたい情報に変更して、編集後のテストコマンドファイルを作成する。 Therefore, before using the symbolic debugger, the user (programmer) starts the editing program from the display terminal, changes the test command in the test command file to the information to be tested, and creates the edited test command file. To do.
例えば、原始プログラムが、
『01 CODE PIC X(4)・データ定義
01 TANKA PIC 9(8)・データ定義
PROCEDURE DIVISION
USING CODE TANKA 』
であるとする。
For example, a primitive program
"01 CODE PIC X (4)-Data definition
01 TANKA PIC 9 (8), data definition
PROCEDURE DIVISION
USING CODE TANKA
Suppose that
この場合、その属性に従って、「CODE」は4バイトのキャラクタであるので「(X(4))」、翻訳プログラム(コンパイラ)によって生成される編集前のテストコマンド(未完成テストコマンド)には、「CODE=ABCD」が設定され、また「TANKA」は8桁の数字であるので「(9(8))」、編集前のテストコマンド(未完成テストコマンド)には、「TANKA=12345678」が設定される。このように、翻訳プログラム(コンパイラ)によって生成される未完成テストコマンドには標準的な値しか設定されない。 In this case, according to the attribute, “CODE” is a 4-byte character, so “(X (4))”, the test command before editing (unfinished test command) generated by the translation program (compiler) includes: Since “CODE = ABCD” is set and “TANKA” is an 8-digit number, “(9 (8))” is set, and “TANKA = 12345678” is set as the test command before editing (incomplete test command). Is set. In this way, only standard values are set for incomplete test commands generated by the translation program (compiler).
このため、利用者(プログラマ)は、デバッグ前に編集ツールを用いてテストコマンドファイルを、テストしたい情報に編集する。すなわち、この例では、データ名に従って「CODE」に「A105」、「TANKA」に「1200」を設定する。 Therefore, the user (programmer) edits the test command file to information to be tested using an editing tool before debugging. That is, in this example, “A105” is set in “CODE” and “1200” is set in “TANKA” according to the data name.
これに対して、第2のテストコマンド生成技術では、第1のテストコマンド生成技術においてデバッグ前に行う編集作業を不要にし、テスト準備作業を簡素化するものであり、テストすべき原始プログラムのデータ名に対応するデータ値を登録した辞書情報ファイルを設け、原始プログラムをコンパイルするときに、当該原始プログラムのプログラム名をキーにして辞書情報ファイルを検索し、原始プログラム中のデータ名に対応するデータ値を辞書情報ファイルから読み出し、読み出されたデータ値を設定したテストコマンドファイルを生成する。 On the other hand, the second test command generation technique eliminates the editing work performed before debugging in the first test command generation technique and simplifies the test preparation work. When a dictionary information file in which data values corresponding to names are registered is provided and the source program is compiled, the dictionary information file is searched using the program name of the source program as a key, and the data corresponding to the data name in the source program A value is read from the dictionary information file, and a test command file in which the read data value is set is generated.
このように、辞書情報ファイルに、予めデータ名に対応した設定すべき値を登録し、原始プログラムの内容を読み込んだ翻訳プログラムが、原始プログラムのプログラム名をキーにして辞書情報ファイルを検索し、原始プログラムのデータ名に対応する、辞書情報ファイルに登録された設定値を読み出して、テストコマンドファイルに設定する。これにより、シンボリックデバッガに入力される環境設定のためのテストコマンドファイルの編集作業が不要となる。 Thus, in the dictionary information file, a value to be set corresponding to the data name is registered in advance, and the translation program that reads the contents of the source program searches the dictionary information file using the program name of the source program as a key, The setting value registered in the dictionary information file corresponding to the data name of the source program is read and set in the test command file. This eliminates the need to edit the test command file for setting the environment input to the symbolic debugger.
しかし、第1のテストコマンド生成技術では、テストコマンドファイルの編集・作成を、仕様書類を2冊以上広げて行う代わりに、ディスプレイ端末上で行うようにしただけであり、また、第2のテストコマンド生成技術においても、辞書情報ファイルへのデータ値の登録には同様の作業が必要であり、共に、新人の作業者では、テストコマンドを理解するのに時間がかかってしまい、実際のテストを行うまでに時間がかかってしまう。 However, in the first test command generation technology, the test command file is edited and created only on the display terminal instead of spreading two or more specification documents. Even in command generation technology, the same work is required to register data values in the dictionary information file. In both cases, a new worker takes time to understand the test command, and the actual test is performed. It takes time to do it.
また、特許文献2には、シミュレータとデバッガとの相互作用によりコンピュータプログラムに対するデバッグを行う技術に関して、ソースプログラムに予めデバッグコマンドを埋め込み、このデバッグコマンドを埋め込んだソースプログラムをアセンブルしてオブジェクトコードを生成する際、当該デバッグコマンドを抽出し、各デバッグコマンドの各々に対応するブレークポイントコマンドを生成し、ブレークポイントコマンドおよびそれに対応するデバッグコマンドをデバッグコマンドファイルに書き込むことにより、コマンドファイルを作成し、そして、ソースプログラムの修正に際して、ブレークポイントコマンドおよびそれに対応する埋め込みデバッグコマンドをデバックコマンドファイルから取り除き、それにより、修正されたソースプログラムの再アセンブルの際に、ソースプログラムのそれぞれ新しい相対位置にある埋め込みデバックコマンドに対応する新しいブレークポイントコマンドを含む新しいコマンドファイルを自動的に作成する技術が記載されている。
しかし、この特許文献2に記載の技術においても、ソースプログラムに予めデバッグコマンドを埋め込む作業に関しては、新人などのコマンドファイルを利用してテストを行っていない作業者では時間がかかってしまい、実際のテストを行うまでに時間がかかってしまう。
However, even in the technique described in
また、特許文献3には、デバッガを用いて行う複数モジュールからなるプログラムの単体テストおよび部分結合テストにおいて、スタブ作成や外部変数の設定等の前処理を行わずに、テストを開始できるようにすることを課題とした技術が記載されている。
すなわち、デバッガの中にグローバル変数等の被テストプログラム内にない変数に関する変数参照管理テーブルを設け、そのような変数の参照がある毎に、当該テーブルを参照し、既に適切な値が設定されているならばそれを用い、値が未だ設定されていない場合や、テストのために値を換える必要がある場合には、ユーザ(操作者)がその場で値を指定することによって、デバッガのコマンドを生成し実行する。このユーザの指示はデバッグコマンドファイルとして保存し、後の再テストや同種のテストにおいて同じ操作を行わなくても良いようにする。 In other words, a variable reference management table for variables that are not in the program under test, such as global variables, is provided in the debugger, and each time such a variable is referenced, the table is referenced and an appropriate value is already set. If it is not set yet, or if it is necessary to change the value for testing, the user (operator) can specify the value on the spot and use the debugger command. Generate and execute. This user instruction is saved as a debug command file so that the same operation does not have to be performed in subsequent retests or similar tests.
しかし、この特許文献3に記載の技術においても、変数参照管理テーブルの生成や、値が未だ設定されていない場合のユーザによる値の指定作業に関しては、新人などのコマンドファイルを利用してテストを行っていない作業者では時間がかかってしまい、実際のテストを行うまでに時間がかかってしまう。
However, even in the technique described in
また、特許文献4では、ウィンドウ画面を用いた操作者との対話的操作により、テスト対象のプログラムに対応した、デバッガ用のテストコマンドを生成する技術が記載されている。
この技術では、まず、表示された「プログラム表示ウィンドウ」においてテスト対象となるプログラムが指定されると、指定された「プログラム」が「プログラム表示ウィンドウ)」中に、「図形エディタ」の形式で(直接プログラムソースの形式でも良い)表示される。 In this technique, first, when a program to be tested is specified in the displayed “program display window”, the specified “program” is displayed in the form of “graphic editor” in the “program display window” ( (It may be in the form of a direct program source).
次に、この「図形エディタ形式」で表示された「プログラム」において、「着目するデータ項目)」がマウスで指定され、「ファイルメニューにおける抽出」が選択されると、「テストデータエディタウィンドウ」と「プログラムソース抽出ウィンドウ」が生成され表示される。 Next, in the “program” displayed in this “graphic editor format”, when “data item of interest” is designated with the mouse and “extract in file menu” is selected, “test data editor window” A “Program Source Extraction Window” is generated and displayed.
尚、「プログラム表示ウィンドウ」において、「オプション」における「抽出オプション設定」が指定されると、例えば、「参照データ項目使用命令」や「分岐命令」が表示され、これらが選択されると、こららの「参照データ項目」や「分岐命令」に関しても「テストデータエディタウィンドウ」と「プログラムソース抽出ウィンドウ」において表示される。 When “Extraction option setting” in “Option” is specified in the “Program display window”, for example, “reference data item use instruction” and “branch instruction” are displayed. These “reference data item” and “branch instruction” are also displayed in the “test data editor window” and “program source extraction window”.
そして、この「プログラムソース抽出ウィンドウ」を参照して、「テストデータエディタウィンドウ」において「データ値」に値が設定され、「プログラムソース抽出ウィンドウ」において「テストコマンド生成」が指定されると、データ値が設定された「テストコマンド」が生成される。 Then, referring to this “program source extraction window”, when “data value” is set in the “test data editor window” and “test command generation” is specified in the “program source extraction window”, the data A “test command” with a value set is generated.
このようにして、特許文献4に記載の技術によれば、ウィンドウを用いた操作者との対話的操作により、テスト対象のプログラムに対応した、デバッガ用のテストコマンドを生成することができる。
In this way, according to the technique described in
しかし、この特許文献4に記載の技術においても、「テストデータエディタウィンドウ」と「プログラムソース抽出ウィンドウ」での入力となっており、作業者は、プログラムのコーディングレベルの内容が理解できていないと、入力作業は困難である。
However, even in the technique described in
また、特許文献4に記載の技術においては、分岐、ファイル、外部ルーチン全てにブレイクポイントを発生させ、「テストデータエディタウィンドウ」と「プログラムソース抽出ウィンドウ」から入力された内容を取り込んでテストコマンドを作成しており、プログラムによっては、テストコマンド文が長くなり、テストコマンドが見ずらい。また、テストで不必要に出力されるテスト結果にブレイクポイントの実行結果が表示がされるので、テスト結果が見ずらいとの問題がある。
In the technique described in
さらに、特許文献4に記載の技術においては、テストコマンドは画面から変更して保存するファイル名を変えて保存するが、作業者は、作業の途中で横槍が入るとどのような条件でどのような値を入力してどのようなテストするのかを忘れてしまうことがあり、これによって作成したテストコマンドは不必要なものになる場合もある。例えば、作業途中で他の作業を行った後には、作業者は、どのような条件でそのような値を設定しているのか、瞬時に思い出すことができず、間違えを起こす場合がある。
Furthermore, in the technique described in
また、例えば、特許文献5、特許文献6、特許文献7に記載のように、プログラムを解析し、視覚的に確認できるようにする技術がある。さらに、特許文献8に記載のように、PAD(Problem Analysis Diagram)を作成する支援技術と、このPADからプログラムソースを作成する技術がある。
Further, for example, as described in
しかし、これらの従来技術では、プログラムからテストコマンドファイルを作成することはできない。 However, these conventional technologies cannot create a test command file from a program.
解決しようとする問題点は、従来の技術では、デバッグによるテストの対象となるプログラムの内容や言語を知らない初心者には、当該プログラム用のテストコマンドファイルを容易に作成することができない点である。 The problem to be solved is that the conventional technology cannot easily create a test command file for a program for a beginner who does not know the contents and language of the program to be tested by debugging. .
本発明の目的は、これら従来技術の課題を解決し、作業者のスキルやテスト状況の変化にも即座に対応でき、新人等、誰でも容易にテストコマンドファイルを作成できるようにすることである。 An object of the present invention is to solve these problems of the prior art, to immediately respond to changes in the skill and test status of the worker, and to make it possible for anyone such as newcomers to easily create a test command file. .
上記目的を達成するため、本発明では、ソースプログラムの字句解析および構文解析を行い、定義部の解析結果表と実行部の解析結果表とを生成し、定義部の解析結果表における各項目の一覧と各項目に対するデータ値を含む操作者からのデバッグ用設定情報を入力する欄とからなるシミュレーション用シートを生成すると共に、実行部の解析結果表における各命令の一覧と各命令に対する操作者からのブレイクポイントの設定の要否を含むデバッグ用制御情報を入力する欄からなるブレイクポイント用シートを生成し、これらのブレイクポイント用シートとシミュレーション用シートを画面表示し、画面表示されたブレイクポイント用シートおよびシミュレーション用シートに対して、操作者が指定入力した情報を設定し、このような操作者指定入力情報が設定されたブレイクポイント用シートおよびシミュレーション用シートを用いてテストコマンドファイルを生成することを特徴とする。さらに、実行部の解析結果表から、当該ソースプログラムに対応するPADを生成して表示装置に表示し、表示したPADにおいて操作者が入力装置を操作して指定した箇所のPAD生成に用いた実行部の解析結果表における情報を読み出して当該箇所に表示し、そして、表示した実行部の解析結果表における情報を、操作者の入力装置からの操作指示に応じて、ブレイクポイント用シートに設定することを特徴とする。 In order to achieve the above object, the present invention performs lexical analysis and syntax analysis of the source program, generates an analysis result table of the definition part and an analysis result table of the execution part, and sets each item in the analysis result table of the definition part. Generates a simulation sheet consisting of a list and a field for inputting debug setting information from the operator including data values for each item, and from the list of each instruction in the analysis result table of the execution unit and from the operator for each instruction Generate breakpoint sheets consisting of fields for entering debug control information, including whether breakpoints need to be set, and display these breakpoint sheets and simulation sheets on the screen. Information specified by the operator is set for the sheet and simulation sheet, and such operations are performed. And generating a test command file using the sheet and simulation sheet for the specified input information is set breakpoint. Furthermore, from the analysis result table of the execution unit, a PAD corresponding to the source program is generated and displayed on the display device, and the execution used to generate the PAD at the location specified by the operator operating the input device in the displayed PAD The information in the analysis result table of the part is read out and displayed at the corresponding location, and the information in the analysis result table of the displayed execution part is set in the breakpoint sheet according to the operation instruction from the operator input device It is characterized by that.
本発明によれば、作業者のスキルやテスト状況の変化にも容易に対応でき、新人等、誰でも容易にテストコマンドファイルの作成および再作成を行うことが可能となる。 According to the present invention, it is possible to easily cope with changes in the skill and test status of an operator, and it is possible for anyone such as a new employee to easily create and recreate a test command file.
以下、図を用いて本発明を実施するための最良の形態例を説明する。図1は、本発明に係るテストコマンドファイル作成システムの構成例を示すブロック図であり、図2Aは、図1におけるプログラムソースの第1の具体例を示す説明図、図2Bは、図1におけるプログラムソースの第2の具体例を示す説明図である。 The best mode for carrying out the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a configuration example of a test command file creation system according to the present invention, FIG. 2A is an explanatory diagram showing a first specific example of a program source in FIG. 1, and FIG. 2B is a diagram in FIG. It is explanatory drawing which shows the 2nd specific example of a program source.
また、図3は、図1における解析結果シート(定義部)の具体例を示す説明図、図4は、図1における解析結果シート(実行部)の具体例を示す説明図、図5は、図1におけるシミュレーション用シートの具体例を示す説明図、図6は、図1におけるブレイクポイント用シートの具体例を示す説明図、図7は、図1におけるPAD作成部で作成されたPADの具体例を示す説明図である。 3 is an explanatory diagram showing a specific example of the analysis result sheet (definition unit) in FIG. 1, FIG. 4 is an explanatory diagram showing a specific example of the analysis result sheet (execution unit) in FIG. 1, and FIG. FIG. 6 is an explanatory diagram showing a specific example of the simulation sheet in FIG. 1, FIG. 6 is an explanatory diagram showing a specific example of the breakpoint sheet in FIG. 1, and FIG. 7 is a specific example of the PAD created by the PAD creation unit in FIG. It is explanatory drawing which shows an example.
さらに、図8は、図1におけるテストコマンドファイル作成システムの本発明に係る第1の処理動作例を示すフローチャート、図9は、図1におけるテストコマンドファイル作成システムの本発明に係る第2の処理動作例を示すフローチャート、図10は、図1におけるテストコマンドファイル作成システムの本発明に係る第3の処理動作例を示すフローチャート、図11は、図1におけるテストコマンドファイル作成システムの本発明に係る第4の処理動作例を示すフローチャート、図12は、図1におけるテストコマンドファイル作成システムの本発明に係る第5の処理動作例を示すフローチャートである。 8 is a flowchart showing a first processing operation example according to the present invention of the test command file creation system in FIG. 1, and FIG. 9 is a second process according to the present invention of the test command file creation system in FIG. FIG. 10 is a flowchart showing a third processing operation example according to the present invention of the test command file creation system in FIG. 1, and FIG. 11 is a flowchart according to the present invention of the test command file creation system in FIG. FIG. 12 is a flowchart showing a fifth processing operation example according to the present invention of the test command file creation system in FIG.
そして、図13は、ブレイクポイント設定選択用の操作画面例を示す説明図、図14Aは、図1におけるテストコマンドファイル作成システムが作成したテストコマンドファイルの第1の具体例を示す説明図、図14Bは、図1におけるテストコマンドファイル作成システムが作成したテストコマンドファイルの第2の具体例を示す説明図、図14Cは、図1におけるテストコマンドファイル作成システムが作成したテストコマンドファイルの第3の具体例を示す説明図である。 FIG. 13 is an explanatory diagram showing an example of an operation screen for selecting a breakpoint setting. FIG. 14A is an explanatory diagram showing a first specific example of a test command file created by the test command file creation system in FIG. 14B is an explanatory diagram showing a second specific example of the test command file created by the test command file creation system in FIG. 1, and FIG. 14C is a third test command file created by the test command file creation system in FIG. It is explanatory drawing which shows a specific example.
図1に示す本例のプログラム解析システムは、CPU(Central Processing Unit)や主メモリ、表示装置、入力装置、外部記憶装置からなるコンピュータ構成からなり、光ディスク駆動装置等を介してCD−ROM(Compact Disc−Read Only Memory)もしくはDVD(Digital VIDeo Disc/Digital Versatile Disc)等からなる光ディスクに記録されたプログラムやデータを外部記憶装置内にインストールした後、この外部記憶装置から主メモリに読み込みCPUで処理することにより、各処理部の機能を実行するものである。 The program analysis system of this example shown in FIG. 1 has a computer configuration including a CPU (Central Processing Unit), a main memory, a display device, an input device, and an external storage device, and a CD-ROM (Compact) via an optical disk drive device or the like. After a program or data recorded on an optical disk such as a Disc-Read Only Memory (DVD) or DVD (Digital VIDeo Disc / Digital Versatile Disc) is installed in the external storage device, the program is read from the external storage device into the main memory and processed by the CPU. By doing so, the function of each processing unit is executed.
図1において、1はキーボードやマウス等からなる入力装置、1aはCRT(Cathode Ray Tube)やLCD(LiquID Crystal Display)等からなる表示装置、2a,2〜6はそれぞれCPUのプログラム実行で実現される機能としてのプログラム制御部2a(図中「プログラム制御(ボタン操作)」と記載)とプログラム解析部2(図中「プログラム解析」と記載)、入力シート作成部3(図中「入力シート作成」と記載)、PAD作成部4(図中「PAD作成」と記載)、PAD制御部5(図中「PAD制御」と記載)、テストコマンドファイル作成部6(図中「テストコマンドファイル」と記載)である。
In FIG. 1, 1 is an input device composed of a keyboard, a mouse, etc., 1a is a display device composed of a CRT (Cathode Ray Tube), LCD (LiquID Crystal Display), etc., and 2a, 2-6 are each realized by executing a program of a CPU.
また、7〜14はCPUのプログラム実行で生成され記憶装置に記憶されるデータであり、7はテストコマンドファイル作成対象のプログラム(図中「プログラムソース」と記載)、8はプログラム7で使用するコピー句群であるディレクトリ(図中「コピー句」と記載)、9,10は各々プログラム解析部2が作成した解析結果シート(定義部)(9)と解析結果シート(実行部)(10)、11,12は入力シート作成部3が作成したシミュレーション用シート(11)とブレイクポイント用シート(12)であり、13はPAD作成部4が作成したPADであり、14は本例のテストコマンドファイル作成システムが作成したテストコマンドファイルである。
7 to 14 are data generated by the CPU program execution and stored in the storage device, 7 is a test command file creation target program (described as “program source” in the figure), and 8 is used by the
プログラム7は、図2A,Bに示すように、当該プログラム7で使用する変数部分15と、プログラム7の実行部分16からなる。
As shown in FIGS. 2A and 2B, the
プログラム制御部2aは、入力装置1での操作者による追加、修正等の指示入力操作に応じて、プログラム解析部2、入力シート作成部3、PAD作成部3、PAD制御部5、テストコマンドファイル作成部6を起動、制御する。
The
プログラム解析部2は、プログラム7の解析を、図2A,Bに示す変数部分15とプログラムの実行部分16とに分けて、図8に示す手順で行い、図3に詳細を示す解析結果シート(定義部)9と、図4に詳細を示す解析結果シート(実行部)10を生成する。
The
入力シート作成部3は、プログラム解析部2の解析結果である解析結果シート(定義部)9と解析結果シート(実行部)10を用いて、図9に示す手順を実行し、図5に詳細を示すシミュレーション用シート11と、図6に詳細を示すブレイクポイント用シート12を作成し、表示装置1aに出力する。
The input
PAD作成部4は、プログラム解析部2の解析結果である解析結果シート(定義部)9と解析結果シート(実行部)10を用いて、図10に示す手順を実行し、図7に詳細を示すPAD13を作成し、表示装置1aに出力する。
The
PAD制御部5は、PAD作成部4が作成して表示装置1aに表示したPAD13に対する、入力装置1での操作者による追加、修正等の指示入力操作に応じて、図12に示す手順を実行し、ブレークポイント用シート12に対する追加、修正等の補助入力を行う。
The
テストコマンドファイル作成部6は、シミュレーション用シート11とブレイクポイント用シート12からなる入力シートを用いて、図11に示す手順を実行し、テストコマンドファイル14を作成して出力する。
The test command
以下、このような構成からなるテストコマンドファイル作成システムの本発明に係る処理動作について具体的に説明する。 The processing operation according to the present invention of the test command file creation system having such a configuration will be specifically described below.
プログラム解析部2は、図8に示すように、プログラムの全行取り込み手順60と、行番号再付番手順61、定義部解析手順62、実行部解析手順63の順で処理を行う。プログラムの全行取り込み手順60は、図2A,Bに詳細を示す「COBOL」で記述されたプログラム7を順次に読み取る。
As shown in FIG. 8, the
そして、定義部解析手順62でCOBOLの定義文についての解析処理を行い、実行部解析手順63でCOBOLの実行処理の解析処理を行うことで、プログラム全体の全てのステップ(構文)に対する解析処理を行う。
Then, an analysis process is performed on the definition statement of the COBOL in the definition
プログラムの全行取り込み手順60では、プログラムファイルがEOFになるまで、プログラムファイルから1行入力する手順と、入力行数を+1カウントする手順、入力行を配列(内部メモリ)にスタックする手順を繰り返して、プログラムの全行を読み込む。
In the program all
行番号再付番手順61では、「0」を行番号スタックに設定した後、前処理のプログラムの全行取り込み手順60で配列にスタックしたデータi分、以下の手順を繰り返す。まず、行番号スタックが「0」であるか否かを判別し、「0」でなければ、配列(i)の先頭6桁が行番号スタック以上であるか否かを判定し、以上であれば、配列(i)の先頭6桁を行番号スタックに設定し、以上でなければ、桁行番号スタックに、配列(i)の先頭6桁を設定する。
In the line
その後、あるいは、上記行番号スタックが「0」であるか否かの判定で「0」であれば、配列(i)がコピー文であるか否かを判別する。 Thereafter, or if it is “0” in the determination of whether or not the line number stack is “0”, it is determined whether or not the array (i) is a copy statement.
コピー文であれば、コピー句行数に「0」を設定し、コピー句ファイルがEOFになるまで、コピー句行数のカウントアップを繰り返した後、コピー句行数を桁行番号スタックに加算する。 If it is a copy statement, set the number of copy phrase lines to “0”, repeat counting up the number of copy phrase lines until the copy phrase file reaches EOF, and then add the number of copy phrase lines to the digit line number stack. .
その後、あるいは、上記配列(i)がコピー文であるか否かの判定で、コピー文でなければ、次の配列に対する処理に移る。 After that, or when it is determined whether the array (i) is a copy sentence or not, if it is not a copy sentence, the process proceeds to the next array.
定義部解析手順62は、入力シート作成部3によるシミュレーション用シート11とブレイクポイント用シート12の作成、および、PAD作成部4によるPAD13の作成用に、COPY句(8)を展開した状態を作り出すものであり、変数部分(定義)15の先頭から実行部分16の前までを、図3に示す内容で展開し、解析結果シート(定義部)9を生成する。
The definition
すなわち、定義部解析手順62では、配列数(スタック数)i分、実行部分16における「PROCEDURE DIVISION」文が現れるまで、プログラムファイルから配列iの内容を読み込み、これが「プログラムID」、「ファイル関連」、「COPY句関連」のいずれであるかを判定し、それぞれの判定結果に応じた処理を行う。
That is, in the definition
例えば、配列iの内容が「プログラムID」、「ファイル関連」の何れでもなく、「COPY句関連」であれば、COPY句展開が必要であるか否かを判定し、必要であれば、COPY句ファイルから1行分入力する手順と、COPY句から読み込んだ1行内容を解析結果シート(定義部)9に設定する手順と、設定行数を+1カウントする手順とを、COPY句ファイルがEOFになるまで繰り返す。 For example, if the contents of the array i are neither “program ID” nor “file related” but “COPY phrase related”, it is determined whether or not COPY phrase expansion is necessary. If necessary, COPY is determined. The COPY phrase file contains an EOF procedure for inputting one line from the phrase file, a procedure for setting the contents of one line read from the COPY phrase in the analysis result sheet (definition part) 9, and a procedure for counting the number of set lines by one. Repeat until.
また、配列iの内容が「ファイル関連」であれば、COPY句展開が必要であるか否かを判定し、必要であれば、COPY句ファイルから1行分入力する手順と、COPY句から読み込んだ1行内容を解析結果シート(定義部)9に設定する手順と、設定行数を+1カウントする手順とを、COPY句ファイルがEOFになるまで繰り返す。 If the contents of the array i are “file related”, it is determined whether or not COPY phrase expansion is necessary. If necessary, a procedure for inputting one line from the COPY phrase file and reading from the COPY phrase are performed. The procedure for setting the contents of one line in the analysis result sheet (definition section) 9 and the procedure for counting the number of set lines by one are repeated until the COPY phrase file becomes EOF.
また、配列iの内容が「プログラムID」であれば、グローバルなメモリに退避させると共に、解析結果シート(定義部)9に設定する。尚、グローバルなメモリに退避させた「プログラムID」は、後のブレークポイント用シートの作成やPADの作成に用いる。 If the content of the array i is “program ID”, it is saved in a global memory and set in the analysis result sheet (definition part) 9. The “program ID” saved in the global memory is used to create a breakpoint sheet and PAD later.
このようにして、プログラム解析部2は、定義部解析手順62により、図3に示すように、解析結果シート(定義部)9として、FILE論理装置名17(ファイルに関わる定義のみ設定)、構造体記号名18(構造体の場合は01レベルの項目記号名称)、レベル19、項目記号名称20、属性21、桁数22に展開する。
In this way, the
実行部解析手順63は、入力シート作成部3によるシミュレーション用シート11とブレイクポイント用シート12の作成、および、PAD作成部4によるPAD13の作成用に、プログラムの実行部分16(命令群)を展開した状態を作り出すものであり、図4に示す処理内容で展開し、解析結果シート(実行部)10を生成する。
The execution
すなわち、実行部解析手順63では、配列数(スタック数)i分、プログラムの実行部分16における「PROCEDURE DIVISION」文から終わりまで、以下の処理を繰り返し行う。
That is, in the execution
まず、配列iの内容を、解析文エリアに設定する。この「解析文エリア」を使用することで、複数行に渡っている構文を1つの構文につなげる。 First, the contents of the array i are set in the analysis sentence area. By using this “analysis sentence area”, a syntax extending over a plurality of lines can be connected to one syntax.
例えば、配列の一部が、ある行において「配列(i)=MOVE ’1’」、次の行において「配列(i+1)= TO AITEM.」のようになっているとすると、まず、配列(i)の内容(MOVE ’1’)を解析文エリアに入れる。この部分が、上述の「配列iの内容を、解析文エリアに設定する」処理である。 For example, if a part of the array is “array (i) = MOVE '1 ′” in one row and “array (i + 1) = TO AITEM.” In the next row, first, the array ( The contents of i) (MOVE '1') are put in the analysis sentence area. This portion is the above-described process of “setting the contents of array i in the analysis sentence area”.
次に、以降の「構文のつなぎ処理」により、配列(i+1)の内容( TO AITEM.)を解析文エリアにつなげて入れ、その結果、解析文エリアの内容は「MOVE ’1’ TO AITEM.」となる。 Next, the contents (TO AITEM.) Of the array (i + 1) are connected to the analysis sentence area by the following “syntax connection processing”, and as a result, the contents of the analysis sentence area are “MOVE '1 ′ TO AITEM.”. "
「構文のつなぎ処理」では、まず、スペースをループ終了フラグに設定することで、複数行に渡っている構文をつなげる処理の終わりを示すフラグのクリア処理(初期化)を行い、その後、配列(i+1)において、ループ終了フラグに「END」が設定されるまで、つなげる処理を繰り返す(つなげ処理ループ)。 In “Syntax Joining”, first, by setting a space as the loop end flag, clearing (initializing) the flag that indicates the end of the process of joining the syntax that spans multiple lines, then the array ( In i + 1), the connection process is repeated until “END” is set in the loop end flag (connection process loop).
このつなげ処理ループでは、配列(i+1)において主要命令文群が存在するか否かを判定し、存在すれば、ループ終了フラグに「END」を設定して当該つなげ処理ループを抜けるようにし、また、存在しなければ、配列(i+1)における主要命令文が終了文であるか否かを判定し、終了文であれば、ループ終了フラグに「END」を設定して当該つなげ処理ループを抜けるようにし、終了文でなければ、解析文エリアに、配列(I+1)の先頭7文字から72文字目までを連結して記憶した後、余分なスペースを排除する。 In this connection processing loop, it is determined whether or not a main command statement group exists in the array (i + 1). If there is, a loop end flag is set to “END” so as to exit the connection processing loop. If it does not exist, it is determined whether or not the main command statement in the array (i + 1) is an end statement. If it is an end statement, “END” is set in the loop end flag to exit the connection processing loop. If the sentence is not an end sentence, the first 7 characters to the 72nd character of the array (I + 1) are concatenated and stored in the analysis sentence area, and then the extra space is eliminated.
このような複数行に渡っている構文をつなげる処理が終わりになったかどうかを判断する具体例では、例えば、上述の「配列(i+1)= TO AITEM.」の次が、「配列(i+2)=PERFORM A_SUB USING AITEM,BITEM.」となっていた場合、処理の終了と判断する。 In a specific example in which it is determined whether or not the process of connecting syntaxes extending over a plurality of lines has been completed, for example, the next to “array (i + 1) = TO AITEM.” Described above is “array (i + 2) = "PERFORM A_SUB USING AITEM, BITEM.", It is determined that the process is finished.
すなわち、配列(i+2)における「PERFORM」はCOBOLの命令文の1つなので、「配列(i)=MOVE ’1’」における「MOVE」文は配列=i+1で終わっていることになる。 That is, since “PERFORM” in the array (i + 2) is one of COBOL command statements, the “MOVE” statement in “array (i) = MOVE '1 ′” ends with array = i + 1.
このようにして、この構文をつなげる処理においては、1つ先の状態を判断して、構文が1ステップで終わっているのか複数ステップに渡っているのかを判断している。 In this way, in the process of connecting this syntax, the state one step ahead is determined, and it is determined whether the syntax ends in one step or multiple steps.
そして、ループ終了フラグに「END」が設定され当該つなげ処理ループを抜けると、命令文の階層レベルを算出し、算出した階層レベルと解析エリアに記憶した内容とを解析結果シート(実行部)10に設定し、次の配列(i)の処理に移る。 When “END” is set in the loop end flag and the connection processing loop is exited, the hierarchical level of the statement is calculated, and the calculated hierarchical level and the content stored in the analysis area are analyzed result sheet (execution unit) 10. To the next processing of the array (i).
このようにして、プログラム解析部2は、プログラム7の実行部分16の情報から、実行部解析手順63により、図4に示すように、解析結果シート(実行部)10として、SECTION名23、区分24(命令を特定の記号に置き換えたコードのことであり、PAD作成部4で使用する)、階層レベル25、行番号26、コーディング文27に展開する。
In this way, the
次に、図9を用いて、入力シート作成部3による、図5に示す、プログラムで使用する入出力ファイルやCALL文で実行される外部サブルーチンのテスト用のシミュレーション用シート11の作成処理動作と、図6に示す、テスト時に実行を中断しテストの状態を制御するブレイクポイント用シート12の作成処理動作を説明する。
Next, referring to FIG. 9, the input
本例の入力シート作成部3は、図9に示すように、プログラムで使用する入出力ファイルテスト用のシミュレーション用シートの作成処理64と、テスト時に実行を中断してテストの状態を制御するブレイクポイント用シートの作成処理65、および、CALL文で実行される外部サブルーチンのテスト用のシミュレーション用シートの作成処理66の順で処理を行い、シミュレーション用シート11とブレイクポイント用シート12とに分けて作成する。
As shown in FIG. 9, the input
シミュレーション用シートの作成処理64とCALL文で実行される外部サブルーチンのテスト用のシミュレーション用シートの作成処理66では、シミュレーション用シート11を、テストコマンドファイル作成部6でのテストコマンドファイル作成が容易となるように、図5に示すようにして、ファイル又はモジュール名30、代表構文31(外部サブルーチンをCALL文の代表例)、シミュレーション区分32(ファイルシミュレーション用と外部サブルーチンシミュレーション用の区別を設定)、記号名称33(引数の01レベルの項目記号名称)、レベル34、項目名35(項目記号名称のこと)、属性36、桁数37に展開する。
In the simulation
また、ブレイクポイント用シートの作成処理65では、ブレイクポイント用シート12を、テストコマンドファイル作成部6でのテストコマンドファイル作成が容易となるように、図6に示すようにして、行番号43、記号名称44(ブレイクポイントがどのSECTIONなのかを設定)、出力有無45(このブレイクポイントをテストコマンドファイルに出力するか否かをYES、NOで設定)に展開をする。
Also, in the breakpoint
入出力ファイルテスト用のシミュレーション用シートの作成処理64では、具体的には図9に示すように、まず、スペースを退避FILE論理装置名エリアに設定して退避FILE論理装置名エリアを初期化し、その後、図3に詳細を示す解析結果シート(定義部)9から1行ずつ入力して、EOFになるまで以下の処理を繰り返す。
In the I / O file test simulation
すなわち、入力行のFILE論理装置名が、退避FILE論理装置名エリアに設定したものと一致するか否かを判定し、一致しなければ、入力行のFILE論理装置名がスペースとなっているかを判定し、スペースになっていれば、解析結果シート(定義部)9から次の行を入力して処理を繰り返し、スペースでなければ、新たに当該FILE論理装置名の分のシミュレーション用シート11を作成すると共に、既に作成しておいたシミュレーション用シート11に、解析結果シート(定義部)9から読み込んだ1行の内容を設定出力する。
That is, it is determined whether or not the FILE logical unit name on the input line matches that set in the save FILE logical unit name area. If not, whether the FILE logical unit name on the input line is a space. If it is determined that there is a space, the next line is input from the analysis result sheet (definition unit) 9 and the process is repeated. If it is not a space, a
また、入力行のFILE論理装置名が、退避FILE論理装置名エリアに設定したものと一致すれば、既に作成しておいたシミュレーション用シート11に、解析結果シート(定義部)9から読み込んだ1行の内容を設定出力(追記)する。
Also, if the FILE logical unit name in the input line matches the one set in the save FILE logical unit name area, the
また、ブレイクポイント用シートの作成処理65では、図4に詳細を示す解析結果シート(実行部)10から1行ずつ入力して、EOFになるまで、CALL文で実行される外部サブルーチンのテスト用のシミュレーション用シートの作成処理66を含む以下の処理を繰り返す。
Also, in the breakpoint
すなわち、入力行の区分が、主要分岐命令の区分群に存在するものであるか否かを判定し、存在すれば、当該解析結果シート(実行部)10から読み込んだ1行の内容を、ブレークポイント用シート12に設定出力(追記)する。
That is, it is determined whether or not the input line category exists in the main branch instruction category group. If there is, the content of one line read from the analysis result sheet (execution unit) 10 is broken. A setting output (addition) is made to the
その後、CALL文で実行される外部サブルーチンのテスト用のシミュレーション用シートの作成処理66として、まず、入力行の区分がCALL文であるか否かを判定し、CALL文でなければ、解析結果シート(実行部)10における次の1行に対する処理に戻り、CALL文であれば、当該CALL文に関して既にシミュレーション用シートが作成済みであるか否かを判定する。
Thereafter, as a simulation
既にシミュレーション用シートが作成済みであれば、解析結果シート(実行部)10における次の1行に対する処理に戻り、作成済みでなければ、当該CALL文用に新たなシミュレーション用シートを作成し、解析結果シート(実行部)10から読み込んだ1行の内容から引数を取得し、解析結果シート(定義部)9から当該引数の情報を取得し、取得した引数の内容を、作成したシミュレーション用シートに設定出力(追記)する。 If a simulation sheet has already been created, the process returns to the processing for the next line in the analysis result sheet (execution unit) 10. If not created, a new simulation sheet is created for the CALL statement and analyzed. An argument is acquired from the content of one line read from the result sheet (execution unit) 10, information on the argument is acquired from the analysis result sheet (definition unit) 9, and the content of the acquired argument is stored in the created simulation sheet. Set output (append).
このようにして、入力シート作成部3は、シミュレーション用シートの作成処理64,66とブレイクポイント用シートの作成処理65により、図3に詳細を示す解析結果シート(定義部)9と図4に詳細を示す解析結果シート(実行部)10から、図5に示すように、ファイル又はモジュール名30、代表構文31、シミュレーション区分32、記号名称33、レベル34、項目名35、属性36、桁数37に展開されたシミュレーション用シート11と、図6に示すように、行番号43、記号名称44、出力有無45に展開されたブレイクポイント用シート12を生成する。
In this way, the input
次に、PAD作成部4による、解析結果シート(定義部)9と解析結果シート(実行部)10から、図7に詳細を示すPAD13を生成する処理について、図10を用いて説明する。
Next, processing for generating the
図7に示すPADは、図3に詳細を示す解析結果シート(定義部)と図4に詳細を示す解析結果シート(実行部)から生成された例を示しており、例えば、操作者がマウス等の入力装置を操作してPAD記号のセル58をクリックするとコメント59が表示されるように作成する。
The PAD shown in FIG. 7 shows an example generated from the analysis result sheet (definition part) shown in detail in FIG. 3 and the analysis result sheet (execution part) shown in detail in FIG. When a
このコメント59においては、解析結果シート(定義部)と解析結果シート(実行部)からその命令のブレイクポイントの行番号26、区分24、項目記号名称20、属性21、桁数22が展開される。
In this
このようなセル(58)とコメント(59)の作成は、以下に説明する、図10における処理67に示すようにして行われる。
Such creation of the cell (58) and the comment (59) is performed as shown in a
PAD作成部4は、図10に示すように、解析結果シート(実行部)から1行ずつEOFになるまで、読み込み、以下の処理を繰り返す。まず、読み込んだ行数と読み込んだ行の階層レベルから図形を張る位置(セル位置)を算出し、算出した位置(セル位置)に、読み込んだ行の区分から特定図形を張る。
As shown in FIG. 10, the
その後、読み込んだ行のコーディング文から変数を取り出し、解析結果シート(定義部)から該当の変数の情報を取得し、取得した変数の情報と読み込んだ行の情報から、セルのコメントに内容を埋め込む(処理67)。 Then, the variable is extracted from the coding statement of the read line, the information of the corresponding variable is acquired from the analysis result sheet (definition part), and the content is embedded in the cell comment from the acquired variable information and the read line information. (Processing 67).
このようにしてPAD作成部4で作成された図7に詳細を示すPADは、入力シート作成部3が生成した図5に詳細を示すシミュレーション用シート(11)と図6に詳細を示すブレークポイント用シート(12)と共に、表示装置1aに画面表示される。
The PAD shown in detail in FIG. 7 created by the
そして、操作者は、表示装置1aに表示されたシミュレーション用シート(11)とブレークポイント用シート(12)に対して、PADを参照しながら、入力装置を介して入力操作を行い、その入力結果に応じた内容に基づき、テストコマンドファイル作成部6が、テストコマンドファイル14を生成して出力する。
Then, the operator performs an input operation on the simulation sheet (11) and the breakpoint sheet (12) displayed on the display device 1a through the input device while referring to the PAD, and the input result The test command
操作者は、入力装置1を操作して、まず、図5のシミュレーション用シート(11)におけるチェックID(チェックリストのチェックID)38、値39、出力文形式40を手入力する。
The operator operates the
尚、図5のシミュレーション用シート(11)における出力文形式40は、入力シート作成部3により、幾つかの文(例えば、「D:DVのみ」、「S:SVのみ」、「ND:DV(無条件)」、「NS:DV,SV両方(無条件)」等)が設定されており、操作者の誤入力を防ぐようにしてある。
Note that the
また、図5のシミュレーション用シート(11)における行挿入28と行削除29は、操作者が入力装置1を操作して、表(シミュレーション用シート11)の行を増やしたり、特定の行を削除したりするのに使用される。これにより、操作者は、容易にシミュレーション用シート11を編集・作成することが可能となる。
In addition, the row insertion 28 and the
さらに、操作者は、入力装置1を操作して、図6のブレークポイント用シート(12)における行番号49、記号名称50(SECTION名)、レベル51、項目名52(項目記号名称)、属性53、桁数54、チェックID55(チェックリストのチェックID)、値56、出力文形式57を手入力する。
Further, the operator operates the
尚、図6のブレークポイント用シート(12)における出力文形式57は、入力シート作成部3により、幾つかの文(例えば、「D:DVのみ」、「S:SVのみ」、「ND:DV(無条件)」、「NS:DV,SV両方(無条件)」等)が設定されており、操作者の誤入力を防ぐようにしてある。
The
また、図6のブレークポイント用シート(12)における行挿入(41,46)と行削除(42,47)は、操作者が入力装置1を操作して、表(ブレークポイント用シート12)の行を増やしたり、特定の行を削除したりするのに使用される。これにより、操作者は、容易にブレークポイント用シート12を編集・作成することが可能となる。
In addition, line insertion (41, 46) and line deletion (42, 47) in the breakpoint sheet (12) of FIG. 6 are performed by the operator operating the
さらに、図6のブレークポイント用シート(12)における属性変更48は、値56のセル属性を属性53により設定することができる。
Furthermore, the
また、図6のブレークポイント用シート(12)における行番号49、記号名称50(SECTION名)、レベル51、項目名52(項目記号名称)、属性53、桁数54については、図7に詳細を示すPAD13を使用・参照することにより設定することが出来る。このようなPAD13を使用したPAD制御部5の処理動作例を図12を用いて説明する。
Also, the
図12に示すように、図7に示すPAD13においてセルがクリックされると(ステップ70)、PAD制御部5は、図13に詳細を示すブレイクポイント設定選択画面74を表示する(ステップ71)。
As shown in FIG. 12, when a cell is clicked in the
そして、このブレイクポイント設定選択画面74において、操作者(ユーザ)が、入力装置1を操作し、「キャンセル」を選択してクリックするとそのまま処理を終了するが、「ブレイクポイントのみ設定」を選択して「OK」をクリックすると、セルのコメント(59)と解析結果シート(定義部)9および解析結果シート(実行部)10から、図6に示すブレイクポイント用シート(12)の「ブレイクポイント」における「行番号」、「記号名称」、「出力有無」に関する情報を取り出し、ブレイクポイント用シート(12)の「ブレイクポイント」における当該欄(行番号、記号名称、出力有無)に設定する。
Then, on this breakpoint
また、ブレイクポイント設定選択画面74において、操作者(ユーザ)が、入力装置を操作し、「Set value/Display value条件設定」を選択して「OK」をクリックすると、セルのコメント(59)と解析結果シート(定義部)9および解析結果シート(実行部)10から、図6に示すブレイクポイント用シート(12)の「ブレイクポイント」における「行番号」、「記号名称」、「出力有無」に関する情報、および、ブレイクポイント用シート(12)の「Set value/Display value」における「行番号」、「記号名称」、「レベル」、「項目名称」、「属性」、「桁数」に関する情報を取り出し、ブレイクポイント用シート(12)の「ブレイクポイント」における当該欄(「行番号」、「記号名称」、「出力有無」)、および、「Set value/Display value」における当該欄(「行番号」、「記号名称」、「レベル」、「項目名称」、「属性」、「桁数」)に設定する。
On the breakpoint
このようにして作成された図6のブレイクポイント用シート(12)、および、図5のシミュレーション用シート(11)を用いて、テストコマンド作成部6は、図11に示す処理を実行して、図14に示すテストコマンドファイル(14)を生成する。
Using the breakpoint sheet (12) of FIG. 6 and the simulation sheet (11) of FIG. 5 created as described above, the test
図14に示すテストコマンドファイル(14)においては、図6のブレイクポイント用シート(12)の「ブレイクポイント」における各情報(行番号43、記号名称44、出力有無45)からブレイクポイントのテストコマンド75(ブレイクポイントを設定するコマンド)が、また、図6のブレイクポイント用シート(12)の「Set value/Display value」における各情報(行番号49、記号名称50、レベル51、項目名52、属性53、桁数54、チェックID55、値56、出力文形式57)からSet value/Display valueのテストコマンド76が、また、図5のシミュレーション用シート(11)におけるファイルシミュレーション情報(ファイル名又はモジュール名30、代表構文31、シミュレーション区分32、記号名称33、レベル34、項目名35、属性36、桁数37、チェックID38、値39、出力文形式40)からファイルシミュレーションのテストコマンド77が、そして、図5のシミュレーション用シート(11)における外部サブルーチンシミュレーション情報(ファイル名又はモジュール名30、代表構文31、シミュレーション区分32、記号名称33、レベル34、項目名35、属性36、桁数37、チェックID38、値39、出力文形式40)から外部サブルーチンシミュレーションのテストコマンド78が、それぞれ生成され、テストコマンドファイル14として出力される。
In the test command file (14) shown in FIG. 14, the breakpoint test command is obtained from each piece of information (
このようなテストコマンドファイル14を生成する処理動作を図11を用いて説明する。図11に示すように、テストコマンドファイル14の生成処理は、プログラムのブレイクポイント及びSet value/Display valueテストコマンドの出力処理68、ファイルシミュレーション及び外部サブルーチンシミュレーションの出力処理69の順で行う。
A processing operation for generating such a
まず、図6のブレイクポイント用シート(12)における「ブレイクポイントの表」と「Set value/Display valueの表」のそれぞれの行番号、記号名称を比較して問題が無いか否かを判別し、問題があればその旨を示すメッセージを表示し、問題がなければ、当該「ブレイクポイントの表」と「Set value/Display valueの表」からテストコマンド文を作成し、テストコマンドファイル(14)に出力し(ステップ68)、その後、図5のシミュレーション用シート(11)を1シートずつ入力してし、全のシートに対して以下の処理を繰り返す。 First, it is determined whether or not there is no problem by comparing the row numbers and symbol names of the “break point table” and the “set value / display value table” in the break point sheet (12) of FIG. If there is a problem, a message to that effect is displayed. If there is no problem, a test command statement is created from the “breakpoint table” and “Set value / Display value table”, and a test command file (14) (Step 68), and then the simulation sheets (11) of FIG. 5 are input one sheet at a time, and the following processing is repeated for all sheets.
すなわち、入力したシミュレーション用シートの内容をチェックして不正の有無を判定し、不正が有れば、その旨を示すメッセージを表示し、不正が無ければ、当該シミュレーション用シートからテストコマンド文を作成し、テストコマンドファイルに出力する(ステップ69)。 In other words, the contents of the input simulation sheet are checked to determine whether or not there are frauds. If there are frauds, a message to that effect is displayed. If there are no frauds, a test command statement is created from the simulation sheet. And output to a test command file (step 69).
以上、図1〜図14Cを用いて説明したように、本例では、ソースプログラムのデバッガ用のテストコマンドファイルを作成する際、ソースプログラムの字句解析および構文解析を行い、定義部の解析結果表と実行部の解析結果表とを生成し、定義部の解析結果表における各項目の一覧と各項目に対するデータ値を含む操作者からのデバッグ用設定情報を入力する欄とからなるシミュレーション用シートを生成すると共に、実行部の解析結果表における各命令の一覧と各命令に対する操作者からのブレイクポイントの設定の要否を含むデバッグ用制御情報を入力する欄からなるブレイクポイント用シートを生成し、これらのブレイクポイント用シートとシミュレーション用シートを画面表示し、そして、画面表示されたブレイクポイント用シートおよびシミュレーション用シートに対して、操作者が指定入力した情報を設定し、このような操作者指定入力情報が設定されたブレイクポイント用シートおよびシミュレーション用シートを用いてテストコマンドファイルを生成することを特徴とする。さらに、実行部の解析結果表から、当該ソースプログラムに対応するPADを生成して表示装置に表示し、表示したPADにおいて操作者が入力装置を操作して指定した箇所のPAD生成に用いた実行部の解析結果表における情報を読み出して当該箇所に表示し、そして、表示した実行部の解析結果表における情報を、操作者の入力装置からの操作指示に応じて、ブレイクポイント用シートに設定することを特徴とする。 As described above with reference to FIGS. 1 to 14C, in this example, when creating a test command file for a debugger of a source program, lexical analysis and syntax analysis of the source program are performed, and an analysis result table of the definition unit A simulation sheet consisting of a list of items in the analysis result table of the definition unit and a column for inputting setting information for debugging including data values for each item. And generating a breakpoint sheet consisting of a column for inputting debug control information including a list of each instruction in the analysis result table of the execution unit and whether or not a breakpoint needs to be set by the operator for each instruction, The breakpoint sheet and simulation sheet are displayed on the screen, and the breakpoint sheet displayed on the screen is displayed. Information specified by the operator is set for the test sheet and simulation sheet, and a test command file is generated using the breakpoint sheet and simulation sheet in which such operator-specified input information is set. It is characterized by. Furthermore, from the analysis result table of the execution unit, a PAD corresponding to the source program is generated and displayed on the display device, and the execution used to generate the PAD at the location specified by the operator operating the input device in the displayed PAD The information in the analysis result table of the part is read out and displayed at the corresponding location, and the information in the analysis result table of the displayed execution part is set in the breakpoint sheet according to the operation instruction from the operator input device It is characterized by that.
このように、本例では、ソースプログラムの解析処理においてテストコマンドファイルを作成するのに必要な項目を取り出し、テストで必要な情報を手入力するためのシート(シミュレーション用シート、ブレイクポイント用シート)および手入力を補助するPADを作成して画面表示し、操作者にこのシートおよびPADを使用して、テストで必要な情報を手入力させ、テストコマンドファイルを作成することにより、操作者(作業者)のスキルのレベルやテスト状況の変化にも即座に対応でき、誰でも容易にテストコマンドファイルの作成およびソースプログラムの変更に伴う再作成を行うことができる。 In this way, in this example, the sheets for extracting the items necessary for creating the test command file in the analysis process of the source program and manually entering the information necessary for the test (simulation sheet, breakpoint sheet) A PAD that assists manual input is created and displayed on the screen. By using this sheet and PAD, the operator manually inputs information necessary for the test and creates a test command file. Anyone can easily create test command files and re-create them when the source program is changed.
また、本例においては、処理の流れをボタンで行うようにし、この処理の流れを順番に行えるようにボタンの不活性、活性する機能を備えており、操作者は、操作ごとに活性化したボタンを押下することで簡単に操作が行えるようにしてある。 In addition, in this example, the flow of processing is performed by buttons, and the function of inactivating and activating buttons is provided so that the flow of processing can be performed in order, and the operator activates each operation. Easy operation by pressing a button.
また、本例では、ソースプログラムから読み取れた内容で、全てのファイルおよび外部ルーチンを示すシミュレーション用シートとブレイクポイント用シートを作成して表示すると共に、各シートには、テスト処理後の値の表示や分岐処理の値の設定等に必要な、操作者からの設定情報を入力するための欄を設けて表示する。特に、その補助機能として、PADを用いることにより、基本はプログラム自体の外部仕様での入力を極力意識した形でテストコマンドを作成できるようにし、かつ、プログラムの内容や言語を知らない初心者でも入力できるようになっている。 In this example, a simulation sheet and a breakpoint sheet indicating all files and external routines are created and displayed with the contents read from the source program, and values after the test processing are displayed on each sheet. And a column for inputting setting information from the operator necessary for setting the value of the branch process and the like. In particular, by using PAD as an auxiliary function, it is basically possible to create test commands in a form that is as conscious of input as possible in the external specifications of the program itself, and even for beginners who do not know the program content and language. It can be done.
また、本例では、ブレイクポイント用シートにおいて、標準のブレイクポイント作成にチェックされている箇所を外すことにより、標準のブレイクポイントの作成を行わないように制御でき、また、シュミレーション用シートにおいて、シュミレーションを作成するためのチェックを外すことにより、実際のファイルを読み込みテストする場合における不必要なファイルシミュレーションの作成を回避できる。 In this example, the breakpoint sheet can be controlled not to create a standard breakpoint by removing the part that is checked for creating a standard breakpoint. In the simulation sheet, By removing the check to create a file, it is possible to avoid creating unnecessary file simulations when reading and testing an actual file.
これにより、標準のテストコマンドの様に、出力するとプログラムによっては、文が長くなり、テストコマンドが見ずらくなる不具合や、テストで不必要に出力されるテスト結果に、ブレイクポイントの実行結果が表示がされるために、テスト結果が見ずらくなる不具合を回避できる。 As a result, as with standard test commands, depending on the program, the sentence becomes long and the test command is difficult to see. Since the display is made, it is possible to avoid the problem that the test result is difficult to see.
また、本例では、シート自体にファイルの名称をいつも表示し、かつテスト内容がわかるようにしており、作業の途中で作業を中断し、その後、作業を再開した際にも、操作者は、どのような条件でそのような値を設定しているのか、瞬時に思い出すことができ、間違えを最小限にできる。 In this example, the file name is always displayed on the sheet itself so that the contents of the test can be understood, and when the work is interrupted during the work and then resumed, the operator It is possible to instantly remember under what conditions such a value is set, and mistakes can be minimized.
尚、本発明は、図1〜図14Cを用いて説明した例に限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能である。例えば、本例では、1つのコンピュータ装置において各処理を実行する構成としているが、複数のコンピュータ装置で分散処理する構成としても良い。 In addition, this invention is not limited to the example demonstrated using FIGS. 1-14C, In the range which does not deviate from the summary, various changes are possible. For example, in this example, each process is executed by one computer device, but a configuration may be adopted in which distributed processing is performed by a plurality of computer devices.
また、図1においてシミュレーション用シート11とブレイクポイント用シート12はメモリ(主記憶装置)に記憶されているが、これらのシミュレーション用シート11とブレイクポイント用シート12をハードディスク等の外部記憶装置やCD−ROM等の記録媒体に記録しておくことにより、再利用することができる。
In FIG. 1, the
また、コンピュータの構成に関しても、キーボードや光ディスクの駆動装置の無いコンピュータ構成としても良い。また、本例では、光ディスクを記録媒体として用いているが、FD(Flexible Disk)等を記録媒体として用いることでも良い。また、プログラムのインストールに関しても、通信装置を介してネットワーク経由でプログラムをダウンロードしてインストールすることでも良い。 Further, the computer configuration may be a computer configuration without a keyboard or optical disk drive. In this example, an optical disk is used as a recording medium, but an FD (Flexible Disk) or the like may be used as a recording medium. As for the program installation, the program may be downloaded and installed via a network via a communication device.
1:入力装置、1a:表示装置、2:プログラム解析部、2a:プログラム制御部、3:入力シート作成部、4:PAD作成部、5:PAD制御部、6:テストコマンドファイル作成部、7:プログラムソース、8:コピー句、9:解析結果シート(定義部)、10:解析結果シート(実行部)、11:シミュレーション用シート、12:ブレイクポイント用シート、13:PAD、14:テストコマンドファイル、15:変数部分、16:実行部分、17:FILE論理装置名、18:構造体記号名、19:レベル、20:項目記号名称、21:属性、22:桁数、23:SECTION名、24:区分、25:階層レベル、26:行番号、27:コーディング文、28:行挿入、29:行削除、30:ファイル又はモジュール名、31:代表構文、32:シミュレーション区分、33:記号名称、34:レベル、35:項目名、36:属性、37:桁数、38:チェックID、39:値、40:出力文形式、41:行挿入、42:行削除、43:行番号、44:記号名称、45:出力有無、46:行挿入、47:行削除、48:属性変更、49:行番号、50:記号名称、51:レベル、52:項目名、53:属性、54:桁数、55:チェックID、56:値、57:出力文形式、58:セル、59:コメント、60:プログラムの全行取り込み手順、61:行番号再付番手順、62:定義部解析手順、63:実行部解析手順、64:シミュレーション用シートの作成処理64、65:ブレイクポイント用シートの作成処理、66:CALL文で実行される外部サブルーチンのテスト用のシミュレーション用シートの作成処理、67:処理(セルとコメントの作成処理)、68:プログラムのブレイクポイント及びSet value/Display valueテストコマンドの出力処理、69:ファイルシミュレーション及び外部サブルーチンシミュレーションの出力処理、74:ブレイクポイント設定選択画面、75:ブレイクポイントのテストコマンド、76:Set value/Display valueのテストコマンド、77:ファイルシミュレーションのテストコマンド、78:外部サブルーチンシミュレーションのテストコマンド。 1: input device, 1a: display device, 2: program analysis unit, 2a: program control unit, 3: input sheet creation unit, 4: PAD creation unit, 5: PAD control unit, 6: test command file creation unit, 7 : Program source, 8: Copy phrase, 9: Analysis result sheet (definition part), 10: Analysis result sheet (execution part), 11: Simulation sheet, 12: Breakpoint sheet, 13: PAD, 14: Test command File: 15: Variable part, 16: Execution part, 17: FILE logical unit name, 18: Structure symbol name, 19: Level, 20: Item symbol name, 21: Attribute, 22: Number of digits, 23: SECTION name, 24: Division, 25: Hierarchy level, 26: Line number, 27: Coding sentence, 28: Insert line, 29: Delete line, 30: File or module name, 31: Table syntax, 32: simulation classification, 33: symbol name, 34: level, 35: item name, 36: attribute, 37: number of digits, 38: check ID, 39: value, 40: output sentence format, 41: line insertion 42: line deletion, 43: line number, 44: symbol name, 45: output presence, 46: line insertion, 47: line deletion, 48: attribute change, 49: line number, 50: symbol name, 51: level, 52: Item name, 53: Attribute, 54: Number of digits, 55: Check ID, 56: Value, 57: Output sentence format, 58: Cell, 59: Comment, 60: Procedure for fetching all lines of a program, 61: Line number Renumbering procedure, 62: Definition part analysis procedure, 63: Execution part analysis procedure, 64: Simulation sheet creation process 64, 65: Breakpoint sheet creation process, 66: External subroutine executed by CALL statement Process for creating a test simulation sheet, 67: Process (cell and comment creation process), 68: Program breakpoint and Set value / Display value test command output process, 69: File simulation and external subroutine simulation output Process: 74: Breakpoint setting selection screen, 75: Breakpoint test command, 76: Set value / Display value test command, 77: File simulation test command, 78: External subroutine simulation test command.
Claims (6)
上記ソースプログラムの字句解析および構文解析を行い、
上記ソースプログラムの定義部から各定義文を読み出すと共に、当該定義文におけるコピー句の内容をコピー句ファイルから読み込み、上記各定義文毎および上記各コピー句の内容毎に、構造体記号名称とレベル、項目記号名称、属性、桁数を登録した定義部の解析結果表を生成して記憶装置に格納し、かつ、上記ソースプログラムの実行部における各実行文を読み出し、各実行文毎に、セクション名と区分、階層レベル、行番号、コーディング文に分けて登録した実行部の解析結果表を生成して記憶装置に格納する解析手段と、
上記定義部の解析結果表を記憶装置から読み込み該定義部の解析結果表における登録内容と、当該定義文および当該コピー句に対して操作者がテスト用に設定するデータ値を入力する欄とからなるシミュレーション用シートを生成して記憶装置に格納する第1の入力シート生成手段と、
上記実行部の解析結果表を記憶装置から読み込み該実行部の解析結果表から各命令を順次に抽出し、抽出した各命令の一覧と、各命令に対して、当該命令をブレイクポイントとして上記テストコマンドファイルに出力するか否かを操作者が設定する入力欄とからなるブレイクポイント用シートを生成して記憶装置に格納する第2の入力シート生成手段と、
該第2の入力シート生成手段が生成したブレイクポイント用シートと上記第1の入力シート生成手段が生成したシミュレーション用シートを記憶装置から読み出して画面表示する表示手段と、
画面表示されたブレイクポイント用シートおよびシミュレーション用シートにおける各入力欄に対して、操作者が指定入力した情報を設定する入力手段と、
該入力手段が操作者からの指定入力情報を設定したブレイクポイント用シートおよびシミュレーション用シートを用いてテストコマンドファイルを生成して出力するコマンド作成手段と
を有することを特徴とするテストコマンドファイル作成システム。 A computer system for creating a test command file for a debugger of a source program described in COBOL,
Perform lexical analysis and syntax analysis of the above source program,
Reads each definition sentence from the definition of the source program, the contents of Turkey Phi clause put in the definition statement read from the copy clause file for each content of the each definition each sentence and each copy clause structure symbol Generate an analysis result table of the definition part in which the name and level, item symbol name, attribute, and number of digits are registered, store it in the storage device, and read out each executable statement in the execution part of the source program. In addition, an analysis means for generating an analysis result table of the execution unit registered by dividing it into a section name and classification, a hierarchy level, a line number, and a coding statement and storing it in a storage device,
Reading the definition part analysis result table from the storage device and registering contents in the definition part analysis result table and a column for inputting data values set for testing by the operator for the definition sentence and the copy phrase A first input sheet generating means for generating a simulation sheet and storing it in a storage device;
The analysis result table of the execution unit is read from the storage device, each instruction is sequentially extracted from the analysis result table of the execution unit, the list of each extracted instruction, and the test with the instruction as a breakpoint for each instruction A second input sheet generating means for generating a breakpoint sheet including an input field for an operator to set whether to output to a command file and storing the sheet in a storage device;
Display means for reading out the breakpoint sheet generated by the second input sheet generating means and the simulation sheet generated by the first input sheet generating means from the storage device and displaying them on the screen;
An input means for setting information designated and input by the operator for each input field in the breakpoint sheet and the simulation sheet displayed on the screen,
A test command file creation system characterized in that the input means has command creation means for generating and outputting a test command file using a breakpoint sheet and a simulation sheet in which designated input information from an operator is set .
上記定義部の解析結果表と上記実行部の解析結果表を記憶装置から読み込み、該定義部の解析結果表と実行部の解析結果表から、当該ソースプログラムに対応するPADを生成して表示装置に出力して表示する手段と、
表示装置に表示したPADにおいて操作者が入力装置を操作して指定した箇所のPAD生成に用いた上記定義部の解析結果表と実行部の解析結果表における行番号、区分、項目記号名称、属性、桁数を含む情報を読み出して当該箇所に表示する手段と、
表示した行番号、区分、項目記号名称、属性、桁数を含む情報を、操作者の入力装置からの操作指示に応じて、上記ブレイクポイント用シートに設定する手段と
を有することを特徴とするテストコマンドファイル作成システム。 The test command file creation system according to claim 1,
An analysis result table of the definition unit and an analysis result table of the execution unit are read from a storage device, and a PAD corresponding to the source program is generated from the analysis result table of the definition unit and the analysis result table of the execution unit and displayed. Means for outputting and displaying
In the PAD displayed on the display device, the line number, category, item symbol name, and attribute in the analysis result table of the above definition part and the analysis result table of the execution part used for PAD generation at the location specified by the operator operating the input device , Means for reading out information including the number of digits and displaying the information at the location;
And means for setting information including the displayed line number, category, item symbol name, attribute, and number of digits in the breakpoint sheet in accordance with an operation instruction from an operator input device. Test command file creation system.
上記コンピュータは、プログラムされたコンピュータ処理を実行する手段として解析手段と第1の入力シート生成手段、第2の入力シート生成手段、表示手段、入力手段、コマンド作成手段を具備し、
上記解析手段により、
上記ソースプログラムの字句解析および構文解析を行い、上記ソースプログラムの定義部から各定義文を読み出すと共に、当該定義文におけるコピー句の内容をコピー句フィアルから読み込み、上記各定義文毎および上記各コピー句の内容毎に、構造体記号名称とレベル、項目記号名称、属性、桁数を登録した定義部の解析結果表を生成して記憶装置に格納し、かつ、上記ソースプログラムの実行部における各実行文を読み出し、各実行文毎に、セクション名と区分、階層レベル、行番号、コーディング文に分けて登録した実行部の解析結果表を生成して記憶装置に格納する第1の手順を実行し、
上記第1の入力シート生成手段により、
上記定義部の解析結果表を記憶装置から読み込み該定義部の解析結果表における登録内容と、当該定義文および当該コピー句に対して操作者がテスト用に設定するデータ値を入力する欄とからなるシミュレーション用シートを生成して記憶装置に格納する第2の手順を実行し、
上記第2の入力シート生成手段により、
上記実行部の解析結果表を記憶装置から読み込み該実行部の解析結果表から各命令を順次に抽出し、抽出した各命令の一覧と、各命令に対して、当該命令をブレイクポイントして上記テストコマンドファイルに出力するか否かを操作者が設定する入力欄とからなるブレイクポイント用シートを生成して記憶装置に格納する第3の手順を実行し、
上記表示手段により、
上記第3の手順で生成したブレイクポイント用シートと上記第2の手順で生成したシミュレーション用シートを記憶装置から読み出して画面表示する第4の手順を実行し、
上記入力手段により、
画面表示されたブレイクポイント用シートおよびシミュレーション用シートにおける各入力欄に対して、操作者が指定入力した情報を設定する第5の手順を実行し、
上記コマンド作成手段により、
上記第5の手順で操作者からの指定入力情報を設定したブレイクポイント用シートおよびシミュレーション用シートを用いてテストコマンドファイルを生成して出力する第6の手順を実行する
ことを特徴とするテストコマンドファイル作成方法。 A test command file creation method for creating a test command file for a debugger of a source program from a source program described in COBOL by a computer ,
The computer includes an analysis unit and a first input sheet generation unit, a second input sheet generation unit, a display unit, an input unit, and a command generation unit as a unit for executing programmed computer processing.
By the above analysis means,
Performs lexical analysis and syntax analysis of the source program, reads each definition sentence from the definition of the source program, reads the contents of Turkey Phi clause put in the definition statement from the copy clause Fiaru, each defined each sentence and For each content of each copy phrase, an analysis result table of a definition part in which structure symbol names and levels, item symbol names, attributes, and the number of digits are registered is generated and stored in a storage device, and the source program is executed. The first execution statement is read out, and an analysis result table of the execution unit registered for each execution statement divided into section name and division, hierarchy level, line number, and coding statement is generated and stored in the storage device. procedure is executed,
By the first input sheet generating means,
Reading the definition part analysis result table from the storage device and registering contents in the definition part analysis result table and a column for inputting data values set for testing by the operator for the definition sentence and the copy phrase A second procedure of generating a simulation sheet and storing it in a storage device,
By the second input sheet generating means,
The analysis result table of the execution unit is read from the storage device, each instruction is sequentially extracted from the analysis result table of the execution unit, a list of each extracted instruction, and the instruction is a breakpoint for each instruction. A third step of generating a breakpoint sheet including an input field set by the operator as to whether or not to output the test command file and storing the sheet in the storage device;
By the display means,
Executing the fourth procedure of reading the breakpoint sheet generated in the third procedure and the simulation sheet generated in the second procedure from the storage device and displaying them on the screen;
By the above input means,
Execute a fifth procedure for setting information designated and input by the operator for each entry field in the breakpoint sheet and simulation sheet displayed on the screen,
By the above command creation means,
A sixth procedure for generating and outputting a test command file using the breakpoint sheet and the simulation sheet in which designated input information from the operator is set in the fifth procedure is executed. How to create a test command file.
上記コンピュータは、プログラムされたコンピュータ処理を実行する手段としてPAD作成手段とPAD制御手段を具備し、
上記PAD作成手段により、
上記定義部の解析結果表と上記実行部の解析結果表を記憶装置から読み込み、該定義部の解析結果表と実行部の解析結果表から、当該ソースプログラムに対応するPADを生成して表示装置に出力して表示する手順を実行し、
上記PAD制御手段により、
上記表示装置に表示したPADにおいて操作者が入力装置を操作して指定した箇所のPAD生成に用いた上記定義部の解析結果表と実行部の解析結果表における行番号、区分、項目記号名称、属性、桁数を含む情報を読み出して当該箇所に表示する手順を実行し、
上記PAD作成手段により、
上記表示した行番号、区分、項目記号名称、属性、桁数を含む情報を、操作者の入力装置からの操作指示に応じて、上記ブレイクポイント用シートに設定する手順を実行する
ことを特徴とするテストコマンドファイル作成方法。 A test command file creation method according to claim 3,
The computer includes a PAD creation means and a PAD control means as means for executing programmed computer processing,
By the PAD creation means,
An analysis result table of the definition unit and an analysis result table of the execution unit are read from a storage device, and a PAD corresponding to the source program is generated from the analysis result table of the definition unit and the analysis result table of the execution unit and displayed. Follow the steps to print and display
By the PAD control means,
In the PAD displayed on the display device, the line number, classification, item symbol name in the analysis result table of the definition unit and the analysis result table of the execution unit used for generating the PAD of the place specified by the operator operating the input device, Execute the procedure to read the information including the attribute and the number of digits and display it in the relevant place,
By the PAD creation means,
A procedure for setting information including the displayed line number, category, item symbol name, attribute, and number of digits in the breakpoint sheet in accordance with an operation instruction from the operator's input device is executed. A test command file creation method characterized by the above.
上記ソースプログラムの字句解析および構文解析を行い、上記ソースプログラムの定義部から各定義文を読み出すと共に、当該定義文におけるコピー句の内容をコピー句フィアルから読み込み、上記各定義文毎および上記各コピー句の内容毎に、構造体記号名称とレベル、項目記号名称、属性、桁数を登録した定義部の解析結果表を生成して記憶装置に格納し、かつ、上記ソースプログラムの実行部における各実行文を読み出し、各実行文毎に、セクション名と区分、階層レベル、行番号、コーディング文に分けて登録した実行部の解析結果表を生成して記憶装置に格納する第1の手順と、
上記定義部の解析結果表を記憶装置から読み込み該定義部の解析結果表における登録内容と、当該定義文および当該コピー句に対して操作者がテスト用に設定するデータ値を入力する欄とからなるシミュレーション用シートを生成して記憶装置に格納する第2の手順と、
上記実行部の解析結果表を記憶装置から読み込み該実行部の解析結果表から各命令を順次に抽出し、抽出した各命令の一覧と、各命令に対して、当該命令をブレイクポイントして上記テストコマンドファイルに出力するか否かを操作者が設定する入力欄とからなるブレイクポイント用シートを生成して記憶装置に格納する第3の手順と、
上記第3の手順で生成したブレイクポイント用シートと上記第2の手順で生成したシミュレーション用シートを記憶装置から読み出して画面表示する第4の手順と、
画面表示されたブレイクポイント用シートおよびシミュレーション用シートにおける各入力欄に対して、操作者が指定入力した情報を設定する第5の手順と、
上記第5の手順で操作者からの指定入力情報を設定したブレイクポイント用シートおよびシミュレーション用シートを用いてテストコマンドファイルを生成して出力する第6の手順。 A program for causing a computer to execute the following procedures to create a test command file for a debugger of the source program from the source program described in COBOL.
Performs lexical analysis and syntax analysis of the source program, reads each definition sentence from the definition part of the source program, reads the contents of the copy phrase in the definition sentence from the copy phrase file, and for each definition sentence and each copy For each phrase content, generate an analysis result table of the definition part in which the structure symbol name and level, item symbol name, attribute, and number of digits are registered, store it in the storage device, and each in the execution part of the source program A first procedure of reading an executable statement, generating an analysis result table of the execution unit registered separately for each executable statement by section name and division, hierarchy level, line number, and coding statement, and storing them in a storage device;
Reading the definition part analysis result table from the storage device and registering contents in the definition part analysis result table and a column for inputting data values set for testing by the operator for the definition sentence and the copy phrase A second procedure for generating a simulation sheet and storing it in a storage device;
The analysis result table of the execution unit is read from the storage device, each instruction is sequentially extracted from the analysis result table of the execution unit, a list of each extracted instruction, and the instruction is a breakpoint for each instruction. A third procedure for generating a breakpoint sheet including an input field for an operator to set whether to output to a test command file and storing it in a storage device;
A fourth procedure in which the breakpoint sheet generated in the third procedure and the simulation sheet generated in the second procedure are read from the storage device and displayed on the screen;
A fifth procedure for setting information designated and input by the operator for each input field in the breakpoint sheet and the simulation sheet displayed on the screen;
A sixth procedure for generating and outputting a test command file using the breakpoint sheet and the simulation sheet in which the designated input information from the operator is set in the fifth procedure.
上記定義部の解析結果表と上記実行部の解析結果表を記憶装置から読み込み、該定義部の解析結果表と実行部の解析結果表から、当該ソースプログラムに対応するPADを生成して表示装置に出力して表示する手順と、
上記表示装置に表示したPADにおいて操作者が入力装置を操作して指定した箇所のPAD生成に用いた上記定義部の解析結果表と実行部の解析結果表における行番号、区分、項目記号名称、属性、桁数を含む情報を読み出して当該箇所に表示する手順と、
上記表示した行番号、区分、項目記号名称、属性、桁数を含む情報を、操作者の入力装置からの操作指示に応じて、上記ブレイクポイント用シートに設定する手順。 The program according to claim 5, which causes a computer to execute the following procedures.
An analysis result table of the definition unit and an analysis result table of the execution unit are read from a storage device, and a PAD corresponding to the source program is generated from the analysis result table of the definition unit and the analysis result table of the execution unit and displayed. To output and display
In the PAD displayed on the display device, the line number, classification, item symbol name in the analysis result table of the definition unit and the analysis result table of the execution unit used for PAD generation at the location specified by the operator operating the input device, A procedure for reading out information including the attribute and the number of digits and displaying it in the relevant place,
A procedure for setting information including the displayed line number, category, item symbol name, attribute, and number of digits in the breakpoint sheet in accordance with an operation instruction from the operator's input device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006082641A JP4458491B2 (en) | 2006-03-24 | 2006-03-24 | Test command file creation system, method and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006082641A JP4458491B2 (en) | 2006-03-24 | 2006-03-24 | Test command file creation system, method and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2007257434A JP2007257434A (en) | 2007-10-04 |
| JP4458491B2 true JP4458491B2 (en) | 2010-04-28 |
Family
ID=38631594
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2006082641A Expired - Fee Related JP4458491B2 (en) | 2006-03-24 | 2006-03-24 | Test command file creation system, method and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4458491B2 (en) |
-
2006
- 2006-03-24 JP JP2006082641A patent/JP4458491B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2007257434A (en) | 2007-10-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0785510B1 (en) | Program debugging system for debugging a program having a graphical user interface | |
| JP4396994B2 (en) | Resource file translation verification method, apparatus, and program | |
| US7865870B2 (en) | Automatic content completion of valid values for method argument variables | |
| US7107182B2 (en) | Program and process for generating data used in software function test | |
| JPH02272645A (en) | Method for supporting program debugging | |
| US20080313208A1 (en) | Apparatus, system, and method for automated context-sensitive message organization | |
| CN118503125A (en) | Automatic unit test generation method and device based on thought chain prompt | |
| KR100915762B1 (en) | Pseudo translation within integrated development environment | |
| CN115062040B (en) | Visual code generation method and system based on SQL (structured query language) statement | |
| US8473903B2 (en) | Code edit apparatus and recording medium | |
| JP4874277B2 (en) | Automated test execution system | |
| JP2009104252A (en) | Debugging support apparatus and debugging support method | |
| Ducasse et al. | Pharo by Example 5.0 | |
| JP4458491B2 (en) | Test command file creation system, method and program | |
| CN118733007A (en) | Python-based code automatic generation and automatic checking method | |
| JPH11224211A (en) | Software inspection support device | |
| JP2002288004A (en) | Program source processing device, program source processing method, and program source processing program | |
| JPH0926897A (en) | Program analysis device and program analysis method | |
| JP3112623B2 (en) | Program production support equipment | |
| JP2016126700A (en) | Program verification device, program verification method, and program verification program | |
| JPH03260742A (en) | Program trace display method | |
| JP2008059515A (en) | Method, system, and program for displaying program execution process | |
| JP2004287869A (en) | Program execution monitoring device and method | |
| Mercer et al. | Computing and visualizing the impact of change with Java PathFinder extensions | |
| Chernetsov et al. | Development and Implementation of FRL Language Interpreter and Integrated Development Environment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20081126 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090814 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091013 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20091106 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100105 |
|
| 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: 20100205 |
|
| 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: 20100205 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4458491 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130219 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130219 Year of fee payment: 3 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130219 Year of fee payment: 3 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140219 Year of fee payment: 4 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |