JPH07306801A - Program test execution method - Google Patents

Program test execution method

Info

Publication number
JPH07306801A
JPH07306801A JP6100473A JP10047394A JPH07306801A JP H07306801 A JPH07306801 A JP H07306801A JP 6100473 A JP6100473 A JP 6100473A JP 10047394 A JP10047394 A JP 10047394A JP H07306801 A JPH07306801 A JP H07306801A
Authority
JP
Japan
Prior art keywords
test
program
execution
tabular
name
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
JP6100473A
Other languages
Japanese (ja)
Inventor
Junichi Hiwatari
淳一 樋渡
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP6100473A priority Critical patent/JPH07306801A/en
Publication of JPH07306801A publication Critical patent/JPH07306801A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

(57)【要約】 【目的】作成したプログラムのテストを行う場合に、テ
ストにおける人的作業部分の自動化と、テスト手順の体
系化によりプログラム作成の生産性を向上させる。 【構成】この方式は、被テストプログラムソース抽出手
段1により表形式情報を抽出し、表形式テスト項目情報
5を生成し、ステップ実行3により実行結果を表形式テ
スト項目情報5に出力する。
(57) [Abstract] [Purpose] When testing the created program, improve the productivity of program creation by automating the human work part in the test and systematizing the test procedure. According to this method, the test program source extraction means 1 extracts the tabular information, generates tabular test item information 5, and outputs the execution result to the tabular test item information 5 by step execution 3.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、作成したプログラムを
ステト項目に基づいてテストし、信頼性の保障を行う場
合のテスト実行方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a test execution system for testing a created program based on a set item and guaranteeing reliability.

【0002】[0002]

【従来の技術】プログラムテストは、そのプログラムが
正常に動作するか否かの判断と、被テストプログラムが
どれだけの信頼性を保障できるかの審査を行うために用
いられる。その手段として、被テストプログラムより関
数情報を抽出して一覧表形式でデータ値の入力処理を行
ない、それによりテストケースを設定してテストプログ
ラムを自動生成し、実行してテストを行うという方法。
この種の従来技術が、特開平2−247742号公報に
述べられている。
2. Description of the Related Art A program test is used to judge whether the program operates normally and to examine how much reliability the program under test can guarantee. As a means to do this, function information is extracted from the program under test, data values are input in the form of a list, and then test cases are set to automatically generate a test program, which is then executed and tested.
A conventional technique of this type is described in Japanese Patent Laid-Open No. 2-247742.

【0003】[0003]

【発明が解決しようとする課題】従来の技術では、テス
ト項目実行のためのテストプログラムを生成していたた
め一旦テストプログラムを生成すると、入力ミスや漏れ
等を修正するのに一覧表形式のデータで入力、修正を行
ない、再度テストプログラムの生成が必要となるので、
時間がかかり効率が悪くなってしまう。
In the prior art, the test program for executing the test items was generated. Therefore, once the test program is generated, the data in the list form is used to correct input errors and omissions. It is necessary to input and modify and generate the test program again, so
It takes time and becomes inefficient.

【0004】[0004]

【課題を解決するための手段】前述の問題を解決するた
めの手段として、被テストプログラムソースから抽出し
たテスト項目の表形式情報に対し、追加・修正を行いな
がら、該表の実行条件に従い被テストプログラムをステ
ップ実行して、その実行結果を概表に出力して該表を完
成させ、実行結果を確認する方式とした。
[Means for Solving the Problems] As a means for solving the above-mentioned problems, while adding / correcting the tabular information of the test items extracted from the program source under test, the target items are executed according to the execution conditions of the table. The test program was step-executed, the execution result was output to an outline table, the table was completed, and the execution result was confirmed.

【0005】[0005]

【作用】本発明において、被テストプログラムソース抽
出手段1により抽出した表形式情報に対し追加・修正を
行ない、被テストプログラムをステップ実行していく事
で、条件入力を実行の都度にできる事と、実行結果を概
表に出力するので結果がリアルタイムで確認できるた
め、正否の判断も容易になる。
In the present invention, by adding / correcting the tabular information extracted by the test program source extraction means 1 and executing the test program step by step, the condition input can be performed each time. Since the execution result is output to the outline, the result can be confirmed in real time, and therefore it is easy to judge whether it is right or wrong.

【0006】[0006]

【実施例】本発明によるプログラムテスト実行方式の実
施例1を図2に示す。
FIG. 2 shows a first embodiment of the program test execution system according to the present invention.

【0007】実施例1では、被テストプログラムから抽
出した実行条件、及び確認条件となる変数からできた表
形式情報に対し、被テストプログラムをステップ実行す
る。ステップ実行させるため、引数以外の変数の値は実
行開始後にも設定可能である。実行終了時には結果の値
が確認条件欄である2jに書き込まれる。同様にテスト
実行条件項目全ケースを完了すると該表が完成する。そ
れらの実行結果から、プログラムの正否を判断する。
In the first embodiment, the program under test is step-executed with respect to the tabular information made up of the variables as the execution condition and the confirmation condition extracted from the program under test. Since step execution is performed, the values of variables other than arguments can be set even after the start of execution. At the end of execution, the resulting value is written in the confirmation condition column 2j. Similarly, when all the test execution condition item cases are completed, the table is completed. The correctness of the program is judged from the execution results.

【0008】以上における表形式テスト項目情報5の具
体的な書式は図3に示す。
The specific format of the tabular test item information 5 described above is shown in FIG.

【0009】図3に於て、コード部2aには表1に示す
コードが設定される。
In FIG. 3, the codes shown in Table 1 are set in the code section 2a.

【0010】[0010]

【表1】 [Table 1]

【0011】変数名部2bには変数名、タイプ部2cに
は変数名の型名が、それぞれ被テストソースプログラム
から抽出した内容で設定される。テストケース選択部2
dは、縦の一列が一つのテストケースを表わし、そのケ
ースに必要な値を入力していき、ケースを作成する。
A variable name is set in the variable name portion 2b, and a type name of the variable name is set in the type portion 2c with the contents extracted from the source program under test. Test case selection section 2
In the d, one vertical column represents one test case, and necessary values are input to the case to create a case.

【0012】本方式によるプログラムテストの例として
図5に示すC言語で記述されたプログラムを説明する。
このプログラムは、引数に入力した値が奇数ならば1、
偶数ならば0を返すというものである。該プログラムに
ついて本テスト方式を実行すると、行2eにはCODE
名FUNCのNAME欄に入力要求されるので関数名を
入力する。入力した関数名から実行条件、及び確認条件
となる変数を抽出し、被テストプログラムソース抽出手
段により表形式テスト項目の情報のひな形、図4が生成
される。確認したい変数が設定されなかった時、確認不
要の変数が設定された時等は、該表に追加・修正を行う
ことができる。図4について具体的に見ていくと、行2
eのCASE欄に入力要求されるので、ケース番号を入
力する(図4ハッチング部、ケース番号1)。行2hは
CODE名PARMで、引数が設定されて、NAME欄
に引数名、TYPE欄に型名がそれぞれ設定される。行
2jはCODE名DCで、関数の戻り値を確認するの
で、NAME欄にreturn_valueという名称が設定され
る。ここで設定されているreturn_valueという名称は、
本テスト方式に於て関数の戻り値を確認する場合の変数
として、常にreturn_valueという名称でNAME欄に設
定される。以上のように各項目を設定すると、行2hの
PARMの引数値が入力要求されるので、被テストルー
チンを実行するため、CASE欄に設定値を入力する
(図4ハッチング部、設定値は9)。そして該プログラ
ムをステップ実行すると、確認条件欄である行2jのD
CコードのCASE欄に実行結果の値が書き込まれる
(図4ハッチング部、実行結果値は1)。以上で一つの
ケースが終了し、次のケースに移る。テストを継続する
場合はケース番号を入力し、その他の項目も同様に入力
する。それらの結果により、プログラムの正否を判断す
る。
As an example of the program test according to this method, a program written in C language shown in FIG. 5 will be described.
This program is 1, if the value entered in the argument is odd,
It returns 0 if it is even. When this test method is executed for this program, CODE is displayed in line 2e.
Input the function name as prompted for the NAME field of the name FUNC. Variables serving as execution conditions and confirmation conditions are extracted from the input function name, and the test program source extraction means generates a template of information of tabular test items, FIG. When the variable to be confirmed is not set, or when the variable that does not need to be confirmed is set, the table can be added or modified. Looking specifically at FIG. 4, line 2
Since the input is required in the CASE field of e, the case number is input (hatched part in FIG. 4, case number 1). In line 2h, the CODE name PARM is set, the argument is set, the argument name is set in the NAME column, and the model name is set in the TYPE column. The line 2j is the CODE name DC, and the return value of the function is confirmed, so the name return_value is set in the NAME column. The name return_value set here is
As a variable for confirming the return value of the function in this test method, it is always set in the NAME column with the name return_value. When each item is set as described above, the argument value of PARM in line 2h is requested to be input. Therefore, in order to execute the routine under test, the set value is input in the CASE column (see the hatched portion in FIG. 4 and the set value is 9). ). When the program is step-executed, D in line 2j, which is the confirmation condition column, is displayed.
The value of the execution result is written in the CASE column of the C code (hatched portion in FIG. 4, the execution result value is 1). This completes one case and moves on to the next case. To continue the test, enter the case number and other items as well. The correctness of the program is judged based on those results.

【0013】[0013]

【発明の効果】本発明によれば、被テストソースプログ
ラムから抽出した、表形式情報の実行条件に従いステッ
プ実行していくので、データの設定が実行後でも可能な
ため、データの漏れを未然に防ぐことができ、実行結果
がリアルタイムなので入力ミス等を見つけだすことがで
きる。また人的作業を最小限にし、実行結果を書き込む
ことで、実行結果を残すこと、作業時間を大幅に短縮す
ること等ができる。
According to the present invention, since step execution is performed according to the execution condition of the tabular information extracted from the source program to be tested, data can be set even after the execution, so that data leakage can be prevented. It is possible to prevent it, and since the execution result is real-time, it is possible to find an input error. In addition, by minimizing the human work and writing the execution result, it is possible to leave the execution result and to significantly reduce the work time.

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

【図1】本発明が動作する環境の構成である。FIG. 1 is a configuration of an environment in which the present invention operates.

【図2】プログラムテスト実行方式の実施例1の構成図
である。
FIG. 2 is a configuration diagram of a first embodiment of a program test execution method.

【図3】表形式入力手段における入力書式である。FIG. 3 is an input format in a table format input means.

【図4】実施例1における表形式入力例である。FIG. 4 is an example of tabular input according to the first embodiment.

【図5】実施例1における被テストプログラムソース例
1である。
FIG. 5 is an example 1 of a program source under test according to the first embodiment.

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

1…被テストプログラムソース抽出手段、 2…表形式入力手段、 2a…コード部、 2b…変数名部、 2c…タイプ部、 2d…テストケース選択部、 3…ステップ実行、 4…被テストプログラムソース、 5…表形式テスト項目情報、 A…コンピュータ、 A1…中央処理装置、 A2…主記憶装置、 A3…制御装置、 B…入力装置、 C…出力装置、 D…補助記憶装置。 1 ... Test program source extraction means, 2 ... Tabular format input means, 2a ... Code part, 2b ... Variable name part, 2c ... Type part, 2d ... Test case selection part, 3 ... Step execution, 4 ... Test program source , 5 ... Tabular test item information, A ... Computer, A1 ... Central processing unit, A2 ... Main storage device, A3 ... Control device, B ... Input device, C ... Output device, D ... Auxiliary storage device.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】被テストソースプログラムから抽出したテ
スト項目である実行条件を表形式とし、該表に対して追
加、修正する手段と、該表の実行条件に基づいて被テス
トプログラムを実行し、該表に実行結果を書き込む手段
とで構成することを特徴とするプログラムテスト実行方
式。
1. A table format of execution conditions, which are test items extracted from a source program to be tested, means for adding or modifying the table, and executing the program under test based on the execution conditions of the table, And a means for writing the execution result in the table.
JP6100473A 1994-05-16 1994-05-16 Program test execution method Pending JPH07306801A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6100473A JPH07306801A (en) 1994-05-16 1994-05-16 Program test execution method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6100473A JPH07306801A (en) 1994-05-16 1994-05-16 Program test execution method

Publications (1)

Publication Number Publication Date
JPH07306801A true JPH07306801A (en) 1995-11-21

Family

ID=14274888

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6100473A Pending JPH07306801A (en) 1994-05-16 1994-05-16 Program test execution method

Country Status (1)

Country Link
JP (1) JPH07306801A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2024509721A (en) * 2021-11-29 2024-03-05 シャンハイ トサン テクノロジー リミテッド Test method, system and device by loading Excel (registered trademark) files
JP7795252B1 (en) * 2025-04-03 2026-01-07 リベラルロジック株式会社 Program, information processing system and information processing method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2024509721A (en) * 2021-11-29 2024-03-05 シャンハイ トサン テクノロジー リミテッド Test method, system and device by loading Excel (registered trademark) files
JP2025061454A (en) * 2021-11-29 2025-04-10 シャンハイ トサン テクノロジー リミテッド Method, system and apparatus for editing Excel test cases - Patents.com
US12475029B2 (en) 2021-11-29 2025-11-18 Shanghai Tosun Technology Ltd. Test method, system, and device based on excel file loading
JP7795252B1 (en) * 2025-04-03 2026-01-07 リベラルロジック株式会社 Program, information processing system and information processing method

Similar Documents

Publication Publication Date Title
US20050235260A1 (en) User interface application development device and development method
EP2271982A1 (en) A method and a system for transforming an object model
CN116009836A (en) RPA programming method, device, equipment and storage medium based on script language
JPH07306801A (en) Program test execution method
US20230176832A1 (en) Program creation assistance device
JP2002014845A (en) Method and apparatus for automatically generating test script components
JP5374405B2 (en) Model debugging apparatus and model debugging method
JP2002157144A (en) Software automatic test method
Raharjana et al. Conversion of User Story Scenarios to Python-Based Selenium Source Code for Automated Testing
JPS5922140A (en) Interactive compilation method
KR101731629B1 (en) Method and device for automatic generating go code from circus
US20260093463A1 (en) Method for Transforming a Code Using a Large Language Model
JPH07160536A (en) Program test support device for interactive system
JPH06250882A (en) Program test execution system
JPS63641A (en) Inputting system for instruction
JPH0612248A (en) Automatic program generation method
JP2000131194A (en) Vehicle diagnostic program creation device and vehicle diagnostic device
CN121326756A (en) Unit test code generation method, device, equipment, medium and program product based on large model
CN113672490A (en) Function definition identification method, device and equipment
JPH04317112A (en) Error message treatment of man-machine-interface
JP2022136800A (en) Correction information generation device, correction information generation method, and program
CN113434126A (en) Development management method and device, electronic equipment and storage medium
JPH01230132A (en) Generator
JPH05181706A (en) Device for forming execution time information output debugger control sentence
JPH01177137A (en) Computer execution diagnostic device