JPH08272649A - How to create the test item form used for the unit test of the program module - Google Patents
How to create the test item form used for the unit test of the program moduleInfo
- Publication number
- JPH08272649A JPH08272649A JP7070245A JP7024595A JPH08272649A JP H08272649 A JPH08272649 A JP H08272649A JP 7070245 A JP7070245 A JP 7070245A JP 7024595 A JP7024595 A JP 7024595A JP H08272649 A JPH08272649 A JP H08272649A
- Authority
- JP
- Japan
- Prior art keywords
- branch
- test
- test item
- execution unit
- statement
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
(57)【要約】
【目的】 プログラムモジュールの単体試験に用いる試
験項目票の自動的作成方法を提供すること。
【構成】 階層プログラムのモジュール毎に行う単体試
験に用いる試験項目票を作成する際に、試験対象のモジ
ュールを選択する(SA1)。次いで、そのソースプロ
グラムを読み込み、構文解析してそのモジュールの処理
構造(ツリー構造)を取得し、このツリー構造の各パス
を最低1回は通る全ての試験項目を抽出し、試験項目フ
ァイルを生成する(SA2)。最後に試験項目データフ
ァイルを読み込み、試験項目票を出力する(SA3)。
(57) [Summary] [Purpose] To provide a method for automatically creating a test item form used for a unit test of a program module. [Structure] When creating a test item form used for a unit test performed for each module of a hierarchical program, a module to be tested is selected (SA1). Next, the source program is read, the syntax is analyzed, the processing structure (tree structure) of the module is acquired, all the test items that pass each path of this tree structure at least once are extracted, and the test item file is generated. Yes (SA2). Finally, the test item data file is read and the test item form is output (SA3).
Description
【0001】[0001]
【産業上の利用分野】本発明は、試験項目票の作成方法
に関し、特にプログラムモジュールの単体試験に用いる
試験項目票の作成方法に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of creating a test item form, and more particularly to a method of creating a test item form used for a unit test of a program module.
【0002】[0002]
【従来の技術】単体試験は、プログラムを構成するモジ
ュールの正常性を確認する試験である。2. Description of the Related Art A unit test is a test for confirming the normality of modules that compose a program.
【0003】従来の単体試験では、試験対象モジュール
の機能を詳細に設計した詳細設計書や、この詳細設計書
に基づいて所定の言語でコーディングしたソースプログ
ラム等から、試験すべき項目、いわゆる試験項目を試験
担当者が抽出し、モジュールがその通りに動作するか確
認していた。In the conventional unit test, items to be tested, so-called test items, are selected from a detailed design document in which the function of the module to be tested is designed in detail, a source program coded in a predetermined language based on the detailed design document, and the like. Was extracted by the tester and confirmed whether the module behaved as it was.
【0004】まず、試験対象モジュールが正常に動作す
る場合と異常を検出して動作する場合とに分けて、可能
なテストケースのどのような組合せが最もエラーを発見
できる確率が高いかに着目して試験項目を抽出し、後か
ら試験結果を記入するようにした試験項目票を作成す
る。また、試験結果を確認するために、ソースコードに
モジュールの入力値、出力値、走行位置などを標準出力
等に表示したり、ファイル化したりするためのデバッグ
文を設定する。First, focusing on what combination of possible test cases has the highest probability of finding an error, the module to be tested operates normally and the module operates when an abnormality is detected. A test item form is created in which test items are extracted and test results are entered later. In addition, in order to confirm the test results, a debug statement for displaying the input value, output value, running position, etc. of the module on the standard output etc. in the source code, or setting them as files is set.
【0005】さらに、試験に必要なデータの作成、試験
対象モジュールを駆動して試験値を送り、戻り値を確認
するためのドライバと呼ばれるモジュールや、試験対象
モジュールから呼び出される擬似的なモジュールである
スタブと呼ばれるモジュールを作成する。Further, it is a module called a driver for creating data necessary for testing, driving a test target module to send a test value and confirming a return value, and a pseudo module called from the test target module. Create a module called a stub.
【0006】この後、試験を効率よく進めるために作成
した試験手順書に沿って試験を実行し、試験で取得した
試験結果と、試験項目票に記載してある予測される試験
結果とを照合し、結果が正常な場合は、試験項目票に正
常終了を記入して次の試験項目に移行する。もし異常が
発見された場合は、所定の手続に従ってバグの管理をす
る。After that, the test is executed in accordance with the test procedure prepared in order to efficiently carry out the test, and the test result obtained by the test is collated with the predicted test result described in the test item form. If the result is normal, enter normal end in the test item form and move to the next test item. If an abnormality is found, the bug will be managed according to the prescribed procedure.
【0007】このようにして得られた試験結果は統計的
に集計して単体試験工程におけるソフトウェアの品質管
理と試験の進捗管理に反映している。The test results thus obtained are statistically tabulated and reflected in the software quality control and the test progress control in the unit testing process.
【0008】このように、従来の単体試験では、試験項
目票を試験担当者が作成していた。従って、試験項目の
抽出に時間を要し、また試験担当者によって試験項目に
ばらつきが生じる等の問題があった。As described above, in the conventional unit test, the person in charge of the test prepared the test item form. Therefore, there is a problem that it takes time to extract the test items, and the test items vary depending on the person in charge of the test.
【0009】[0009]
【発明が解決しようとする課題】従って、本発明の目的
は、試験担当者の手作業によることなく、試験対象モジ
ュールのソースプログラムを構文解析して試験項目票を
自動的に生成するようにした試験項目票の作成方法を提
供することにある。SUMMARY OF THE INVENTION Therefore, an object of the present invention is to automatically generate a test item vote by parsing a source program of a module to be tested without manual work of a tester. It is to provide a method for creating a test item vote.
【0010】[0010]
【課題を解決するための手段】上記目的を達成するため
に、本発明は、複数のモジュールにより階層的に構成さ
れるプログラムの該モジュール毎に行う単体試験に用い
る試験項目票の作成方法であって、前記モジュールのソ
ースプログラムとして、実行文毎に試験すべき項目(試
験項目)または該試験項目に対応した確認すべき項目
(確認項目)をコメント文として備えたものを用意する
ステップと、前記ソースプログラムを実行文毎に読み込
みながら前記試験項目および前記確認項目を対とする実
行単位データに細分化し、前記実行単位データの試験項
目に対応する実行文が分岐文である場合には分岐情報テ
ーブルに前記実行単位データを格納し、前記実行単位デ
ータの試験項目に対応する実行文が分岐文以外である場
合には分岐外情報テーブルに前記実行単位データを格納
する、実行単位データ抽出ステップと、前記実行単位デ
ータの繋がりを、分岐処理の先頭に位置する実行単位デ
ータの番号を先頭分岐番号情報テーブルに格納すると共
に、前記実行単位データの次に処理される実行単位デー
タの番号を次分岐番号として該実行単位データに格納し
て前記モジュールのソースプログラムの分岐構造を求め
る分岐構造抽出ステップと、前記先頭分岐番号情報テー
ブルに格納された実行単位データの番号に対応する実行
単位データを先頭に、該実行単位データの次分岐番号に
対応する実行単位データを繋げる処理を、前記次分岐番
号がなくなるまで繰り返し、少なくとも前記試験項目お
よび前記確認項目を含む試験項目票を作成する試験項目
票の作成ステップとを備えたことを特徴とする。In order to achieve the above object, the present invention is a method of creating a test item form used for a unit test performed for each module of a program hierarchically composed of a plurality of modules. A source program of the module, which prepares an item to be tested (test item) for each execution statement or an item to be confirmed (confirmation item) corresponding to the test item as a comment statement, While reading the source program for each execution statement, the test item and the confirmation item are subdivided into execution unit data, and when the execution statement corresponding to the test item of the execution unit data is a branch statement, a branch information table The execution unit data is stored in the execution unit data. If the execution statement corresponding to the test item of the execution unit data is other than the branch statement, the non-branch information information is stored. The execution unit data extraction step of storing the execution unit data in a block and the connection of the execution unit data, the number of the execution unit data located at the head of the branch processing is stored in the head branch number information table, and the execution A branch structure extraction step of storing the number of the execution unit data processed next to the unit data as the next branch number in the execution unit data to obtain the branch structure of the source program of the module, and storing it in the head branch number information table. The process of connecting the execution unit data corresponding to the next branch number of the execution unit data starting from the execution unit data corresponding to the number of the executed execution unit data is repeated until the next branch number disappears, and at least the test item and And a test item voucher creating step for creating a test item voucher including the confirmation items. To.
【0011】[0011]
【作用】図1は、本発明のプログラム試験システムのハ
ードウェア構成を示すブロック図である。図1におい
て、1はメモリを内蔵するCPU、2はフロッピーディ
スク等の外部記憶装置、3は試験の実行を入力するキー
ボード等の入力部、4はCRT等の表示装置、5はプリ
ンタ装置等の出力部である。外部記憶装置に格納された
ソースプログラムをCPU1のメモリにロードし、入力
部3であるキーボードから試験の実行を指示する信号を
入力し、問題とするモジュールについて、ソースプログ
ラムの構文解析を実行し、その結果に基づいて試験項目
を抜き出す。作成経過および結果を表示装置4でモニタ
する。作成された試験項目票をプリンタ装置5から出力
する。FIG. 1 is a block diagram showing the hardware configuration of the program test system of the present invention. In FIG. 1, 1 is a CPU having a built-in memory, 2 is an external storage device such as a floppy disk, 3 is an input unit such as a keyboard for inputting the execution of a test, 4 is a display device such as a CRT, and 5 is a printer device or the like. It is an output part. The source program stored in the external storage device is loaded into the memory of the CPU 1, a signal instructing the execution of the test is input from the keyboard which is the input unit 3, the source program is parsed for the module in question, Select test items based on the results. The creation process and the result are monitored by the display device 4. The created test item form is output from the printer device 5.
【0012】図2は、本発明の試験システムの処理手順
を説明するためのフローチャートである。FIG. 2 is a flow chart for explaining the processing procedure of the test system of the present invention.
【0013】また、図3はプログラムの構成例を示す図
である。プログラムは、機能毎にいくつかのモジュール
で構成されている。なお、ここではtest0という名
前のモジュールの単体試験を行うものとして説明する。FIG. 3 is a diagram showing an example of the structure of a program. The program is composed of several modules for each function. It should be noted that here, description will be made assuming that a unit test of a module named test0 is performed.
【0014】図2に沿って本発明の試験システムにより
作成する試験項目票の作成手順を説明する。A procedure for creating a test item form created by the test system of the present invention will be described with reference to FIG.
【0015】まず、試験対象のモジュールを選択する。
この場合は、モジュール「test0」を指定する(S
A1).次に、試験対象のモジュール(test0)の
ソースプログラムを読み込み、構文解析して当該モジュ
ールの処理構造(以下、「ツリー構造」と呼ぶ)を取得
し、このツリー構造の各パスを最低1回は通る全ての試
験項目を抽出し、試験項目データファイルを生成する
(SA2)。First, a module to be tested is selected.
In this case, the module "test0" is designated (S
A1). Next, the source program of the module to be tested (test0) is read, the syntax is analyzed to obtain the processing structure of the module (hereinafter referred to as "tree structure"), and each path of this tree structure is acquired at least once. All test items that pass are extracted and a test item data file is generated (SA2).
【0016】最後に、試験項目データファイルを読み込
み、試験項目票を出力する(SA3)。Finally, the test item data file is read and the test item form is output (SA3).
【0017】このように、本発明に従えば、試験対象モ
ジュールのソースプログラムを構文解析し、試験項目票
を自動的に生成するようにしてある。それにより、従来
は試験担当者が詳細設計書などから手作業で抽出して作
成していた「試験項目票の作成」作業を自動化すること
ができる。As described above, according to the present invention, the source program of the test target module is parsed and the test item form is automatically generated. As a result, it is possible to automate the work of “creating a test item form,” which was conventionally created by a tester by manually extracting from a detailed design document or the like.
【0018】[0018]
【実施例】以下に本発明のプログラムモジュールの単体
試験に用いる試験項目票の作成方法の重要な構成要素で
ある試験項目データの作成手順(上述の図2に図示した
フローチャートのSA2)を実施例によってより詳細に
説明する。しかし、本発明はそれに限定されないことは
勿論である。EXAMPLE An example of a procedure for creating test item data (SA2 in the flow chart shown in FIG. 2 above), which is an important component of the method for creating a test item form used for a unit test of a program module of the present invention, will be described below. Will be described in more detail by. However, it goes without saying that the present invention is not limited thereto.
【0019】(1)試験項目データファイルの作成手順 図4は、試験対象モジュールのソースプログラムを示す
図である。このプログラムはC言語で書かれているが、
階層化されたプログラムであれば、本発明を適用するこ
とができる。(1) Procedure for Creating Test Item Data File FIG. 4 is a diagram showing the source program of the module to be tested. This program is written in C,
The present invention can be applied to any hierarchical program.
【0020】ソースプログラムは、所定の記述規則(コ
ーディング規約)に沿ってコーディングする必要があ
り、一例を示すと、「先頭には関数名と処理内容などを
記載したヘッダー部をコメント行として配置する」、
「その後に配置するプログラム部では、例えば条件文
(if〜else文、switch文)の前に条件文に
対応するコメント(すなわち、試験項目内容を示すコメ
ント)を配置したり、条件毎の実行文(cnt=a;)
の前に条件文に対応するコメント(すなわち、確認項目
内容を示すコメント)を配置する」等がある。このよう
に、コーディング規約は、作成した試験項目票の〔試験
項目〕と〔確認項目〕等の明確化のために規定してい
る。The source program needs to be coded in accordance with a predetermined description rule (coding rule). As an example, "a header section in which a function name and processing contents are described is placed at the beginning as a comment line. ",
“In the program section to be placed after that, for example, a comment (that is, a comment indicating the test item content) corresponding to the conditional statement is placed before the conditional statement (if to else statement, switch statement), or an execution statement for each condition is placed. (Cnt = a;)
, A comment corresponding to the conditional sentence (that is, a comment indicating the contents of the confirmation item) is placed in front of. In this way, the coding rules are provided for clarifying the [test item] and [confirmation item] of the created test item slip.
【0021】本発明の特長は、「構文を解析して分岐ブ
ロック毎の繋がりを抽出することであり、これにより全
ての分岐ルートを通る試験項目を抽出することができ
る」点にある。The feature of the present invention is that "the syntax is analyzed to extract the connection for each branch block, and thus the test items passing through all the branch routes can be extracted".
【0022】図5(a)は、図4のソースプログラムを
フローチャートに表示したものであり、このフローチャ
ートによりソースプログラムのツリー構造を簡単に説明
する。FIG. 5A is a flow chart showing the source program of FIG. 4, and the tree structure of the source program will be briefly described with reference to this flow chart.
【0023】第1条件文(if)で、「a==NUL
L」の場合、(図中のパス)には「NG」をモジュー
ルの返却値として処理を終了する。In the first conditional statement (if), "a == NUL
In the case of "L", "NG" is set to (path in the figure) and the process is terminated.
【0024】一方、「a≠NULL」の場合(図中のパ
ス)には、aをcntに代入して次に進み、第2条件
文(switch)で、「aが1」の場合(図中のパス
)には、処理3を実行し、「aが1以外」の場合(図
中のパス)には、処理4を実行し、次の条件文に進
む。On the other hand, in the case of "a ≠ NULL" (path in the figure), a is substituted for cnt and the process proceeds to the next condition. In the second conditional statement (switch), "a is 1" (see the figure). Process 3 is executed for the middle path), and process 4 is executed for "a is other than 1" (path in the figure), and the processing proceeds to the next conditional statement.
【0025】このように、図4のソースプログラムのツ
リー構造は、図5(b)のように表すことができる。な
お、以下の説明では、条件文に続く処理のブロック(処
理1など)を条件文ブロックと呼ぶ。As described above, the tree structure of the source program of FIG. 4 can be represented as shown in FIG. In the following description, a block of processing (such as processing 1) following the conditional statement is called a conditional statement block.
【0026】本発明の試験項目データファイルには、上
述の条件文ブロック内の試験項目と確認項目の他に、各
条件文ブロックの繋がり、すなわち、「ツリー構造」を
示すデータ(後述する次分岐番号を格納しており、これ
らのデータによりソースプログラム(test0)の全
パス(パスからパス)を1回は通るような試験項目
票を作成することができる。In the test item data file of the present invention, in addition to the above-mentioned test items and confirmation items in the conditional statement block, data indicating a connection of each conditional statement block, that is, a "tree structure" (next branch described later). The number is stored, and a test item slip that passes all the paths (path to path) of the source program (test0) once can be created by these data.
【0027】次いで、本発明の試験項目データファイル
の作成方法を詳細に説明する。Next, the method of creating the test item data file of the present invention will be described in detail.
【0028】図6は試験項目データファイルの作成時に
必要なワークデータ、図7は試験項目データの作成方法
の概略を示すフローチャートである。FIG. 6 is a work data required for creating the test item data file, and FIG. 7 is a flow chart showing an outline of the test item data creating method.
【0029】図7により試験項目データファイルの作成
手順を説明する。The procedure for creating the test item data file will be described with reference to FIG.
【0030】まず、図4のソースプログラムのヘッダー
部より処理名と関数名を抽出し、ヘッダー情報テーブル
図6(a)に登録する(SB1)。First, the process name and the function name are extracted from the header part of the source program of FIG. 4 and registered in the header information table of FIG. 6A (SB1).
【0031】次に、ソースプログラムのプログラム部を
先頭行から1行ずつ読み込み、プログラムの構造を解析
し、所定の条件文を検出した場合には、その条件文ブロ
ックを抽出して、図6(c)に示す分岐情報テーブルに
分岐番号、条件文種別などの所定の情報を書き込む(S
B2)。なお、ソースプログラムは処理のネストに応じ
てインデントを設けて記述してあり、分岐番号はネスト
の浅い処理から順に番号を付与するようにしている。ま
た、分岐情報テーブルのスタブ関数のフィールドには、
条件文ブロックの中に標準関数以外の関数を含む場合
(本実施例の「sub1」,「sub2」に相当する)
には、分岐外情報テーブル(図6(d))に書き込む。Next, the program part of the source program is read line by line from the first line, the structure of the program is analyzed, and when a predetermined conditional statement is detected, the conditional statement block is extracted and the block shown in FIG. Predetermined information such as a branch number and conditional statement type is written in the branch information table shown in c) (S).
B2). The source program is described with indentation according to the nest of processing, and branch numbers are given in order from the processing with the shallowest nesting. Also, in the stub function field of the branch information table,
When a function other than the standard function is included in the conditional statement block (corresponding to "sub1" and "sub2" in this embodiment)
Is written in the outside branch information table (FIG. 6D).
【0032】次に、ツリー構造から見て分岐の先頭にな
る可能性のある分岐番号は、先頭分岐番号テーブル(図
6(b)参照)に登録し、また、各条件文ブロックの繋
がりを後述する図16〜図17の処理により調べ、分岐
情報テーブルの次分岐番号のフィールドに書き込む(S
B3)。すなわち、本実施例の条件文ブロック2の場合
には、分岐番号3と分岐番号4を次分岐番号のフィール
ドに書き込む。Next, the branch number that may be the head of the branch in the tree structure is registered in the head branch number table (see FIG. 6B), and the connection of each conditional statement block will be described later. 16 to 17, and writes in the field of the next branch number of the branch information table (S
B3). That is, in the case of the conditional statement block 2 of this embodiment, the branch number 3 and the branch number 4 are written in the next branch number field.
【0033】最後に、これら先頭分岐番号テーブルと分
岐情報テーブルおよび分岐外情報テーブルを基に、図2
0に示す試験項目票を試験項目データファイルに出力す
る(SB4)。Finally, based on these head branch number table, branch information table and non-branch information table, FIG.
The test item form shown in 0 is output to the test item data file (SB4).
【0034】(2) 分岐情報テーブルおよび分岐外情
報テーブルの作成手順 図8〜図13は試験項目データの分岐情報テーブルおよ
び分岐外情報テーブルの作成方法を説明するフローチャ
ートである。(2) Procedure for creating branch information table and non-branch information table FIGS. 8 to 13 are flowcharts for explaining a method for creating the branch information table and non-branch information table of the test item data.
【0035】処理のポイントに着目して詳細に説明す
る。A detailed description will be given focusing on processing points.
【0036】まず、図8に示すように、初期設定し(S
C1〜3)、ソースプログラム(図4)のプログラム部
の先頭から1行(改行を示す「CR」コードまで)を読
み込む(SC4)。First, as shown in FIG. 8, initial setting (S
(C1-3), one line (up to the "CR" code indicating a line feed) from the beginning of the program part of the source program (Fig. 4) is read (SC4).
【0037】次に読み込んだ1行の文字列が“NIL”
以外であれば、それがコメント行か否かを判定する(S
C6)。The one-line character string read next is "NIL".
Otherwise, it is determined whether it is a comment line (S
C6).
【0038】コメント行の場合には、コメントフラグを
ONにし(SC6−1)、所定のバッファに一時メモリ
し(SC100)、再度読み込みステップSC4に戻
る。In the case of a comment line, the comment flag is turned on (SC6-1), the memory is temporarily stored in a predetermined buffer (SC100), and the process returns to the reading step SC4.
【0039】読み込んだ1行の文字列が“NIL”以外
でない、すなわち、“NIL”である場合は、図13に
示すへ進み、テーブルNo.が基準テーブルNo.で
あるか否かを判定し(SC51)、基準テーブルNo.
であれば基準ネストを1加算した後へ進む(SC5
2)。テーブルNo.が基準テーブルNo.で無い場合
は、次分岐番号セット処理()をし(SC53)、終了
する。If the read one-line character string is not "NIL", that is, "NIL", the process proceeds to the step shown in FIG. Is the reference table No. Is determined (SC51), and the reference table No.
In that case, the standard nest is incremented by 1 before proceeding (SC5
2). Table No. Is the reference table No. If not, the next branch number setting process () is performed (SC53), and the process ends.
【0040】次に、図9に示すように、読み込んだ1行
の文字列がコメント行でなく、ネストの開始・終了を示
す中括弧「{」を含む場合には(SC7,SC7−1お
よびSC8)、現在の処理ブロックのネストを更新する
(SC9)。ネストの更新は開始の中括弧「{」を検出
した場合に所定の変数NESTに1加算し、終了の中括
弧「{」を検出した場合にNESTから1減算すること
になる。ネストの開始・終了を示す中括弧「{」を含ま
ない場合には次のSC10へ進む。Next, as shown in FIG. 9, when the read one-line character string is not a comment line but includes curly braces "{" indicating the start and end of nesting (SC7, SC7-1 and SC8), the nest of the current processing block is updated (SC9). To update the nest, 1 is added to the predetermined variable NEST when the opening curly brace “{” is detected, and 1 is subtracted from NEST when the ending curly brace “{” is detected. When the curly braces "{" indicating the start and end of nesting are not included, the process proceeds to the next SC10.
【0041】次に、図9〜図10に示すように、読み込
んだ1行の文字列に「条件文」を含むか否か判定する
(SC10)。条件文とは(if,else,else
if,switch,case,default)で
ある。Next, as shown in FIGS. 9 to 10, it is determined whether or not the read one-line character string includes a "condition sentence" (SC10). What is a conditional statement (if, else, else
if, switch, case, default).
【0042】条件文を含む場合には、それが「if,e
lse,else if,switch,case,d
efault」であれば分岐のネストレベル(以下、
「ブランチネストレベル」と呼ぶ)に1加算する(SC
11)。ここで、条件文が「case,defaul
t」の場合、ブランチネストを加算しないのは、他の条
件文「if, else, else if」と「sw
itch」の記述構造が異なることに起因している。す
なわち、「switch」文では、実際の条件文が「c
ase,default」の中に記述されるため、ブラ
ンチネストレベルが不正に成らず且つ条件文ブロックを
確実に抽出するために、このような制御を行っている。When the conditional statement is included, it is "if, e
lse, else if, switch, case, d
If "default", the nesting level of the branch (hereinafter,
Add 1 to "branch nest level" (SC
11). Here, the conditional statement is "case, default
In the case of "t", the branch nest is not added because the other conditional statements "if, else, else if" and "sw" are added.
This is because the description structure of "itch" is different. That is, in the “switch” statement, the actual conditional statement is “c
As described in “asse, default”, such control is performed so that the branch nest level does not become illegal and the conditional statement block is surely extracted.
【0043】条件文を検出した場合は、続いて新たな分
岐情報データのエリアを確保するために分岐番号を1加
算し(SC16)、分岐番号、抽出した「条件文」、コ
メントバッファにメモリしている「試験内容」に関する
コメント、ブランチネストレベル、スタブ関数を、それ
ぞれ分岐情報データの該当フィールドに書き込む(SC
17〜27)。なお、スタブ関数が存在しない場合には
(SC25)、分岐情報テーブルの「スタブ情報」の欄
に「なし」を設定する(SC25−1)。When a conditional statement is detected, the branch number is subsequently incremented by 1 to secure a new branch information data area (SC16), and the branch number, the extracted "conditional statement" and memory are stored in the comment buffer. Write the comment, branch nest level, and stub function related to the "test content" that are specified in the corresponding fields of the branch information data (SC
17-27). When there is no stub function (SC25), "none" is set in the "stub information" column of the branch information table (SC25-1).
【0044】最後にテーブルセットフラグをONにして
(SC28)、へ進み、再度1行読み込みのステップ
SC4に戻る。Finally, the table set flag is turned ON (SC28), and the process proceeds to step SC4 for reading one row again.
【0045】ここで、テーブルセットフラグを簡単に説
明すると、図14に示すように、抽出した文字列が条件
文ブロックの中(文字列A)か、条件文ブロックの外
(文字列B)かを判定する目的で使用しており、図11
に示すように、条件文ブロックを抜けると(SC3
2)、このテーブルセトフラグをOFFにしている(S
C33−1)。なお、条件文ブロックを抜けたか否かの
判定(SC32)は、条件文毎に上述のネストのレベル
を示す変数NESTを変数Z1に記憶し、処理ブロック
の終了を示す中括弧「}」を検出したときに算出した変
数NESTと上述の変数Z1を比較し、(NEST=Z
1−1)であれば、その条件文ブロックを抜けたと判定
している。The table set flag will be briefly described here. As shown in FIG. 14, whether the extracted character string is inside the conditional statement block (character string A) or outside the conditional statement block (character string B). It is used for the purpose of determining
As shown in, when the conditional statement block is exited (SC3
2), this table set flag is turned off (S
C33-1). It should be noted that the determination as to whether or not the conditional statement block has been skipped (SC32) stores the variable NEST indicating the nesting level described above in the variable Z1 for each conditional statement, and detects the curly braces "}" indicating the end of the processing block. Then, the variable NEST calculated at the time is compared with the above-mentioned variable Z1, and (NEST = Z
If 1-1), it is determined that the conditional statement block is exited.
【0046】一方、読み込んだ1行の文字列に「条件
文」を含まない場合(SC10の)に進む)には、所
定のバッファにコメントがメモリしてあれば該コメント
は確認項目に関するコメントなので分岐情報データの該
当フィールドにコメントの内容を書き込み(SC3
9)、スタブ関数であれば分岐情報データの該当フィー
ルドに書き込む(SC42)。On the other hand, if the read one-line character string does not include a "conditional sentence" (proceed to SC10), if a comment is stored in a predetermined buffer, the comment is a comment regarding a confirmation item. Write the content of the comment in the corresponding field of the branch information data (SC3
9) If it is a stub function, write it in the corresponding field of the branch information data (SC42).
【0047】また、「exit」,「return」の
強制終了関数であれば、条件ブロックはそこで終了とな
るので、分岐情報データの次分岐番号フィールドに次分
岐がないことを示す「なし」の情報を書き込む(SC4
4)。If the function is a forced termination function of "exit" or "return", the conditional block is terminated there, so "none" information indicating that there is no next branch in the next branch number field of the branch information data. Write (SC4
4).
【0048】また、図12に示すように、「ネストレベ
ルが1」かつ「ブランチネストレベルが0」の場合に
は、その文字列は分岐外テーブルに登録すべき情報なの
で、コメントバッファにコメントがあれば、分岐外情報
テーブルの「確認項目フィールド」にコメントの内容を
書き込み(SC47)、スタブ関数があれば(本実施例
では「sub3()」が相当する。)分岐外情報テーブ
ルの「スタブ関数フィールド」に書き込む(SC4
9)。As shown in FIG. 12, when "nesting level is 1" and "branch nesting level is 0", the character string is the information to be registered in the outside branch table, and therefore the comment is written in the comment buffer. If there is, the content of the comment is written in the "confirmation item field" of the outside-branch information table (SC47), and if there is a stub function (corresponding to "sub3 ()" in this embodiment), "stub of outside-branch information table". Function field "(SC4
9).
【0049】最後にコメントフラグをOFFにして(S
C50)、再度1行読み込みのステップSC4に戻る。Finally, the comment flag is turned off (S
C50), and returns to step SC4 of reading one line again.
【0050】図15は、試験項目データの分岐情報テー
ブルおよび分岐外情報テーブルの作成処理を実行した後
の分岐情報テーブルの内容を示している。FIG. 15 shows the contents of the branch information table after the creation processing of the branch information table and the non-branch information table of the test item data is executed.
【0051】(3)次分岐番号の付与処理 本処理は、当該モジュールの処理構造すなわち「ツリー
構造」を決定する処理である。要するに、上述した図1
5の分岐情報テーブルを基に次分岐番号を決定すること
により当該モジュールのツリー構造が判明する。(3) Process for assigning next branch number This process is a process for determining the processing structure of the module, that is, the "tree structure". In short, the above-mentioned FIG.
By determining the next branch number based on the branch information table of No. 5, the tree structure of the module is known.
【0052】図16および図17は、次分岐番号の付与
処理を説明するフローチャートである。16 and 17 are flowcharts for explaining the process of assigning the next branch number.
【0053】図18は、次分岐番号の付与処理を実行し
た後の分岐情報テーブルの内容を示している。FIG. 18 shows the contents of the branch information table after executing the process of assigning the next branch number.
【0054】ここで、次分岐番号を書き込む処理(SB
3)について、図16および図17のフローチャートに
基づいて詳細に説明する。Here, the process of writing the next branch number (SB
3) will be described in detail based on the flowcharts of FIGS. 16 and 17.
【0055】まず、処理対象の分岐情報テーブルの分岐
番号の初期値として、分岐No.カウンタに「1」をセ
ットする(S1)。First, as the initial value of the branch number of the branch information table to be processed, the branch No. The counter is set to "1" (S1).
【0056】次に、分岐No.に該当する分岐情報テー
ブルよりネストレベル(テーブル登録時に、ネストの深
さに応じた番号をネストレベルとして登録する。ネスト
が一番浅い処理が、ネストレベル「1」となる。)を取
得する(S2)。Next, the branch No. From the branch information table corresponding to the above, obtain the nest level (when registering the table, register the number corresponding to the nest depth as the nest level. The process with the shallowest nest is the nest level "1".) ( S2).
【0057】ネストレベルが「1」である場合は、ネス
トが一番浅い処理ということになるのでそのまま次分岐
番号を取得する処理に進む(S5)。If the nesting level is "1", it means that the nesting is the shallowest process, and therefore the process directly proceeds to the process for acquiring the next branch number (S5).
【0058】一方、ネストレベルが「1」以外の場合に
は、自分よりもネストの浅い分岐処理(これを、親分岐
とする)の中に含まれているということなので、ネスト
が「1」浅い親分岐の分岐情報テーブル(次番号情報フ
ィールド)へ分岐No.を追加する(S29)。On the other hand, when the nesting level is other than "1", it means that the nesting is included in the branching process with a shallower nest than that of itself (this is the parent branching), so the nesting is "1". Branch No. to the branch information table (next number information field) of the shallow parent branch. Is added (S29).
【0059】次に、親分岐の次分岐番号の中で親分岐と
同じネストレベルの次分岐番号は、自分の次分岐番号で
もあるので分岐情報テーブルの「次番号情報」フィール
ドへコピーして(S30)次分岐番号を取得する処理に
戻る(S5)。Next, among the next branch numbers of the parent branch, the next branch number of the same nest level as the parent branch is also the next branch number of itself, so it is copied to the "next number information" field of the branch information table ( S30) Return to the process of acquiring the next branch number (S5).
【0060】次分岐番号が登録されていて「なし」がセ
ットされていない場合には、ifフラグとswフラグを
「0」にセットする(S7)。次分岐番号に「なし」が
セットされている場合(分岐情報テーブル登録時に、
「return」または「exit」を検出した時点で
「次番号情報」フィールドへ「なし」をセットする。こ
れは、現在の分岐処理ブロックで試験対象モジュールの
処理は終了するという意味である。)には次に進む分岐
処理がないという意味なので、分岐No.を「1」カウ
ントアップして(S27)、処理対象の分岐番号を更新
する。When the next branch number is registered and "none" is not set, the if flag and sw flag are set to "0" (S7). When "none" is set in the next branch number (when registering the branch information table,
When "return" or "exit" is detected, "none" is set in the "next number information" field. This means that the processing of the test target module ends in the current branch processing block. ) Means that there is no branch processing to proceed to, so branch No. Is incremented by "1" (S27), and the branch number to be processed is updated.
【0061】ifフラグとswフラグを「0」にセット
した後、条件文種別の取得を行う(S8)。条件文種別
が「if」または「else if」の場合には、if
フラグを「1」にセットする(S10)。また、条件文
種別が「case」の場合にはswフラグを「1」にセ
ットし(S12)、それ以外の場合にはフラグのセット
は行わない。After the if flag and the sw flag are set to "0", the conditional sentence type is acquired (S8). If the conditional statement type is “if” or “else if”, then if
The flag is set to "1" (S10). If the conditional statement type is "case", the sw flag is set to "1" (S12), and otherwise the flag is not set.
【0062】次に、次分岐No.カウンタに「分岐N
o.+1」をセットする(S13)。次分岐No.の分
岐情報テーブルよりネストレベルを取得して(S1
4)、分岐No.のネストレベルと比較する(S1
5)。ネストレベルが一致している場合は、次分岐N
o.の分岐情報テーブルより分岐文種別を取得する処理
に進む(S16)。また、ネストレベルが一致していな
い場合または次分岐No.の分岐情報テーブルが存在し
ていない場合は、処理対象の分岐番号に対する次番号の
セットは終了したということなので、分岐No.を
「1」カウントアップして(s27)、処理対象の分岐
番号を更新する。Next branch No. The counter displays “Branch N
o. +1 "is set (S13). Next branch No. From the branch information table of (S1
4), branch No. Compare with the nesting level of (S1
5). If the nesting levels match, the next branch N
o. The process proceeds to the process of acquiring the branch statement type from the branch information table (S16). If the nesting levels do not match or the next branch No. If the branch information table of No. does not exist, it means that the setting of the next number for the branch number to be processed has been completed, so that the branch No. Is incremented by "1" (s27), and the branch number to be processed is updated.
【0063】ifフラグが「1」の場合で、取得した次
分岐No.の分岐文種別が「else if」または
「else」の場合にはセット対象の次分岐番号となら
ない(if文に続くelse if文やelse文は処
理対象にならない。)ので、そのまま次分岐No.を
「1」カウントアップする処理に移る(S25)。ま
た、ifフラグが「1」の場合で、取得した次分岐N
o.の分岐文種別が「elseif」または「els
e」以外の場合にはifフラグを「0」にセットして
(S19)分岐No.の分岐情報テーブル(次分岐番号
フィールド)に次分岐番号をセットする(S23)。When the if flag is "1", the acquired next branch number. If the branch statement type of "else if" or "else" is not the next branch number to be set (the else if statement or else statement following the if statement is not the processing target), the next branch No. The process shifts to "1" for counting up (S25). If the if flag is “1”, the acquired next branch N
o. Branch statement type is "elseif" or "els"
If the flag is other than "e", the if flag is set to "0" (S19), and the branch number. The next branch number is set in the branch information table (next branch number field) (S23).
【0064】一方、swフラグが「1」の場合で、取得
した次分岐No.の分岐文種別が「case」または
「default」の場合にはセット対象の次分岐番号
とはならない(case文に続くcase文やdefa
ult文は処理対象にならない。)ので、そのまま次分
岐No.を「1」カウントアップする処理に移る(S2
5).また、swフラグが「1」の場合で、取得した次
分岐No.の分岐文種別が「case」または「def
ault」以外の婆アイにはswフラグを「0」にセッ
トして(S22)分岐No.の分岐情報テーブル(次分
岐番号フィールド)に次分岐番号をセットする(S2
3).ifフラグ、swフラグどちらも「0」の場合に
は、そのまま分岐No.の分岐情報テーブル(次番号フ
ィールド)に次分岐番号をセットする(S23).次分
岐番号をセットした後、次分岐No.の分岐文種別が
「else」または「default」以外の場合(S
24)は、次分岐No.を「1」カウントアップする
(S25)。また、次分岐No.の分岐文の種別が「e
lse」または「default」の場合は、以降の次
分岐には直接進まないので分岐No.を「1」カウント
アップして(S27)、処理対象の分岐番号を更新す
る。次分岐No.をカウントアップして、次分岐No.
の分岐情報テーブルが存在する場合(S26)は、次分
岐No.のネストレベルを取得する処理(S14)に戻
る。次分岐No.の分岐情報テーブルが存在しない場合
は、分岐No.を「1」カウントアップして(S2
7)、処理対象の分岐番号を更新する。On the other hand, when the sw flag is "1", the acquired next branch No. If the branch statement type is "case" or "default", it is not the next branch number to be set (case statement or default following the case statement).
The ult statement is not the processing target. ), The next branch No. Shifts to the process of counting up "1" (S2
5). When the sw flag is “1”, the acquired next branch number. Branch statement type is "case" or "def"
The sw flag is set to "0" for the grandmothers other than "ult" (S22). Next branch number is set in the branch information table (next branch number field) (S2
3). When both the if flag and the sw flag are “0”, the branch No. The next branch number is set in the branch information table (next number field) of (S23). After setting the next branch number, the next branch number. If the branch statement type is other than "else" or "default" (S
24) is the next branch No. Is incremented by "1" (S25). In addition, the next branch No. The branch statement type is "e
In the case of “lse” or “default”, the branch does not proceed directly to the next branch, so the branch No. Is incremented by "1" (S27), and the branch number to be processed is updated. Next branch No. Is counted up, and the next branch No.
If the branch information table of No. exists (S26), the next branch No. The process returns to the process (S14) of acquiring the nest level of. Next branch No. If the branch information table of No. exists, the branch No. Is incremented by "1" (S2
7) Update the branch number to be processed.
【0065】分岐No.の分岐情報テーブルが存在する
場合は、分岐No.のネストレベルを取得する処理(S
3)に戻る。分岐No.の分岐情報テーブルが存在しな
い場合は、すべての分岐情報テーブルへ次分岐番号情報
のセットが終了したということなので、処理を終了する
(S31).このようにして、先製した分岐情報テーブ
ルを基に次番号情報を登録する。Branch No. If the branch information table of No. exists, the branch No. To get the nesting level of (S
Return to 3). Branch No. If the branch information table of No. does not exist, it means that the setting of the next branch number information to all the branch information tables has been completed, and the processing is ended (S31). In this way, the next number information is registered based on the branch information table manufactured in advance.
【0066】(4)先頭分岐番号テーブルの作成処理 図19は、先頭分岐番号テーブルの作成処理を説明する
フローチャートである。本フローチャートに従って、処
理を詳細に説明する。(4) Leading Branch Number Table Creating Process FIG. 19 is a flow chart for explaining the leading branch number table creating process. The process will be described in detail with reference to this flowchart.
【0067】まず、ツリー構造の先頭となる分岐処理ブ
ロックは、分岐番号1の分岐処理ブロックであるから、
ブランチNoを1とし(se1)、図6(c)の分岐情
報テーブルに登録した分岐番号の最大値(本例ではブラ
ンチ情報テーブル数は6)とブランチNoを比較する。First, since the branch processing block at the head of the tree structure is the branch processing block with branch number 1,
The branch number is set to 1 (se1), and the maximum value of the branch numbers registered in the branch information table of FIG. 6C (the number of branch information tables is 6 in this example) is compared with the branch number.
【0068】(ブランチNo)<(ブランチ情報テーブ
ル)であれば、se2のYESに進み、ブランチネスト
レベルを取得する(se3)。If (branch No.) <(Branch information table), the process proceeds to YES in se2 to acquire the branch nest level (se3).
【0069】ブランチネストレベルが「1」か判定し
(ブランチネストレベルが2異常であればツリーの先頭
となることはない)、1であればse4のYESに進
み、条件文種別を取得する(se5)。It is judged whether the branch nest level is "1" (if the branch nest level is 2 abnormal, it does not become the head of the tree). If it is 1, the process proceeds to YES in se4 to acquire the condition statement type ( se5).
【0070】次に、図6(b)の先頭分岐番号テーブル
に該ブランチNoを登録し(se6)、先ほど取得した
条件文種別が「else」、「default」以外で
あるか判定する(se7)。条件文種別が「els
e」、「default」であれば、その次に続く分岐
処理ブロックは必ずそれ以前の分岐処理ブロックを通過
した後の処理となる。すなわち、分岐の先頭になる可能
性のない分岐処理ブロックのみしか存在しないので、本
先頭分岐番号テーブルの作成処理を終了する。Next, the branch No. is registered in the head branch number table of FIG. 6B (se6), and it is determined whether the condition statement type acquired earlier is other than "else" or "default" (se7). . Condition sentence type is "els"
In the case of "e" and "default", the branch processing block that follows is always processing after passing through the previous branch processing block. That is, since there is only a branch processing block that is unlikely to be the head of the branch, the process of creating the head head branch number table ends.
【0071】ここでは、条件文種別は「if」であるか
ら、まだツリーの先頭になる分岐処理ブロックが存在す
る可能性があるので、se7のYESに進み、ブランチ
Noを1加算し、se2へ戻る。Here, since the conditional statement type is "if", there is a possibility that there is a branch processing block at the beginning of the tree, so the processing proceeds to YES in se7, 1 is added to the branch No, and to se2. Return.
【0072】se3で分岐番号2のブランチネストレベ
ル(=1)を取得し、se4のYESに進み、条件文種
別(「else」)を取得する(se5)。In se3, the branch nest level (= 1) of the branch number 2 is acquired, the process proceeds to YES in se4, and the conditional statement type (“else”) is acquired (se5).
【0073】se6では上述したように、条件文種別が
「else」であるから、もうツリーの先頭になる可能
性のある分岐処理ブロックはないと判定し、se7のN
Oに進んで本処理を終了する。In se6, as described above, since the conditional statement type is "else", it is determined that there is no branch processing block that may already be at the beginning of the tree, and N7 in se7.
The process proceeds to O to end this processing.
【0074】本処理により図6(b)の先頭分岐番号テ
ーブルには分岐番号1および2が登録される。以上説明
した処理により割き制した先頭分岐番号テーブルの先頭
分岐番号から分岐情報テーブルの次分岐番号が「なし」
になるまで辿ると、図5(b)のツリー構造となる。従
って、少なくとも分岐情報テーブルの「試験内容」「確
認項目」「スタブ関数」の項目を抽出して試験項目票作
成すれば、ツリーの全ての分岐を辿る試験項目票を作成
することができる。By this processing, the branch numbers 1 and 2 are registered in the head branch number table of FIG. 6 (b). The next branch number in the branch information table is "none" from the first branch number in the first branch number table assigned by the processing explained above.
The tree structure shown in FIG. Therefore, if at least the items “test content”, “confirmation item”, and “stub function” in the branch information table are extracted and a test item vote is created, a test item vote that follows all branches of the tree can be created.
【0075】[0075]
【発明の効果】本発明は、試験対象のモジュールを記述
したソースプログラムから単体試験の試験項目票を自動
的に作成できるので、試験担当者の付加を軽減すること
ができる。As described above, according to the present invention, a test item form for a unit test can be automatically created from a source program in which a module to be tested is described.
【図1】本発明のプログラム試験システムの構成を示す
ブロック図である。FIG. 1 is a block diagram showing a configuration of a program test system of the present invention.
【図2】本発明の試験システムの処理手順を示すフロー
チャートである。FIG. 2 is a flowchart showing a processing procedure of the test system of the present invention.
【図3】プログラム構成図である。FIG. 3 is a program configuration diagram.
【図4】試験対象モジュールのソースプログラムを示す
図である。FIG. 4 is a diagram showing a source program of a module to be tested.
【図5】図4のソースプログラムを示す図であり、
(a)はフローチャート、(b)はツリー構造図であ
る。5 is a diagram showing the source program of FIG. 4,
(A) is a flowchart and (b) is a tree structure diagram.
【図6】試験項目データファイルの作成時に必要なワー
クデータを示すデータフォーマット図であり、(a)は
ヘッダー情報テーブル、(b)は先頭分岐番号テーブ
ル、(c)は分岐情報テーブル、(d)は分岐外情報テ
ーブルを示す図である。FIG. 6 is a data format diagram showing work data required when creating a test item data file, where (a) is a header information table, (b) is a head branch number table, (c) is a branch information table, and (d). ) Is a diagram showing a non-branch information table.
【図7】試験項目データの作成方法の概略を示すフロー
チャートである。FIG. 7 is a flowchart showing an outline of a method for creating test item data.
【図8】試験項目データの分岐情報テーブルおよび分岐
外情報テーブルの作成方法を説明するフローチャートで
ある。FIG. 8 is a flowchart illustrating a method of creating a branch information table and a non-branch information table of test item data.
【図9】試験項目データの分岐情報テーブルおよび分岐
外情報テーブルの作成方法を説明するフローチャートで
ある。FIG. 9 is a flowchart illustrating a method of creating a branch information table and a non-branch information table of test item data.
【図10】試験項目データの分岐情報テーブルおよび分
岐外情報テーブルの作成方法を説明するフローチャート
である。FIG. 10 is a flowchart illustrating a method of creating a branch information table and a non-branch information table of test item data.
【図11】試験項目データの分岐情報テーブルおよび分
岐外情報テーブルの作成方法を説明するフローチャート
である。FIG. 11 is a flowchart illustrating a method of creating a branch information table and a non-branch information table of test item data.
【図12】試験項目データの分岐情報テーブルおよび分
岐外情報テーブルの作成方法を説明するフローチャート
である。FIG. 12 is a flowchart illustrating a method for creating a branch information table and a non-branch information table of test item data.
【図13】試験項目データの分岐情報テーブルおよび分
岐外情報テーブルの作成方法を説明するフローチャート
である。FIG. 13 is a flowchart illustrating a method of creating a branch information table and a non-branch information table of test item data.
【図14】文字列を表示する図である。FIG. 14 is a diagram showing a character string.
【図15】分岐情報テーブルの内容を示す図である。FIG. 15 is a diagram showing the contents of a branch information table.
【図16】次分岐番号の付与処理を説明するフローチャ
ートである。FIG. 16 is a flowchart illustrating a process of assigning a next branch number.
【図17】次分岐番号の付与処理を説明するフローチャ
ートである。FIG. 17 is a flowchart illustrating a process of assigning a next branch number.
【図18】分岐情報テーブルの内容を示す図である。FIG. 18 is a diagram showing the contents of a branch information table.
【図19】先頭分岐番号テーブルの作成処理を説明する
フローチャートである。FIG. 19 is a flowchart illustrating a process of creating a leading branch number table.
【図20】試験項目票を示す図である。FIG. 20 is a diagram showing a test item form.
1 CPU 2 外部記憶装置(フロッピーディスク) 3 入力部(キーボード) 4 表示装置(CRT) 5 出力部(プリンタ) 1 CPU 2 External storage device (floppy disk) 3 Input unit (keyboard) 4 Display device (CRT) 5 Output unit (printer)
Claims (1)
れるプログラムの該モジュール毎に行う単体試験に用い
る試験項目票の作成方法であって、 前記モジュールのソースプログラムとして、実行文毎に
試験すべき項目(試験項目)または該試験項目に対応し
た確認すべき項目(確認項目)をコメント文として備え
たものを用意するステップと、 前記ソースプログラムを実行文毎に読み込みながら前記
試験項目および前記確認項目を対とする実行単位データ
に細分化し、 前記実行単位データの試験項目に対応する実行文が分岐
文である場合には分岐情報テーブルに前記実行単位デー
タを格納し、 前記実行単位データの試験項目に対応する実行文が分岐
文以外である場合には分岐外情報テーブルに前記実行単
位データを格納する、実行単位データ抽出ステップと、 前記実行単位データの繋がりを、分岐処理の先頭に位置
する実行単位データの番号を先頭分岐番号情報テーブル
に格納すると共に、前記実行単位データの次に処理され
る実行単位データの番号を次分岐番号として該実行単位
データに格納して前記モジュールのソースプログラムの
分岐構造を求める分岐構造抽出ステップと、 前記先頭分岐番号情報テーブルに格納された実行単位デ
ータの番号に対応する実行単位データを先頭に、該実行
単位データの次分岐番号に対応する実行単位データを繋
げる処理を、前記次分岐番号がなくなるまで繰り返し、
少なくとも前記試験項目および前記確認項目を含む試験
項目票を作成する試験項目票の作成ステップとを備えた
ことを特徴とするプログラムモジュールの単体試験に用
いる試験項目票の作成方法。1. A method of creating a test item form used for a unit test of each program of a program hierarchically composed of a plurality of modules, wherein each source statement of the module should be tested for each execution statement. A step of preparing an item (test item) or an item (confirmation item) to be confirmed corresponding to the test item as a comment statement, and the test item and the check item while reading the source program for each execution statement Is subdivided into a pair of execution unit data, and when the execution statement corresponding to the test item of the execution unit data is a branch statement, the execution unit data is stored in a branch information table, and the test item of the execution unit data is If the execution statement corresponding to is other than a branch statement, the execution unit data is stored in the non-branch information table. Data extraction step and the connection of the execution unit data, the number of the execution unit data located at the beginning of the branch processing is stored in the head branch number information table, and the execution unit data to be processed next to the execution unit data is stored. A branch structure extracting step for obtaining a branch structure of the source program of the module by storing a number as a next branch number in the execution unit data; and an execution unit corresponding to the number of the execution unit data stored in the leading branch number information table. The process of connecting the execution unit data corresponding to the next branch number of the execution unit data starting from the data is repeated until the next branch number disappears,
A method of creating a test item vote used for a unit test of a program module, comprising a test item vote creating step of creating a test item vote including at least the test item and the confirmation item.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP7070245A JPH08272649A (en) | 1995-03-28 | 1995-03-28 | How to create the test item form used for the unit test of the program module |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP7070245A JPH08272649A (en) | 1995-03-28 | 1995-03-28 | How to create the test item form used for the unit test of the program module |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH08272649A true JPH08272649A (en) | 1996-10-18 |
Family
ID=13425995
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP7070245A Pending JPH08272649A (en) | 1995-03-28 | 1995-03-28 | How to create the test item form used for the unit test of the program module |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH08272649A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6385741B1 (en) | 1998-10-05 | 2002-05-07 | Fujitsu Limited | Method and apparatus for selecting test sequences |
JP2008234405A (en) * | 2007-03-22 | 2008-10-02 | Nec Corp | Abnormal system test support device, method, and program |
WO2013161195A1 (en) * | 2012-04-26 | 2013-10-31 | 日本電気株式会社 | Program unit test assistance device |
US8875105B2 (en) | 2010-11-09 | 2014-10-28 | International Business Machines Corporation | Efficiently developing software using test cases to check the conformity of the software to the requirements |
-
1995
- 1995-03-28 JP JP7070245A patent/JPH08272649A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6385741B1 (en) | 1998-10-05 | 2002-05-07 | Fujitsu Limited | Method and apparatus for selecting test sequences |
JP2008234405A (en) * | 2007-03-22 | 2008-10-02 | Nec Corp | Abnormal system test support device, method, and program |
US8875105B2 (en) | 2010-11-09 | 2014-10-28 | International Business Machines Corporation | Efficiently developing software using test cases to check the conformity of the software to the requirements |
US8875104B2 (en) | 2010-11-09 | 2014-10-28 | International Business Machines Corporation | Efficiently developing software using test cases to check the conformity of the software to the requirements |
WO2013161195A1 (en) * | 2012-04-26 | 2013-10-31 | 日本電気株式会社 | Program unit test assistance device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7536678B2 (en) | System and method for determining the possibility of adverse effect arising from a code change in a computer program | |
EP0785510A1 (en) | Program debugging system for debugging a program having a graphical user interface | |
US8640105B2 (en) | Method and system for debugging a job running on a legacy system | |
JP6440895B2 (en) | Software analysis apparatus and software analysis method | |
CN113434395B (en) | Automatic generation method, device, equipment and medium for test cases | |
US20060005169A1 (en) | Software development system and method | |
US9213692B2 (en) | System and method for the automatic validation of dialog run time systems | |
JPH08272649A (en) | How to create the test item form used for the unit test of the program module | |
US5828829A (en) | System test support system and system test support method | |
JP3062266B2 (en) | Support device | |
CN118916293A (en) | Automatic testing method, device and equipment for universal executor and storage medium | |
US20090110280A1 (en) | Image recognition apparatus, image recognition program, and image recognition method | |
KR101826618B1 (en) | Method and apparatus for generating test case, computer readable recording medium | |
US20060225004A1 (en) | Apparatus for giving assistance in analyzing deficiency in RTL-input program and method of doing the same | |
JPH06168111A (en) | System for automatically generating debugged statement | |
JPH06195216A (en) | Automatic generation device for verification program | |
CN113467978A (en) | Method and device for detecting and repairing code defects | |
JP2005056183A (en) | Rule checking system, device, method, and program | |
JP2002342129A (en) | Coding check method | |
JP2014021686A (en) | Test data generation device, program and method | |
JP2002215391A (en) | Program analysis device, program analysis method, and recording medium | |
JP2024097176A (en) | Test specification generation support device, test specification generation support program, and test specification generation support method | |
CN115964295A (en) | Method and device for quickly replacing compiled front-end file preprocessed in chip | |
JPH0981371A (en) | Automatic version-up method and device for source code | |
CN117312156A (en) | Code quality assessment method and device |