JPH04137146A - Test data generating method - Google Patents

Test data generating method

Info

Publication number
JPH04137146A
JPH04137146A JP2260177A JP26017790A JPH04137146A JP H04137146 A JPH04137146 A JP H04137146A JP 2260177 A JP2260177 A JP 2260177A JP 26017790 A JP26017790 A JP 26017790A JP H04137146 A JPH04137146 A JP H04137146A
Authority
JP
Japan
Prior art keywords
test
test cases
address
cases
case
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2260177A
Other languages
Japanese (ja)
Other versions
JP2585460B2 (en
Inventor
Tameyasu Hioki
日置 為保
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2260177A priority Critical patent/JP2585460B2/en
Publication of JPH04137146A publication Critical patent/JPH04137146A/en
Application granted granted Critical
Publication of JP2585460B2 publication Critical patent/JP2585460B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To efficiently generate test data by connecting test cases in accordance with a specific rule. CONSTITUTION:Based on a bus analysis table 4, test cases are connected from start address (0010) in accordance with two rules (a) and (b). In accordance with the rule (a), one of unconnected test cases which has a smaller end address is selected; and in accordance with the rule (b), one test case having the smallest end address in a group, where all test cases are connected, it selected in the case of the existence of unconnected test cases of following groups between test cases having smallest and second smallest end addresses in this group, and the same processing is executed between test cases having second and third smallest end addresses in the other case, and this operation is repeated hereafter. Address (0050) and (0060) are the final address for connection of test cases. Thus, required minimum test data is efficiently obtained.

Description

【発明の詳細な説明】 〔概要〕 テストデータ作成方法に関し、 テストデータを効率的に求めることを目的とし、プログ
ラムソースからパス解析用テーブルを作成し、この解析
用テーブルに基づいて、開始アドレスと終了アドレスと
の間のパスに相当するテストケースを連結していく方法
であって、パス解析用テーブルには、開始アドレスごと
に、すべてのテストケースについてのデータを格納し、
最初の開始アドレスから、順次、グループごとに、末連
結のテストケースの中で、終了アドレスの小さい方を選
択する第1のルールと、すべてのテストケースを連結し
たグループにおいては、その中の終了アドレスの一番小
さいものと次に小さいものとの間に、以降のグループの
未連結テストケースが存在する時は終了アドレスが一番
小さいほうのテストケースを選択し、存在しない時は終
了アドレスの二番目に小さいものと三番目に小さいもの
との間で同様の処理を実行し、以後これを繰り返す第2
のルール、の2つのルールにしたがって、テストケース
を連結していく構成を有する。
[Detailed Description of the Invention] [Summary] Regarding the test data creation method, for the purpose of efficiently obtaining test data, a path analysis table is created from the program source, and based on this analysis table, the start address and This method connects test cases corresponding to the path between the end address and the path analysis table, which stores data about all test cases for each start address.
The first rule selects the one with the smaller end address among the end-connected test cases for each group sequentially from the first start address, and the end address in the group in which all test cases are connected. If there is an unconnected test case in the following group between the smallest address and the next smallest address, select the test case with the smallest end address, and if there is no test case, select the test case with the smallest end address. The second step is to perform the same process between the second smallest and third smallest, and then repeat this process.
It has a configuration in which test cases are connected according to two rules:

〔産業上の利用分野〕[Industrial application field]

本発明は、プログラムのテストデータ作成方法に関し、
特にプログラムソースからパス解析用テーブルを作成し
、この解析用テーブルに基づいてテストケースを連結し
ていくテストデータ作成方法に関する。
The present invention relates to a method for creating test data for a program,
In particular, it relates to a test data creation method in which a path analysis table is created from a program source and test cases are linked based on this analysis table.

プログラム開発においては、作成されたプログラムの検
査のためにテストデータを用いたプログラムを実行する
方法がとられる。この場合、テストデータはプログラム
のロジックに対応したあらゆるケースを網羅するもので
なければならない。
In program development, a method is used to test the created program by executing the program using test data. In this case, the test data must cover all cases that correspond to the logic of the program.

本発明はこのテストケースをプログラムソースから効率
的に抽出する方法を提供する。
The present invention provides a method for efficiently extracting test cases from program sources.

〔従来の技術〕[Conventional technology]

一般に、プログラムソースからテストデータを生成する
際、全体のロジック検証を可能にするた給には当該プロ
グラムソース中の条件文のすべてをカバーできるデータ
群を用意すること、例えば、第6図に示すように、条件
文アドレス[00101。
Generally, when generating test data from a program source, it is necessary to prepare a data group that can cover all conditional statements in the program source to enable the overall logic verification.For example, as shown in Figure 6, , the conditional statement address [00101.

[00301、[0040〕および条件後の飛び先アド
レス[0020) 、  (00501、[00601
間のフローで表されるプログラムソースにおいては、前
記アドレス[:0010) 、  [00303、(0
040〕の条件文のすべてをカバーできるテストデータ
を作成することが必要である。なお、このプログラムソ
ースは、C0BOLで書かれたものである。
[00301, [0040] and the jump destination address after the condition [0020), (00501, [00601
In the program source represented by the flow between, the addresses [:0010), [00303, (0
It is necessary to create test data that can cover all of the conditional statements in [040]. Note that this program source is written in C0BOL.

そして、従来、このテストデータの作成は、プログラム
ソース中の条件文を洗い出してすべての組合せを求める
ことにより行っていた。すなわち、アドレス[0010
] 、  [003(1:l 、  [0040)それ
ぞれの条件文の内容が、例えば「A=1であるかどうか
J、rB=2であるかどうかJ、rC=3であるかどう
か」のとき、第7図に示すように、それぞれがr YB
SJの場合と「NO」の場合とについてのすべての組合
せを求めていた。なお、図中の〔発明が解決しようとす
る課題〕 以上のように、従来の、プログラムソースのテストデー
タ作成は、プログラムソース中の条件文のそれぞれがr
 YBSJの場合と「NO」の場合についてのすべての
組合せを求めることにより行ない、n個の条件文を持つ
プログラムソースに対しては2″組のデータを用意して
いた。しかしながら、この方法では、実際にはパスとし
て成立しないテストデータも作成されるため、膨大なテ
ストデ−タ量になるとともに、実作業では使いづらいテ
ストデータになるといった問題がある。
Conventionally, this test data has been created by identifying conditional statements in the program source and finding all combinations. That is, address [0010
], [003(1:l, [0040)] When the content of each conditional statement is, for example, "Whether A=1 or not J, whether rB=2 or not J, whether rC=3 or not" , as shown in FIG. 7, each r YB
All combinations of SJ cases and "NO" cases were sought. [Problem to be Solved by the Invention] in the figure As described above, in the conventional program source test data creation, each conditional statement in the program source
This was done by finding all combinations for the YBSJ case and the "NO" case, and 2'' sets of data were prepared for a program source with n conditional statements.However, with this method, Since test data that does not actually pass the test is created, there are problems in that the amount of test data is enormous and the test data is difficult to use in actual work.

そこで、本発明では、プログラムソース中の条件命令が
記述されている行番号である開始アドレスと、当該条件
命令の途中に分岐命令がある時はその分岐先、また分岐
命令がない時はこの条件命令の飛び先の行番号である終
了アドレスとの間のパスに相当するテストケースそれぞ
れについてのデータを格納したパス解析用テーブルを作
成し、この解析用テーブルに基づいて、最初の開始アド
レスから、順次、所定のルールにしたがってテストケー
スを連結してテストデータを作成することにより、プロ
グラムソース全体のロジック検証のために必要な最低限
のテストデータを効率的に求めることを目的とする。
Therefore, in the present invention, the start address, which is the line number where the conditional instruction is written in the program source, and the branch destination if there is a branch instruction in the middle of the conditional instruction, or this condition if there is no branch instruction. Create a path analysis table that stores data for each test case corresponding to the path between the end address, which is the line number to which the instruction jumps, and based on this analysis table, from the first start address, The purpose is to efficiently obtain the minimum amount of test data necessary for logic verification of the entire program source by sequentially connecting test cases according to predetermined rules to create test data.

〔課題を解決するための手段〕[Means to solve the problem]

第1図は本発明の原理説明図である。 FIG. 1 is a diagram explaining the principle of the present invention.

第1図は、第6図と同様のフローからなるプログラムソ
ースのテストデータを求める際に、本発明を適用した場
合の説明図である。
FIG. 1 is an explanatory diagram of the case where the present invention is applied when obtaining test data of a program source having a flow similar to that of FIG. 6.

第1図において、 1は、フロー中のテストケースの開始アドレスであり、
プログラムソース中の条件命令が記述されている討番号
に対応している。
In Figure 1, 1 is the start address of the test case in the flow,
It corresponds to the reference number in which the conditional command in the program source is written.

2は、フロー中のテストケースの終了アドレスであり、
プログラムソース中の条件命令の途中に分岐命令がある
時はその分岐先、また分岐命令がない時はこの条件命令
の飛び先の行番号に対応している。
2 is the end address of the test case in the flow,
If there is a branch instruction in the middle of a conditional instruction in the program source, it corresponds to the branch destination, and if there is no branch instruction, it corresponds to the line number to which the conditional instruction jumps.

3は、プログラムソースファイルであり、テスト対象の
プログラムソースが格納されている。
3 is a program source file in which a program source to be tested is stored.

4は、パス解析用テーブルであり、開始アドレスと終了
アドレスとの間のパスに対応するテストケースについて
のデータが、テストケースの開始アドレスごとのグルー
プ単位で格納されている。
4 is a path analysis table in which data regarding test cases corresponding to the path between the start address and the end address is stored in groups for each start address of the test case.

5は、テストデータテーブルであり、パス解析用テーブ
ルから求めたテストケースの連結状態およびテストデー
タが格納されている。
Reference numeral 5 denotes a test data table, which stores test case connection states and test data obtained from the path analysis table.

ここで、パス解析用テーブル4には、開始アドレスがC
00IOIであるテストケース■、■および開始アドレ
スが〔0030〕であるテストケース■。
Here, in the path analysis table 4, the start address is C.
Test cases ■ and ■ whose start address is [0030] are test cases ■ and ■ whose starting address is [0030].

■、■のそれぞれについて、終了アドレスや、アドレス
[0010) 、  [:0030] 、  [004
03における状態値A、B、Cなどが格納されている。
For each of ■ and ■, the end address, address [0010), [:0030], [004]
Status values A, B, C, etc. in 03 are stored.

なお、「−」は「任意の値」であることを、またrlJ
、r2」、r3」はそれぞれ「1」。
Note that "-" is "any value" and rlJ
, r2" and r3" are each "1".

r2」、r3」でないことを表している。r2", r3".

そして、このパス解析用テーブル4に基づいて、開始ア
ドレス[00101から、 (a)  未連結のテストケースの中で、終了アドレス
の小さい方を選択する第1のルール、 ら)すべてのテストケースを連結したグループについて
は、その中の終了アドレスの一番小さいものと次に小さ
いものとの間に、以降のグループの未連結テストケース
が存在する時は終了アドレスが一番小さいほうのテスト
ケースを選択し、存在しない時は終了アドレスの二番目
に小さいものと三番目に小さいものとの間で同様の処理
を実行し、以後これを繰り返す第2のルール、 02つのルールにしたがってテストケースを連結してい
く。なお、アドレス〔0050〕及び[0060〕は、
テストケースを連結していくときの最終アドレスでもあ
る。
Then, based on this path analysis table 4, from the start address [00101, (a) the first rule that selects the one with the smaller end address among the unconnected test cases; For connected groups, if there are unconnected test cases of subsequent groups between the one with the smallest end address and the next smallest, the test case with the smallest end address is selected. The second rule is to connect the test cases according to the second rule, which executes the same process between the second smallest end address and the third smallest end address when it does not exist, and repeats this from then on. I will do it. In addition, addresses [0050] and [0060] are
It is also the final address when linking test cases.

先ず、前記第1のルール(a)にしたがって、開始アド
レス[0010〕から始まるテストケース■、■の中、
テストケース終了アドレスの小さい方のテストケース■
を選択し、続いて、この終了アドレスC0020]の次
の開始アドレス〔0030〕から始まるテストケース■
、■、■について同様の処理を行なう。なお、複数のテ
ストケースの終了アドレスが同一であるときは任意のテ
ストケース、例えばテストケース番号の若いテストケー
スを選択する。このようにしてテストケース■とテスト
ケース■とを連結し、第1のテストデータ[A=1゜B
=2.C=−)を作成する。
First, according to the first rule (a), in the test cases ■ and ■ starting from the start address [0010],
Test case with smaller test case end address ■
Then select the test case starting from the next start address [0030] after this end address C0020].
Similar processing is performed for , ■, and ■. Note that when a plurality of test cases have the same end address, an arbitrary test case, for example, a test case with a smaller test case number is selected. In this way, test case ■ and test case ■ are connected, and the first test data [A=1°B
=2. Create C=-).

次に、開始アドレスC0010)から始まる未連結のテ
ストケース■を選択する。このときの終了アドレス[0
060〕は最終アドレスであるため、テストケース■の
みで第2のテストデータ[A=1゜8=−、C=−1を
作成する。
Next, the unconnected test case (2) starting from the start address (C0010) is selected. End address at this time [0
060] is the final address, so the second test data [A=1°8=-, C=-1 is created using only test case (2).

次に、開始アドレス[0010〕から始まるテストケー
ス■、■はともに使用され、このテストケース■、■そ
れぞれの終了アドレス[0020]と〔0060〕との
間には未連結のテストケース■、■があるので、前g己
第2のルールら)にしたがって、終了アドレスが[00
20]であるテストケース■を選択する。続いて、前記
第1のルール(a)にしたがって、開始アドレスがC0
030〕であるテストケース■。
Next, test cases ■ and ■ starting from the start address [0010] are both used, and there are unconnected test cases ■ and ■ between the end addresses [0020] and [0060] of these test cases ■ and ■. Therefore, according to the previous rule (second rule, etc.), the end address is [00
20] is selected. Then, according to the first rule (a), the starting address is C0.
030] test case ■.

■、■のグループの中から未連結のテストケース■を選
択してテストケース■に連結し、第3のテストデータ[
:A=1.B=2.C=3]を作成する。
Select the unconnected test case ■ from the groups of ■ and ■, connect it to the test case ■, and create the third test data [
:A=1. B=2. C=3].

次に、この第3のテストデータの作成手順と同じ手順で
テストケース■とテストケース■を連結し、第4のテス
トデータ(A=1.B=2.C=3〕を作成する。
Next, test case (2) and test case (2) are connected in the same manner as the third test data creation procedure to create fourth test data (A=1.B=2.C=3).

このようにして、プログラムソース全体のロジック検証
のために最低限必要なテストデータを求めでいる。
In this way, the minimum required test data for logic verification of the entire program source is obtained.

〔作用〕[Effect]

本発明においては、プログラムソースからパス解析用テ
ーブルを作成し、この解析用テーブルの内容に基づいて
、最初の開始アドレスから、順次、前記の2つのルール
(a)、 (b)にしたがってテストケースを連結して
いくため、実際に使用するパスのテストデータのみを確
実に求めることができる。
In the present invention, a path analysis table is created from the program source, and based on the contents of this analysis table, test cases are sequentially created from the first start address according to the above two rules (a) and (b). By concatenating the following, it is possible to reliably obtain only the test data for the paths that are actually used.

〔実施例〕〔Example〕

第2図〜第5図を参照して本発明の詳細な説明する。 The present invention will be described in detail with reference to FIGS. 2 to 5.

この実施例は、第2図のように、条件文アドレス[01
10] 、 [0130) 、 [0140) 、 [
016[)) 。
In this embodiment, the conditional statement address [01
10], [0130), [0140), [
016[)).

[0170:]および条件後の飛び先アドレス[012
0:l 。
[0170:] and the jump destination address after the condition [012
0:l.

[:0150]、  [0180:1間のフローで表せ
るプログラムソースに関するものである。
This relates to a program source that can be expressed as a flow between [:0150] and [0180:1.

先ず、このプログラムソースから、開始アドレス[01
10〕、 −[0140]、  [:0160]のそれ
ぞれごとのテストケースをグループにした、第3図のパ
ス解析用テーブルを作成する。この解析用テーブルには
、前記グループごとの連結法テストケース数、およびテ
ストケースそれぞれの連結法フラグについてのデータも
格納されている。
First, from this program source, start address [01
10], -[0140], and [:0160] are grouped into the path analysis table shown in FIG. 3. This analysis table also stores data about the number of connection method test cases for each group and the connection method flag of each test case.

次に、この解析用テーブルのデータに基づき、前記第1
.12のルール(a)、(ハ)にしたがってテストケー
スを連結していく。すなわち、開始アドレス[0110
]から始まるテストケース■′、■′■′に第1のルー
ル(a)を適用して■′を選択し、続いて開始アドレス
[014−0〕から始まるテストケース■′、・■′に
も当該ルール(a)を適用して■′を選択し、続いて開
始アドレス[0160)から始まるテストケース■′、
■′、■′にも第1のルール(川を適用して■′を選択
し、■′−■′−■′のテストケースを連結することに
より、第1のテストデータ  [A’ た1、B’ =
−、−C’ =3゜D’ =4.E’ =−)を求める
。このとき、連結にmmいたテストケースのグループの
連結法テストケース数を「1」だけカウントアツプする
とともに、連結に用いたテストケースの連結法フラグを
rONJにするため、解析用テーブルの状態は第4図A
のようになっている。
Next, based on the data of this analysis table, the first
.. Test cases are connected according to Rule 12 (a) and (c). That is, starting address [0110
] Apply the first rule (a) to the test cases ■′, ■′■′ starting from ] to select ■′, and then select the test cases ■′, ・■′ starting from the start address [014-0]. also applies the rule (a) to select ■', and then selects test case ■' starting from the start address [0160],
By applying the first rule (river) to ■' and ■' and selecting ■', and connecting the test cases of ■'-■'-■', the first test data [A',B'=
-, -C' = 3°D' = 4. Find E'=-). At this time, the number of connection method test cases of the group of test cases that have been connected is counted up by 1, and the connection method flag of the test cases used for connection is set to rONJ, so the state of the analysis table is changed to Figure 4 A
It looks like this.

次も、第1のルール(a)にしたがって、テストケース
■′と■′とを選択してこの両者を連結し、第2のテス
トデータCA’ =1.B’ =2.C’=+、D’ 
=4.E’ =5]を求める。このとき、前記の場合と
同様に、連結に用いたテストケースのグループの連結法
テストケース数を「1」だけカウントアツプするととも
に、連結に用いたテストケースの連結法フラグをrON
Jにするため、解析用テーブルの状態は第41fflB
のようになっている。
Next, according to the first rule (a), test cases ■' and ■' are selected and connected, and the second test data CA' = 1. B'=2. C'=+, D'
=4. E' = 5]. At this time, as in the previous case, the number of connection method test cases in the group of test cases used for connection is counted up by 1, and the connection method flag of the test cases used for connection is set to rON.
J, the state of the analysis table is 41st fflB.
It looks like this.

次も、第1のルール(a)にしたがって、テストケース
■′を選択して第3のテストデータ[A′=1.8’ 
=2.C’ =−、D’ =−、E’ =−]を求める
。・このとき、前記の場合と同様に、連結に用いたテス
トケースのグループの連結法テストケース数を「1」だ
けカウントアツプするとともに、連結に用いたテストケ
ースの連結法フラグを「ON」にするため、解析用テー
ブルの状態は第4図Cのようになる。この段階で、開始
アドレスが[0110]のグループの連結法テストケー
ス数は発生テストケース数と同じ[3Jとなり、これ以
降、当該グループに対して第1のルール(a)を適用す
る必要がないことを示している。
Next, according to the first rule (a), test case ■' is selected and the third test data [A'=1.8'
=2. C'=-, D'=-, E'=-].・At this time, as in the case above, count up the number of connection method test cases of the group of test cases used for connection by "1", and set the connection method flag of the test cases used for connection to "ON". Therefore, the state of the analysis table becomes as shown in FIG. 4C. At this stage, the number of concatenation method test cases for the group with the start address [0110] is equal to the number of generated test cases [3J, and from now on there is no need to apply the first rule (a) to the group. It is shown that.

次に、開始アドレスが[01101のグループのテスト
ケースに第2のルール(社)を適用する。すなわち、テ
ストケース■′、■′の終了アドレス〔01203、[
0150〕の間に未連結テストケース■′があるため、
先ず、テストケース■′、■′の中、終了アドレスが小
さい方のテストケース■′を選択し、続いて開始アドレ
スが[0140)のグループのテストケースに第1のル
ール(a)を適用して未連結テストケース■′を選択し
、更に開始アドレスが[: 01601のグループのテ
ストケースに第1のルール(a)を適用して未連結テス
トケース■′を選択してテストケース ■′−■′−■
′を連結し、第4のテストデータ[A’ =1.8’ 
=−、C’=丁、D′=7.E’ =5]を求める。こ
のとき、前記の場合と同様に、連結に用いたテストケー
スのグループの連結法テストケース数を「1」だけカウ
ントアツプするとともに、連結したテストケースの連結
法フラグを「ON」にするため、解析用テーブルの状態
は第4図りのようになり、この段階で、各グループの連
結法テストケース数は発生テストケース数と同じ値にな
り、また連結法フラグのすべてが「ON」になり、必要
数のテストデータが作成されたことが判明する。
Next, the second rule (company) is applied to the test case of the group whose start address is [01101. In other words, the end address of test case ■', ■' is [01203, [
0150], there is an unconnected test case ■' between
First, select the test case ■′ with the smaller end address from test cases ■′ and ■′, and then apply the first rule (a) to the test cases in the group with the start address [0140). Select unlinked test case ■', apply the first rule (a) to the test cases in the group whose start address is [: 01601, select unlinked test case ■', and test case ■'- ■′−■
', and the fourth test data [A' = 1.8'
=-, C'=Ding, D'=7. E' = 5]. At this time, as in the previous case, the number of connection method test cases in the group of test cases used for connection is counted up by "1", and the connection method flag of the connected test cases is set to "ON". The state of the analysis table will be as shown in the fourth diagram, and at this stage, the number of connection method test cases in each group will be the same as the number of generated test cases, and all the connection method flags will be "ON". It turns out that the required number of test data has been created.

このように、最初の開始アドレスのグループから、順次
、前記の第1.第2のルール(a)、(社)にしたがっ
てテストケースを選択して連結することにより、第5図
に示すような、必要最低限のテストデータを効率的に求
めている口 そして、連結したテストケースの連結法フラグを「ON
」にするとともに、当該テストケースのグツシープの連
結法テストケース数を「1」だけカウントアツプしてい
るため、すべての連結法フラグが「ON」となった時点
、または、すべてのグループの連結法テストケース数の
それぞれが発生テストケース数と同じ値になった時点で
、プログラムソース全体のロジック検証のために必要な
テストデータが求められたことになる。
In this way, starting from the first starting address group, the above-mentioned first . By selecting and concatenating test cases according to the second rule (a), we can efficiently obtain the minimum necessary test data as shown in Figure 5. Set the connection method flag of the test case to “ON”
”, and the number of concatenation method test cases of Gutsu Sheep for the test case is counted up by “1”, so when all the concatenation method flags are “ON”, or when all the concatenation method of all groups When the number of test cases reaches the same value as the number of generated test cases, test data necessary for logic verification of the entire program source has been obtained.

なお、この実施例のプログラムソースにおいて従来の方
法を用いると、条件文のそれぞれについてのr YE!
SJの場合と「NO」の場合とのすべての組合せを求め
るため、32(2’)組のテストデータになる。
Note that if the conventional method is used in the program source of this embodiment, r YE! for each conditional statement is determined.
Since all combinations of the SJ case and the "NO" case are found, there are 32 (2') sets of test data.

〔発明の効果〕〔Effect of the invention〕

本発明は、パス解析用テーブルに格納したテストケース
それぞれについての各種データに基づき、最初の開始ア
ドレスから、前記の第1.第2のルール(a)、(b)
にしたがってテストケースを連結することによりテスト
データを求める構成にしているため、テスト対象のプロ
グラムソース全体のロジック検証に必要なテストデータ
を効率的に作成することができる。
In the present invention, based on various data regarding each test case stored in a path analysis table, starting from the first start address is performed. Second rule (a), (b)
Since test data is obtained by linking test cases according to the following, it is possible to efficiently create test data necessary for logic verification of the entire program source to be tested.

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

第1図は本発明の原理説明図、第2図は本発明の対象フ
ローの一例を示す説明図、第3図は本発明の実施例のパ
ス解析用テーブルの初期状態を示す説明図、第4図A、
B、C,Dは本発明の実施例のパス解析用テーブルのテ
ストケース連結の各状態を示す説明図、第5図は本発明
の実施例のテストデータを示す説明図、第6図はプログ
ラムソース及びそのフローの一例を示す説明図、第7図
は従来のテストデータを示す説明図である。 第1図において、 1・・・テストケースの開始アドレス 2・・・テストケースの終了アドレス 3・・・プログラムソースファイル 4・・・パス解析用テーブル 5・・・テストデータテーブル
FIG. 1 is an explanatory diagram of the principle of the present invention, FIG. 2 is an explanatory diagram showing an example of the target flow of the present invention, FIG. 3 is an explanatory diagram showing the initial state of the path analysis table of the embodiment of the present invention, 4 Figure A,
B, C, and D are explanatory diagrams showing each state of test case connection in the path analysis table according to the embodiment of the present invention, FIG. 5 is an explanatory diagram showing test data according to the embodiment of the present invention, and FIG. 6 is a program diagram. FIG. 7 is an explanatory diagram showing an example of a source and its flow. FIG. 7 is an explanatory diagram showing conventional test data. In Figure 1, 1... Start address of test case 2... End address of test case 3... Program source file 4... Table for path analysis 5... Test data table

Claims (3)

【特許請求の範囲】[Claims] (1)プログラムソースからパス解析用テーブルを作成
し、この解析用テーブルに基づいて、条件命令が記述さ
れている行番号に対応する開始アドレスと、当該条件命
令の途中に分岐命令がある時はその分岐先、また分岐命
令がない時はこの条件命令の飛び先の行番号に対応する
終了アドレスとの間のパスに相当するテストケースを連
結していくテストデータ作成方法であって、 前記パス解析用テーブルには、前記開始アドレスごとに
、この開始アドレスから生じるすべての前記テストケー
スについてのデータをグループにして格納し、 最初の前記開始アドレスから、順次、前記グループごと
に、 ・未連結の前記テストケースの中で、前記終了アドレス
の小さい方を選択する第1のルールと、・すべての前記
テストケースを連結した前記グループにおいては、その
中の前記終了アドレスの一番小さいものと次に小さいも
のとの間に、以降の前記グループの未連結テストケース
が存在する時は前記終了アドレスが一番小さいほうの前
記テストケースを選択し、存在しない時は前記終了アド
レスの二番目に小さいものと三番目に小さいものとの間
で同様の処理を実行し、以後これを繰り返す第2のルー
ル、 の2つのルールにしたがって、最終の終了アドレスまで
テストケースを連結していくことを特徴とするテストデ
ータ作成方法。
(1) Create a path analysis table from the program source, and based on this analysis table, find the start address corresponding to the line number where the conditional instruction is written, and if there is a branch instruction in the middle of the conditional instruction. A test data creation method that connects test cases corresponding to a path between the branch destination or, when there is no branch instruction, the end address corresponding to the line number to which the conditional instruction jumps, the method comprising: In the analysis table, for each start address, data for all the test cases arising from this start address are stored in groups, and from the first start address, sequentially for each group: - unconnected A first rule that selects the one with the smallest end address among the test cases; - In the group in which all the test cases are connected, the one with the smallest end address among them and the next one; If there is a subsequent unconnected test case of the group between the smaller one, select the test case with the smallest end address, and if there is none, select the test case with the second smallest end address. The second rule is to execute the same process between How to create test data.
(2)パス解析用テーブルには、グループごとの発生テ
ストケース数及び連結済テストケース数についてのデー
タも格納し、テストケースを連結するたびに対応する連
結済テストケース数の値をカウントアップして、すべて
のグループについて、この値が予めセットされている前
記発生テストケース数になった時点でテストケースの連
結処理を終了する請求項1記載のテストデータ作成方法
(2) The path analysis table also stores data on the number of generated test cases and the number of connected test cases for each group, and counts up the corresponding number of connected test cases each time test cases are connected. 2. The test data creation method according to claim 1, wherein the test case linking process is terminated when this value reaches a preset number of generated test cases for all groups.
(3)パス解析用テーブルには、テストケースそれぞれ
の連結済フラグについてのデータも格納し、テストケー
スを連結するたびに対応する連結済フラグを「ON」に
して、すべてのテストケースの連結済フラグが「ON」
になった時点でテストケースの連結処理を終了する請求
項1記載のパス解析におけるテストデータ作成方法。
(3) The path analysis table also stores data about the linked flag of each test case, and each time a test case is linked, the corresponding linked flag is set to "ON", and all test cases are marked as linked. Flag is “ON”
2. The test data creation method in path analysis according to claim 1, wherein the test case linking process is terminated when the test case is reached.
JP2260177A 1990-09-28 1990-09-28 Test data creation method Expired - Lifetime JP2585460B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2260177A JP2585460B2 (en) 1990-09-28 1990-09-28 Test data creation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2260177A JP2585460B2 (en) 1990-09-28 1990-09-28 Test data creation method

Publications (2)

Publication Number Publication Date
JPH04137146A true JPH04137146A (en) 1992-05-12
JP2585460B2 JP2585460B2 (en) 1997-02-26

Family

ID=17344393

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2260177A Expired - Lifetime JP2585460B2 (en) 1990-09-28 1990-09-28 Test data creation method

Country Status (1)

Country Link
JP (1) JP2585460B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07219819A (en) * 1993-12-10 1995-08-18 Nec Corp Production of program evaluation data
US5729676A (en) * 1993-12-10 1998-03-17 Nec Corporation Method of generating data for evaluating programs
JP2009217664A (en) * 2008-03-12 2009-09-24 Hitachi Software Eng Co Ltd Automatic test execution system
JP2017207959A (en) * 2016-05-19 2017-11-24 富士通株式会社 Test case generation method, test case generation program and test case generation device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07219819A (en) * 1993-12-10 1995-08-18 Nec Corp Production of program evaluation data
US5729676A (en) * 1993-12-10 1998-03-17 Nec Corporation Method of generating data for evaluating programs
JP2009217664A (en) * 2008-03-12 2009-09-24 Hitachi Software Eng Co Ltd Automatic test execution system
JP2017207959A (en) * 2016-05-19 2017-11-24 富士通株式会社 Test case generation method, test case generation program and test case generation device

Also Published As

Publication number Publication date
JP2585460B2 (en) 1997-02-26

Similar Documents

Publication Publication Date Title
US20080232359A1 (en) Fast packet filtering algorithm
JPH04137146A (en) Test data generating method
JPS62208167A (en) Vector processor
CN109491919B (en) Software testing method and testing platform
CN109766268A (en) A kind of sequence assembly instruction program verification method and system
JPH04239338A (en) Measuring system for microprogram comprehension rate
CN112346986B (en) Test case layered storage method and system, electronic device and storage medium
US7415479B2 (en) Method and apparatus for assigning test numbers
JP2000242524A (en) Software simulator for processor
JPH07311694A (en) Analyzing method for program execution path
JPH01310444A (en) Parallel arithmetic processor
JPH064348A (en) Program debugging system
JPH03262050A (en) Parameter pattern data generating device
JPH0283634A (en) Program debugging system
JPH0659937A (en) Device for supporting single body test of load module
JPH04330526A (en) Relocatable assembler
JPH05158741A (en) Test verification method for computer program
JPH08166431A (en) Generation of test pattern for multipvalued logic device
Abdallah et al. Derivation of Efficient Parallel Algorithms on a Ring of Processors.
JPH0193826A (en) System for counting dynamic step of high grade language
JPS63208941A (en) Managing system for updating history of program path
JPH02171938A (en) Device for supporting program development
JPH05143312A (en) Method for testing on-line program
JPH02308355A (en) Input procedure management system for interpreter
Malhotra et al. Generating an algorithm for executing graphical models