JPH06250884A - Device for supporting module test - Google Patents

Device for supporting module test

Info

Publication number
JPH06250884A
JPH06250884A JP5040204A JP4020493A JPH06250884A JP H06250884 A JPH06250884 A JP H06250884A JP 5040204 A JP5040204 A JP 5040204A JP 4020493 A JP4020493 A JP 4020493A JP H06250884 A JPH06250884 A JP H06250884A
Authority
JP
Japan
Prior art keywords
module
test
control command
stub
under test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP5040204A
Other languages
Japanese (ja)
Other versions
JP3119400B2 (en
Inventor
Hiroyuki Sugawara
広行 菅原
Tatsuro Murakami
龍郎 村上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP05040204A priority Critical patent/JP3119400B2/en
Publication of JPH06250884A publication Critical patent/JPH06250884A/en
Application granted granted Critical
Publication of JP3119400B2 publication Critical patent/JP3119400B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

PURPOSE:To provide a module test supporting device capable of efficiently executing a module single body test. CONSTITUTION:An automatic driver generating part 6 automatically generates a driver 19 being a module for calling out a module to be tested based upon tested module information stored in an intermediate file 18. An automatic stub generating part 7 automatically generates a stub 20 being a module for simulating the operation of the low-order module of module to be tested based upon the tested module information stored in the file 18. An automatic debugger control command string generating part 8 specifies both the set position of the input data of a variable necessary for the execution of the module to be tested and a field to be practically used in an execution sentence and automatically generates a debugger control command for promoting the confirmation of setting and a result of the input data.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、モジュール構造を持つ
大規模ソフトウェアの、複数者による分散協調開発にお
いて、その試験工程の、特にモジュール単体試験を支援
する装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a device for supporting a test process, especially a module unit test, in a distributed cooperative development by a plurality of persons of a large scale software having a module structure.

【0002】[0002]

【従来の技術】近年、実用生産物に占めるソフトウェア
の割合が大幅に増加してきており、ソフトウェア開発効
率の向上が急務となっている。なかでも試験工程に要す
る労力は、全開発工程に要する稼働の約半分を占め、試
験工程の効率化が重要な課題となっている。
2. Description of the Related Art In recent years, the ratio of software to practical products has increased significantly, and there is an urgent need to improve software development efficiency. Especially, the labor required for the test process accounts for about half of the operation required for the entire development process, and the efficiency of the test process is an important issue.

【0003】一つのプログラムのサブプログラム、サブ
ルーチン、またはプロシージャをモジュール、それらを
試験することをモジュール試験と呼ぶことにすると、モ
ジュール構造を持つ大規模ソフトウェアのモジュール試
験においては、入力パラメータを設定しそのモジュール
を起動する疑似プログラム(以後、ドライバと呼ぶ)
や、そのモジュールによって呼び出されるプログラムの
疑似プログラム(以後、スタブと呼ぶ)を多数作成しな
ければならない。また、そのモジュールの動作に影響す
る多数の入力パラメータや外部変数に試験の条件に応じ
て適当な値を設定しなければならない。
Subprograms, subroutines, or procedures of one program are called modules, and testing them is called a module test. In a module test of large-scale software having a module structure, input parameters are set. Pseudo program that starts a module (hereafter called a driver)
Or, many pseudo programs (hereinafter referred to as stubs) of programs called by the module must be created. In addition, many input parameters and external variables that affect the operation of the module must be set to appropriate values according to the test conditions.

【0004】分散開発環境下では、独立工程であるソー
スコード作成の段階で高品質を確保することが後工程の
効率化に大きく寄与する。プログラム部品であるソース
モジュール単位を対象としたモジュール試験は、この目
的に合致したものであるが、上記のように試験環境準備
やデータ設定に時間がかかることが大きな阻害要因とな
っている。
In a distributed development environment, ensuring high quality at the stage of source code creation, which is an independent process, greatly contributes to the efficiency of subsequent processes. The module test targeting the source module unit, which is a program component, meets this purpose, but it takes a lot of time to prepare the test environment and set the data as described above, which is a major obstacle.

【0005】スタブおよびドライバの自動生成や入力パ
ラメータ等の設定に関して、種々の方法が提案されてい
るが、予めテスト・ケース(入力と予想出力)を非手続
き言語でコード化し、データ・ベースに保存し、これを
もとに自動試験を行なうものがある(D.J.Panzl 'Autom
atic Software Test Drivers,' Computer, 11(4), 197
8. )。これはトップダウンテストの場合はスタブの代
わりとしても使用できるが、被試験モジュールから呼ば
れる存在しないモジュールに対するテストケースを予め
書いておく必要がある。
Various methods have been proposed for automatic generation of stubs and drivers and setting of input parameters, etc., but test cases (input and expected output) are encoded in advance in a non-procedural language and saved in a database. However, there are some that perform an automatic test based on this (DJPanzl 'Autom
atic Software Test Drivers, 'Computer, 11 (4), 197
8.). This can be used as a substitute for a stub in the case of top-down test, but it is necessary to write in advance a test case for a nonexistent module called from the module under test.

【0006】[0006]

【発明が解決しようとする課題】しかし、今日、ソフト
ウェア規模が増大し、モジュール構造化が進む一方、分
散・分担協調開発による効率化が行われてきており、上
記方法では各モジュール毎に必要なテスト・ケースを全
て予め作成する必要があり、また、スタブを自動生成し
ようとする場合には、存在しないモジュールのテスト・
ケースを作成し、トップダウン的に試験を行わなくては
いけないため、モジュール単体試験支援としては稼働が
大きすぎる上に、分散並行開発の利点を損なう場合もあ
る。
However, today, as the scale of software increases and the modularization of modules progresses, the efficiency is increased by distributed / shared cooperative development. In the above method, it is necessary for each module. All test cases need to be created in advance, and if you want to automatically generate stubs, you can
Since it is necessary to create a case and perform the test from the top down, the operation is too large as a module unit test support, and the advantage of distributed parallel development may be impaired.

【0007】また、テスト・ケースの作成に着目すれ
ば、実際には被試験モジュール内で参照されない入力デ
ータの値も設定しなくてはならない。
Further, focusing on the creation of the test case, the value of the input data that is not actually referred to in the module under test must be set.

【0008】本発明の目的は、モジュール単体試験を効
率的に行なうことができるモジュール試験支援装置を提
供することにある。
An object of the present invention is to provide a module test support device capable of efficiently performing a module unit test.

【0009】[0009]

【課題を解決するための手段】本発明の第1のモジュー
ル試験支援装置は、被試験モジュールを呼び出すモジュ
ールであるドライバを、被試験モジュール情報をもとに
自動的に生成するドライバ自動生成手段と、被試験モジ
ュールの下位モジュールの動作を擬似するモジュールで
あるスタブを、被試験モジュール情報をもとに自動的に
生成するスタブ自動生成手段と、被試験モジュールの実
行に必要な変数の入力データの設定個所の特定、および
実行文中で実際に使用されるフィールドの特定を行な
い、入力データの設定、結果の確認を促すデバッガ制御
コマンド列ファイルを自動的に生成するデバッガ制御コ
マンド列自動生成手段とを有する。
A first module test support device of the present invention is a driver automatic generation means for automatically generating a driver, which is a module for calling a module under test, based on information about the module under test. , A stub that automatically generates a stub that is a module that simulates the operation of the lower module of the module under test, based on the information of the module under test, and the input data of the variables necessary for the execution of the module under test. Debugger control command sequence automatic generation means that automatically generates a debugger control command sequence file that specifies the setting location and the field that is actually used in the execution statement, sets the input data, and prompts you to check the result. Have.

【0010】本発明の第2のモジュール試験支援装置
は、試験ログからテストケースを抽出し、試験データ管
理ファイルに登録する試験データ抽出・登録手段と、改
版後に自動生成されたドライバ、スタブおよびデバッガ
制御コマンド列ファイルと、改版前のドライバ、スタブ
および改版前のテストケースが付加されたデバッガ制御
コマンド列ファイルとを比較し、再利用可能なテストケ
ースを前記試験データ管理ファイルから抽出し、その入
力情報/出力情報を埋め込んだバッチモードのデバッガ
制御コマンド列ファイルを生成する試験データ再利用手
段とを有する。
A second module test support device of the present invention is a test data extraction / registration means for extracting a test case from a test log and registering it in a test data management file, and a driver, a stub and a debugger which are automatically generated after revision. The control command sequence file is compared with the debugger control command sequence file to which the pre-revision driver, stub, and pre-revision test case are added, and the reusable test case is extracted from the test data management file and its input And a test data reuse means for generating a batch mode debugger control command sequence file in which information / output information is embedded.

【0011】[0011]

【作用】本発明は、具体的には、以下のことを行なう。The present invention specifically performs the following.

【0012】(A)被試験モジュールを呼び出すドライ
バ、および被試験モジュールから呼ばれるスタブを自動
生成する。また、ドライバが被試験モジュールを呼び出
す時点での実行の一時停止、スタブが被試験モジュール
から呼び出された時点での実行の一時停止と、スタブの
入力パラメータの出力、スタブが被試験モジュールに結
果を返す時点での実行の一時停止、ドライバが被試験モ
ジュールから結果を受けとった時点での実行の一時停止
と、被試験モジュールの出力パラメータ値(これらが構
造を持つ場合は被試験モジュール内で作用を受ける可能
性のあるフィールドのみ)の表示をそれぞれ行なうデバ
ッガ制御コマンド列を自動生成する。
(A) A driver that calls a module under test and a stub called from the module under test are automatically generated. It also suspends execution when the driver calls the module under test, suspends execution when the stub is called from the module under test, outputs stub input parameters, and returns results to the module under test by the stub. Suspend execution on return, suspend execution when the driver receives a result from the module under test, and output parameter values for the module under test (if they have a structure, act within the module under test). Automatically generate a debugger control command string to display each field that may be received.

【0013】(B)被試験モジュールがプロセス定義で
ある場合において、この被試験モジュールに対するドラ
イバおよびスタブを自動生成する。また、ドライバが被
試験モジュールを起動する時点での実行の一時停止、ス
タブが被試験モジュールから呼び出された時点での実行
の一時停止と、スタブの入力パラメータの出力、スタブ
が被試験モジュールに結果を返す時点での実行の一時停
止を行なうデバッガ制御コマンド列を自動生成する。
(B) When the module under test is a process definition, the driver and stub for this module under test are automatically generated. It also suspends execution when the driver starts the module under test, suspends execution when the stub is called from the module under test, outputs stub input parameters, and returns the stub to the module under test. Automatically generate a debugger control command string that suspends execution when returning.

【0014】(C)被試験モジュールによって起動され
るモジュールがプロセス定義である時、これを疑似する
スタブと、被試験モジュールの信号の送受信に関わるプ
ロセスの疑似プロセスを自動生成する。また、信号受信
待ちの被試験モジュールに対し該当プロセスが信号を送
信する時点での実行の一時停止、被試験モジュールによ
ってプロセスが起動された時点での実行の一時停止と、
起動されたプロセスが受けとったパラメータの出力、被
試験モジュールから他プロセスが信号を受けとった時点
での実行の一時停止とその信号の出力を行なうデバッガ
制御コマンド列を自動生成する。
(C) When the module activated by the module under test is a process definition, a stub for simulating this is automatically generated and a pseudo process for a process relating to signal transmission / reception of the module under test. In addition, the execution is suspended when the process sends a signal to the module under test waiting for signal reception, and the execution is suspended when the process is activated by the module under test,
A debugger control command sequence for automatically outputting the parameters received by the started process, suspending the execution when another process receives a signal from the module under test, and outputting the signal is automatically generated.

【0015】(D)被試験モジュールの入力パラメータ
および外部定義変数のうち、被試験モジュール内で使用
される要素名とその型定義、これらが構造を持つ場合は
必要なフィールドとその型定義だけを表示し、また、被
試験モジュールによって呼ばれる外部定義モジュールの
出力パラメータのうち、被試験モジュール内で使用され
る要素名とその型定義、これらが構造を持つ場合は必要
なフィールドとその型定義だけを表示するデバッガ制御
コマンド列を自動生成する。
(D) Of the input parameters and externally defined variables of the module under test, the element names used in the module under test and their type definitions, and if these have a structure, only the necessary fields and their type definitions Of the output parameters of the externally defined module that are displayed and called by the module under test, only the element names and their type definitions used within the module under test, and if these have a structure, only the required fields and their type definitions. Automatically generate the debugger control command string to be displayed.

【0016】(E)信号受信待ち状態にある被試験モジ
ュールが、それに対し信号を送信するプロセスから受信
する信号の名前とパラメータのうち、被試験モジュール
内で使用される要素とその型定義、これらが構造を持つ
場合は必要なフィールドとその型定義だけを表示するデ
バッガ制御コマンド列を自動生成する。
(E) Among the names and parameters of the signals received by the module under test waiting for signal reception from the process of transmitting signals to them, the elements used in the module under test and their type definitions, and these If has a structure, it automatically generates a debugger control command string that displays only the required fields and their type definitions.

【0017】(F)上記で自動生成されたスタブ、ドラ
イバ、デバッガ制御コマンド列に加え、試験者が入力し
た情報およびデバッガ出力結果情報をシステム内に保持
する。そして、被試験モジュールが変更された場合、変
更前のデバッガ制御コマンド列と変更後のそれとを比較
し、実行の一時停止コマンド部分を対応付け、一時停止
時の試験者の入力情報を変更後のコマンド列ファイルに
自動追加する。また、変更を生じたモジュールの試験に
おいて得られたデバッガ出力結果情報と、システム内に
保持している変更前のモジュールに対する出力情報との
対応部分を自動抽出し、その対応部分を比較して一致し
ているかどうかを自動判定する。
(F) In addition to the automatically generated stub, driver, and debugger control command sequence, the information input by the tester and the debugger output result information are held in the system. When the module under test is changed, the debugger control command sequence before the change is compared with that after the change, the temporary stop command portion of the execution is associated, and the input information of the tester at the time of the temporary stop is changed. It is automatically added to the command string file. Also, the corresponding parts of the debugger output result information obtained in the test of the changed module and the output information for the module before the change held in the system are automatically extracted, and the corresponding parts are compared and compared. Automatically determine whether or not you are doing.

【0018】上記(A)により、ドライバやスタブが自
動生成され、人間がわざわざコーディングしたり、ソー
スコードを書き換えたりする必要がなくなり、また、被
試験モジュールの出力結果の確認が容易となる。これに
加え、上記(D)により、入力パラメータ値およびスタ
ブの出力パラメータ値の設定を容易かつ必要最小限に行
える。
According to the above (A), the driver and the stub are automatically generated, it is not necessary for a human to bother to code or rewrite the source code, and the output result of the module under test can be easily confirmed. In addition to this, the setting of the input parameter value and the output parameter value of the stub can be easily and minimally performed by the above (D).

【0019】上記(B)により、被試験モジュールがプ
ロセス定義の場合にも、上記作用が可能となる。
By the above (B), the above operation is possible even when the module under test has a process definition.

【0020】上記(C)により、被試験モジュールがプ
ロセスを起動したり、信号の送受信を行なう場合におい
ても、これに対するスタブが自動生成され、人間がわざ
わざコーディングしたり、ソースコードを書き換えたり
する必要がなくなる。また、これに加え、上記(E)に
より、スタブから送信される信号の設定を容易かつ必要
最小限に行える。
According to the above (C), even when the module under test activates a process or transmits / receives a signal, a stub for this is automatically generated, and it is necessary for a human to bother to code or rewrite the source code. Disappears. Moreover, in addition to this, the setting of the signal transmitted from the stub can be easily and minimally performed by the above (E).

【0021】上記(F)により、一度行った試験の再現
が可能になり、また、変更を生じたモジュールに対する
再試験にかかる作業を最小限に抑えることができる。
By the above (F), it is possible to reproduce the test once performed, and it is possible to minimize the work for retesting the module in which the change has occurred.

【0022】[0022]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments of the present invention will now be described with reference to the drawings.

【0023】ここでは、CHILL言語による大規模ソ
フトウェア開発に対する実施例を示す。関連のあるデー
タ定義、プロシージャ定義、大プロセス定義等の集まり
を、プログラム中のサブプログラム、サブルーチン、プ
ロシージャのモジュールと区別するためにCHILLモ
ジュールと呼ぶことにする。
Here, an embodiment for large-scale software development by the CHILL language will be shown. A group of related data definitions, procedure definitions, large process definitions, etc. is called a CHILL module to distinguish it from a module of a subprogram, a subroutine, or a procedure in a program.

【0024】図1は本発明の一実施例のモジュール試験
支援装置の構成図である。
FIG. 1 is a block diagram of a module test support device according to an embodiment of the present invention.

【0025】モジュール試験支援装置1は入出力装置4
と接続され、処理装置2と記憶装置3から構成されてい
る。処理装置2は構文・意味解析部5とドライバ自動生
成部6とスタブ自動生成部7とデバッガ制御コマンド列
自動生成部8とコンパイラ/リンカ9とデバッガ10と
ログ生成部11と試験データ抽出部12と試験データ登
録部13と試験データ再利用部14で構成されている。
記憶装置3はユーザ用作業領域15と試験データ管理フ
ァイル16を含んでいる。なお、各部の機能については
後述する。
The module test support device 1 is an input / output device 4
And a processing device 2 and a storage device 3. The processing device 2 includes a syntax / semantic analysis unit 5, a driver automatic generation unit 6, a stub automatic generation unit 7, a debugger control command sequence automatic generation unit 8, a compiler / linker 9, a debugger 10, a log generation unit 11, and a test data extraction unit 12. The test data registration unit 13 and the test data reuse unit 14 are included.
The storage device 3 includes a user work area 15 and a test data management file 16. The function of each unit will be described later.

【0026】図2はモジュール単体試験時の装置構成図
である。
FIG. 2 is a block diagram of the device during a module unit test.

【0027】まず、ソースプログラムである被試験モジ
ュール17を構文・意味解析部5に入力することによ
り、構文・意味解析されたソースコード情報を収めた中
間ファイル18を得る。以下に説明する、ドライバ自動
生成部6、スタブ自動生成部7、そしてデバッガ制御コ
マンド列自動生成部8は、それぞれこの中間ファイル1
8に保存された情報をもとに各ファイルを生成する。
First, the module under test 17, which is a source program, is input to the syntax / semantic analysis unit 5 to obtain an intermediate file 18 containing the source code information subjected to the syntax / semantic analysis. The driver automatic generation unit 6, the stub automatic generation unit 7, and the debugger control command sequence automatic generation unit 8 described below respectively use the intermediate file 1
Each file is generated based on the information stored in 8.

【0028】ドライバ自動生成部6は、中間ファイル1
8に収められた被試験モジュール情報を元に、以下の手
順でドライバ19を作成する。第1に、入出力パラメー
タの有無を調べる。被試験モジュールが入力パラメータ
あるいは出力パラメータを持つかどうか調べ、パラメー
タを伴う場合は、そのパラメータの変数名、型定義情報
を中間ファイル18から抽出し、ドライバモジュールフ
ァイルに型定義文の記述、パラメータ付被試験モジュー
ルの呼び出し文の記述をそれぞれ行なう。ここでは、入
力パラメータには、値は設定されていない。パラメータ
を伴わない場合は、被試験モジュールの呼び出し文だけ
を記述する。ただし、被試験モジュール呼び出し記述
は、被試験モジュールがプロシージャ(PROC)であ
るかプロセス(PROCESS)であるかで異なる。第
2に、被試験モジュールが他プロセスからの信号を受信
するかどうか調べる。もし、信号を受信する場合は、被
試験モジュールに対し信号を送信するスタブプログラム
の起動文をドライバモジュール19に追加する。第3
に、被試験モジュールが他プロセスに対し信号を送信す
るかどうか調べる。もし、信号を送信する場合は、被試
験モジュールからの信号を受信するスタブプログラムの
起動文をドライバモジュール19に追加する。
The driver automatic generation unit 6 uses the intermediate file 1
The driver 19 is created according to the following procedure based on the information on the module under test stored in FIG. First, the presence / absence of input / output parameters is checked. It is checked whether the module under test has an input parameter or an output parameter. When accompanied by a parameter, the variable name of the parameter and the type definition information are extracted from the intermediate file 18, and the type definition statement and the parameter are added to the driver module file. Describe the call statement of the module under test. Here, no value is set for the input parameter. If no parameter is included, describe only the call statement of the module under test. However, the module under test call description differs depending on whether the module under test is a procedure (PROC) or a process (PROCESS). Second, check whether the module under test receives a signal from another process. If a signal is to be received, a start statement of a stub program that sends a signal to the module under test is added to the driver module 19. Third
First, check whether the module under test sends a signal to another process. If a signal is to be transmitted, a start statement of a stub program that receives a signal from the module under test is added to the driver module 19.

【0029】次に、スタブ自動生成部7について説明す
る。スタブには、被試験モジュールによって呼び出され
るプロシージャあるいはプロセス、被試験モジュールと
信号を送信あるいは受信するプロセスがある。 (1)被試験モジュールによって他CHILLモジュー
ルのプロシージャが呼び出される場合、このCHILL
モジュール名と同名のCHILLモジュールを作成し、
同名のプロシージャを記述する。その呼び出されるモジ
ュールが入力パラメータ、あるいは出力パラメータを伴
うかどうかを調べ、パラメータを持つ場合は、その変数
定義に関する記述を追加する。 (2)また、被試験モジュールがプロセスを起動する場
合も、同様にして行なう。ただし、プロセスの場合は、
プロシージャではなくプロセス定義を記述する。 (3)被試験モジュールが他プロセスから信号を受信す
る場合、被試験モジュールのプロセスIDをパラメータ
として受けとり、そのIDに対して信号名対応に信号を
送信するプロセス定義を記述したCHILLモジュール
を作成する。信号がパラメータを持つ場合、パラメータ
変数の定義文を追加し、パラメータ付シグナルを送信す
る記述にする。 (4)また、被試験モジュールが他プロセスに対し信号
を送信する場合は、そのシグナルを信号名対応に受信す
るプロセス定義を記述する。
Next, the stub automatic generation unit 7 will be described. A stub is a procedure or process that is called by the module under test, or a process that sends or receives signals to or from the module under test. (1) If the module under test calls a procedure of another CHILL module, this CHILL
Create a CHILL module with the same name as the module name,
Describe the procedure with the same name. Check whether the called module has an input parameter or an output parameter, and if it has a parameter, add a description regarding the variable definition. (2) Also, when the module under test activates the process, the same process is performed. However, for processes,
Write a process definition, not a procedure. (3) When the module under test receives a signal from another process, the process ID of the module under test is received as a parameter, and a CHILL module describing a process definition for transmitting a signal corresponding to the signal name to the ID is created. . If the signal has a parameter, add the definition statement of the parameter variable to make the description to send the signal with parameter. (4) When the module under test transmits a signal to another process, describe the process definition that receives the signal corresponding to the signal name.

【0030】次に、デバッガ制御コマンド列自動生成部
8について説明する。この実施例で実際に対象とした交
換プログラムの特徴として、・手続き呼び出し関係が複
雑である、・スタティックデータとして状態を保持す
る、・パラメータをリスト形式で引き渡す、といったこ
とが挙げられる。これらの特徴を考慮し、以下のような
入力−出力モデルを考える。すなわち、被試験プログラ
ムの入力パラメータ、参照スタティックデータ、手続き
呼び出しの出力パラメータ、受信シグナルを入力、被試
験プログラムの出力パラメータ、設定スタティックデー
タ、手続き呼び出しの入力パラメータ、送信シグナルを
出力として、入力情報のセットでテストケースを規定
し、出力情報のセットで結果を判定する。
Next, the debugger control command sequence automatic generation unit 8 will be described. The features of the exchange program actually targeted in this embodiment include: complex procedure call relationships; holding state as static data; passing parameters in list format. Considering these characteristics, consider the following input-output model. That is, the input parameter of the program under test, the reference static data, the output parameter of the procedure call, the reception signal is input, the output parameter of the program under test, the setting static data, the input parameter of the procedure call, the transmission signal is output, and the input information The test case is defined by the set, and the result is judged by the set of output information.

【0031】前述のドライバ自動生成部6およびスタブ
自動生成部7で生成されたドライバ19およびスタブ2
0は、入力データが未設定である。デバッガ制御コマン
ド列自動生成部8は、この入力データの設定および出力
情報の確認を対話的に促すためのデバッガ制御コマンド
列ファイル21を生成する。すなわち、入力データ設定
箇所の特定、そして、その入力のうち実行文中で実際に
使用されるフィールドの特定を行なう。以下に、具体的
に説明する。
The driver 19 and the stub 2 generated by the driver automatic generation unit 6 and the stub automatic generation unit 7 described above.
In 0, the input data is not set. The debugger control command sequence automatic generation unit 8 generates a debugger control command sequence file 21 for interactively prompting the setting of the input data and the confirmation of the output information. That is, the input data setting location is specified, and the field of the input that is actually used in the execution statement is specified. The details will be described below.

【0032】入力は、被試験モジュールがドライバ19
から受けとるパラメータ、スタティックデータ、プロシ
ージャ呼び出しのリターンデータ、受信シグナルであ
る。デバッガ制御コマンド列自動生成部8は、ソースコ
ードを構文解析することにより得られた中間ファイル1
8の情報、および自動生成されたドライバ19、スタブ
20のソース情報を元に、ドライバ19が被試験モジュ
ールを呼び出す箇所、スタティックデータが最初に使用
される箇所、スタブ20が被試験モジュールに対しリタ
ーンデータを渡す箇所、スタブ20が被試験モジュール
に対しシグナルを送信する箇所をそれぞれ特定する。次
に、それらの入力がどのような構造を持っているか、ど
の入力の、どのフィールドが、実際に被試験モジュール
の実行文で使用されるかを特定する。こうしてデバッガ
制御コマンド列自動生成部8は、データ設定を必要とす
る箇所で実行を停止するコマンドを記述し、その停止時
に実行するデバッガコマンド、すなわち、変数のどのフ
ィールドの設定が必要なのか、またどういった型のデー
タを設定すれば良いのかを表示するコマンド記述、試験
者の入力データを受けとり設定するコマンド、データ設
定後自動的に実行を再開するコマンドをそれぞれ停止コ
マンドに対応付けて記述することによって、デバッガ制
御コマンド列ファイル21を生成する。
The input is the driver 19
These are parameters received from, static data, return data of procedure calls, and received signals. The debugger control command sequence automatic generation unit 8 is an intermediate file 1 obtained by parsing the source code.
8 and the automatically generated source information of the driver 19 and stub 20 where the driver 19 calls the module under test, where static data is first used, and the stub 20 returns to the module under test The location where the data is passed and the location where the stub 20 sends the signal to the module under test are specified. Next, it is specified what kind of structure those inputs have, what fields of which inputs are actually used in the executable statement of the module under test. In this way, the debugger control command sequence automatic generation unit 8 describes a command for stopping the execution at the place where data setting is required, and executes the debugger command at the time of the stop, that is, which field of the variable needs to be set, A command description that indicates what type of data should be set, a command that receives and sets the tester's input data, and a command that automatically resumes execution after setting the data are described in association with the stop command. As a result, the debugger control command sequence file 21 is generated.

【0033】一方、出力は、被試験モジュールのドライ
バ19へのリターンデータ、被試験モジュール内で設定
(変更)されたスタティックデータ、プロシージャ呼び
出しあるいはプロセス起動時の入力パラメータ、送信シ
グナルである。デバッガ制御コマンド列自動生成部8
は、入力に関する場合と同様にして、ドライバ19が被
試験モジュールからリターンデータを受け取る箇所、ス
タティックデータが設定される箇所、被試験モジュール
によってスタブ20が呼び出される(起動される)箇
所、スタブ20がシグナルを受けとる箇所をそれぞれ特
定する。次に、どの変数フィールドが、被試験モジュー
ルの実行文によって変更されたかを特定する。こうして
デバッガ制御コマンド列自動生成部8は、出力データ確
認を必要とする箇所で実行を停止するコマンド、その停
止時に確認を必要とするデータを出力し、特に被試験モ
ジュールの実行によって変更を生じた変数フィールドに
はそれが分かるマークを付けて表示するコマンドをそれ
ぞれデバッガ制御コマンド列ファイル21に記述する。
On the other hand, the output is return data to the driver 19 of the module under test, static data set (changed) in the module under test, input parameters at the time of procedure call or process activation, and transmission signal. Debugger control command sequence automatic generation unit 8
Is the same as in the case of input, where the driver 19 receives return data from the module under test, where static data is set, where the stub 20 is called (started) by the module under test, and stub 20 is Identify each location that receives the signal. Next, it identifies which variable field was changed by the executable statement of the module under test. In this way, the debugger control command sequence automatic generation unit 8 outputs the command for stopping the execution at the place where the output data confirmation is required and the data requiring the confirmation at the time of the stop, and the change is caused especially by the execution of the module under test. In the variable control field, commands to be displayed with a mark to show them are described in the debugger control command sequence file 21, respectively.

【0034】次に、試験データ抽出部12と試験データ
登録部13について説明する。交換プログラムは先に挙
げた特徴により、そのテストケースが複数の入力データ
のセットと出力データのセットとなるため、予め作成す
るのは非常に手間がかかる。一方、本発明のように対話
形式で入力データ・セットを与える場合、再試験を考慮
していかにテストケースを抽出するかが一つの課題とな
るが、試験データ抽出部12、試験データ登録部13に
よってこれを解決する。
Next, the test data extraction unit 12 and the test data registration unit 13 will be described. Since the exchange program has a set of a plurality of input data and a set of output data due to the above-mentioned features, it is very troublesome to create in advance. On the other hand, when an input data set is given interactively as in the present invention, one issue is how to extract the test case in consideration of the retest, but the test data extraction unit 12 and the test data registration unit 13 Solve this by.

【0035】開発者(試験者)は、被試験モジュール、
上記ドライバ19およびスタブ20からコンパイラ/リ
ンカ9によってロード・モジュール22を生成し、デバ
ッガ10にロードする。そして、デバッガ制御コマンド
列ファイル21によって規定される手順にしたがって、
入力情報を設定し、出力情報を確認する。デバッガ10
上でのこれらの過程はすべて、デバッガ10が生成する
試験ログファイル23に保存される。試験データ抽出部
12は、この試験ログファイル23を元に入力情報セッ
ト、出力情報セットを抽出し、試験データ登録部13は
テストケース・データベースである試験データ管理ファ
イル16に登録し、管理する。
The developer (tester) is the module under test,
The load module 22 is generated by the compiler / linker 9 from the driver 19 and the stub 20 and loaded into the debugger 10. Then, according to the procedure specified by the debugger control command sequence file 21,
Set the input information and check the output information. Debugger 10
All of these steps above are saved in the test log file 23 generated by the debugger 10. The test data extraction unit 12 extracts an input information set and an output information set based on the test log file 23, and the test data registration unit 13 registers and manages the test data management file 16 which is a test case database.

【0036】図3はモジュール再試験時の装置構成図で
ある。
FIG. 3 is a block diagram of the apparatus at the time of retesting the module.

【0037】被試験ソースコード改版時には、デグレー
ド確認のため、再試験が必要となる。しかし、一般にデ
バッガ制御コマンド列ファイルやテストケースファイル
を、そのまま改版時の再試験に流用することは困難であ
る。試験データ再利用部14は、以下の方法により、試
験データ抽出部12および試験データ登録部13によっ
て試験データ管理ファイル16にデータベース化されて
いる改版前の試験情報を、可能な限り再試験に適用す
る。具体的には、改版後のソースプログラム17から本
装置によって自動生成されたドライバ19、スタブ2
0、デバッガ制御コマンド列ファイル21と、改版前の
対応ファイル19’,20’,21’とをそれぞれ比較
し、特に実行停止箇所の対応関係を調べ、再利用可能な
テストケースを抽出する。停止箇所のソース行位置のズ
レは、実行文を比較することにより、動的にマッチング
をとる。そして、有効なテストケースの入力情報および
出力情報を改版後ソースコード試験用のデバッガ制御コ
マンド列ファイル21に埋め込んで、再利用可能部分に
ついては自動入力データ設定、自動結果判定できるよう
にした、バッチモードの再試験デバッガ制御コマンド列
ファイル24を生成する。これにより開発者は、ソース
コード修正にともない生じたテストケースのみ、再試験
デバッガ制御コマンド列ファイル24のサポートに従っ
てマニュアル試験すれば良い。
At the time of revision of the source code to be tested, retesting is required to confirm the degradation. However, it is generally difficult to divert the debugger control command sequence file and the test case file as they are to the retest at the time of revision. The test data reuse unit 14 applies the test information before revision stored in the test data management file 16 by the test data extraction unit 12 and the test data registration unit 13 to the retest as much as possible by the following method. To do. Specifically, the driver 19 and the stub 2 which are automatically generated by this apparatus from the revised source program 17
0, the debugger control command sequence file 21 and the corresponding files 19 ', 20', and 21 'before the revision are compared with each other, and in particular, the correspondence relationship at the execution stop portion is checked to extract a reusable test case. The source line position shift at the stop point is dynamically matched by comparing the executable statements. Then, by embedding the input information and output information of valid test cases in the debugger control command sequence file 21 for the source code test after revision, automatic input data setting and automatic result determination can be performed for reusable parts. Generate a retest debugger control command sequence file 24 for mode. As a result, the developer may manually test only the test cases generated by the source code modification according to the support of the retest debugger control command sequence file 24.

【0038】[0038]

【発明の効果】以上説明したように本発明は、以下に示
すような効果がある。 (1)請求項1の発明は、ドライバ、スタブおよびデバ
ッガ制御コマンド列ファイルを自動生成することによ
り、試験者は被試験モジュールの実行に必要な最小限の
入力データを設定し、かつ出力データを対話方式で確認
できるので、モジュール単体試験を効率的に行なうこと
ができる。また、モジュール試験以降の試験工程(結合
試験工程など)におけるモジュールの品質が向上し、モ
ジュールにバグが存在した場合の手戻りを削減できるた
め、試験工程に要する時間を短縮できる。さらに、試験
情報により、版管理されたモジュールの品質が保証され
る。 (2)請求項2の発明は、モジュールに変更や修正を生
じた場合、変更前のモジュールに対して行なった試験資
源を再利用することにより、モジュール単体試験を効率
的に行なうことができる。
As described above, the present invention has the following effects. (1) According to the first aspect of the invention, the tester sets the minimum input data necessary for the execution of the module under test and automatically outputs the output data by automatically generating the driver, stub, and debugger control command sequence files. Since it can be confirmed by the interactive method, the module unit test can be efficiently performed. Further, the quality of the module in the test process after the module test (such as the coupling test process) is improved, and the rework when a bug exists in the module can be reduced, so the time required for the test process can be shortened. In addition, the test information ensures the quality of the version-controlled module. (2) According to the second aspect of the present invention, when a module is changed or modified, the module unit test can be efficiently performed by reusing the test resources performed for the module before the change.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の一実施例のモジュール単体試験支援装
置の構成図である。
FIG. 1 is a configuration diagram of a module unit test support device according to an embodiment of the present invention.

【図2】モジュール単体試験時の装置構成図である。FIG. 2 is a device configuration diagram during a module unit test.

【図3】モジュール再試験時の装置構成図である。FIG. 3 is a device configuration diagram at the time of a module retest.

【符号の説明】 1 モジュール試験支援装置 2 処理装置 3 記憶装置 4 入出力装置 5 構文・意味解析部 6 ドライバ自動生成部 7 スタブ自動生成部 8 デバッガ制御コマンド列自動生成部 9 コンパイラ/リンカ 10 デバッガ 11 ログ作成部 12 試験データ抽出部 13 試験データ登録部 14 試験データ再利用部 15 ユーザ用作業領域 16 試験データ管理ファイル 17 ソースプログラム 18 中間ファイル 19、19’ ドライバ 20、20’ スタブ 21、21’ デバッガ制御コマンド列ファイル 22 ロード・モジュール 23 試験ログファイル 24 再試験デバッガ制御コマンド列ファイル[Explanation of symbols] 1 module test support device 2 processing device 3 storage device 4 input / output device 5 syntax / semantic analysis unit 6 driver automatic generation unit 7 stub automatic generation unit 8 debugger control command sequence automatic generation unit 9 compiler / linker 10 debugger 11 Log Creation Section 12 Test Data Extraction Section 13 Test Data Registration Section 14 Test Data Reuse Section 15 User Work Area 16 Test Data Management File 17 Source Program 18 Intermediate File 19, 19 'Driver 20, 20' Stub 21, 21 ' Debugger control command sequence file 22 Load module 23 Test log file 24 Retest Debugger control command sequence file

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 プログラム中のサブプログラム、サブル
ーチン、プロシージャである複数のモジュールによって
構成される大規模ソフトウェアのモジュール試験に対し
て、対話方式によって、被試験モジュールの実行に必要
な変数の入力のデータを設定し、出力データを確認する
ためのモジュール試験支援装置であって、 被試験モジュールを呼び出すモジュールであるドライバ
を、被試験モジュール情報をもとに自動的に生成するド
ライバ自動生成手段と、 被試験モジュールの下位モジュールの動作を擬似するモ
ジュールであるスタブを、被試験モジュール情報をもと
に自動的に生成するスタブ自動生成手段と、 被試験モジュールの実行に必要な変数の入力データの設
定個所の特定、および実行文中で実際に使用されるフィ
ールドの特定を行ない、入力データの設定、結果の確認
を促すデバッガ制御コマンド列ファイルを自動的に生成
するデバッガ制御コマンド列自動生成手段とを有するモ
ジュール試験支援装置。
1. Data for inputting variables necessary for executing a module under test by an interactive method for a module test of large-scale software composed of a plurality of modules that are subprograms, subroutines, and procedures in a program. Is a module test support device for setting and confirming output data, and a driver automatic generation means for automatically generating a driver, which is a module for calling a module under test, based on module information under test, Automatic stub generation means that automatically generates a stub that is a module that simulates the operation of the lower module of the test module based on the information of the module under test, and the setting location of the input data of the variables required to execute the module under test. The fields that are actually used in the executable statement. And a module test support device having a debugger control command sequence automatic generation means for automatically generating a debugger control command sequence file prompting the setting of input data and confirmation of the result.
【請求項2】 試験ログからテストケースを抽出し、試
験データ管理ファイルに登録する試験データ抽出・登録
手段と、 改版後に自動生成されたドライバ、スタブおよびデバッ
ガ制御コマンド列ファイルと、改版前のドライバ、スタ
ブおよび改版前のテストケースが付加されたデバッガ制
御コマンド列ファイルとを比較し、再利用可能なテスト
ケースを前記試験データ管理ファイルから抽出し、その
入力情報/出力情報を埋め込んだバッチモードのデバッ
ガ制御コマンド列ファイルを生成する試験データ再利用
手段とを有するモジュール試験支援装置。
2. A test data extraction / registration means for extracting a test case from a test log and registering it in a test data management file, a driver, stub and debugger control command sequence file automatically generated after revision, and a driver before revision. , A stub, and a debugger control command sequence file to which test cases before revision are added are compared, reusable test cases are extracted from the test data management file, and input / output information of the batch mode is embedded. A module test support device having a test data reuse means for generating a debugger control command sequence file.
JP05040204A 1993-03-01 1993-03-01 Module test support equipment Expired - Fee Related JP3119400B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP05040204A JP3119400B2 (en) 1993-03-01 1993-03-01 Module test support equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP05040204A JP3119400B2 (en) 1993-03-01 1993-03-01 Module test support equipment

Publications (2)

Publication Number Publication Date
JPH06250884A true JPH06250884A (en) 1994-09-09
JP3119400B2 JP3119400B2 (en) 2000-12-18

Family

ID=12574256

Family Applications (1)

Application Number Title Priority Date Filing Date
JP05040204A Expired - Fee Related JP3119400B2 (en) 1993-03-01 1993-03-01 Module test support equipment

Country Status (1)

Country Link
JP (1) JP3119400B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010092228A (en) * 2008-10-07 2010-04-22 Internatl Business Mach Corp <Ibm> System, method and program for controlling access to object model
CN105319964A (en) * 2015-09-29 2016-02-10 上海新跃仪表厂 Carrier rocket test launch flow generation method and system based on configuration files
US9851944B2 (en) 2014-03-10 2017-12-26 Fujitsu Limited Operation search method and operation search apparatus

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0666600U (en) * 1993-02-23 1994-09-20 英機 吉増 Collection and delivery vehicles for cleaning stores, etc.

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010092228A (en) * 2008-10-07 2010-04-22 Internatl Business Mach Corp <Ibm> System, method and program for controlling access to object model
US9851944B2 (en) 2014-03-10 2017-12-26 Fujitsu Limited Operation search method and operation search apparatus
CN105319964A (en) * 2015-09-29 2016-02-10 上海新跃仪表厂 Carrier rocket test launch flow generation method and system based on configuration files

Also Published As

Publication number Publication date
JP3119400B2 (en) 2000-12-18

Similar Documents

Publication Publication Date Title
CN110008113B (en) Test method and device and electronic equipment
US7895575B2 (en) Apparatus and method for generating test driver
JPH05505695A (en) An improved software debugging system and method specifically for debugging code within a multi-architecture environment.
JP2007012003A (en) System for providing development environment of feature-oriented software product line
KR20040091560A (en) Just-my-code debugging
CN111930398B (en) Application program updating method, device, system, medium and equipment
JPH0748182B2 (en) Program error detection method
Bothell ACT-R 7.21+ reference manual
US7243059B2 (en) Simulation of hardware based on smart buffer objects
JP3119400B2 (en) Module test support equipment
US20080300846A1 (en) Methods and apparatus for hardware simulation and design verification
JPH08314760A (en) Program development supporting device
CN112162921B (en) Industrial automation test and control system
CN115344268A (en) Multi-platform embedded development environment compiling method and device
JP2828590B2 (en) Microprogram verification method
JP2002157144A (en) Automatic test system for software
CN111427795A (en) Code test control method and device, storage medium and electronic equipment
JP2007004516A (en) Program debugging method of built-in system
KR960703478A (en) SYSTEM FOR GENERATING INSTRUCTIONS FOR SPEECH APPLICATION
JP2882876B2 (en) Program test method
CN117075907A (en) Application program compiling method, system, compiler and storage medium
CN115495137A (en) Configuration system and method for intelligent fusion terminal APP development
CN117421029A (en) Upgrading method and device of software system, electronic equipment and storage medium
Oman An objective look at C++ environments
Post et al. Avinux: Towards automatic verification of Linux device drivers

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees