JP2001273169A - Device for generating program test specification - Google Patents

Device for generating program test specification

Info

Publication number
JP2001273169A
JP2001273169A JP2000085440A JP2000085440A JP2001273169A JP 2001273169 A JP2001273169 A JP 2001273169A JP 2000085440 A JP2000085440 A JP 2000085440A JP 2000085440 A JP2000085440 A JP 2000085440A JP 2001273169 A JP2001273169 A JP 2001273169A
Authority
JP
Japan
Prior art keywords
program
unit
variable
test
test item
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.)
Withdrawn
Application number
JP2000085440A
Other languages
Japanese (ja)
Inventor
Takashi Okayama
敬 岡山
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2000085440A priority Critical patent/JP2001273169A/en
Publication of JP2001273169A publication Critical patent/JP2001273169A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a program test specification generation which enables automatic extraction of a test item corresponding to significance. SOLUTION: This program test specification generation device is provided with a program analyzing part extracting a variable from in a program, a displaying part for displaying the variable extracted by the program analyzing part, an inputting part for inputting information specifying the variable, a test item extracting part extracting description including the variable specified by the information inputted from the inputting part from the program, and a specification generating part generating a program test specification in which the description extracted by the test item extracting part is defined as a test item.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、プログラムテスト
を行うためのプログラムテスト仕様書を生成するプログ
ラムテスト仕様書生成装置装置およびプログラムテスト
仕様書生成方法に関する。
The present invention relates to an apparatus and a method for generating a program test specification for generating a program test specification for performing a program test.

【0002】[0002]

【従来の技術】開発したプログラムが正常に動作するか
否かを確認するために、開発プログラムに種々のテスト
が行われる。ここで、このテストの1態様として、プロ
グラムの実行時に入力するパラメータの組み合わせを変
化させ、設計時に予定したプログラムの特定の箇所を通
過するか否かを確認するプログラムテストが行われる。
2. Description of the Related Art Various tests are performed on a developed program to confirm whether the developed program operates normally. Here, as one mode of this test, a program test is performed in which a combination of parameters input at the time of execution of the program is changed, and whether or not the program passes a specific portion of the program scheduled at the time of design is checked.

【0003】プログラムテストに先立って、プログラム
の実行時に通過の有無を確認するプログラムの箇所をテ
スト項目として表したプログラムテスト仕様書が作成さ
れる。プログラムテストは、このプログラムテスト仕様
書に基づいて行われる。
[0005] Prior to a program test, a program test specification is created in which a portion of the program for checking whether or not the program has passed during execution of the program is expressed as a test item. The program test is performed based on this program test specification.

【0004】また、既存のプログラムの機能強化や保守
等のために、既存のプログラムの新版としてのプログラ
ムを開発することがある。この場合、新版のプログラム
に対して、修正、追加を行った箇所が既存の部分にどの
程度影響を与えているかを判断するためのプログラムテ
ストが行われることがある。
In some cases, a program as a new version of an existing program is developed in order to enhance the functions or maintain the existing program. In this case, a program test may be performed on the new version of the program in order to determine how much the corrected or added portion affects the existing portion.

【0005】このときはこのプログラムテストの目的に
沿ったプログラムテスト仕様書を作成する必要がある。
At this time, it is necessary to prepare a program test specification for the purpose of the program test.

【0006】[0006]

【発明が解決しようとする課題】しかるに従来のプログ
ラムテスト仕様書は、人がプログラムテストの対象とな
るプログラムの記述を見てテストが必要であると思われ
る部分を1つずつ確認、抽出した後に、それをテスト項
目として記述することによって作成されていた。このた
め、プログラムテスト仕様書の作成に大きな労力を要し
ていた。
However, the conventional program test specification is based on the fact that a person looks at a description of a program to be subjected to a program test, and confirms and extracts, one by one, portions which are deemed necessary to be tested. Was created by describing it as a test item. For this reason, great effort was required to create the program test specifications.

【0007】ソフトウェアツ‐ルなどを利用してこの労
力を軽減することも考えられるが、従来のツールは重要
度に応じたテスト項目の抽出ができなかった。結局、人
手でテスト項目として重要でない項目や冗長な項目を削
除する必要があり、ツールの利用は労力の軽減には結び
ついていなかった。
Although it is conceivable to reduce this effort by using a software tool or the like, conventional tools cannot extract test items according to importance. In the end, it was necessary to manually remove non-essential and redundant test items, and the use of tools did not reduce the effort.

【0008】本発明はこのような課題を解決するために
なされたもので、重要度に応じたテスト項目の自動的な
抽出を可能とするプログラムテスト仕様書生成装置を提
供することを目的としている。
The present invention has been made to solve such a problem, and an object of the present invention is to provide a program test specification generating apparatus capable of automatically extracting test items according to importance. .

【0009】[0009]

【課題を解決するための手段】上記の課題を解決するた
めに本発明に係るプログラムテスト仕様書生成装置は以
下の構成を採用する。
In order to solve the above-mentioned problems, a program test specification generating apparatus according to the present invention employs the following configuration.

【0010】(1)プログラム中から変数を抽出するプ
ログラム解析部と、前記プログラム解析部によって抽出
された変数を表示する表示部と、変数を特定する情報を
入力するための入力部と、前記入力部から入力された情
報によって特定された変数を含む記述を前記プログラム
から抽出するテスト項目抽出部と、前記テスト項目抽出
部によって抽出された記述をテスト項目とするプログラ
ムテスト仕様書を生成する仕様書生成部とを具備するこ
とを特徴とする。
(1) A program analysis unit for extracting variables from a program, a display unit for displaying the variables extracted by the program analysis unit, an input unit for inputting information for specifying the variables, and the input unit A test item extracting unit for extracting a description including a variable specified by information input from the unit from the program, and a specification for generating a program test specification using the description extracted by the test item extracting unit as a test item And a generation unit.

【0011】プログラム中から変数を自動的に抽出した
変数中から操作者がテスト項目の抽出に利用する変数を
指定することで、プログラムテスト仕様書が自動的に生
成される。その結果、プログラムテスト仕様書の作成が
極めて容易に行える。
A program test specification is automatically generated when an operator designates a variable to be used for extracting a test item from variables automatically extracted from a program. As a result, it is possible to extremely easily create a program test specification.

【0012】(2)プログラム中から変数名および関数
を抽出するプログラム解析部と、前記プログラム解析部
によって抽出された変数および関数を表示する表示部
と、変数または関数を特定する情報を入力するための入
力部と、前記入力部から入力された変数または関数を含
む記述を前記プログラムから抽出するテスト項目抽出部
と、前記テスト項目抽出部によって抽出された記述をテ
スト項目とするプログラムテスト仕様書を生成する仕様
書生成部とを具備することを特徴とする。
(2) A program analyzer for extracting variable names and functions from a program, a display for displaying variables and functions extracted by the program analyzer, and information for specifying variables or functions. An input unit, a test item extraction unit that extracts a description including a variable or a function input from the input unit from the program, and a program test specification that uses the description extracted by the test item extraction unit as a test item. And a specification generation unit for generating the specification.

【0013】変数と関数の双方をプログラム中から抽出
し、操作者が変数、関数からテスト項目の抽出に利用す
るものを指定することで、プログラムテスト仕様書が自
動的に生成される。
A program test specification is automatically generated by extracting both variables and functions from a program and designating an operator to use the variables and functions to extract test items from the program.

【0014】(3)(1)において前記表示部が、前記
プログラム解析部によって抽出された変数および関数を
その出現頻度順に表示することを特徴とする。
(3) In (1), the display unit displays the variables and functions extracted by the program analysis unit in order of their appearance frequency.

【0015】プログラムから抽出した変数が頻度順に表
示されることから、操作者による変数の重要度の判断が
容易になる。
Since the variables extracted from the program are displayed in order of frequency, the operator can easily determine the importance of the variables.

【0016】(4)プログラム中の変数の出現頻度を算
出する出現頻度算出部と、前記出現頻度算出部によって
算出された変数の最大出現頻度を表示する表示部と、出
現頻度レベルを入力するための入力部と、前記入力部に
入力された出現頻度レベル以上の出現頻度の変数を含む
記述を前記プログラムから抽出するテスト項目抽出部
と、前記テスト項目抽出部によって抽出された記述をテ
スト項目とするプログラムテスト仕様書を生成する仕様
書生成部とを具備することを特徴とする。
(4) An appearance frequency calculating section for calculating the appearance frequency of the variable in the program, a display section for displaying the maximum occurrence frequency of the variable calculated by the appearance frequency calculation section, and an input of the appearance frequency level. An input unit, a test item extraction unit that extracts from the program a description including a variable of an appearance frequency equal to or higher than the appearance frequency level input to the input unit, and a description extracted by the test item extraction unit as a test item. And a specification generation unit that generates a program test specification to be executed.

【0017】操作者が出現頻度レベルを指定するだけ
で、指定した出現頻度レベル以上の出現頻度をもつ変数
が選択され、その変数を含む記述をテスト項目とするプ
ログラムテスト仕様書が自動的に生成される。
Just by the operator designating the appearance frequency level, a variable having an appearance frequency equal to or higher than the designated appearance frequency level is selected, and a program test specification having a description including the variable as a test item is automatically generated. Is done.

【0018】(5)プログラム中の変数および関数の出
現頻度を算出する出現頻度算出部と、前記出現頻度算出
部によって算出された変数および関数の最大出現頻度を
表示する表示部と、変数と関数それぞれの出現頻度レベ
ルを入力するための入力部と、前記入力部に入力された
それぞれの出現頻度レベル以上の出現頻度の変数または
関数を含む記述を前記プログラムから抽出するテスト項
目抽出部と、前記テスト項目抽出部によって抽出された
記述をテスト項目とするプログラムテスト仕様書を生成
する仕様書生成部とを具備することを特徴とする。
(5) an appearance frequency calculating section for calculating the appearance frequency of variables and functions in the program; a display section for displaying the maximum occurrence frequency of the variables and functions calculated by the appearance frequency calculation section; An input unit for inputting each appearance frequency level, a test item extraction unit for extracting a description including a variable or function of an appearance frequency equal to or higher than the respective appearance frequency level input to the input unit from the program, A specification generation unit that generates a program test specification using the description extracted by the test item extraction unit as a test item.

【0019】変数と関数のそれぞれに出現頻度レベルを
指定することで、それぞれの出現頻度レベル以上の出現
頻度を有する変数、関数を自動的に選択できる。変数と
関数で別個に出現頻度レベルを指定できるのでそれぞれ
の重要度を個別に考慮したプログラムテスト仕様書を自
動的に生成できる。
By specifying an appearance frequency level for each of the variable and the function, a variable or function having an appearance frequency equal to or higher than the respective appearance frequency level can be automatically selected. Since the appearance frequency level can be separately specified for the variable and the function, a program test specification can be automatically generated in which each importance is individually considered.

【0020】(6)(4)または(5)において、前記
入力部が、変数または関数を特定するための情報をさら
に入力するためのものであり、前記テスト項目抽出部
が、前記入力部に入力された情報によって特定された変
数または関数を含む記述を前記プログラムから抽出する
ことを特徴とする。
(6) In (4) or (5), the input section is for further inputting information for specifying a variable or a function, and the test item extracting section is provided for the input section. A description including a variable or a function specified by the input information is extracted from the program.

【0021】出現頻度レベルの指定と併せて、変数を直
接指定できることから、プログラムテスト仕様書の生成
にあたって、変数の重要度をよりきめ細かに反映したテ
スト項目が選択される。
Since the variable can be directly specified together with the specification of the appearance frequency level, a test item that reflects the importance of the variable more precisely is selected when generating the program test specification.

【0022】(7)(4)から(6)において、前記表
示部が、前記プログラム解析部によって抽出された変数
および関数をそれぞれの出現頻度順に表示することを特
徴とする。
(7) In (4) to (6), the display unit displays the variables and functions extracted by the program analysis unit in the order of their appearance frequencies.

【0023】出現頻度順の変数表示によって出現頻度レ
ベルあるいは変数そのものの決定が容易になる。
The display of the variables in the order of appearance frequency makes it easy to determine the appearance frequency level or the variables themselves.

【0024】(8)プログラムの制御構造を表す構文木
を生成する構文木生成部と、ネストレベルを入力するた
めの入力部と、前記入力部に入力されたネストレベル以
上のネストレベルを有する箇所を前記プログラムから抽
出するテスト項目抽出部と、前記テスト項目抽出部によ
って抽出された記述をテスト項目とするプログラムテス
ト仕様書を生成する仕様書生成部とを具備することを特
徴とする。
(8) A syntax tree generating section for generating a syntax tree representing a control structure of a program, an input section for inputting a nest level, and a section having a nest level higher than the nest level input to the input section From the program, and a specification generator that generates a program test specification using the description extracted by the test item extractor as a test item.

【0025】構文木を予め生成しておくことで、指定し
たネストレベル以上のネストレベルを有する箇所をプロ
グラムから自動的に抽出できる。
By generating a syntax tree in advance, a portion having a nesting level higher than a specified nesting level can be automatically extracted from a program.

【0026】(9)第1のプログラムから第2のプログ
ラムと相違する箇所を抽出して、差分プログラムを生成
する差分プログラム生成部と、前記差分プログラムから
変数を抽出するプログラム解析部と、前記プログラム解
析部によって抽出された変数を含む箇所を前記第1のプ
ログラムから抽出するテスト項目抽出部と、前記テスト
項目抽出部によって抽出された記述をテスト項目とする
プログラムテスト仕様書を生成する仕様書生成部とを具
備することを特徴とする。
(9) A difference program generator for extracting a difference from the first program to the second program to generate a difference program, a program analyzer for extracting variables from the difference program, A test item extracting unit for extracting a portion including a variable extracted by the analyzing unit from the first program, and a specification generating unit for generating a program test specification using the description extracted by the test item extracting unit as a test item And a unit.

【0027】第1のプログラム中から第1のプログラム
から追加、変更された部分を自動的に抽出し、この追
加、変更部分に含まれる変数を抽出し、第1のプログラ
ム中この変数を含む記述をテスト項目とする。
A part added or changed from the first program is automatically extracted from the first program, a variable included in the added or changed part is extracted, and a description including the variable in the first program is included. Is a test item.

【0028】この結果、第1のプログラムで追加、変更
された箇所が第2のプログラムと同一の部分の動作に与
える影響を判断するのに適した、プログラムテスト仕様
書を生成できる。
As a result, it is possible to generate a program test specification suitable for judging the influence of the portion added or changed in the first program on the operation of the same portion as the second program.

【0029】[0029]

【発明の実施の形態】(第1実施形態)本発明の第1の
実施形態を図1に示す。図1は、本実施形態の構成を示
すブロック図である。
(First Embodiment) FIG. 1 shows a first embodiment of the present invention. FIG. 1 is a block diagram showing the configuration of the present embodiment.

【0030】図1に示されるように、本実施形態に係る
プログラムテスト仕様書生成装置は、プログラム解析部
11,入力部12,テスト項目抽出部13,仕様書生成
部14から構成される。
As shown in FIG. 1, the program test specification generating apparatus according to the present embodiment includes a program analyzing unit 11, an input unit 12, a test item extracting unit 13, and a specification generating unit 14.

【0031】プログラムテスト仕様書生成装置によっ
て、プログラム15からプログラムテスト仕様書17が
作成されるが、中間処理として変数、関数の一覧が記載
された変数・関数ファイル16の生成が行われる。
The program test specification generating apparatus generates a program test specification 17 from the program 15, and generates a variable / function file 16 containing a list of variables and functions as an intermediate process.

【0032】図2は、本実施形態における処理の流れを
示すフロー図である。
FIG. 2 is a flowchart showing the flow of processing in this embodiment.

【0033】プログラム解析部11は、プログラム15
から変数、関数を抽出し変数・関数ファイル16として
出力する(S21)。変数・関数ファイル16の内容は
必要に応じてディスプレイ等に表示される(S22)。
The program analysis unit 11 includes a program 15
Are extracted from the data and output as the variable / function file 16 (S21). The contents of the variable / function file 16 are displayed on a display or the like as necessary (S22).

【0034】入力部12には、テスト項目抽出のための
変数、関数が指定され入力される(S23)。ここには
オペレータが変数・関数ファイル16中から、重要と思
われる変数、関数を選択して入力する。
Variables and functions for extracting test items are designated and input to the input unit 12 (S23). Here, the operator selects and inputs variables and functions considered to be important from the variable / function file 16.

【0035】テスト項目抽出部13は、プログラム15
から入力された変数、関数を使用している箇所を抽出し
仕様書生成部14に送る(S24)。仕様書生成部14
はプログラムテスト仕様書17を出力する(S25)。
The test item extraction unit 13 includes a program 15
Then, the part using the variables and functions input from is extracted and sent to the specification generator 14 (S24). Specification generation unit 14
Outputs the program test specification 17 (S25).

【0036】図3は、S21の変数・関数の抽出の手順
をより詳しく説明するためのフロー図である。プログラ
ム15から変数または関数の宣言文をサーチし、宣言文
のある行番号と共に変数・関数ファイル16に追加記入
される。
FIG. 3 is a flowchart for explaining the procedure for extracting variables and functions in S21 in more detail. A variable or function declaration is searched from the program 15 and is additionally written in the variable / function file 16 together with the line number of the declaration.

【0037】図3に示されるように、行番号を表す変数
lineが0にセットされる(S31)。そして、プロ
グラム15の1行がプログラム解析部11によって読み
込まれる(S32)。プログラム15を1行読み込んだ
ことから、変数lineには1が加算される。そして、
読み込んだ行が関数または変数の宣言文を含むか否かが
判断される(S34)。
As shown in FIG. 3, a variable line indicating a line number is set to 0 (S31). Then, one line of the program 15 is read by the program analysis unit 11 (S32). Since one line of the program 15 has been read, 1 is added to the variable line. And
It is determined whether the read line contains a function or variable declaration statement (S34).

【0038】この判断がYesなら、変数名または関数
名が行番号を示す変数lineとともに変数・関数ファ
イル16に追加して記入される(S35)。このとき、
1行において複数の変数が宣言されている場合は、変数
ごとに分解されて変数・関数ファイル16に記入され
る。
If the determination is Yes, the variable or function name is added to the variable / function file 16 together with the variable line indicating the line number (S35). At this time,
When a plurality of variables are declared in one line, the variables are decomposed for each variable and entered in the variable / function file 16.

【0039】ステップS34の判断がNoならステップ
S35の処置は行われない。
If the determination in step S34 is No, the processing in step S35 is not performed.

【0040】プログラムの最後の行に到達し次の行が存
在しないか否かが判断され(S35)、この判断がYe
sのときは変数・関数の抽出処理は終了する(S3
7)。ステップS35の判断がNoのときは、ステップ
S32に戻って処理が続行される。
It is determined whether the last line of the program has been reached and the next line does not exist (S35).
In the case of s, the variable / function extraction process ends (S3
7). If the determination in step S35 is No, the process returns to step S32 and continues.

【0041】変数・関数の抽出処理が終了したときには
必要に応じて、変数・関数ファイル16中の変数、関数
のソートを行い一覧を容易にする。
When the variable / function extraction processing is completed, the variables and functions in the variable / function file 16 are sorted as necessary to facilitate listing.

【0042】なお、図3は、変数、関数の使用に際して
必ず宣言が必要なプログラム言語、例えばC言語を対象
とした例である。宣言なしで変数を使用できる言語では
宣言文以外からも変数、関数を抽出すべきであるのはい
うまでもない。
FIG. 3 shows an example of a program language, such as the C language, which must be declared when using variables and functions. It goes without saying that in a language that can use variables without declaration, variables and functions should be extracted from sources other than the declaration statement.

【0043】本実施形態によって生成されたプログラム
テスト仕様書の例を図4に示す。図4は変数yを含む行
をテスト項目として抽出した例である。テスト項目は番
号1−1,1−2,2−1−1,2−1−2の項目内
容、例えば、「y=a+b;」である。なお、番号1,
2,2−1はテスト項目の区切りとして記載されてい
る。
FIG. 4 shows an example of a program test specification generated according to the present embodiment. FIG. 4 is an example in which a row including the variable y is extracted as a test item. The test items are item contents of numbers 1-1, 1-2, 2-1-1, and 1-2-2, for example, “y = a + b;”. In addition, number 1,
2, 2-1 are described as test item delimiters.

【0044】以上のように本実施形態では、プログラム
中で使用されているすべての変数,関数を自動的に抽出
して,それらに対して使用者がプログラムテストを行う
必要があると判断した変数、関数を指定する機構を有す
る。
As described above, in this embodiment, all the variables and functions used in the program are automatically extracted, and the variables for which it is determined that the user needs to perform the program test are determined. , A function to specify a function.

【0045】そして、使用者によって指定された変数・
関数に関するテスト項目をもれなくプログラム中から抽
出し、プログラムテスト仕様書を自動的に生成すること
ができる。
The variable designated by the user
All test items related to functions can be extracted from the program, and a program test specification can be automatically generated.

【0046】(第2実施形態)本発明の第2の実施形態
を図5に示す。図5は、本実施形態に係るプログラムテ
スト仕様書生成装置の構成を示すブロック図である。
(Second Embodiment) FIG. 5 shows a second embodiment of the present invention. FIG. 5 is a block diagram illustrating a configuration of the program test specification generation device according to the present embodiment.

【0047】図5に示されるように、本実施形態に係る
プログラムテスト仕様書生成装置は、プログラム解析部
61,入力部62,テスト項目抽出部63,仕様書生成
部64から構成される。
As shown in FIG. 5, the program test specification generating apparatus according to the present embodiment comprises a program analyzing section 61, an input section 62, a test item extracting section 63, and a specification generating section 64.

【0048】プログラムテスト仕様書生成装置によっ
て、プログラム65からプログラムテスト仕様書67が
作成されるが、中間処理として変数の一覧が頻度順に記
載された変数ファイル66の生成が行われる。
The program test specification generating device generates a program test specification 67 from the program 65. As an intermediate process, a variable file 66 in which a list of variables is described in order of frequency is generated.

【0049】図6は、本実施形態における処理の流れを
示すフロー図である。
FIG. 6 is a flowchart showing the flow of processing in this embodiment.

【0050】プログラム解析部61は、プログラム65
から変数を抽出し変数一時ファイル68に出力する(S
71)。そして、抽出した変数がそれぞれプログラム6
5中に出現する頻度を算出する。
The program analysis section 61 includes a program 65
And outputs it to the temporary variable file 68 (S
71). Then, the extracted variables are stored in the program 6
5 is calculated.

【0051】その結果に基づいて、変数一時ファイル6
8中の変数が頻度順に並び替えられ、変数が出現頻度順
に並んだ変数ファイル66が生成される。変数ファイル
66の内容は必要に応じてディスプレイ等に表示される
(S73)。なお、この表示のさせ方は、(1)変数名
そのものを頻度順に表示する、(2)出現頻度の最大値
のみを表示する、(3)出現頻度の分布を表示する(例
えば、横軸に出現頻度の数を縦軸にその出現頻度をもつ
変数の個数をとったグラフを表示する)等種々の方法が
考えられる。
Based on the result, the variable temporary file 6
8 are rearranged in order of frequency, and a variable file 66 in which variables are arranged in order of appearance frequency is generated. The contents of the variable file 66 are displayed on a display or the like as necessary (S73). Note that this display method includes (1) displaying the variable names themselves in order of frequency, (2) displaying only the maximum value of the appearance frequency, and (3) displaying the distribution of the appearance frequency (for example, the horizontal axis Various methods are conceivable, such as displaying a graph in which the number of occurrence frequencies is plotted on the vertical axis and the number of variables having the appearance frequency is taken).

【0052】入力部62には、テスト項目抽出のための
頻度レベルが指定され入力される(S74)。頻度レベ
ルは、テスト項目抽出に用いる変数を選択するための境
界値である。頻度レベルはオペレータがステップS73
における表示等を考慮して決定する。
A frequency level for extracting test items is designated and input to the input section 62 (S74). The frequency level is a boundary value for selecting a variable used for test item extraction. The frequency level is determined by the operator in step S73.
Is determined in consideration of the display and the like.

【0053】テスト項目抽出部63は、プログラム65
から入力された頻度レベル以上の出現頻度を有する変数
を使用している箇所を抽出し、仕様書生成部64に送る
(S75)。仕様書生成部14はプログラムテスト仕様
書17を出力する(S76)。
The test item extracting section 63 is a program
Then, a portion using a variable having an appearance frequency equal to or higher than the frequency level input from is extracted and sent to the specification generating unit 64 (S75). The specification generator 14 outputs the program test specification 17 (S76).

【0054】ステップS71は、実施形態1と同様に、
図3のフローで実現できる。
Step S71 is the same as in the first embodiment.
It can be realized by the flow of FIG.

【0055】図7は、ステップS72の変数の出現頻度
算出の手順をより詳しく説明するためのフロー図であ
る。
FIG. 7 is a flowchart for explaining in more detail the procedure of calculating the frequency of appearance of variables in step S72.

【0056】まず、プログラム解析部61は、S71で
生成された変数一時ファイル68を読み込む(S8
1)。そして、変数の頻度を表す変数Ni(N1,N
2、…Nn)をすべて0にセットする(S82)。ここ
で、nは変数の個数であり、iはそれぞれの変数を表す
添え字である。
First, the program analysis section 61 reads the temporary variable file 68 generated in S71 (S8).
1). Then, a variable Ni (N1, N1,
, Nn) are all set to 0 (S82). Here, n is the number of variables, and i is a suffix representing each variable.

【0057】プログラム65の1行がプログラム解析部
61によって読み込まれる(S83)。そして、読み込
んだ行がいずれかの変数を含むか否かが判断される(S
84)。
One line of the program 65 is read by the program analyzer 61 (S83). Then, it is determined whether the read line includes any variable (S
84).

【0058】この判断がYesなら、その行に含まれる
変数についてのNiに1が加算される(S85)。ここ
で、iは、その行に含まれた変数に応じて、適宜に単
数、あるいは複数1からnの間で選択される。
If the determination is Yes, 1 is added to Ni for the variables included in the row (S85). Here, i is appropriately selected from a single or a plurality from 1 to n according to the variables included in the row.

【0059】次にプログラムの最後の行に到達して次の
行が存在しないか否かが判断され(S86)、この判断
がYesのときは変数の出現頻度算出処理は終了する
(S87)。終了に際して、変数一時ファイル68中の
変数がそれぞれの変数に対応するNiの大きい順に並べ
替えられる。ステップS86の判断がNoのときは、S
83に戻って処理が続行される。
Next, it is determined whether or not the program reaches the last line and the next line does not exist (S86). If the determination is Yes, the variable appearance frequency calculation processing ends (S87). Upon completion, the variables in the variable temporary file 68 are rearranged in descending order of Ni corresponding to each variable. If the determination in step S86 is No, S
Returning to 83, the processing is continued.

【0060】以上のようにして、出現頻度を基準として
変数を選択し、この変数を含む箇所をテスト項目として
プログラム65より抽出することができる。
As described above, it is possible to select a variable on the basis of the frequency of appearance, and extract a part including this variable from the program 65 as a test item.

【0061】なお、本実施形態では、変数のみを対象と
して出現頻度の算出等を行っているが、関数をも併せて
あるいは関数単独で出現頻度の算出および関数を使用し
ている箇所の抽出を行えるのはいうまでもない。
In the present embodiment, the calculation of the appearance frequency is performed only for the variables. However, the calculation of the appearance frequency together with the function or the function alone and the extraction of the part using the function are performed. It goes without saying that it can be done.

【0062】また、ステップS74において頻度レベル
の入力と併せて頻度レベルとは無関係に変数そのものを
入力し、ステップS75において入力した変数を含む記
述をプログラム65から抽出できることはいうまでもな
い。
Further, it goes without saying that in step S 74, the variable itself can be input irrespective of the frequency level together with the input of the frequency level, and the description including the variable input in step S 75 can be extracted from the program 65.

【0063】以上のように本実施形態では、プログラム
中に出現する変数を抽出して出現頻度を算出、表示し、
使用者が出現頻度により変数を指定する機構を付加して
いる。
As described above, in the present embodiment, variables appearing in a program are extracted, the appearance frequency is calculated and displayed,
A mechanism is added for the user to specify a variable according to the frequency of appearance.

【0064】これにより,プログラム中で煩雑に出現す
る変数についてもれなくプログラムから対応する記述を
テスト項目として抽出できる。
As a result, a corresponding description can be extracted from the program as a test item without fail for variables that appear complicated in the program.

【0065】このように本実施形態において、プログラ
ムテスト仕様書を自動的に生成することができ、プログ
ラムテスト仕様書を作成する工数を低減することができ
る。
As described above, in this embodiment, the program test specification can be automatically generated, and the number of steps for preparing the program test specification can be reduced.

【0066】(第3実施形態)本発明の第3の実施形態
を図8に示す。図8は、本実施形態の構成を示すブロッ
ク図である。
(Third Embodiment) FIG. 8 shows a third embodiment of the present invention. FIG. 8 is a block diagram showing the configuration of the present embodiment.

【0067】図8に示されるように、本実施形態に係る
プログラムテスト仕様書生成装置は、プログラム解析部
91,入力部92,テスト項目抽出部93,仕様書生成
部94から構成される。
As shown in FIG. 8, the program test specification generating apparatus according to the present embodiment includes a program analyzing section 91, an input section 92, a test item extracting section 93, and a specification generating section 94.

【0068】プログラムテスト仕様書生成装置によっ
て、プログラム95からプログラムテスト仕様書97が
作成されるが、中間処理として構文木が記載された構文
木ファイル96の生成が行われる。
A program test specification 97 is created from the program 95 by the program test specification generator, and a syntax tree file 96 in which a syntax tree is described is generated as an intermediate process.

【0069】図9は、本実施形態における処理の流れを
示すフロー図である。
FIG. 9 is a flowchart showing the flow of processing in this embodiment.

【0070】プログラム解析部91は、プログラム95
からプログラムのネスティングの状態を分析し、プログ
ラムの制御構造、即ち、プログラムの行とネスト数の対
応関係を示す構文木ファイル96として出力する(S1
01)。なお、構文木の詳細については後述する。
The program analyzing section 91 includes a program 95
, The nesting state of the program is analyzed and output as a syntax tree file 96 indicating the control structure of the program, that is, the correspondence between the program line and the nest number (S1).
01). The details of the syntax tree will be described later.

【0071】入力部92には、テスト項目抽出のための
ネストレベルが指定され入力される(S102)。ネス
トレベルは、テスト項目抽出範囲を決定するための境界
値である。
A nest level for extracting test items is designated and input to the input section 92 (S102). The nest level is a boundary value for determining a test item extraction range.

【0072】テスト項目抽出部93は、プログラム15
から入力されたネストレベル以上のネスト数を持つ箇所
をプログラム95から抽出し、仕様書生成部14に送る
(S103)。仕様書生成部94はプログラムテスト仕
様書97を生成、出力する(S1045)。
The test item extracting section 93 is a program
Then, a portion having a nest number equal to or greater than the nest level input from is extracted from the program 95 and sent to the specification generating unit 14 (S103). The specification generator 94 generates and outputs a program test specification 97 (S1045).

【0073】図10は、構文木の概念を説明するための
プログラムリストであり、プログラムとネスト数の対応
関係を示している。
FIG. 10 is a program list for explaining the concept of a syntax tree, and shows the correspondence between programs and nest numbers.

【0074】図10に示すように、プログラムが行番号
とともに記載されている。ここで、図10の右辺の数値
はネスト数であり、それぞれの行のネストの深さを表し
ている。ここでは、このようにプログラムの行とネスト
の深さとの対応関係を表したものを構文木と呼ぶことと
する。
As shown in FIG. 10, the program is described together with the line numbers. Here, the numerical value on the right side of FIG. 10 is the nesting number, and indicates the nesting depth of each row. Here, the expression representing the correspondence between the program lines and the nesting depth is called a syntax tree.

【0075】即ち、構文木はプログラムの制御構造の深
さを表す。行番号1から4までは、制御構造内に組み込
まれていないためネスト数は0である。しかし、行番号
5から9まではif文の制御構造の範囲内なのでネスト
数は1である。行番号10から12の範囲は、先ほどの
行番号5のif文の制御範囲から外れるのでネスト数は
0となる。さらに、行番号13から25までは行番号1
3のwhile文の制御範囲なのでネスト数は少なくと
も1以上となる。このうち、行番号15から23の範囲
はさらに行番号15のif文の制御範囲でもあるためネ
スト数は少なくとも2以上となる。さらにこのうち、行
番号18から22の範囲は行番号18のif文の制御範
囲でもあるためネスト数は3となる。
That is, the syntax tree indicates the depth of the control structure of the program. Since the line numbers 1 to 4 are not incorporated in the control structure, the nest number is 0. However, since the line numbers 5 to 9 are within the range of the control structure of the if statement, the nest number is 1. Since the range of line numbers 10 to 12 is out of the control range of the if statement of line number 5 described above, the nest number is 0. Further, line numbers 13 to 25 correspond to line number 1
Since the control range of the while statement is 3, the nest number is at least one. Of these, the range of line numbers 15 to 23 is also the control range of the if sentence of line number 15, so the number of nests is at least two. Furthermore, among these, the range of line numbers 18 to 22 is also the control range of the if sentence of line number 18, so that the nest number is 3.

【0076】以上のように図10に示されたネスト数は
それぞれの行が、いくつの制御構造に組み込まれている
かを表す。このネスト数が大きいところにプログラムの
欠陥があるとその影響は極めて大きい。即ち、ネスト数
はある意味でそれぞれの行の重要度を表す尺度として利
用できる。
As described above, the number of nests shown in FIG. 10 indicates how many control structures each row is incorporated in. If there is a program defect where the number of nests is large, the effect is extremely large. That is, the nest number can be used as a measure indicating the importance of each row in a sense.

【0077】例えば、ステップS102においてネスト
レベルとして2が入力されたとすると、S103におい
てネスト数2以上の行番号15から23の範囲が抽出さ
れる。但し、行番号17、20,22,23は非実行文
なのでテスト項目としては除外される。
For example, if 2 is input as the nest level in step S102, the range of line numbers 15 to 23 with the nest number of 2 or more is extracted in S103. However, since the line numbers 17, 20, 22, and 23 are non-executable statements, they are excluded as test items.

【0078】図11は、S101の構文木ファイル生成
の手順をより詳しく説明するためのフロー図である。
FIG. 11 is a flowchart for explaining the syntax tree file generation procedure in S101 in more detail.

【0079】まず、行番号を表す変数lineとネステ
ィング数を表すcountとを0にセットする(S12
1)。
First, the variable line representing the line number and the count representing the nesting number are set to 0 (S12).
1).

【0080】プログラム解析部91は、プログラム95
を1行読み込む(S122)。そして、1行の読み込み
に対応してlineに1を加算する(S123)。
The program analysis section 91 has a program 95
Is read in one line (S122). Then, 1 is added to line in response to reading of one row (S123).

【0081】そして、読み込んだ行が制御構造の始まり
(例えば、if文、while文等)であるか否かが判
断される(S124)。この判断がYesであれば、c
ountに1が加算される(S125)。
Then, it is determined whether or not the read line is the beginning of the control structure (for example, if statement, while statement, etc.) (S124). If this determination is Yes, c
“1” is added to “out” (S125).

【0082】ステップS124の判断がNoのときは、
読み込んだ行が制御構造の終わりであるか否かが判断さ
れ(S126)、この判断がYesならcountから
1が減算される(S127)。なお、S126の判断が
Noのときは次のステップ(S128)に進む。
If the determination in step S124 is No,
It is determined whether or not the read line is the end of the control structure (S126). If the determination is Yes, 1 is subtracted from count (S127). If the determination in S126 is No, the process proceeds to the next step (S128).

【0083】ステップS125、S127の次に、li
neとcountの1対が構文木ファイル96に追加し
て記入される(S129)。
After steps S125 and S127, li
A pair of ne and count is additionally written in the syntax tree file 96 (S129).

【0084】次に読み込んだ行がプログラムの最後の行
でないかが判断される(S129)。ステップS129
の判断がYesなら構文木の生成処理は終了し、判断が
NoならS122に戻って処理が続行される。
Next, it is determined whether the read line is the last line of the program (S129). Step S129
If the determination is Yes, the syntax tree generation process ends, and if the determination is No, the process returns to S122 and continues.

【0085】このようにして、プログラムの行番号(l
ine)とそれに対応するネスト数(count)が次
々にファイルに書き加えられ構文木ファイル96が生成
される。
Thus, the program line number (l
Ine) and the corresponding nest number (count) are sequentially added to the file, and a syntax tree file 96 is generated.

【0086】プログラムテスト仕様書は、第1の実施形
態と同様であるので、記載を省略する。
The program test specification is the same as that of the first embodiment, so that the description is omitted.

【0087】以上のように本実施形態では、プログラム
の制御構造の複雑度を表すネストレベルを使用者が指定
し、それ以上に複雑である制御構造に関して、プログラ
ム中の記述を抽出してテスト項目とする機構を有する。
As described above, in the present embodiment, the user specifies the nesting level indicating the complexity of the control structure of the program, and extracts the description in the program for the control structure which is more complicated than the test item. It has a mechanism to be.

【0088】このため、開発したプログラムに対するプ
ログラムテストにおいて使用者が選択した複雑度以上の
記述についてテスト項目として抽出し、プログラムテス
ト仕様書を自動的に生成できる。
Therefore, in a program test for a developed program, a description of a complexity or more selected by a user is extracted as a test item, and a program test specification can be automatically generated.

【0089】その結果、効率的なプログラムテストを実
施することができる。
As a result, an efficient program test can be performed.

【0090】(第4実施形態)本発明の第4の実施形態
を図12に示す。図12は、本実施形態の構成を示すブ
ロック図である。
(Fourth Embodiment) FIG. 12 shows a fourth embodiment of the present invention. FIG. 12 is a block diagram showing the configuration of the present embodiment.

【0091】図12に示されるように、本実施形態に係
るプログラムテスト仕様書生成装置は、第1のプログラ
ム解析部131,第2のプログラム解析部132,テス
ト項目抽出部133,仕様書生成部134から構成され
る。
As shown in FIG. 12, the program test specification generating apparatus according to the present embodiment comprises a first program analyzing section 131, a second program analyzing section 132, a test item extracting section 133, and a specification generating section. 134.

【0092】プログラムテスト仕様書生成装置による新
規版のプログラム136のプログラムテスト仕様書13
9の生成にあたって、中間処理として既存版プログラム
135と新規版プログラム136の差分プログラムファ
イル137、および差分プログラムファイル137中か
ら抽出された変数ファイル138の生成が行われる。
The program test specification 13 of the new version of the program 136 by the program test specification generation device
9 is generated as an intermediate process, a difference program file 137 of the existing version program 135 and the new version program 136 and a variable file 138 extracted from the difference program file 137 are generated.

【0093】図13は、本実施形態における処理の流れ
を示すフロー図である。
FIG. 13 is a flowchart showing the flow of processing in this embodiment.

【0094】第1のプログラム解析部141は、既存版
プログラム135と新規版プログラム136との相違す
る箇所を抽出した差分プログラムファイル137を生成
する(S141)。
The first program analysis section 141 generates a difference program file 137 by extracting the difference between the existing version program 135 and the new version program 136 (S141).

【0095】そして、第2のプログラム解析部132は
差分プログラムファイル137中で使用されている変数
を抽出する(S142)。
Then, the second program analyzer 132 extracts the variables used in the difference program file 137 (S142).

【0096】さらに、テスト項目抽出部133は、新規
版プログラム136から差分プログラムファイルから抽
出された変数を使用している箇所を抽出し仕様書生成部
14に送る(S143)。仕様書生成部134はプログ
ラムテスト仕様書139を生成、出力する(S14
4)。
Further, the test item extracting section 133 extracts a portion using the variable extracted from the difference program file from the new version program 136 and sends it to the specification creating section 14 (S143). The specification generator 134 generates and outputs the program test specification 139 (S14).
4).

【0097】次にS141の差分プログラムファイル1
37生成の手順をより詳しく説明する。差分プログラム
ファイル137は新規版プログラム136から既存版プ
ログラム135と相違する部分を抽出した結果が記録さ
れたものであるが、この相違は以下のように分類され
る。
Next, the difference program file 1 in S141
The procedure for generating 37 will be described in more detail. The difference program file 137 is a file in which a result of extracting a part different from the existing version program 135 from the new version program 136 is recorded, and this difference is classified as follows.

【0098】(1)既存版プログラム135に新しい行
を追加(あるいは挿入)した場合 (2)既存版プログラム135の行の内容を変更した場
合 (3)既存版プログラム135の行を削除した場合 差分プログラムファイル137はこの内、(1)、
(2)の追加、変更が行われた箇所を抽出して作成され
る。
(1) When a new line is added (or inserted) to the existing program 135 (2) When the contents of the line of the existing program 135 are changed (3) When the line of the existing program 135 is deleted The program file 137 includes (1)
It is created by extracting the part where (2) is added or changed.

【0099】(3)はそれ自体としては検出する必要は
ない。但し、実際は新規版プログラム136は、(1)
〜(3)の組み合わせから構成されるので、差分プログ
ラムファイル137の生成にあたって(1)〜(3)を
区分する必要が生じることになる。
(3) need not be detected as such. However, the new version program 136 is actually (1)
(3), it is necessary to classify (1) to (3) when generating the difference program file 137.

【0100】ステップS142の差分プログラムファイ
ル137からの変数の抽出について、さらに説明する。
The extraction of variables from the difference program file 137 in step S142 will be further described.

【0101】差分プログラムファイル137に用いられ
ている変数は次の2通りに分類できる。
The variables used in the difference program file 137 can be classified into the following two types.

【0102】(1)新規版プログラム136の追加、変
更部分のみで用いられている変数 (2)新規版プログラム136の追加、変更部分と既存
版プログラム135とで共通に使われている変数 (1)の変数を用いて新規版プログラム136からテス
ト項目を抽出すると、新規版プログラム136の追加、
変更部分に特化したプログラムテスト仕様書139を生
成できる。
(1) Variables used only in addition and change of new version program 136 (2) Variables used in common in addition and change of new version program 136 and existing version program 135 (1) When the test items are extracted from the new version program 136 using the variables in ()), the addition of the new version program 136,
A program test specification 139 specialized for a changed part can be generated.

【0103】このときの変数の抽出は、第1の実施形態
で図3に示された様に変数の宣言文の有無を検出するこ
とにより行える。
The extraction of variables at this time can be performed by detecting the presence or absence of a variable declaration statement as shown in FIG. 3 in the first embodiment.

【0104】(2)の変数を用いて新規版プログラム1
36からテスト項目を抽出すると新規版プログラム13
6の追加、変更によって、既存部分の動作状態にどのよ
うな影響を与えるかの判断を行うのに適したプログラム
テスト仕様書139を生成できる。
New version program 1 using variables in (2)
When the test items are extracted from 36, the new version program 13
6 can be generated to generate a program test specification 139 suitable for determining how to affect the operation state of the existing part.

【0105】この差分プログラムファイル137からの
共通した変数の抽出は、差分プログラムファイル137
で使われている変数のすべてを取り出した後、差分プロ
グラムファイル137内で宣言されている変数を除去す
ることによって行える。
The extraction of the common variables from the difference program file 137
After all of the variables used in step (1) are extracted, the variable declared in the difference program file 137 can be removed.

【0106】(3)さらに、(1)、(2)の変数の双
方を用いて、新規版プログラム136からテスト項目を
抽出できる。
(3) Further, a test item can be extracted from the new version program 136 by using both the variables (1) and (2).

【0107】このときは、新規版プログラム136の追
加、変更部分そのものおよび追加変更により既存部分に
与えた影響の双方を含めて判断するプログラムテスト仕
様書139を生成できる。
At this time, it is possible to generate a program test specification 139 for determining both the addition and change of the new version program 136 and the effect of the addition and change on the existing part.

【0108】この場合、差分プログラムファイル137
から使われている変数のすべてを取り出すことで、変数
の抽出が行える。
In this case, the difference program file 137
By extracting all the variables used from, the variables can be extracted.

【0109】以上のように変数の抽出には3通り考えら
れる。但し、単に差分プログラムファイル137から変
数の抽出といったときは、変数のすべてを抽出する3番
目の場合を通例いうものとする。
As described above, there are three ways to extract variables. However, when simply extracting variables from the difference program file 137, the third case of extracting all variables is a general case.

【0110】以上のように本実施形態では、既存版プロ
グラム135に新規版プログラム136において追加、
変更された記述中に出現する変数に関する記述を新規版
プログラムから抽出し、テスト項目としている。
As described above, in this embodiment, the new version program 136 is added to the existing version program 135,
Descriptions about variables that appear in the changed description are extracted from the new version of the program and used as test items.

【0111】このため、新規版プログラムで追加、修正
されたプログラムの記述に新たに含まれる変数によって
影響される部分を、新規版プログラムから自動的に抽出
してプログラムテスト仕様書を作成することができる。
For this reason, it is possible to automatically extract, from the new-version program, a part affected by a variable newly included in the description of the program added or modified in the new-version program to create a program test specification. it can.

【0112】このプログラムテスト仕様書は、新規版プ
ログラムにおける迫加、修正がプログラムの動作にどの
程度影響を与えているかを確認するためのリグレッショ
ンテスト用として利用できるプログラムテスト仕様書で
ある。
This program test specification is a program test specification that can be used for a regression test for checking how much the addition or modification of a new version program affects the operation of the program.

【0113】[0113]

【発明の効果】以上説明したように、本発明によれば、
重要度に応じたテスト項目の自動的な抽出を可能とする
プログラムテスト仕様書の作成装置を提供することがで
きる。
As described above, according to the present invention,
It is possible to provide an apparatus for creating a program test specification that enables automatic extraction of test items according to importance.

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

【図1】 本発明の第1の実施形態に係る構成を示すブ
ロック図である。
FIG. 1 is a block diagram showing a configuration according to a first embodiment of the present invention.

【図2】 本発明の第1の実施形態に係る処理の流れを
示すブロック図である。
FIG. 2 is a block diagram showing a processing flow according to the first embodiment of the present invention.

【図3】 図2における変数・関数の抽出の手順をより
詳しく説明するためのフロー図である。
FIG. 3 is a flowchart for explaining a procedure of extracting variables and functions in FIG. 2 in more detail;

【図4】 本発明の第1の実施形態よって生成されたプ
ログラムテスト仕様書の例を示す図である。
FIG. 4 is a diagram showing an example of a program test specification generated according to the first embodiment of the present invention.

【図5】 本発明の第2の実施形態に係る構成を示すブ
ロック図である。
FIG. 5 is a block diagram showing a configuration according to a second embodiment of the present invention.

【図6】 本発明の第2の実施形態に係る処理の流れを
示すブロック図である。
FIG. 6 is a block diagram showing a processing flow according to a second embodiment of the present invention.

【図7】 図6における変数の出現頻度算出の手順をよ
り詳しく説明するためのフロー図である。
FIG. 7 is a flowchart for explaining in more detail a procedure of calculating the appearance frequency of a variable in FIG. 6;

【図8】 本発明の第3の実施形態に係る構成を示すブ
ロック図である。
FIG. 8 is a block diagram showing a configuration according to a third embodiment of the present invention.

【図9】 本発明の第3の実施形態に係る処理の流れを
示すブロック図である。
FIG. 9 is a block diagram showing a flow of processing according to a third embodiment of the present invention.

【図10】 構文木の概念を説明するためのプログラム
リストである。
FIG. 10 is a program list for explaining the concept of a syntax tree.

【図11】 図9における構文木生成の手順をより詳し
く説明するためのフロー図である。
FIG. 11 is a flowchart for explaining the syntax tree generation procedure in FIG. 9 in more detail;

【図12】 本発明の第4の実施形態に係る構成を示す
ブロック図である。
FIG. 12 is a block diagram showing a configuration according to a fourth embodiment of the present invention.

【図13】 本発明の第4の実施形態に係る処理の流れ
を示すブロック図である。
FIG. 13 is a block diagram showing a processing flow according to a fourth embodiment of the present invention.

【符号の説明】[Explanation of symbols]

11 プログラム解析部 12 入力部 13 テスト項目抽出部 14 仕様書生成部 15 プログラム 16 変数・関数ファイル 17 プログラムテスト仕様書 61 プログラム解析部 62 入力部 63 テスト項目抽出部 64 仕様書生成部 65 プログラム 66 変数ファイル 67 プログラムテスト仕様書 68 変数一時ファイル 91 プログラム解析部 92 入力部 93 テスト項目抽出部 94 仕様書生成部 95 プログラム 96 構文木ファイル 97 プログラムテスト仕様書 131 第1のプログラム解析部 132 第2のプログラム解析部 133 テスト項目抽出部 134 仕様書生成部 135 既存版プログラム 136 新規版プログラム 137 差分プログラムファイル 138 変数ファイル 139 プログラムテスト仕様書 Reference Signs List 11 program analysis unit 12 input unit 13 test item extraction unit 14 specification generation unit 15 program 16 variable / function file 17 program test specification 61 program analysis unit 62 input unit 63 test item extraction unit 64 specification generation unit 65 program 66 variable File 67 program test specification 68 variable temporary file 91 program analysis unit 92 input unit 93 test item extraction unit 94 specification generation unit 95 program 96 syntax tree file 97 program test specification 131 first program analysis unit 132 second program Analysis unit 133 Test item extraction unit 134 Specification generation unit 135 Existing version program 136 New version program 137 Difference program file 138 Variable file 139 Program test specification

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 プログラム中から変数を抽出するプログ
ラム解析部と、 前記プログラム解析部によって抽出された変数を表示す
る表示部と、 変数を特定する情報を入力するための入力部と、 前記入力部から入力された情報によって特定された変数
を含む記述を前記プログラムから抽出するテスト項目抽
出部と、 前記テスト項目抽出部によって抽出された記述をテスト
項目とするプログラムテスト仕様書を生成する仕様書生
成部とを具備することを特徴とするプログラムテスト仕
様書生成装置。
1. A program analysis unit for extracting a variable from a program, a display unit for displaying a variable extracted by the program analysis unit, an input unit for inputting information for specifying a variable, and the input unit A test item extracting unit for extracting a description including a variable specified by information input from the program from the program, and a specification generating unit for generating a program test specification using the description extracted by the test item extracting unit as a test item And a program test specification generation device.
【請求項2】 プログラム中から変数名および関数を抽
出するプログラム解析部と、 前記プログラム解析部によって抽出された変数および関
数を表示する表示部と、 変数または関数を特定する情報を入力するための入力部
と、 前記入力部から入力された変数または関数を含む記述を
前記プログラムから抽出するテスト項目抽出部と、 前記テスト項目抽出部によって抽出された記述をテスト
項目とするプログラムテスト仕様書を生成する仕様書生
成部とを具備することを特徴とするプログラムテスト仕
様書生成装置。
2. A program analysis unit for extracting variable names and functions from a program, a display unit for displaying variables and functions extracted by the program analysis unit, and a unit for inputting information for specifying variables or functions. An input unit, a test item extracting unit that extracts a description including a variable or a function input from the input unit from the program, and a program test specification in which the description extracted by the test item extracting unit is used as a test item. A program test specification generation device, comprising:
【請求項3】 前記表示部が、前記プログラム解析部に
よって抽出された変数および関数をその出現頻度順に表
示することを特徴とする請求項1記載のテスト仕様書生
成装置。
3. The test specification generator according to claim 1, wherein the display unit displays the variables and functions extracted by the program analysis unit in the order of their appearance frequency.
【請求項4】 プログラム中の変数の出現頻度を算出す
る出現頻度算出部と、 前記出現頻度算出部によって算出された変数の最大出現
頻度を表示する表示部と、 出現頻度レベルを入力するための入力部と、 前記入力部に入力された出現頻度レベル以上の出現頻度
の変数を含む記述を前記プログラムから抽出するテスト
項目抽出部と、 前記テスト項目抽出部によって抽出された記述をテスト
項目とするプログラムテスト仕様書を生成する仕様書生
成部とを具備することを特徴とするプログラムテスト仕
様書生成装置。
4. An appearance frequency calculation unit for calculating an appearance frequency of a variable in a program, a display unit for displaying a maximum occurrence frequency of a variable calculated by the appearance frequency calculation unit, and an input unit for inputting an appearance frequency level. An input unit, a test item extraction unit that extracts from the program a description including an occurrence frequency variable equal to or higher than the appearance frequency level input to the input unit, and a description extracted by the test item extraction unit as a test item. A program test specification generation device, comprising: a specification generation unit that generates a program test specification.
【請求項5】 プログラム中の変数および関数の出現頻
度を算出する出現頻度算出部と、 前記出現頻度算出部によって算出された変数および関数
の最大出現頻度を表示する表示部と、 変数と関数それぞれの出現頻度レベルを入力するための
入力部と、 前記入力部に入力されたそれぞれの出現頻度レベル以上
の出現頻度の変数または関数を含む記述を前記プログラ
ムから抽出するテスト項目抽出部と、 前記テスト項目抽出部によって抽出された記述をテスト
項目とするプログラムテスト仕様書を生成する仕様書生
成部とを具備することを特徴とするプログラムテスト仕
様書生成装置。
5. An appearance frequency calculation unit for calculating the appearance frequency of a variable and a function in a program; a display unit for displaying the maximum occurrence frequency of the variable and the function calculated by the appearance frequency calculation unit; An input unit for inputting an appearance frequency level of a test item; a test item extraction unit for extracting a description including a variable or a function of an appearance frequency equal to or higher than the respective appearance frequency level input to the input unit from the program; A program test specification generation device, comprising: a specification generation unit that generates a program test specification having a description extracted by an item extraction unit as a test item.
【請求項6】 前記入力部が、変数または関数を特定す
るための情報をさらに入力するためのものであり、 前記テスト項目抽出部が、前記入力部に入力された情報
によって特定された変数または関数を含む記述を前記プ
ログラムから抽出することを特徴とする請求項4乃至請
求項5いずれか1項に記載のプログラムテスト仕様書生
成装置。
6. The input unit is for further inputting information for specifying a variable or a function, and the test item extracting unit is for inputting the variable or the function specified by the information input to the input unit. The program test specification generation device according to claim 4, wherein a description including a function is extracted from the program.
【請求項7】 前記表示部が、前記プログラム解析部に
よって抽出された変数および関数をそれぞれの出現頻度
順に表示することを特徴とする請求項4乃至請求項6い
ずれか1項に記載のテスト仕様書生成装置。
7. The test specification according to claim 4, wherein the display unit displays the variables and the functions extracted by the program analysis unit in the order of their respective appearance frequencies. Document generator.
【請求項8】 プログラムの制御構造を表す構文木を生
成する構文木生成部と、 ネストレベルを入力するための入力部と、 前記入力部に入力されたネストレベル以上のネストレベ
ルを有する箇所を、前記構文木を用いて、前記プログラ
ムから抽出するテスト項目抽出部と、 前記テスト項目抽出部によって抽出された記述をテスト
項目とするプログラムテスト仕様書を生成する仕様書生
成部とを具備することを特徴とするプログラムテスト仕
様書生成装置。
8. A syntax tree generating section for generating a syntax tree representing a control structure of a program, an input section for inputting a nest level, and a section having a nest level higher than the nest level input to the input section. A test item extracting unit that extracts from the program using the syntax tree; and a specification generating unit that generates a program test specification using the description extracted by the test item extracting unit as a test item. A program test specification generation device characterized by the following.
【請求項9】 第1のプログラムから第2のプログラム
と相違する箇所を抽出して、差分プログラムを生成する
差分プログラム生成部と、 前記差分プログラムから変数を抽出するプログラム解析
部と、 前記プログラム解析部によって抽出された変数を含む箇
所を前記第1のプログラムから抽出するテスト項目抽出
部と、 前記テスト項目抽出部によって抽出された記述をテスト
項目とするプログラムテスト仕様書を生成する仕様書生
成部とを具備することを特徴とするプログラムテスト仕
様書生成装置。
9. A difference program generation unit that extracts a part different from the second program from the first program to generate a difference program, a program analysis unit that extracts a variable from the difference program, and the program analysis A test item extracting unit for extracting a portion including a variable extracted by the unit from the first program, and a specification generating unit for generating a program test specification using the description extracted by the test item extracting unit as a test item A program test specification generation device, comprising:
【請求項10】 前記第1のプログラムが、前記第2の
プログラムより版が新しいことを特徴とする請求項9記
載のプログラムテスト仕様書生成装置。
10. The program test specification generating apparatus according to claim 9, wherein the first program has a newer version than the second program.
JP2000085440A 2000-03-24 2000-03-24 Device for generating program test specification Withdrawn JP2001273169A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000085440A JP2001273169A (en) 2000-03-24 2000-03-24 Device for generating program test specification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000085440A JP2001273169A (en) 2000-03-24 2000-03-24 Device for generating program test specification

Publications (1)

Publication Number Publication Date
JP2001273169A true JP2001273169A (en) 2001-10-05

Family

ID=18601780

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000085440A Withdrawn JP2001273169A (en) 2000-03-24 2000-03-24 Device for generating program test specification

Country Status (1)

Country Link
JP (1) JP2001273169A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006293417A (en) * 2005-04-05 2006-10-26 Ntt Docomo Inc Application program verification system and method, and computer program
JP2007179488A (en) * 2005-12-28 2007-07-12 Fujitsu Ltd Program for predicting source code problem
JP2008204405A (en) * 2007-02-22 2008-09-04 Fujitsu Ltd Software regression test system, regression test program and regression test method
JP2009098872A (en) * 2007-10-16 2009-05-07 Toshiba Corp Source program analysis device, source program analysis method and computer program
CN102103589A (en) * 2009-12-18 2011-06-22 三菱电机株式会社 Test table creation system and test table creation method
WO2012011145A1 (en) * 2010-07-20 2012-01-26 株式会社 日立製作所 Software maintenance supporting device and electronic control device verified by the same
JP2012203777A (en) * 2011-03-28 2012-10-22 Hitachi Ltd Software component preparation support device and method
JP2016192093A (en) * 2015-03-31 2016-11-10 富士通株式会社 Information processor and program
JP2019053729A (en) * 2017-09-15 2019-04-04 富士通株式会社 Test method and test apparatus of smart contract
JP2019168753A (en) * 2018-03-22 2019-10-03 三菱電機株式会社 Source code analysis device and source code analysis program

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8332823B2 (en) 2005-04-05 2012-12-11 Ntt Docomo, Inc. Application program verification system, application program verification method and computer program
JP4727278B2 (en) * 2005-04-05 2011-07-20 株式会社エヌ・ティ・ティ・ドコモ Application program verification system, application program verification method, and computer program
JP2006293417A (en) * 2005-04-05 2006-10-26 Ntt Docomo Inc Application program verification system and method, and computer program
JP2007179488A (en) * 2005-12-28 2007-07-12 Fujitsu Ltd Program for predicting source code problem
JP2008204405A (en) * 2007-02-22 2008-09-04 Fujitsu Ltd Software regression test system, regression test program and regression test method
JP2009098872A (en) * 2007-10-16 2009-05-07 Toshiba Corp Source program analysis device, source program analysis method and computer program
CN102103589A (en) * 2009-12-18 2011-06-22 三菱电机株式会社 Test table creation system and test table creation method
JP2011128951A (en) * 2009-12-18 2011-06-30 Mitsubishi Electric Corp Test table generation device and test table generating method
US8401813B2 (en) 2009-12-18 2013-03-19 Mitsubishi Electric Company Test table creation system and test table creation method
US9170805B2 (en) 2010-07-20 2015-10-27 Hitachi, Ltd. Software maintenance supporting device for analyzing relationships between variables
JP5516736B2 (en) * 2010-07-20 2014-06-11 株式会社日立製作所 Software maintenance support device and electronic control device verified thereby
WO2012011145A1 (en) * 2010-07-20 2012-01-26 株式会社 日立製作所 Software maintenance supporting device and electronic control device verified by the same
JP2012203777A (en) * 2011-03-28 2012-10-22 Hitachi Ltd Software component preparation support device and method
JP2016192093A (en) * 2015-03-31 2016-11-10 富士通株式会社 Information processor and program
JP2019053729A (en) * 2017-09-15 2019-04-04 富士通株式会社 Test method and test apparatus of smart contract
JP2019168753A (en) * 2018-03-22 2019-10-03 三菱電機株式会社 Source code analysis device and source code analysis program
JP7068752B2 (en) 2018-03-22 2022-05-17 三菱電機株式会社 Source code analyzer and source code analysis program

Similar Documents

Publication Publication Date Title
JP6542612B2 (en) Test scenario generation support apparatus and test scenario generation support method
CN111158656B (en) Test code generation method and device based on fruit tree method
JP2001273169A (en) Device for generating program test specification
JP2000112784A (en) Program test support device and storage medium recording program test support program
US20090217259A1 (en) Building Operating System Images Based on Applications
JP5834991B2 (en) Schematic program test coverage measuring apparatus and method, and program
US20180088914A1 (en) Method for supporting program creation and apparatus for supporting program creation
JP5811978B2 (en) Test case generation apparatus and test case generation method for model-based control apparatus
JP6002507B2 (en) Software verification program and software verification system
JP4630489B2 (en) Log comparison debugging support apparatus, method and program
JP5595304B2 (en) Program test apparatus, program test apparatus program test method, and program test program
JP6157166B2 (en) Parts generation system, method and program
WO2016001982A1 (en) Test data generation assistance device and test data generation assistance method
JP5910410B2 (en) Schematic program test data generation apparatus and method, and program
JP5748118B2 (en) Document creation support method, document creation support device, and document creation support program
JP3305049B2 (en) Software quality management system
CN113501034B (en) Test log generation method and device for railway signal system
JPH0926897A (en) Program analyzer and program analyzing method
JP2010002977A (en) System for creating business system program
JPH1153391A (en) Database access method
JP3584204B2 (en) Automatic source program converter
JP6397800B2 (en) Test support system and test support method
JPH0658716B2 (en) Failure diagnosis device and failure diagnosis system
JP6553461B2 (en) Existing system processing specification extraction device
WO2012066635A1 (en) Test method, test device, and test execution program

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20070605