JP5509992B2 - Test data generation apparatus and program evaluation support method - Google Patents

Test data generation apparatus and program evaluation support method

Info

Publication number
JP5509992B2
JP5509992B2 JP2010076410A JP2010076410A JP5509992B2 JP 5509992 B2 JP5509992 B2 JP 5509992B2 JP 2010076410 A JP2010076410 A JP 2010076410A JP 2010076410 A JP2010076410 A JP 2010076410A JP 5509992 B2 JP5509992 B2 JP 5509992B2
Authority
JP
Japan
Prior art keywords
input
data
value
output
test data
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.)
Active
Application number
JP2010076410A
Other languages
Japanese (ja)
Other versions
JP2011209970A (en
Inventor
寛和 徳田
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co 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 Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP2010076410A priority Critical patent/JP5509992B2/en
Publication of JP2011209970A publication Critical patent/JP2011209970A/en
Application granted granted Critical
Publication of JP5509992B2 publication Critical patent/JP5509992B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明は、コンピュータで実行されるプログラムの動的テストに使用するためのテストデータを生成するテストデータ生成装置およびプログラム評価支援方法に関する。   The present invention relates to a test data generation apparatus and a program evaluation support method for generating test data for use in a dynamic test of a program executed on a computer.

従来、プログラムの動作が正常であることを検証するために、プログラムにテスト用の入力値を与え、本来出力すべき値が正しく出力されているか否かを検証することによって、プログラムの品質を評価するという方法が用いられている。   Conventionally, in order to verify that the operation of the program is normal, the program quality is evaluated by providing test input values to the program and verifying whether the values that should be output are output correctly. The method of doing is used.

この検証作業は、人間系で行う場合があるが、検証データ数が多くなると作業効率が悪くなる。このため、検証作業を自動的に実行する技術が提案されている。(例えば、特許文献2,特許文献3を参照のこと。)   This verification work may be performed by a human system, but the work efficiency decreases as the number of verification data increases. For this reason, techniques for automatically executing verification work have been proposed. (For example, see Patent Document 2 and Patent Document 3.)

また、検証作業において、あらゆる入力値に対する出力値を評価するのでは工数が多くなり効率が悪くなる。このため、より検証作業の工数を減らして、効率よくテストするための手法が提案されている。例えば、特許文献4では、プログラムの分岐を自動解析し、ソースコードの全パスを通過するテスト項目を作成する技術が開示されている。   Further, in the verification work, evaluating output values for all input values increases man-hours and decreases efficiency. For this reason, a method for efficiently testing by reducing the number of verification work steps has been proposed. For example, Patent Document 4 discloses a technique for automatically analyzing a branch of a program and creating a test item that passes through all paths of the source code.

また、特許文献1では、工数の多い作業を見通しよく進めるため、グラフィカルなボックスパターンにより、内部的なI/Oサブシステムの信号パターンを隠蔽することにより、効率的にテスト仕様を作成する技術が開示されている。   Patent Document 1 discloses a technique for efficiently creating a test specification by concealing an internal I / O subsystem signal pattern by a graphical box pattern in order to proceed with a large amount of man-hours. It is disclosed.

また、特許文献5では、プログラムの検証作業を効率的に進めるために波形をグラフィカルに表示し、テストデータを作成する技術が開示されている。   Patent Document 5 discloses a technique for graphically displaying waveforms and creating test data in order to efficiently proceed with program verification.

特開平11−119821号公報JP-A-11-119821 特開平9−223042号公報JP-A-9-222302 特開平9−259006号公報Japanese Patent Laid-Open No. 9-259006 特開平5−210537号公報JP-A-5-210537 特開2006−99518号公報JP 2006-99518 A

ところで、特許文献1においても指摘されているように、単体テスト以降のテストの段階においては、全てのテストケースについて試験を実行するのは効率的ではない。この問題に対して、特許文献1では、状態遷移を処理単位に分割し、その入出力時点での値に注目している。しかしながら、この方法を採った場合、全てのケースを網羅することによるデメリットは解消されるものの、波形データなど時系列データを扱おうとすると、台形状、三角波状等の波形の形状の判別が視覚的に難しくなる。即ち特許文献1の方法では、波形全体の形が把握しにくくなって、効率的に試験ポイントを指定したり、絞り込んだりすることができなくなるという新たな問題が生ずる。   By the way, as pointed out in Patent Document 1, it is not efficient to execute tests for all test cases in the test stage after the unit test. With respect to this problem, Patent Document 1 divides state transitions into processing units and pays attention to values at the time of input / output. However, when this method is adopted, the disadvantages of covering all cases are eliminated, but when time series data such as waveform data is to be handled, it is possible to visually distinguish the waveform shape such as trapezoidal shape and triangular wave shape. It becomes difficult. That is, the method of Patent Document 1 has a new problem that it becomes difficult to grasp the shape of the entire waveform, and the test points cannot be efficiently specified or narrowed down.

本発明は、上述のかかる事情に鑑みてなされたものであり、時系列データなどの波形データの中からプログラムの動的テストに有効なデータを抽出してテストデータを生成することのできるテストデータ生成装置およびプログラム評価支援方法を提供することを目的とする。   The present invention has been made in view of the above-described circumstances, and test data that can generate test data by extracting data effective for dynamic testing of a program from waveform data such as time-series data. It is an object to provide a generation apparatus and a program evaluation support method.

本発明の概要は、検証用プログラムに入力するデータと、本来出力されるべき出力データのぞれぞれの波形図を入出力の対応関係や時系列的な変化が容易に視認できるように表示装置に表示する。そして、設計者は視覚的に入出力の関係を確認しながら、テストデータに用いる入出力データに抽出マークを付す。その後、抽出マークを付した入出力データからテストデータを生成するというものである。   The outline of the present invention is to display the waveform diagram of each of the data to be input to the verification program and the output data to be output so that the input / output correspondence and time-series changes can be easily seen. Display on the device. Then, the designer attaches an extraction mark to the input / output data used for the test data while visually confirming the input / output relationship. Thereafter, test data is generated from input / output data with extraction marks.

また本発明は、テストデータを、プログラムまたはプログラムの一部として出力することにより、検証用プログラムと直接結合したり、検証用プログラムに取り込んだりすることを可能にする。また、テストデータは、検証用プログラムへの入力値と、該入力値を検証用プログラムへ入力したときの期待される出力値(以下、「出力期待値」という。)に分けて生成する。この出力期待値は、検証用プログラムにテストデータの入力値が与えられたときに検証用プログラムから出力された出力値と比較され、検証用プログラムの評価に用いられる。   In addition, the present invention enables the test data to be output directly as a program or a part of the program, so that the test data can be directly coupled to the verification program or taken into the verification program. The test data is generated separately for an input value to the verification program and an output value expected when the input value is input to the verification program (hereinafter referred to as “output expected value”). The expected output value is compared with an output value output from the verification program when an input value of test data is given to the verification program, and is used for evaluation of the verification program.

通常は、この入力値と出力値の抽出された組から、正しい値が計算されているかを検証すれば良いので、この入力値と出力値の抽出された組のみを出力すれば足りる。しかし、検証する対象のプログラムが前回の状態を記憶しているような場合においては、抽出された入力値と出力値の組からだけでは、正しい値を計算することができない。このため、このような検証を行う場合には、入力は時系列で全てのデータを抽出する一方、出力は、抽出指定した出力値のみを用いるようにする。ただし、どの時点のデータであるかを判別できるように、出力値には、入力時点がわかるデータ位置情報を付随させる。   Normally, it is only necessary to verify whether a correct value is calculated from the extracted set of input values and output values, so it is sufficient to output only the extracted set of input values and output values. However, in the case where the program to be verified stores the previous state, a correct value cannot be calculated only from the set of the extracted input value and output value. For this reason, when such verification is performed, all data is extracted in time series, while only output values designated for extraction are used for output. However, data position information that identifies the input time point is attached to the output value so that it can be determined at which time point the data is.

具体的には、本発明に係るテストデータ生成装置は、検証用プログラムへの入力値と該入力値に対する出力期待値とを入力し、該入力値と該出力期待値の組み合わせに、入力された順番を示すデータ位置を付して入力データとして記憶装置に保存するデータ入力手段と、記憶装置に保存されている入力データに基づいて表示装置へ入力値と出力期待値をそれぞれグラフ表示するグラフ表示手段と、各グラフ上に入力値と該入力値に対応する出力期待値との関係を示すカーソルを表示するカーソル表示手段と、データ抽出指示の指令を受け付けてカーソルで示された入力値と該入力値に対応する出力期待値のデータ位置に抽出マークを付する抽出データ指定手段と、抽出マークの付されたデータ位置の入力値と出力期待値とを抽出することによって検証用プログラムのテストデータを生成するテストデータ出力手段と、を備えたことを特徴とする。   Specifically, the test data generation device according to the present invention inputs an input value to the verification program and an output expected value for the input value, and is input to the combination of the input value and the output expected value. Data input means for storing data as an input data in the storage device with a data position indicating the order, and a graph display for graphically displaying the input value and the output expected value on the display device based on the input data stored in the storage device Means for displaying a cursor indicating a relationship between an input value and an expected output value corresponding to the input value on each graph, an input value indicated by the cursor in response to a data extraction instruction command, and the cursor Extraction data designation means for attaching an extraction mark to the data position of the output expected value corresponding to the input value, and extracting the input value and the output expected value of the data position to which the extraction mark is attached Characterized in that and a test data output means for generating test data for verification program Te.

本発明では、入力値と出力期待値との関係をグラフ表示して、設計者がそのグラフを見て任意に抽出したいデータを抽出することができるので、効率的に有効なテストデータを選択することができる。   In the present invention, the relationship between the input value and the output expected value is displayed in a graph, and the designer can extract the data he / she wants to extract arbitrarily by looking at the graph. Therefore, effective test data is selected efficiently. be able to.

本発明に係るテストデータ生成装置では、さらに、テストデータ出力手段は、入力値については、データ入力手段によって入力された全ての入力値を抽出すると共に、出力期待値については、抽出マークの付された出力期待値を該出力期待値のデータ位置を付して抽出し、当該抽出されたデータを用いてテストデータを生成することを特徴とする。   In the test data generation device according to the present invention, the test data output means extracts all input values input by the data input means for the input values, and adds an extraction mark for the output expected value. The output expected value is extracted by attaching the data position of the output expected value, and test data is generated using the extracted data.

本発明では、入力値の履歴が出力値に影響を与えるようなケースでも適切にテストデータを生成することができる。   In the present invention, test data can be appropriately generated even in the case where the history of input values affects the output value.

また、本発明に係るテストデータ生成装置では、さらに、抽出データ指定手段は、出力期待値が予め定めた抽出条件に該当するか否かを判定し、該当する場合は、その出力期待値のデータ位置に抽出マークを表示することを特徴とする。抽出条件として、例えば、出力期待値の変化が予め定めた閾値よりも大きいか否かで判定し、出力期待値の変化が閾値よりも大きくなるデータ位置に抽出マークを表示することにより、効率的に検証箇所を絞ることができる。   Further, in the test data generation device according to the present invention, the extraction data specifying means further determines whether or not the expected output value satisfies a predetermined extraction condition, and if so, data of the expected output value. An extraction mark is displayed at the position. As an extraction condition, for example, it is determined by whether or not a change in output expected value is larger than a predetermined threshold, and an extraction mark is displayed at a data position where the change in output expected value is larger than the threshold. The verification part can be narrowed down to.

本発明に係るプログラム評価支援方法は、コンピュータ上で検証用プログラムを動作させ、該検証用プログラムにテストデータ生成装置によって生成されたテストデータを入力し、該検証用プログラムの計算結果を表示装置へ表示させることによって検証用プログラムの評価を支援するプログラム評価支援方法であって、テストデータの入力値をデータ位置の順番に予め定められた時間間隔で検証用プログラムへ入力し、該検証用プログラムからの出力値と、テストデータの出力期待値が一致するか否かを判定し、その判定結果を表示装置へ表示することを特徴とする。   The program evaluation support method according to the present invention operates a verification program on a computer, inputs test data generated by a test data generation device to the verification program, and outputs the calculation result of the verification program to a display device. A program evaluation support method for supporting evaluation of a verification program by displaying the test data by inputting test data input values to the verification program in a predetermined time interval in the order of data positions, and from the verification program It is characterized in that it is determined whether or not the output value and the expected output value of the test data match, and the determination result is displayed on the display device.

本発明では、テストデータを検証用プログラムに入力し、その出力値と、テストデータに保存されている入力値ごとの出力期待値を比較することによって、検証用プログラムの評価を行う。なお、一致か否かは、差が予め定めた閾値以下か否かで判定する。   In the present invention, the verification program is evaluated by inputting test data to the verification program and comparing the output value with the expected output value for each input value stored in the test data. Whether or not they match is determined by whether or not the difference is equal to or less than a predetermined threshold.

好ましくは、コンピュータには、検証用プログラムの応答時間を設定しておき、テストデータの入力値を検証用プログラムへ入力してから、応答時間後の出力値と、当該入力値に対する出力期待値とを比較して、該出力値と該出力期待値が一致するか否かを判定するのが良い。これにより、プログラムの応答時間の期待値も同時に評価することができる。   Preferably, the response time of the verification program is set in the computer, and after the input value of the test data is input to the verification program, the output value after the response time, the expected output value for the input value, and Are compared to determine whether the output value matches the expected output value. Thereby, the expected value of the response time of the program can be evaluated simultaneously.

また、データ入力位置ごとに、出力期待値と検証用プログラムの出力値との差分を計算し、該差分が予め定めた閾値以上の場合はアラーム出力をすることにより、設計者に検証用プログラムに異常が存在するか、仕様に問題があることを確実に伝えることができる。   In addition, for each data input position, the difference between the expected output value and the output value of the verification program is calculated, and if the difference is equal to or greater than a predetermined threshold value, an alarm is output, thereby allowing the designer to enter the verification program. You can be sure that there is an anomaly or that there is a problem with the specification.

本発明によれば、テストデータの入力値と出力期待値を時系列的に波形表示して、設計者はその波形を見て抽出したいデータを抽出することができるので、効率的に有効なテストデータを選択することができる。また、本発明では、入力値の履歴が出力値に影響を与えるようなケースでも適切にテストデータを生成することができる。   According to the present invention, the input value and the expected output value of the test data are displayed in a waveform in time series, and the designer can extract the data to be extracted by looking at the waveform. Data can be selected. In the present invention, test data can be appropriately generated even in the case where the history of input values affects the output value.

本発明の実施の形態によるテストデータ生成装置1の装置構成図である。It is a device block diagram of the test data generation device 1 by embodiment of this invention. 本発明の実施の形態によるテストデータ生成装置1の機能ブロック図である。It is a functional block diagram of the test data generation device 1 by embodiment of this invention. 図2のディスプレイ装置50に表示される画面の構成例を示している。The example of a structure of the screen displayed on the display apparatus 50 of FIG. 2 is shown. 図2のカーソル表示手段13の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the cursor display means 13 of FIG. 図2のテストデータ出力手段15の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the test data output means 15 of FIG. 図2のテストデータ出力手段15によって出力されたテストデータファイルの一例である。It is an example of the test data file output by the test data output means 15 of FIG. 図6のテストデータファイルの他の例である。It is another example of the test data file of FIG. 図3の他の画面構成例である。It is the other example of a screen structure of FIG. 図2のテストデータ出力手段15が全データ出力モードにおいてC言語形式で出力したテストデータファイルの例である。It is an example of the test data file which the test data output means 15 of FIG. 2 output in the C language format in the all data output mode. 図2のテストデータ出力手段15の全データ出力モードにおける処理手順を示すフローチャートである。It is a flowchart which shows the process sequence in the all data output mode of the test data output means 15 of FIG. 本発明の実施の形態によるプログラム検証装置のブロック図である。It is a block diagram of the program verification apparatus by embodiment of this invention. 図11のインタフェースプログラム22の一例である。It is an example of the interface program 22 of FIG. 図2の抽出データ指定手段14の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the extraction data designation | designated means 14 of FIG. 図13の抽出データ指定手段14の処理に用いられる抽出条件のテーブルである。It is a table of extraction conditions used for the process of the extraction data designation | designated means 14 of FIG. 図2のテストデータ出力手段15の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the test data output means 15 of FIG.

以下、本発明の実施の形態を説明する。図1は、本実施の形態によるテストデータ生成装置1の装置構成図である。この図に示すように、テストデータ生成装置1は、データを入力する入力装置40、種々の演算処理を実行する演算装置10、演算装置10のプログラム実行等に用いられる主記憶装置20、データやプログラムを保存する補助記憶装置30、および、演算結果を表示するディスプレイ装置50から構成されている。   Embodiments of the present invention will be described below. FIG. 1 is a device configuration diagram of a test data generation device 1 according to the present embodiment. As shown in this figure, the test data generation device 1 includes an input device 40 for inputting data, an arithmetic device 10 for executing various arithmetic processes, a main storage device 20 used for program execution of the arithmetic device 10, etc. The auxiliary storage device 30 stores the program and the display device 50 displays the calculation result.

図2は、本実施の形態によるテストデータ生成装置1の機能ブロック図である。この図において、テストデータ生成装置1は、入力装置40を介して検証用プログラムへの入力値と出力期待値を入力するデータ入力手段11、入力したデータに基づいてディスプレイ装置50へグラフ表示するグラフ表示手段12、表示したグラフ上にカーソルの表示やカーソルの移動処理を行うカーソル表示手段13、入力したデータのうちテストデータに使用するデータの指定を受け付ける抽出データ指定手段14、指定されたデータを抽出して検証用プログラムのテストデータを生成して補助記憶装置30へ出力するテストデータ出力手段15を有している。各手段11〜15はCPUの機能としてブログラムによって実現することができる。   FIG. 2 is a functional block diagram of the test data generation apparatus 1 according to this embodiment. In this figure, the test data generating device 1 includes a data input means 11 for inputting an input value and an expected output value to the verification program via the input device 40, and a graph for displaying a graph on the display device 50 based on the input data. Display means 12, cursor display means 13 for performing cursor display and cursor movement processing on the displayed graph, extracted data designation means 14 for accepting designation of data to be used for test data out of input data, designated data Test data output means 15 for extracting and generating test data of the verification program and outputting it to the auxiliary storage device 30 is provided. Each means 11-15 can be realized by a program as a function of the CPU.

図2に示すテストデータ生成装置1の機能を図1との関連において説明すると、各手段11を実現するプログラムが補助記憶装置30に格納されており、テストデータ生成処理の開始時にこのプログラムが主記憶装置20にロードされて演算装置10によって実行される。生成されたテストデータは、補助記憶装置30に保存される。   The function of the test data generation device 1 shown in FIG. 2 will be described in relation to FIG. 1. A program for realizing each means 11 is stored in the auxiliary storage device 30, and this program is the main program at the start of the test data generation process. It is loaded into the storage device 20 and executed by the arithmetic device 10. The generated test data is stored in the auxiliary storage device 30.

次に上記の構成を有するテストデータ生成装置1の動作を説明する。
<データ入力処理>
図3は、テストデータ生成装置1のデータ入力手段11によってディスプレイ装置50に表示される画面の構成例を示している。この画面の左側はデータを入力するための画面(データ入力部2)であり、画面右側は、入力された値に基づいてグラフ表示をする画面(波形表示部3)になっている。また、波形表示部3の上側には、カーソルを移動させるためのボタン群(指示データ変更ボタン表示部4)などが配置されている。
Next, the operation of the test data generation apparatus 1 having the above configuration will be described.
<Data input processing>
FIG. 3 shows a configuration example of a screen displayed on the display device 50 by the data input unit 11 of the test data generation device 1. The left side of the screen is a screen for inputting data (data input unit 2), and the right side of the screen is a screen (waveform display unit 3) for displaying a graph based on the input value. In addition, on the upper side of the waveform display unit 3, a group of buttons (instruction data change button display unit 4) for moving the cursor is arranged.

設計者(テストデータを生成する者)はこの画面のデータ入力部2を介して入力値や出力期待値を設定入力する。データ入力部2は、表計算ソフトウェアなどで見られるスプレッドシート状の入力インターフェースとなっており、列2bの「IN」欄、列2cの「OUT」欄の各セルには個々に数値を入力できるようになっている。「IN」欄にはプログラムへの入力値、「OUT」欄には出力期待値が入力できるようになっている。列2aの「No.」欄には自動的に連番が表示される。この「No.」欄はデータの順番、すなわち時系列を表す。以降の説明で、「データ位置」は、データの順番を意味する。最下行までデータが入力されると、新たな行がスクロール表示されるようになっている。   A designer (one who generates test data) sets and inputs an input value and an expected output value via the data input unit 2 on this screen. The data input unit 2 is a spreadsheet-like input interface that can be found in spreadsheet software and the like, and numerical values can be individually input into each cell in the “IN” column of the column 2b and the “OUT” column of the column 2c. It is like that. An input value to the program can be input in the “IN” column, and an expected output value can be input in the “OUT” column. A serial number is automatically displayed in the “No.” column of the column 2a. This “No.” column represents the order of data, that is, time series. In the following description, “data position” means the order of data. When data is input to the bottom line, a new line is scrolled.

図3は、入力値と出力期待値を直接入力する形態になっているが、入出力値を設定する代わりに、数式を入力して、入力値または出力期待値を指定することによって、その数式から出力期待値または入力値を自動的に算出するようにしても良い。   In FIG. 3, the input value and the output expected value are directly input. Instead of setting the input / output value, the numerical value is input and the input value or the output expected value is designated. The output expected value or the input value may be automatically calculated from the above.

また、図3の例では、入力データ列は1系列であるが、複数系列であっても良い。同様に、出力データ列もプログラムが複数の出力点を有する場合は、複数系列であっても良い。このとき、各列のセルの幅は、データ列の数に合わせて自動的に表示範囲を合わせるようにするのが良い。   Further, in the example of FIG. 3, the input data string is one series, but may be a plurality of series. Similarly, the output data string may be a plurality of series when the program has a plurality of output points. At this time, it is preferable to automatically adjust the display range of the cell width of each column according to the number of data columns.

また、表計算ソフトウェアのような数式を計算する場合、数式が複雑になり過ぎないように、中間の値を計算する必要がある場合もある。このような場合には、図3には表示されていないが、中間の値を計算する列を設けて、これをもとに入力値あるいは出力期待値を計算するようにしても良い。   In addition, when calculating mathematical formulas such as spreadsheet software, it may be necessary to calculate intermediate values so that the mathematical formulas are not overly complex. In such a case, although not shown in FIG. 3, a column for calculating an intermediate value may be provided, and the input value or the output expected value may be calculated based on this column.

入力されたデータは、図3のデータ入力部2と同様のテーブル形式で主記憶装置20に保存される。   The input data is stored in the main storage device 20 in the same table format as the data input unit 2 of FIG.

<グラフ表示処理>
グラフ表示手段12は、データ入力部2を介して入力されたデータを用いて波形表示部3にグラフィカル表示をする。このグラフ表示手段12によって、入力波形表示部3aには、入力値の時系列波形が表示される。入力波形表示部3aの横軸は「No.」欄に対応しており、連番が等間隔に表示される。縦軸は「IN」欄に対応し、「IN」欄に入力された値の最大値と最小値でグラフの縦軸の範囲が定められその間を等間隔で目盛り表示される。出力波形表示部3bには、出力期待値の時系列波形が表示される。入力波形表示部3aと同様に横軸は「No.」欄に対応し、「IN」欄と同じ番号が等間隔に表示される。出力波形表示部3bの縦軸は「OUT」欄に対応し、「OUT」欄に入力された値の最大値と最小値でグラフの縦軸の範囲が定められ、その間を等間隔で目盛り表示される。
<Graph display processing>
The graph display unit 12 displays a graphical display on the waveform display unit 3 using the data input via the data input unit 2. By the graph display means 12, the time series waveform of the input value is displayed on the input waveform display section 3a. The horizontal axis of the input waveform display portion 3a corresponds to the “No.” column, and serial numbers are displayed at regular intervals. The vertical axis corresponds to the “IN” field, and the range of the vertical axis of the graph is determined by the maximum value and the minimum value of the values input in the “IN” field, and scales are displayed at regular intervals between them. The output waveform display section 3b displays a time series waveform of expected output values. Similar to the input waveform display section 3a, the horizontal axis corresponds to the “No.” field, and the same number as the “IN” field is displayed at equal intervals. The vertical axis of the output waveform display portion 3b corresponds to the “OUT” field, and the range of the vertical axis of the graph is determined by the maximum value and the minimum value input in the “OUT” field, and the scale is displayed at regular intervals between Is done.

なお、図示していないが、データ列2b,2cと並列に列を設けて補助線をグラフに引くためのデータを設定入力できるようにしておいて、入力されたデータを入力波形表示部3a、出力波形表示部3bに表示するようにしても良い。   Although not shown, a column is provided in parallel with the data columns 2b and 2c so that data for drawing an auxiliary line on the graph can be set and input, and the input data is input to the input waveform display unit 3a, You may make it display on the output waveform display part 3b.

<カーソル表示処理>
カーソル表示手段13は、入力波形表示部3a,出力波形表示部3bに、それぞれ縦線のカーソル9a,9bを表示する。カーソル表示手段13は、指示データ変更ボタン表示部4のいずれかのボタン4a〜4dが押されるとカーソル表示手段13はその押下を検知して、押されたボタンに対応してカーソル位置を移動させる。例えば、指示データ変更ボタン表示部4の枠内の左から2番目にある左移動ボタン4bが押されると、後述する図4の手順で、カーソル表示手段13は限界位置を判定した後に移動可能ならば、カーソルを左に1だけずらす。指示データ変更ボタン表示部4の他のボタンについても同様にそれぞれのボタンに応じてカーソルを移動させる。入力波形表示部3aと出力波形表示部3bのカーソルは常に同じ動きであり、横軸上の同じデータ位置に表示される。このため、設計者は、そのデータ位置における入力値と出力期待値の対応を容易に認識することができる。
<Cursor display processing>
The cursor display means 13 displays vertical line cursors 9a and 9b on the input waveform display section 3a and the output waveform display section 3b, respectively. When any one of the buttons 4a to 4d of the instruction data change button display unit 4 is pressed, the cursor display unit 13 detects the pressing and moves the cursor position corresponding to the pressed button. . For example, if the left movement button 4b that is second from the left in the frame of the instruction data change button display unit 4 is pressed, the cursor display means 13 can move after determining the limit position in the procedure of FIG. For example, move the cursor to the left by 1. Similarly, for the other buttons of the instruction data change button display unit 4, the cursor is moved according to each button. The cursors of the input waveform display unit 3a and the output waveform display unit 3b always move in the same manner, and are displayed at the same data position on the horizontal axis. For this reason, the designer can easily recognize the correspondence between the input value and the expected output value at the data position.

カーソル位置表示部7には、現在カーソルのある位置が「No.」欄の数値として表示される。すなわち、「カーソル位置=データ位置」の関係にある。なお、直接カーソル位置表示部7に「No.」欄の数値を入力することによってカーソル位置を設定することもできる。この場合、入力された値がカーソルの移動可能範囲を超えるときは、カーソルの移動可能範囲内に制限される。   The cursor position display unit 7 displays the position where the cursor is currently located as a numerical value in the “No.” column. That is, there is a relationship of “cursor position = data position”. The cursor position can also be set by directly inputting a numerical value in the “No.” column to the cursor position display unit 7. In this case, when the input value exceeds the movable range of the cursor, it is limited within the movable range of the cursor.

次に、図4を用いて、上記のカーソル処理を実現するためのカーソル表示手段13の処理手順を説明する。なお、表示画面中、各ボタンの押下は、それぞれのボタンが押下されたときに、押下有りのステータスを保存すると共に、集約してボタン押下イベント発生によって、カーソル表示手段13を起動し、起動されたカーソル表示手段13は、ステータスを読みこむことによって、どのボタンが押されたかを検知すると共に、そのステータスをリセットするものとして説明するが、起動の方法はこれに限らない。   Next, the processing procedure of the cursor display means 13 for realizing the cursor processing will be described with reference to FIG. It should be noted that pressing each button in the display screen saves the pressed status when each button is pressed, and activates the cursor display means 13 when a button pressing event occurs. The cursor display means 13 is described as detecting which button is pressed by reading the status and resetting the status, but the activation method is not limited to this.

カーソル表示手段13は、ボタン押下イベント発生によって起動されると、左移動ボタン4aの押下が有ったか否かを判定する(S101)。この判定の結果、左移動ボタン4aの押下が有った場合、カーソル表示手段13は、次にカーソルの位置が左から10以上手前か否かを判定し(S102)、10以上手前の場合は、現在のカーソル位置を左に10個分移動させる(S103)。具体的には、現在のカーソル位置として保存されている「No.」欄の数値を10デクリメントする。カーソルの位置が左から10未満の場合、カーソル表示手段13は、カーソル位置を最左端に移動させる(S104)。すなわち、現在のカーソル位置として保存されている「No.」欄の数値を1にセットする。   When the cursor display means 13 is activated by the occurrence of a button press event, it determines whether or not the left move button 4a has been pressed (S101). If the result of this determination is that the left move button 4a has been pressed, the cursor display means 13 next determines whether or not the cursor position is at least 10 before this from the left (S102). The current cursor position is moved to the left by 10 (S103). Specifically, the numerical value in the “No.” column stored as the current cursor position is decremented by 10. When the cursor position is less than 10 from the left, the cursor display means 13 moves the cursor position to the leftmost end (S104). That is, the numerical value in the “No.” field stored as the current cursor position is set to 1.

ステップS101で、左移動ボタン4aが押下されていない場合、カーソル表示手段13は、次に、左移動ボタン4bの押下が有ったか否かを判定する(S105)。判定の結果、左移動ボタン4bの押下があった場合、カーソル表示手段13は、現在のカーソルの位置が左から1以上手前か否かを判定し(S106)、1以上手前の場合は、現在のカーソル位置を左に1つ移動させる(S107)。すなわち、現在のカーソル位置として保存されている「No.」欄の数値を1デクリメントする。   If the left movement button 4a is not pressed in step S101, the cursor display means 13 next determines whether or not the left movement button 4b has been pressed (S105). If the result of the determination is that the left move button 4b has been pressed, the cursor display means 13 determines whether or not the current cursor position is one or more before the left (S106). Is moved by one to the left (S107). That is, the numerical value in the “No.” field stored as the current cursor position is decremented by one.

ステップS105で左移動ボタン4bが押下されていない場合やステップS106で現在のカーソル位置が左から1以上手前でない場合、カーソル表示手段13は、次に右移動ボタン4dの押下が有ったか否かを判定する(S108)。この判定の結果、右移動ボタン4dの押下が有った場合、カーソル表示手段13は、次にカーソルの位置が右から10以上手前か否かを判定し(S109)、10以上手前の場合は、現在のカーソル位置を右に10個分移動させる(S110)。具体的には、現在のカーソル位置として保存されている「No.」欄の数値を10インクリメントする。カーソルの位置が右から10未満の場合、カーソル表示手段13は、カーソル位置を最右端に移動させる(S110)。すなわち、現在のカーソル位置として保存されている「No.」欄の数値を最終値にセットする。   If the left move button 4b is not pressed in step S105 or if the current cursor position is not one or more from the left in step S106, the cursor display means 13 determines whether or not the right move button 4d is next pressed. Is determined (S108). If the result of this determination is that the right move button 4d has been pressed, the cursor display means 13 next determines whether or not the cursor position is 10 or more before the right (S109). The current cursor position is moved to the right by 10 (S110). Specifically, the numerical value in the “No.” field stored as the current cursor position is incremented by 10. When the cursor position is less than 10 from the right, the cursor display means 13 moves the cursor position to the right end (S110). That is, the numerical value in the “No.” field stored as the current cursor position is set to the final value.

ステップS108で、右移動ボタン4dが押下されていない場合、カーソル表示手段13は、次に、右移動ボタン4cの押下が有ったか否かを判定する(S112)。判定の結果、右移動ボタン4cの押下があった場合、カーソル表示手段13は、現在のカーソルの位置が右から1以上手前か否かを判定し(S113)、1以上手前の場合は、現在のカーソル位置を右に1つ移動させる(S114)。すなわち、現在のカーソル位置として保存されている「No.」欄の数値を1インクリメントする。
カーソル表示手段13は、以上の手順によって動作する。
If the right movement button 4d is not pressed in step S108, the cursor display means 13 next determines whether or not the right movement button 4c has been pressed (S112). As a result of the determination, if the right movement button 4c is pressed, the cursor display means 13 determines whether or not the current cursor position is one or more before the right (S113). The cursor position is moved to the right by one (S114). That is, the numerical value in the “No.” field stored as the current cursor position is incremented by one.
The cursor display means 13 operates according to the above procedure.

<抽出データ指定処理>
カーソルを抽出したいデータ位置に移動させた後、設計者は指示データ選択ボタン5を押す。抽出データ指定手段14は、この選択ボタン5の押下を検知して、データ入力部2の列2dの「抽出」欄に抽出マークを設定する。既に抽出マークが設定されているデータ位置で指示データ選択ボタン5が押されると、抽出データ指定手段14は、トグル動作によって抽出マークをキャンセルする。また、図3の例では、列2dに抽出マークを表示する方式を取っているが、抽出マーク専用の別の表を画面表示しておいて、指示データ選択ボタン5が押されるごとに、指示されたデータがその表にコピーされるようにしても良い。
<Extracted data specification processing>
After moving the cursor to the data position to be extracted, the designer presses the instruction data selection button 5. The extraction data specifying means 14 detects the pressing of the selection button 5 and sets an extraction mark in the “extraction” column of the column 2d of the data input unit 2. When the instruction data selection button 5 is pressed at a data position where an extraction mark has already been set, the extraction data specifying means 14 cancels the extraction mark by a toggle operation. In the example of FIG. 3, the extraction mark is displayed in the column 2d, but another table dedicated to the extraction mark is displayed on the screen, and each time the instruction data selection button 5 is pressed, the instruction is displayed. The recorded data may be copied to the table.

<テストデータ出力処理>
以上の操作を繰り返して、必要なデータに全て抽出マークが付加されると、設計者は次に保存ボタン6を押す。この保存ボタン6の押下によって、テストデータ出力手段15が起動される。図5にテストデータ出力手段15の処理手順を示す。
<Test data output processing>
When the above operation is repeated and all the extraction marks are added to the necessary data, the designer next presses the save button 6. When the save button 6 is pressed, the test data output means 15 is activated. FIG. 5 shows a processing procedure of the test data output means 15.

テストデータ出力手段15は、保存ボタン6の押下によって起動されると、各入力データについて抽出マークがセットされているか否かを判定し(S402)、セットされている場合は、その入力値と出力値、およびこのデータ位置をファイルに出力してテストデータファイルを生成する(S403)。   When activated by pressing the save button 6, the test data output means 15 determines whether or not an extraction mark is set for each input data (S402), and if it is set, its input value and output. The value and the data position are output to a file to generate a test data file (S403).

図6は、出力されたテストデータファイルの例である。この例は図3に示されたデータが出力された例であり、出力形式は、コンマを区切り記号としたテキスト形式(CSV; Comma Separated Values)である。   FIG. 6 is an example of the output test data file. In this example, the data shown in FIG. 3 is output, and the output format is a text format (CSV: Comma Separated Values) with a comma as a delimiter.

図7は、テストデータファイルの他の例である。この例も図3に示されたデータが出力された例であるが、プログラムの形式(C言語形式)を採っている。このように、あらかじめプログラム形式でデータを出力しておくと、テストプログラムへの取り込みが容易となり、効率良く取り扱うことができる。   FIG. 7 shows another example of the test data file. This example is also an example in which the data shown in FIG. 3 is output, but adopts a program format (C language format). Thus, if data is output in advance in a program format, it can be easily taken into a test program and can be handled efficiently.

なお、図3の入力波形表示部3に示すグラフの例では、入力値は、−100から+100まで変化しているが、出力値は、−60から+60までの変化に制限されており、上下限リミッタのテストデータになっている。このように、上下限リミッタのようなアルゴリズムの場合には、今回の出力の計算値は、前回の計算値に依存しないため、抽出点を上記のように、NO.4、NO.7、NO.10のデータ位置で独立に取り出しても、そのデータのみを用いて検証を行うことが可能である。   In the example of the graph shown in the input waveform display unit 3 of FIG. 3, the input value changes from −100 to +100, but the output value is limited to a change from −60 to +60. Test data for the lower limiter. In this way, in the case of an algorithm such as an upper / lower limiter, the calculated value of the current output does not depend on the previous calculated value, and therefore, the extraction point is set to NO. 4, NO. 7, NO. Even if the data is extracted independently at 10 data positions, the verification can be performed using only the data.

一方、図8の入力波形表示部3aおよび出力波形表示部3bに示すような波形の場合は独立に取り出すことが出来ない。この場合、テスト対象のプログラムの出力は、次の式で計算される。
OUT[k] = (IN[k] + IN[k-1])/2 (k:2以上の整数 ),OUT[1]=0 ・・・(1)
ここで、OUT[k]は、データ位置Kにおける出力期待値、IN[k]は、データ位置Kにおける入力値である。
On the other hand, in the case of waveforms as shown in the input waveform display section 3a and the output waveform display section 3b in FIG. 8, they cannot be taken out independently. In this case, the output of the test target program is calculated by the following equation.
OUT [k] = (IN [k] + IN [k-1]) / 2 (k: an integer greater than or equal to 2), OUT [1] = 0 (1)
Here, OUT [k] is an expected output value at the data position K, and IN [k] is an input value at the data position K.

上記の(1)式は、入出力値が移動平均の関係にあることを表している。この場合、今回の出力値を計算するためには、今回の入力値に加えて、前回の入力値も必要となる。例えば、図8において、No.3、No.4のデータとも、入力値は同じ値を取っているが、出力値は異なっている。この場合、図6や図7のようなテストデータの抽出方法を採ると、前回の入力値がテストデータに含まれない場合があり、検証を行うためのデータとしては不十分になる。このため、テストデータ出力手段15には、入力値については、抽出マークの付されているデータのみをテストデータとして出力するモード(通常出力モード)と、入力された全データを出力するモード(全データ出力モード)の2つを設けるのが良い。両モードとも出力期待値については、抽出マークの付されたデータのみを出力する。   The above equation (1) represents that the input / output values have a moving average relationship. In this case, in order to calculate the current output value, the previous input value is also required in addition to the current input value. For example, in FIG. 3, no. In the data of 4, the input values are the same, but the output values are different. In this case, if the test data extraction method as shown in FIG. 6 or FIG. 7 is employed, the previous input value may not be included in the test data, which is insufficient as data for verification. For this reason, the test data output means 15 has a mode (normal output mode) for outputting only the data with extraction marks as test data, and a mode for outputting all input data (all data). Two data output modes) may be provided. In both modes, only the data with the extraction mark is output for the expected output value.

図8のように現在の出力値が過去の入力値に依存するような場合には、全データ出力モードを選択して、入力値は全データを出力し、出力期待値はデータの位置を示す情報とともに、抽出マークの付されたデータのみを出力する。これにより、プログラムの動作特性に合わせて、そのプログラムの検証に必要かつ有効なテストデータを得ることができる。   When the current output value depends on the past input value as shown in FIG. 8, the all data output mode is selected, the input value outputs all the data, and the output expected value indicates the position of the data. Only the data with the extraction mark is output together with the information. As a result, it is possible to obtain test data necessary and effective for verifying the program in accordance with the operation characteristics of the program.

図9は、全データ出力モードにおいて、C言語形式で出力されたテストデータファイルの例である。入力値と、出力期待値のデータ数が異なるため、別々の配列として、生成されている。なお、出力期待値には、データ位置を付して、入力値との対応関係がわかるようになっている。   FIG. 9 is an example of a test data file output in C language format in the all data output mode. Since the number of data of the input value and the expected output value is different, they are generated as separate arrays. The expected output value is attached with a data position so that the correspondence relationship with the input value can be understood.

図10は、全データ出力モードにおけるファイルへのデータ出力手順を示したフローチャートである。出力期待値のデータ出力手順については図5と同様であるが、入力値については全データがファイルに出力されるようになっている。   FIG. 10 is a flowchart showing a data output procedure to a file in the all data output mode. The data output procedure of the expected output value is the same as that shown in FIG. 5, but all data for the input value is output to a file.

<テストデータによるプログラムの検証>
次に、このテストデータの使用方法の例を説明する。
図11に示すように、検証用プログラム23は、コンピュータで構成されるプログラム検証装置(エミュレータ)60に組み込まれて実行される。このプログラム検証装置60では、図6、図7、あるいは図9の形式で生成されたテストデータ21がインタフェースプログラム22を介して検証用プログラム23の入力として与えられる。検証用プログラム23からの出力は、インタフェースプログラム22に渡して、表示装置24上に表示しても良いし、実際の出力機器を通して出力させるようにしても良い。
表示装置24に表示させる場合は、テストデータの入力値に関連付けて検証用プログラムからの出力値、および、テストデータ中の出力期待値を表示し、出力値と出力期待値との差が予め定めた一定値以上の場合など所定の条件を満たしたときに異常マークを表示する。
<Program verification using test data>
Next, an example of how to use this test data will be described.
As shown in FIG. 11, the verification program 23 is incorporated in a program verification device (emulator) 60 composed of a computer and executed. In this program verification device 60, the test data 21 generated in the format of FIG. 6, 7 or 9 is given as an input of the verification program 23 via the interface program 22. The output from the verification program 23 may be transferred to the interface program 22 and displayed on the display device 24, or may be output through an actual output device.
When displaying on the display device 24, the output value from the verification program and the expected output value in the test data are displayed in association with the input value of the test data, and the difference between the output value and the expected output value is determined in advance. An abnormal mark is displayed when a predetermined condition is satisfied, such as when the value exceeds a certain value.

図12は、インタフェースプログラム22の例であり、C言語のプログラムの検証に用いられる。
図12において、最初に、#include "TestLimData1.c" という形で、テストデータ生成装置1により生成されたテストデータをプログラムに取り込んでいる。この場合は、図7のように、プログラム形式でデータが生成され、TestLimData1.cというファイルに出力されていることが前提である。
FIG. 12 shows an example of the interface program 22, which is used for verification of a C language program.
In FIG. 12, first, test data generated by the test data generation device 1 is taken into the program in the form of #include “TestLimData1.c”. In this case, as shown in FIG. 7, it is assumed that data is generated in a program format and output to a file called TestLimData1.c.

テストプログラム本体は、for ループ内で、テスト対象の関数 Limiter() に、テストデータ生成装置1により生成されたテストデータを渡して、計算を実行させる。その後、この計算結果を、 ASSERT_EQUAL() マクロにて、検証している。このマクロは、2つの引数の値が異なったときに、エラーとしてレポートされる。これを、テストデータ生成装置1により生成された全ての抽出データについて、forループ内で検証を行い、ASSERT_EQUAL() マクロにて、計算結果(出力値)とテストデータ生成装置1により生成された出力期待値との不一致が検出されなければ、試験合格となる。   In the for loop, the test program body passes the test data generated by the test data generation device 1 to the function Limiter () to be tested, and executes the calculation. After that, this calculation result is verified by ASSERT_EQUAL () macro. This macro is reported as an error when the two arguments have different values. This is verified in the for loop for all the extracted data generated by the test data generation device 1, and the ASSERT_EQUAL () macro calculates the output (output value) and the output generated by the test data generation device 1. If no mismatch with the expected value is detected, the test passes.

このように、図12に示すようなインタフェースプログラムを介して、テストデータを検証用プログラムへ入力し、検証用プログラムの出力値とテストデータの出力期待値とを比較することにより、効率的な検証が可能となる。   As described above, the test data is input to the verification program through the interface program as shown in FIG. 12, and the output value of the verification program is compared with the expected output value of the test data, thereby enabling efficient verification. Is possible.

なお、テストデータには、遅延時間(検証用プログラムの応答時間)を設定できるようにしておき、インタフェースプログラムは、入力値を検証用プログラムへ入力してから、遅延時間後の出力値と、この入力値に対する出力期待値とを比較して、一致、不一致などの判定をするようにしても良い。このようにすれば、プログラムの処理速度を含めた評価が可能になる。この場合は実機で検証するのが効果的である。   The test data is set so that a delay time (response time of the verification program) can be set, and the interface program inputs the input value to the verification program and outputs the output value after the delay time. It is also possible to compare the input expected value with respect to the input value and determine whether it is a match or a mismatch. In this way, evaluation including the processing speed of the program becomes possible. In this case, it is effective to verify with an actual machine.

以上、本実施の形態によれば、検証用プログラムに有効なテストデータをグラフィカルに抽出することができ、抽出したテストデータを用いて、プログラムの動的テストを行い、その結果を自動的に判定することができるので、検証作業の効率が向上する。   As described above, according to the present embodiment, it is possible to graphically extract test data effective for a verification program, perform dynamic testing of the program using the extracted test data, and automatically determine the result This improves the efficiency of the verification work.

なお、プログラム検証装置60は、エミュレータや実機に限らず、その評価内容によって、既存の検証装置を任意に選択して用いるようにすれば良い。例えば、応答時間の評価は含まず、対象CPUのオブジェクトコードでのプログラムの評価ならば、プログラム検証装置60をテストデータ生成装置1と一体として構成するようにして、その上で実行されるCPUシミュレータを用いることも可能である。   Note that the program verification device 60 is not limited to an emulator or an actual device, and an existing verification device may be arbitrarily selected and used depending on the evaluation contents. For example, if the evaluation of the program is not included in the response time, and the program is evaluated with the object code of the target CPU, the program verification device 60 is configured integrally with the test data generation device 1, and the CPU simulator is executed on the program verification device 60 It is also possible to use.

また、プログラム検証装置60をテストデータ生成装置1と一体として構成するようにしてC言語の論理のレベルでのプログラムの評価を行うようにしても良い。   Alternatively, the program verification device 60 may be integrated with the test data generation device 1 so that the program is evaluated at the logic level of the C language.

例えば、テストデータ生成装置1を汎用的な計算機を用いて構成し、この計算機用の実行プログラムを生成するCコンパイラを用いて検証用プログラムをコンパイルして、この計算機上でネイティブ実行する。そして、テストデータの入力値に対する実行結果とテストデータの出力期待値とを比較して、一致、不一致を判定することにより、効率良くプログラムの検証作業を行うことができる。   For example, the test data generation apparatus 1 is configured using a general-purpose computer, a verification program is compiled using a C compiler that generates an execution program for the computer, and is executed natively on the computer. Then, by comparing the execution result with respect to the input value of the test data and the expected output value of the test data and determining the match or mismatch, the program can be verified efficiently.

(抽出データ指定処理の他の実施例)
次に図7、図8を用いて抽出データ指定処理の他の実施例を説明する。
本実施例は、テストデータの抽出条件を表示画面を通して設定し、その後、抽出データ指定手段14を起動して自動的にテストデータを抽出するものである。
(Another example of extraction data specification processing)
Next, another embodiment of the extraction data specifying process will be described with reference to FIGS.
In the present embodiment, test data extraction conditions are set through a display screen, and thereafter, the extraction data specifying means 14 is activated to automatically extract test data.

図14に抽出条件を示す。テストデータ生成装置1の主記憶装置20にこの抽出条件を記憶すると共に、抽出データ指定手段14は、ディスプレイ装置50に抽出条件を項目ごとに表示する。設計者がこの画面を通して、項目ごとに条件を選択や閾値の入力を行う。抽出データ指定手段14は、選択入力があると、主記憶装置20に保存されている抽出条件の選択フラグをセットし、閾値を記憶する。   FIG. 14 shows the extraction conditions. The extraction condition is stored in the main storage device 20 of the test data generation device 1, and the extraction data designation unit 14 displays the extraction condition for each item on the display device 50. The designer selects conditions and inputs threshold values for each item through this screen. When there is a selection input, the extraction data designation unit 14 sets a selection flag for the extraction condition stored in the main storage device 20 and stores the threshold value.

必要なデータ全ての入力が終わると(S701,S702で「YES」)抽出データ指定手段14は、全てのデータ位置のデータについて、選択された抽出条件を満足するか否かを判定し(S704)、抽出条件を満足する場合は、そのデータ位置に抽出マークを設定する(S705)。   When the input of all necessary data is completed (“YES” in S701 and S702), the extracted data specifying means 14 determines whether or not the selected extraction condition is satisfied for the data at all the data positions (S704). If the extraction condition is satisfied, an extraction mark is set at the data position (S705).

下記の(2)式は、抽出条件の演算式の例である。
変化量[k]=OUT[k] - OUT[k-1] (k:2以上の整数 ) ・・・(2)
The following formula (2) is an example of an extraction condition calculation formula.
Change [k] = OUT [k]-OUT [k-1] (k: integer greater than or equal to 2) (2)

変化量[k]は、データ位置[k]における出力期待値の変化量を求める計算式であり、閾値以上の変化量がある場合は抽出マークを設定するというものである。   The change amount [k] is a calculation formula for obtaining the change amount of the output expected value at the data position [k], and when there is a change amount equal to or greater than a threshold value, an extraction mark is set.

なお、(2)式の代わりに、変化量[k] / OUT[k]で算出した変化率を閾値と比較してポイントを抽出するようにしても良い。   Instead of the equation (2), points may be extracted by comparing the change rate calculated by the change amount [k] / OUT [k] with a threshold value.

抽出条件を満たすデータ位置には、図3に示すように抽出マークが表示され、カーソルをそのデータ位置に合わせて指示データ選択ボタン5を押下することにより、トグル動作によって抽出マークがキャンセルされる。   As shown in FIG. 3, an extraction mark is displayed at a data position that satisfies the extraction condition. When the instruction data selection button 5 is pressed with the cursor positioned at the data position, the extraction mark is canceled by a toggle operation.

本実施例によれば、選択した抽出条件で重要なデータ位置に自動的にマーク表示をすることができるので、テストデータ生成作業の効率が向上する。   According to the present embodiment, marks can be automatically displayed at important data positions under the selected extraction condition, so that the efficiency of test data generation work is improved.

(テストデータ出力処理の他の実施例)
図15に他の実施例によるテストデータ出力手段15の処理手順を示す。この実施例では、表示画面を通して、予めテストデータの形式を設定しておく。テストデータの形式とは、入力値は抽出フラグを付したもののみ(入力個別)か、全ての入力(入力全部)かという抽出パターンと、出力タイプは、データのみか、プログラム組込みかという出力タイプを意味する。テストデータ出力手段15は、この設定に基づいてテストデータを生成するというものである。なお、図15において、個別の出力アルゴリズム(S804〜S807)は、図5、図10の手順に従う。
(Another example of test data output processing)
FIG. 15 shows a processing procedure of the test data output means 15 according to another embodiment. In this embodiment, the format of the test data is set in advance through the display screen. The format of the test data is that the input value is an extraction pattern with an extraction flag only (individual input) or all the inputs (all inputs), and the output type is an output type that is only data or program embedded Means. The test data output means 15 generates test data based on this setting. In FIG. 15, the individual output algorithms (S804 to S807) follow the procedures in FIGS.

本実施例によれば、出力データの抽出パターンや出力タイプを設定できるのでテストデータ生成時の利便性が向上する。   According to the present embodiment, since the extraction pattern and output type of output data can be set, the convenience when generating test data is improved.

1……テストデータ生成装置
2……データ入力部
3……波形表示部
3a……入力波形表示部
3b……出力波形表示部
4……指示データ変更ボタン
4a,4b……左移動ボタン
4c,4d……右移動ボタン
5……指示データ選択ボタン
6……保存ボタン
7……カーソル位置表示部
10……演算装置
11……データ入力手段
12……グラフ表示手段
13……カーソル表示手段
14……抽出データ指定手段
15……テストデータ出力手段
20……主記憶装置
21……テストデータ
22……インタフェースプログラム
23……検証用プログラム
30……補助記憶装置
40……入力装置
50……ディスプレイ装置
60……プログラム検証装置
DESCRIPTION OF SYMBOLS 1 ... Test data generation apparatus 2 ... Data input part 3 ... Waveform display part 3a ... Input waveform display part 3b ... Output waveform display part 4 ... Instruction data change button 4a, 4b ... Left move button 4c, 4d …… Right move button 5 …… Instruction data selection button 6 …… Save button 7 …… Cursor position display portion 10 …… Calculation device 11 …… Data input means 12 …… Graph display means 13 …… Cursor display means 14… ... Extracted data designation means 15 ... Test data output means 20 ... Main storage device 21 ... Test data 22 ... Interface program 23 ... Verification program 30 ... Auxiliary storage device 40 ... Input device 50 ... Display device 60 …… Program verification device

Claims (5)

検証用プログラムへの入力値と該入力値に対する期待される出力値(以下、「出力期待値」という。)とを入力し、該入力値と該出力期待値の組み合わせに、入力された順番を示すデータ位置を付して入力データとして記憶装置に保存するデータ入力手段と、
前記記憶装置に保存されている入力データに基づいて表示装置へ前記入力値と前記出力期待値をそれぞれグラフ表示するグラフ表示手段と、
前記各グラフ上に入力値と該入力値に対応する出力期待値との関係を示すカーソルを表示するカーソル表示手段と、
データ抽出指示の指令を受け付けて前記カーソルで示された入力値と該入力値に対応する出力期待値のデータ位置に抽出マークを付する抽出データ指定手段と、
前記抽出マークの付されたデータ位置の入力値と出力期待値とを抽出することによって検証用プログラムのテストデータを生成するテストデータ出力手段と、
を備えたことを特徴とするテストデータ生成装置。
An input value to the verification program and an expected output value for the input value (hereinafter referred to as “expected output value”) are input, and the input order is input to the combination of the input value and the output expected value. Data input means for attaching the data position shown and storing it in the storage device as input data;
Graph display means for displaying the input value and the output expected value in a graph on a display device based on input data stored in the storage device;
Cursor display means for displaying a cursor indicating a relationship between an input value and an expected output value corresponding to the input value on each graph;
An extraction data specifying means for receiving an instruction of data extraction instruction and attaching an extraction mark to the data position of the input value indicated by the cursor and the output expected value corresponding to the input value;
Test data output means for generating test data of a verification program by extracting an input value and an output expected value of the data position with the extraction mark;
A test data generating apparatus comprising:
前記テストデータ出力手段は、入力値については、前記データ入力手段によって入力された全ての入力値を抽出すると共に、出力期待値については、抽出マークの付された出力期待値を該出力期待値のデータ位置を付して抽出し、当該抽出されたデータを用いてテストデータを生成することを特徴とする請求項1に記載のテストデータ生成装置。   The test data output means extracts all the input values input by the data input means for the input value, and for the output expected value, the output expected value with the extraction mark is set to the expected output value. 2. The test data generating apparatus according to claim 1, wherein the test data is extracted by attaching a data position, and test data is generated using the extracted data. 前記抽出データ指定手段は、前記出力期待値が予め定めた抽出条件に該当するか否かを判定し、該当する場合は、その出力期待値のデータ位置に抽出マークを付することを特徴とする請求項1または2に記載のテストデータ生成装置。   The extracted data specifying means determines whether or not the expected output value meets a predetermined extraction condition, and if so, adds an extraction mark to the data position of the expected output value. The test data generation device according to claim 1 or 2. コンピュータ上で検証用プログラムを動作させ、該検証用プログラムに請求項1乃至3のいずれかに記載のテストデータ生成装置によって生成されたテストデータを入力し、該検証用プログラムの計算結果を表示装置へ表示させることによって検証用プログラムの評価を支援するプログラム評価支援方法であって、
前記テストデータの入力値を、該入力値に付されているデータ位置の順番に予め定められた時間間隔で前記検証用プログラムへ入力し、該検証用プログラムからの出力値と、前記テストデータの出力期待値が一致するか否かを判定し、その判定結果を前記表示装置へ表示することを特徴とするプログラム評価支援方法。

A verification program is operated on a computer, test data generated by the test data generation device according to claim 1 is input to the verification program, and a calculation result of the verification program is displayed on the display device A program evaluation support method for supporting evaluation of a verification program by displaying the
The input value of the test data is input to the verification program at a predetermined time interval in the order of the data positions attached to the input value, and the output value from the verification program and the test data A program evaluation support method comprising: determining whether output expected values match, and displaying the determination result on the display device.

前記コンピュータには、前記検証用プログラムの応答時間を設定しておき、
前記テストデータの入力値を検証用プログラムへ入力してから、前記応答時間後の出力値と、当該入力値に対する出力期待値とを比較して、該出力値と該出力期待値が一致するか否かを判定することを特徴とする請求項4に記載のプログラム評価支援方法。
The computer sets a response time of the verification program,
After the input value of the test data is input to the verification program, the output value after the response time is compared with the expected output value for the input value, and the output value matches the expected output value. The program evaluation support method according to claim 4, wherein it is determined whether or not.
JP2010076410A 2010-03-29 2010-03-29 Test data generation apparatus and program evaluation support method Active JP5509992B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010076410A JP5509992B2 (en) 2010-03-29 2010-03-29 Test data generation apparatus and program evaluation support method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010076410A JP5509992B2 (en) 2010-03-29 2010-03-29 Test data generation apparatus and program evaluation support method

Publications (2)

Publication Number Publication Date
JP2011209970A JP2011209970A (en) 2011-10-20
JP5509992B2 true JP5509992B2 (en) 2014-06-04

Family

ID=44940963

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010076410A Active JP5509992B2 (en) 2010-03-29 2010-03-29 Test data generation apparatus and program evaluation support method

Country Status (1)

Country Link
JP (1) JP5509992B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5851857B2 (en) * 2012-01-20 2016-02-03 アズビル株式会社 Graph display device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0827808B2 (en) * 1988-03-31 1996-03-21 富士通株式会社 Test data editing device
JPH0831110B2 (en) * 1990-06-11 1996-03-27 三菱電機株式会社 Logic simulation system
JPH0895817A (en) * 1994-09-22 1996-04-12 Hitachi Ltd Method for testing information processor
JP2003228493A (en) * 2001-04-27 2003-08-15 Mitsubishi Electric Corp Program testing automatic execution device, program testing automatic execution method, and program testing automatic execution program
JP4438331B2 (en) * 2003-06-27 2010-03-24 ダイキン工業株式会社 Control test support system and control test support system program
JP2007052634A (en) * 2005-08-18 2007-03-01 Fujitsu Ten Ltd Software development device and method

Also Published As

Publication number Publication date
JP2011209970A (en) 2011-10-20

Similar Documents

Publication Publication Date Title
US10162739B2 (en) Test case generation system and recording medium wherein test case is recorded
KR20190025474A (en) Apparatus and Method for Predicting Plant Data
JP2012208830A (en) Program test device, program test method and program
JP2019036186A (en) Abnormality detection model construction apparatus, abnormality detection model construction method and program
JP4922265B2 (en) Plant monitoring apparatus and plant monitoring method
US8346584B2 (en) Method and apparatus for determining design modification effects on a computerized engineering model
JP5509992B2 (en) Test data generation apparatus and program evaluation support method
JP2019057112A (en) Design information processing device and program
JP5303531B2 (en) Maintenance support device for embedded system
JP5743663B2 (en) Test support system, test support method, and program
JP2018132786A (en) Plant situation information presentation system and plant situation information presentation method
JP2007304846A (en) Specification creation support method and specification creation support apparatus
JP2020107248A (en) Abnormality determination device and abnormality determination method
KR20120087288A (en) Simulation Apparatus and Method for the Performance Evaluation of the Plant
JP2013171350A (en) Device for measuring test coverage of diagram type program, and method therefor, and program
JP6734362B2 (en) Monitoring device, monitoring method, program
US20170097637A1 (en) Operation assistance apparatus at time of accident in plant
KR20090004593A (en) Design support method and storage medium
JP2006268422A (en) Analysis navigation system
KR101810648B1 (en) Apparatus and method for analyzing usability hampering elements of mobile application
KR20210139267A (en) Supported device, display device, support method and support program
JP6572190B2 (en) Software verification system and software verification method
TWI734330B (en) Support device, support method and recording medium
JP2019020182A (en) Mechanical structure fault rate prediction system and fault rate predicting device equipped therewith
JP2012058911A (en) Design support system and design support method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130313

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131211

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131217

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140206

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140225

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140310

R150 Certificate of patent or registration of utility model

Ref document number: 5509992

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250