JPH03244043A - Test data generating device - Google Patents

Test data generating device

Info

Publication number
JPH03244043A
JPH03244043A JP2041883A JP4188390A JPH03244043A JP H03244043 A JPH03244043 A JP H03244043A JP 2041883 A JP2041883 A JP 2041883A JP 4188390 A JP4188390 A JP 4188390A JP H03244043 A JPH03244043 A JP H03244043A
Authority
JP
Japan
Prior art keywords
test data
data
generation
stored
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.)
Pending
Application number
JP2041883A
Other languages
Japanese (ja)
Inventor
Hiroaki Kobayashi
裕明 小林
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2041883A priority Critical patent/JPH03244043A/en
Publication of JPH03244043A publication Critical patent/JPH03244043A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To generate the test data at one time to the data area where plural types of items are defined by defining the items and designating the number of data to be generated via a user for generation of a test data in the same data area where plural types of items are defined. CONSTITUTION:A source program is read into a source file 1 and an item definition analyzing means 2 analyzes a data part. The data generating instruction inputted from a keyboard 4 is stored in a generating instruction information storage part 5 together with the item definition information 3. The designation of the test data output frequency is inputted via the keyboard 4, and the number of generated test data is designated per repetition together with the repeating frequency. These designated factors are stored in an output frequency information storage part 6 together with the data names. The information stored in both parts 5 and 6 are referred to by a test data generating means 7, and the generated test data is outputted to a file 8 and stored there. Thus it is possible to generate the test data to all patterns with no rearrangement required.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はコンピュータプログラムのテストデータ生成装
置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a test data generation device for a computer program.

〔従来の技術〕[Conventional technology]

フンピエータのプログラムにおいで、同一のデータ領域
に複数種類の項目定義を与え、ひとつの領域で複数通り
のデータ処理を行う技法がある。
In Humpieta's program, there is a technique in which multiple types of item definitions are given to the same data area, and data processing is performed in multiple ways in one area.

このようなデータ領域にツース)・データを作る場合、
従来のテストデータ生成装置では1種類の項目定義を選
び、その項目定義に従った一連のテストデータを生成し
ていた。
When creating tooth) data in such a data area,
Conventional test data generation devices select one type of item definition and generate a series of test data according to that item definition.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

」−述した従来の技術で、複数種類の項目定義に従った
データが現れる−・連のテストデータを生成するために
は、−度ひとつの項目定義に従ったテストデータを生成
し、次に別の項目定義に従ったテストデータを生成し、
並べ換えなtJればならなかった。
” - In the conventional technology described above, data that conforms to multiple types of item definitions appears. In order to generate a series of test data, - generate test data that conforms to one item definition, and then Generate test data according to another item definition,
I had to rearrange tJ.

本発明の目的は、同一データ領域に対して複数種類の項
目定義を行っているソースを読み込んで解析し、全ての
パターンに対して並べ換えを行わないでテストデータを
生成するテストデータ生成装置を提供するものである。
An object of the present invention is to provide a test data generation device that reads and analyzes a source that defines multiple types of items for the same data area, and generates test data without rearranging all patterns. It is something to do.

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

本発明のテストデータ生成装置は、同一のデータ領域に
対して複数種類の項目定義を行っているソースプログラ
ムのデータ部の項目定義解析手段と、前記複数種類の項
目に対するテストデータの生成指示を行う第1の入力手
段と、前記テストデータの生成指示の情報を記憶する生
成指示記憶手段と、各項目定義ごとにテストデータの生
成順序と出力回数を指定する第2の入力手段と、テスト
データの生成順序と出力回数の情報を記憶する生成回数
情報記憶手段と、テストデータの生成を行うテストデー
タ生成手段とを備え、前記複数種類の項目定義に従った
テストデータがテストデータ出力ファイルに格納される
一連のテストデータを生成して構成される。
The test data generation device of the present invention includes an item definition analysis means for a data section of a source program that defines multiple types of items for the same data area, and an instruction to generate test data for the multiple types of items. a first input means; a generation instruction storage means for storing information on the test data generation instruction; a second input means for specifying the test data generation order and the number of outputs for each item definition; The method includes a generation number information storage means for storing information on the generation order and the number of outputs, and a test data generation means for generating test data, and the test data according to the plurality of types of item definitions is stored in the test data output file. It is constructed by generating a series of test data.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

第1図は本発明の一実施例の構成を示すブロック図であ
る。図において、1はテストデータを生成しようとする
データの記述を含んだソースプログラムを格納している
ソースファイル、2は読み込んだソースプログラムのデ
ータ部の項目定義を行う項目定義解析手段、3は解析し
た項目定義の情報を格納しておく項目定義記憶部、4は
第1及び第2の入力手段となるキーボード、5はキーボ
ード4から入力されたテストデータの生成指示の情報を
格納しておく生成指示情報記憶部、6はキーボード4か
ら入力された生成順序と出力回数の情報を格納しておく
生成回数情報記憶部、7はテストデータを生成するテス
トデータ生成手段、8は生成されたテストデータを出力
するテストデータ出力ファイルをそれぞれ示している。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. In the figure, 1 is a source file that stores a source program that includes a description of data for which test data is to be generated, 2 is an item definition analysis means that defines items in the data section of the read source program, and 3 is an analysis unit. 4 is a keyboard that serves as the first and second input means; 5 is a generator that stores information on test data generation instructions input from the keyboard 4; an instruction information storage unit; 6 a generation number information storage unit that stores information on the generation order and the number of outputs input from the keyboard 4; 7 a test data generation means for generating test data; 8 the generated test data; The test data output files that are output are shown respectively.

第2図は本実施例における制御の流れを示すフローチャ
ートである。
FIG. 2 is a flowchart showing the flow of control in this embodiment.

第3図(a)は本実施例に使用するソースプログラムの
データ部の一部、第3図(b)は第3図(a)を図式化
したものである。01〜03はレベル番号、DATA−
AREA、DATAI、A。
FIG. 3(a) is a part of the data portion of the source program used in this embodiment, and FIG. 3(b) is a diagrammatic representation of FIG. 3(a). 01 to 03 are level numbers, DATA-
AREA, DATAI, A.

B、C・・・はデータ名、p、c・・・はデータ、この
うちX、9.Nはそれぞれ英数字、数字9日本語で書か
れていることを示す。
B, C... are data names, p, c... are data, of which X, 9. N indicates alphanumeric characters and numbers 9 written in Japanese.

第4図は項目定義記憶部3の内容を示している。FIG. 4 shows the contents of the item definition storage section 3.

ここには、本装置がソースファイル1に格納されたソー
スプログラムから読み取った情報が格納されており、9
は項目が属するデータ名、10は項目名、11は項目の
桁位置、12は生成するデータの文字タイプ(ここでは
データの構成文字に従って英数字、数字9日本語に分け
ている。)、13は各データの項目ごとの桁数をそれぞ
れ示している。
Information read by this device from the source program stored in source file 1 is stored here, and 9
is the data name to which the item belongs, 10 is the item name, 11 is the digit position of the item, 12 is the character type of the data to be generated (here, it is divided into alphanumeric characters and numbers 9 Japanese according to the constituent characters of the data), 13 indicates the number of digits for each item of data.

第5図は生成指示情報記憶部5の内容を示している。9
〜13な項目定義記憶部3から入力されたもの、14・
工5はキーボード4から入力されたもので、14はテス
トデータ生成方法(定数生5− 成か乱数生成か)、15は定数生成の場合のみ実際にテ
ストデータとして出力される値である定義生成用データ
をそれぞれ示している。
FIG. 5 shows the contents of the generation instruction information storage section 5. As shown in FIG. 9
~13 inputted from the item definition storage unit 3, 14.
Step 5 is what is input from the keyboard 4, 14 is the test data generation method (constant generation or random number generation), and 15 is the definition generation which is the value that is actually output as test data only in the case of constant generation. The data for each are shown.

第6図は生成回数情報記憶部6の内容を示している。1
6は各項目定義ごとのデータ名、17は1繰り返しあた
りのテストデータの出力回数、18は繰り返し回数をそ
れぞれ示しており、データ名16は項目定義記憶部3か
ら、出力回数と繰り返し回数はキーボード4からそれぞ
れ入力される。
FIG. 6 shows the contents of the generation number information storage section 6. 1
6 indicates the data name for each item definition, 17 indicates the number of test data output per repetition, and 18 indicates the number of repetitions. 4 are respectively input.

第7図は第1図のテストデータ生成手段7で示したテス
トデータ生成を行うデータ生成部である。図において1
9は第1図の生成回数情報記憶部6に記憶されている繰
り返し回数カウンタ、20は第1図の生成回数情報記憶
部6に記憶されている出力回数のカウンタ、21は実際
にデータが生成されるテストデータ生成領域をそれぞれ
示している。
FIG. 7 shows a data generation section that generates the test data shown in the test data generation means 7 of FIG. In the figure 1
Reference numeral 9 indicates a repetition number counter stored in the generation number information storage unit 6 shown in FIG. 1, 20 indicates an output number counter stored in the generation number information storage unit 6 shown in FIG. 1, and 21 indicates the number of times data is actually generated. The test data generation areas are shown respectively.

第8図は本実施例で実際生成されるテストデータを示し
ている。
FIG. 8 shows test data actually generated in this embodiment.

−〇− 次に第1図から第8図までを使用して、ソースプログラ
ムが入力されてからテストデータが生成−出力されるま
での一連の動作を、本実施例ではコボルのrREDEF
INEsJ句を使用して説明する。第2図のaの手順す
なわちステップ31〜33に従い、第1図のソースファ
イル1に第3図に示すようなソースプログラムを読み込
む。次に第1図の2の項目定義解析手段2でデータ部の
解析を行う。ここでは、本装置がrREDEFINES
」句を検出すると(第3図(a)下線部)、第4図に示
すようにrREDEFINEsJの次に記述されている
DA、TAlと同じ桁位置にデータ開始位置が位置づけ
られ格納される。次に、各項目に生成指示を与えるキー
ボード4から入力された生成指示は、データの生成方法
(定数か乱数か)と、生成方法が定数の場合に実際に出
力したいデータと生成方法が乱数の場合の桁数とから成
り、第1図の項目定義情報3と共に第1図の生成指示情
報記憶部5へ格納される。
-〇- Next, using Figures 1 to 8, we will explain the series of operations from input of the source program to generation and output of test data using Kobol's rREDEF.
This will be explained using the INEsJ phrase. According to the procedure of a in FIG. 2, that is, steps 31 to 33, a source program as shown in FIG. 3 is read into the source file 1 of FIG. 1. Next, the data section is analyzed by the item definition analysis means 2 shown in FIG. Here, the device is rREDEFINES
” (underlined part in FIG. 3(a)), the data start position is positioned and stored at the same digit position as DA and TAL written next to rREDEFINEsJ, as shown in FIG. 4. Next, the generation instructions entered from the keyboard 4 that give generation instructions for each item include the data generation method (constant or random number), the actual data to be output if the generation method is constant, and the generation method is random number. It is stored in the generation instruction information storage section 5 of FIG. 1 together with the item definition information 3 of FIG. 1.

次にテストデータ出力回数の指定を行う。テストデータ
出力回数の指定はキーボード4から入力され、第6図に
示すように各項目について1繰り返し当りの生成テスト
データ数の指定と、その繰り返し回数を指定する。この
2つの情報はデータ名と共に出力回数情報記憶部6に格
納される。
Next, specify the number of test data outputs. The designation of the number of test data outputs is entered from the keyboard 4, and as shown in FIG. 6, the number of test data generated per repetition and the number of repetitions are designated for each item. These two pieces of information are stored in the output count information storage unit 6 together with the data name.

次に第2図のステップ34−37の手順に従いテストデ
ータを生成拳出力する。第1図の生成指示情報記憶部5
と生成回数情報記憶部6とにそれぞれ格納された情報は
、テストデータ生成手段7で参照される。第7図がその
内容を示しており、生成指示情報記憶部5内の定数生成
用データ15の生成イメージに対して文字タイプ12の
生成指示が定数であれば定数生成用データ15の内容を
テストデータ生成領域21にそのまま取り込む。
Next, test data is generated and output according to steps 34-37 in FIG. Generation instruction information storage unit 5 in FIG.
The information stored in the and generation number information storage section 6 is referred to by the test data generation means 7. FIG. 7 shows the contents, and if the generation instruction of the character type 12 is a constant, the contents of the constant generation data 15 are tested against the generation image of the constant generation data 15 in the generation instruction information storage unit 5. It is taken into the data generation area 21 as it is.

文字タイプ12の生成指示が乱数の場合は、項目桁数1
3の桁と同じ桁数の乱数をテストデータ生成領域21に
生成する。データがひとつ生成されると出力回数カウン
タ20の値の繰り返し坐位のカウンタの値から1が減算
され、次のデータを生成する。そして出力回数カウンタ
20の値がOになると、次のデータの出力回数17の値
を取り込み、次の項目定義のデータ生成を開始する。本
実施例ではDATAlの項目定義に対するデータを2個
生成すると出力回数カウンタ20の値は0になり、次に
DATA2の項目定義に対してデータが生成される。そ
してDATA2が5個生成されるとDATA3は0とい
う指定になっているので、DATAlの生成に戻る。こ
の時繰り返し回数カウンタ19の値から1減算される。
If the generation instruction for character type 12 is a random number, the number of digits in the item is 1.
A random number having the same number of digits as 3 is generated in the test data generation area 21. When one piece of data is generated, 1 is subtracted from the value of the repeated sitting position counter of the output number counter 20, and the next data is generated. When the value of the output count counter 20 reaches O, the value of the output count 17 of the next data is taken in and data generation for the next item definition is started. In this embodiment, when two pieces of data are generated for the item definition of DATA1, the value of the output count counter 20 becomes 0, and then data is generated for the item definition of DATA2. Then, when five DATA2 are generated, since DATA3 is specified as 0, the process returns to generating DATA1. At this time, 1 is subtracted from the value of the repetition counter 19.

このようにしてDATAlを2個、DATA2を5個と
いう繰り返しが35回行われるとストデータの生成を終
了する。生成されたテストデータは8のファイルに出力
され保存される。
In this way, when the repetition of 2 DATA1 and 5 DATA2 is repeated 35 times, the generation of the strike data is completed. The generated test data is output and saved in 8 files.

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

以上説明したように本発明は、複数種類の項目定義がな
されている同一データ領域に、利用者が項目定義と生成
データの個数を指定しテストデータが生成できるように
したので、従来−つの項目定義に対してしか生成できな
かったために2度以上行わなければならなかった複数種
類の項目定義9− がなされているデータ領域に対するテストデータ生成が
一度にできるようになり、テストデータ生成作業の効率
化が可能となるという効果がある。
As explained above, the present invention enables the user to generate test data by specifying the item definition and the number of generated data in the same data area where multiple types of item definitions are made. Test data can now be generated at once for data areas that have multiple types of item definitions, which previously had to be done more than once because it could only be generated for definitions, improving the efficiency of test data generation work. This has the effect of making it possible to

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

第1図は本発明の一実施例の構成を示すブロック図、第
2図は本実施例の動作を流れを示すフローチャート、第
8図(a)は本実施例に使用したコボルのプログラムソ
ースのデータ部の一部を示す説明図、第3図(b)は第
3図(a)を図式化した説明図、第4図は項目定義記憶
部の構成の一例を示す図、第5図は生成指示情報記憶部
の構成の一例を示す図、第6図は出力指定情報記憶部の
構成の一例を示す図、第7図はテストデータ生成部の構
成の一例を示す図、第8図は本実施例で生成される実際
のテストデータの一例を示す図である。 1・・・ソースファイル、2・・・項目定義解析手段、
3・・・項目定義記憶部、4・・・キーボード、5・・
・生成10− 指示情報記憶部、6・・・生成回数情報記憶部、7・・
・テストデータ生成手段、8・・・テストデータ出力フ
ァイル、9・・・データ名、10・・・項目名、11・
・・項目の桁位置、12・・・文字タイプ、13・・・
項目桁数、14・・・テストデータ生成方法、15・・
・定数生成用データ、16・・・データ名、17・・・
出力回数、18・・・繰り返し回数、19・・・繰り返
し回数カウンタ、20・・・出力回数カウンタ、21・
・・テストデータ生成領域。
Figure 1 is a block diagram showing the configuration of an embodiment of the present invention, Figure 2 is a flowchart showing the operation of this embodiment, and Figure 8 (a) is the program source of Cobol used in this embodiment. FIG. 3(b) is an explanatory diagram showing a part of the data section. FIG. 3(b) is an explanatory diagram illustrating FIG. 3(a). FIG. FIG. 6 is a diagram showing an example of the configuration of the generation instruction information storage section, FIG. 6 is a diagram showing an example of the configuration of the output specification information storage section, FIG. 7 is a diagram showing an example of the configuration of the test data generation section, and FIG. 8 is a diagram showing an example of the configuration of the test data generation section. FIG. 3 is a diagram showing an example of actual test data generated in this embodiment. 1... Source file, 2... Item definition analysis means,
3... Item definition storage section, 4... Keyboard, 5...
- Generation 10 - instruction information storage section, 6... generation number information storage section, 7...
- Test data generation means, 8... Test data output file, 9... Data name, 10... Item name, 11.
...Digit position of item, 12...Character type, 13...
Item number of digits, 14...Test data generation method, 15...
・Constant generation data, 16...Data name, 17...
Number of outputs, 18... Number of repetitions, 19... Number of repetitions counter, 20... Number of outputs counter, 21.
...Test data generation area.

Claims (1)

【特許請求の範囲】[Claims] 同一のデータ領域に対して複数種類の項目定義を行って
いるソースプログラムのデータ部の項目定義解析手段と
、前記複数種類の項目に対するテストデータの生成指示
を行う第1の入力手段と、前記テストデータの生成指示
の情報を記憶する生成指示記憶手段と、各項目定義ごと
にテストデータの生成順序と出力回数を指定する第2の
入力手段と、テストデータの生成順序と出力回数の情報
を記憶する生成回数情報記憶手段と、テストデータの生
成を行うテストデータ生成手段とを備え、前記複数種類
の項目定義に従ったテストデータがテストデータ出力フ
ァイルに格納される一連のテストデータを生成して成る
ことを特徴とするテストデータ生成装置。
an item definition analysis means for a data section of a source program that defines a plurality of types of items for the same data area; a first input means for instructing generation of test data for the plurality of types of items; A generation instruction storage means for storing information on data generation instructions; a second input means for specifying the generation order and number of outputs of test data for each item definition; and a second input means for storing information on the generation order and number of outputs of test data. and a test data generating means that generates test data, and generates a series of test data in which test data according to the plurality of types of item definitions is stored in a test data output file. A test data generation device characterized by:
JP2041883A 1990-02-21 1990-02-21 Test data generating device Pending JPH03244043A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2041883A JPH03244043A (en) 1990-02-21 1990-02-21 Test data generating device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2041883A JPH03244043A (en) 1990-02-21 1990-02-21 Test data generating device

Publications (1)

Publication Number Publication Date
JPH03244043A true JPH03244043A (en) 1991-10-30

Family

ID=12620676

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2041883A Pending JPH03244043A (en) 1990-02-21 1990-02-21 Test data generating device

Country Status (1)

Country Link
JP (1) JPH03244043A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6499119B1 (en) 1999-05-06 2002-12-24 Fujitsu Limited Data inspection method and apparatus
WO2012104907A1 (en) * 2011-02-02 2012-08-09 株式会社日立製作所 Test data production method for evaluating execution performance of program
JP2012208830A (en) * 2011-03-30 2012-10-25 Nec Corp Program test device, program test method and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6499119B1 (en) 1999-05-06 2002-12-24 Fujitsu Limited Data inspection method and apparatus
WO2012104907A1 (en) * 2011-02-02 2012-08-09 株式会社日立製作所 Test data production method for evaluating execution performance of program
US9092577B2 (en) 2011-02-02 2015-07-28 Hitachi, Ltd. Method for generating test data for evaluating program execution performance
JP2012208830A (en) * 2011-03-30 2012-10-25 Nec Corp Program test device, program test method and program

Similar Documents

Publication Publication Date Title
US5008831A (en) Method for producing high quality chemical structure diagrams
JPH03244043A (en) Test data generating device
US6333999B1 (en) Systematic enumerating of strings using patterns and rules
JP3251203B2 (en) JCL program conversion device, JCL program conversion method, and recording medium
JP2004157927A (en) Creating system for business form input, creating program and creating method
JP2003058677A (en) Workflow generating method and device
JP2000029677A (en) Automatic generating device for screen constitution
KR20140065389A (en) Module structural analysis supporting device and program
JP2722684B2 (en) File system search device
Wood An interactive system for the definition of a semantic data model
JPH08166973A (en) Image data managing system
JPH04138575A (en) Device for repreparing finite element data
Junghenn Discrete Mathematics with Coding
JP2845821B2 (en) Font pattern generation method
JPH04177573A (en) Retrieving system
JPS63156254A (en) Control method for intermediate text by interpreter
JPH07334399A (en) Code conversion system for fixed length record
Hall et al. Induction
JPH02245927A (en) Character string generation system
KR20050008269A (en) Chinese Characters Input System
JPH0535532A (en) Test data generator system
JPH06110938A (en) Relational data base management system
Phillips Several techniques of bandwidth reduction for computational efficiency
JPS6074025A (en) Well-ordering processing system for japanese data
JPH10143592A (en) Report preparation device provided with connection repetitive frame and connection repetitive frame generation method