JP2011100420A - Test program creation device - Google Patents
Test program creation device Download PDFInfo
- Publication number
- JP2011100420A JP2011100420A JP2009256483A JP2009256483A JP2011100420A JP 2011100420 A JP2011100420 A JP 2011100420A JP 2009256483 A JP2009256483 A JP 2009256483A JP 2009256483 A JP2009256483 A JP 2009256483A JP 2011100420 A JP2011100420 A JP 2011100420A
- Authority
- JP
- Japan
- Prior art keywords
- test
- test program
- program
- program creation
- 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.)
- Pending
Links
Images
Abstract
Description
この発明は、例えばプログラムの単体テストに用いるテストプログラムの作成作業を支援するためのシステム開発支援技術に関する。 The present invention relates to a system development support technology for supporting, for example, the creation of a test program used for a unit test of a program.
近年、様々な業種で作業の電子化が広く図られている。また、インターネットの利用が一般化した今日では、取引の形態が多様化し、かつ、その変貌も著しい。そのため、このような状況に即時に対応するためのシステム開発の効率化が、以前にも増して強く要求されてきている。そして、その方策の1つとして、プログラムのテストを効率的に行うための仕組みが、これまでも種々提案されている(例えば特許文献1,2等参照)。
In recent years, computerization of work has been widely promoted in various industries. In addition, today, when the use of the Internet has become commonplace, the form of transactions has diversified and its transformation has been remarkable. For this reason, there has been a strong demand for more efficient system development to respond immediately to such a situation. As one of the measures, various mechanisms for efficiently testing a program have been proposed (see, for example,
ここで、開発中のプログラムについて、メソッド(関数、サブルーチン等)単位のテストを行う場合を考える。そして、このメソッドの中に、階層構造を持つ構造体(オブジェクトやデータ)群を受け取って動作するものが存在するものと想定する。この場合、そのメソッドは、最上位に位置する構造体を引数として受け取って動作を開始する。 Here, consider a case in which a method (function, subroutine, etc.) unit test is performed on a program under development. It is assumed that there are some methods that operate by receiving a group of structures (objects and data) having a hierarchical structure. In this case, the method starts operation by receiving the structure located at the top as an argument.
しかしながら、これまでは、メソッドに引数として直接的に引き渡す値を設定してテストを行うための支援ツールは種々存在したものの、階層構造を持つ構造体群を受け取って動作するメソッドについて、最上位に位置する構造体に加えて、次位層以下に位置する構造体の値をも設定してテストを行うための支援ツールは存在せず、意図したテストを簡単には行えないのが実情であった。 However, until now, there are various support tools for testing by setting the value passed directly as an argument to the method, but the method that receives and operates the hierarchical structure group is the highest level. There is no support tool for testing by setting the value of the structure located below the next layer in addition to the located structure, and the actual situation is that the intended test cannot be performed easily. It was.
この発明は、このような事情を考慮してなされたものであり、例えば、階層構造を持つ構造体群を受け取って動作するプログラムをテストするためのテストプログラムを簡単に作成することを可能とするテストプログラム作成装置を提供することを目的とする。 The present invention has been made in view of such circumstances. For example, it is possible to easily create a test program for testing a program that operates by receiving a structure group having a hierarchical structure. An object is to provide a test program creation device.
前述の課題を解決するために、この発明のテストプログラム作成装置は、階層構造を持つ構造体群の最上位に位置する構造体を引数として受け取って動作するプログラムをテストするためのテストプログラムを作成するテストプログラム作成装置であって、前記階層構造を持つ構造体群の各値を定義するテストデータ定義データを入力する入力手段と、前記入力手段により入力されたテストデータ定義データで定義される各値を持つ前記階層構造を持つ構造体群を生成する手続きと、当該生成した構造体群の最上位に位置する構造体を引数としてテスト対象の前記プログラムを呼び出す手続きとを有する前記テストプログラムを作成するテストプログラム作成手段と、を具備することを特徴とする。 In order to solve the above-described problems, the test program creation device of the present invention creates a test program for testing a program that operates by receiving a structure located at the top of a structure group having a hierarchical structure as an argument. A test program creation device for inputting test data definition data for defining each value of a group of structures having a hierarchical structure, and each defined by test data definition data input by the input means Creating the test program having a procedure for generating a structure group having a hierarchical structure having a value and a procedure for calling the program to be tested with a structure positioned at the top of the generated structure group as an argument And a test program creating means.
この発明によれば、例えば、階層構造を持つ構造体群を受け取って動作するプログラムをテストするためのテストプログラムを簡単に作成することが可能となる。 According to the present invention, for example, it is possible to easily create a test program for testing a program that operates by receiving a structure group having a hierarchical structure.
以下、図面を参照して、この発明の実施形態を説明する。 Embodiments of the present invention will be described below with reference to the drawings.
(第1実施形態)
まず、この発明の第1実施形態について説明する。
(First embodiment)
First, a first embodiment of the present invention will be described.
図1は、第1実施形態に係るテストプログラム作成装置(単体テストプログラム作成システム1)の機能ブロック図である。この単体テストプログラム作成システム1は、例えば、CD(conpact disc)等のコンピュータ読取り可能な記憶メディアに記録されて頒布される単体テストプログラム作成プログラムが、パーソナルコンピュータのHD(hard disc)にインストールされ、主メモリにロードされてCPU(central processing unit)によって実行されることによって、そのパーソナルコンピュータ上に構築されるものである。
FIG. 1 is a functional block diagram of a test program creation device (unit test program creation system 1) according to the first embodiment. In this unit test
この単体テストプログラム作成システム1は、例えば、階層的に構造化されたデータ群を受け取って動作するプログラム(メソッド等)について、引数として直接的に引き渡す最上位に位置するデータの値だけでなく、次位以下に位置するデータ群の値をも設定してテストを行うためのテストプログラムを作成するものであり、図1に示すように、テストプログラム作成部11を有している。
For example, the unit test
テストプログラム作成部11は、テストデータ定義データ21を入力して、単体テスト対象のプログラムをテストするためのテストプログラム22を作成する。図2に、単体テスト対象プログラムの一例を示す。
The test
ここでは、"testMethod"というメソッドが、単体テスト対象プログラムであるものと想定する。図2に示すように、このメソッド"testMethod"は、引数として、"box"という構造体を受け取って動作する。この構造体"box"は、"num"、"id"、"area"という3つのパラメータで構成されている。そして、その3つのパラメータのうちのパラメータ"area"は、別途定義される、パラメータ"count"を有する構造体となっている。つまり、メソッド"testMethod"は、階層構造を持つ構造体群("box","area")を受け取って動作するメソッドであって、最上位に位置する構造体"box"のみを引数として直接的に受け取るメソッドである。そして、この単体テストプログラム作成システム1は、引数として直接的に受け渡しが行われる構造体"box"だけでなく、構造体"area"についても、目的の値を設定した上で、メソッド"testMethod"を動作させるテストプログラム22を簡単に作成できるようにしたものであり、以下、この点について詳述する。
Here, it is assumed that the method "testMethod" is a unit test target program. As shown in FIG. 2, the method “testMethod” operates by receiving a structure “box” as an argument. This structure “box” is composed of three parameters “num”, “id”, and “area”. Of the three parameters, the parameter “area” is a structure having a parameter “count” defined separately. In other words, the method "testMethod" is a method that operates by receiving a structure group ("box", "area") having a hierarchical structure, and only the structure "box" positioned at the top is directly used as an argument. It is a method received in The unit test
図3は、テストデータ定義データ21の一例を示す図である。ここでは、図2に示したメソッド"testMethod"を、構造体"box"のパラメータ"num","id"に"10","A"を設定すると共に、(構造体"box"の一パラメータとして当該構造体"box"の下位層に位置づけられる)構造体"area"のパラメータ"count"に"1"を設定した上で動作させるためのテストプログラム22を作成する場合を想定する。
FIG. 3 is a diagram illustrating an example of the test
図3に示すように、テストデータ定義データ21は、XML(extensible markup language)によって記載されるテキストデータである。XMLは、タグをユーザが自由に定義することのできる記述言語である。そこで、この単体テストプログラム作成システム1では、予め定義したタグを使用することによって、テスト対象プログラムに供給する構造体群の階層構造をテストデータ定義データ21上において表現する。なお、図3に示したテストデータ定義データ21内に埋め込まれたタグの名称は、単なる一例であって、これに限定されるものではなく、任意に変更(定義)することが可能である。
As shown in FIG. 3, the test
より具体的に説明すると、図3に示したテストデータ定義データ21を入力したテストプログラム作成部11は、タグに基づき、まず、(1-1)構造体"box"が引数であること(図3のa1)および(1-2)構造体"box"にはパラメータ"num","id","area"が存在し、かつ、パラメータ"area"は構造体であること(図3のa11,a12,a13)、つまり、構造体群の階層構造を認識する。
More specifically, the test
また、テストプログラム作成部11は、タグに基づき、(2-1)パラメータ"num"に"10"を設定すること(図3のa11)、(2-2)パラメータ"id"に"A"を設定すること(図3のa11)および(2-3)パラメータ"area"(構造体)内のパラメータ"count"に"1"を設定すること(図3のa13)、つまり、構造体群中のパラメータの各値を認識する。
Also, the test
そして、テストプログラム作成部11は、パラメータ"num"に"10"、パラメータ"id"に"A"が設定された構造体"box"とパラメータ"count"に"1"が設定された構造体"area"とからなる構造体群を生成する手続きと、構造体"box"を引数としてメソッド"testMethod"を呼び出す手続きとを有するテストプログラム22を作成して出力する。図4は、この単体プログラム作成システム1によって作成されるテストプログラム22の一例を示す図である。
The test
単体テストプログラム作成システム1は、例えば、単体テスト対象のプログラム(メソッド)名とテストデータ定義データ21のファイル名とを入力するための画面を提示するユーザインタフェース機能を有している。つまり、テスト担当者は、XMLによって記載するテキストデータであるテストデータ定義データ21を作成するだけで、階層構造を持つ構造体群を受け取って動作するプログラムについて、引数として直接的に引き渡す最上位に位置する構造体の値だけでなく、次位層以下に位置する構造体群の値をも設定してテストするためのテストプログラム22を簡単に作成することが可能となる。
The unit test
なお、テストデータ定義データ21の取得については、各々を外部ファイルとして指定することに代えて、テストプログラム作成部11が、予め定められたデータベースにアクセスし、その時点で当該データベースに格納されたテストデータ定義データ21を順次取得していくように構成することも可能である。この場合、データベースに格納されたテストデータ定義データ21の数だけテストプログラム22が自動作成される。
As for the acquisition of the test
また、この手法は、オブジェクトを引数として受け取って動作するプログラム(メソッド)についても有用である。いま、"Test"というオブジェクトを引数として受け取って動作するメソッド"TestMethod"を単体テスト対象プログラムとし、かつ、オブジェクト"Test"は、3つのパラメータを受け取るものであって、第2パラメータが"Test2"というオブジェクトである場合を想定する。つまり、階層構造を持つ構造体群(オブジェクト"Test","Test2")を引数とするメソッド"TestMethod"を単体テスト対象プログラムとする場合を想定する。 This method is also useful for a program (method) that operates by receiving an object as an argument. Now, a method “TestMethod” that operates by receiving an object “Test” as an argument is a unit test target program, and the object “Test” receives three parameters, and the second parameter is “Test2”. Assume that it is an object. That is, it is assumed that a method “TestMethod” having a structure group (object “Test”, “Test2”) having a hierarchical structure as an argument is a unit test target program.
この場合も、テスト担当者は、タグによって、オブジェクト"Test","Test2"の階層構造を表しつつ各パラメータの値を設定するテストデータ定義データ21を作成する。図5は、この場合のテストデータ定義データ21の一例を示す図である。
Also in this case, the person in charge of the test creates test
図5に示すように、タグによって、(1-1)オブジェクト"Test"が引数であること(図5のb1)および(1-2)オブジェクト"Test"は3つのパラメータを受け取り、かつ、第2パラメータは"Test2"というオブジェクトであって、オブジェクト"Test2"は、1つのパラメータを受け取ること(図5のb1,b11,b12,b13,b121)、を表すと共に、(2-1)オブジェクト"Test"の第1,第3パラメータに"10","test"を設定すること(図5のb1,b2,b3,)および(2-2)オブジェクト"Test2"に引き渡すパラメータを"0"に設定し、かつ、その内部状態について、パラメータ"name"に"name"、データとして"10"を設定すること(図5のb121)、を表す。 As shown in FIG. 5, depending on the tag, (1-1) the object “Test” is an argument (b1 in FIG. 5) and (1-2) the object “Test” receives three parameters, and The two parameters are an object “Test2”, and the object “Test2” represents receiving one parameter (b1, b11, b12, b13, b121 in FIG. 5), and (2-1) the object “ Set “10” and “test” to the first and third parameters of “Test” (b1, b2, b3 in FIG. 5) and (2-2) set the parameter handed over to the object “Test2” to “0” For the internal state, “name” is set in the parameter “name” and “10” is set as the data (b121 in FIG. 5).
そして、この図5に示したテストデータ定義データ21を入力したテストプログラム作成部11は、各タグを解釈し、図6に示すテストプログラム22を作成して出力する。図6に示すように、テストデータ定義データ21は、設定された各値を持つオブジェクト群を生成する手続きと、生成したオブジェクト群を引数としてメソッドを呼び出す手続きとを有するテストプログラム22を作成して出力する。
5 receives the test
このように、この単体テストプログラム作成システム1によれば、テスト担当者は、XMLによって記載するテキストデータであるテストデータ定義データ21を作成するだけで、オブジェクトを引数として受け取って動作するプログラムについても、引数として直接的に引き渡す最上位に位置するオブジェクトのみならず、次位層以下に位置するオブジェクトを目的の状態に設定してテストするためのテストプログラム22を簡単に作成することが可能となる。
As described above, according to the unit test
(第2実施形態)
次に、この発明の第2実施形態について説明する。
(Second Embodiment)
Next explained is the second embodiment of the invention.
前述した第1実施形態の単体テストプログラム作成システム1では、テストデータ定義データ21をXMLによって記載し、その際、予め定義したタグによって、単体テスト対象プログラムに供給する構造体群の階層構造を表した。
In the unit test
これに代えて、この第2実施形態の単体テストプログラム作成システム1では、図7に示すように、インデント(字下げ)を利用して、単体テスト対象プログラムに供給する構造体群の階層構造を表す。
Instead, in the unit test
図7に示した例は、第1実施形態において説明した、階層構造を持つ構造体群(オブジェクト"Test","Test2")を引数とするメソッド"TestMethod"を単体テスト対象プログラムとする場合を想定した際に作成されるテストデータ定義データ21の一例を示す図である。
The example shown in FIG. 7 assumes that the method “TestMethod” having the structure group (objects “Test” and “Test2”) having a hierarchical structure described in the first embodiment as a unit test target program is used. It is a figure which shows an example of the test
図7に示すように、インデントを用いることによって、(1)オブジェクト"Test"、(2)パラメータ"10","test2","test"、(3)"name","SetData"の階層構造を表現する。そして、このテストデータ定義データ21を入力したテストプログラム作成部11は、インデントに基づき、階層構造を認識して、第1実施形態と同様、図6に示したテストプログラム22を作成して出力する。
As shown in FIG. 7, by using indentation, (1) object “Test”, (2) parameters “10”, “test2”, “test”, (3) “name”, “SetData” hierarchical structure Express. Then, the test
このように、この第2実施形態の単体テストプログラム作成システム1においても、テスト担当者は、インデントを適所に用いたテキストデータであるテストデータ定義データ21を作成するだけで、階層構造を持つ構造体群を受け取って動作するプログラムについて、引数として直接的に引き渡す最上位に位置する構造体の値だけでなく、次位層以下に位置する構造体群の値をも設定してテストするためのテストプログラム22を簡単に作成することが可能となる。
As described above, also in the unit test
(第3実施形態)
次に、この発明の第3実施形態について説明する。
(Third embodiment)
Next explained is the third embodiment of the invention.
図8は、第3実施形態に係るテストプログラム作成装置(単体テストプログラム作成システム1)の機能ブロック図である。 FIG. 8 is a functional block diagram of a test program creation device (unit test program creation system 1) according to the third embodiment.
この単体テストプログラム作成システム1は、(第1,第2実施形態において)前述したテストプログラム作成部11に加えて、ソースコード解析部12およびテストケース生成部13をさらに有している。そして、この単体テストプログラム作成システム1は、メソッド(関数,サブルーチン等)単位のテストを行おうとしているプログラムのソースコード23を入力し、このソースコード23を解析して、当該プログラム内の目的のメソッドをテストするためのテストプログラム22を作成して出力する。
The unit test
より具体的に説明すると、この単体テストプログラム作成システム1では、ソースコード23内に、目的のメソッドに対するコメント(注釈)として、そのメソッドに与えるテストデータの範囲や値等を記載する。
More specifically, in the unit test
図9は、ソースコード23の一部分の一例を示す図である。また、図10は、コメントとして用いるタグの一例を示す図であり、図11は、コメントとして用いる演算子の一例を示す図である。
FIG. 9 is a diagram illustrating an example of a part of the
図9には、メソッド"RegistUser"(図9のc1)用のテストプログラム22を作成するためのコメントの記載例が示されている。テスト担当者は、図10に示すタグおよび図11に示す演算子を用いて、メソッド"RegistUser"の各パラメータが取り得る値や設定したい値を、当該メソッド"RegistUser"の直前にコメントとして記載する。そして、このようなコメントが記載されたソースコード23が入力されると、ソースコード解析部12によって解析が施され、コメントに基づきテスト対象のメソッドが検出され、かつ、当該メソッドの各パラメータとして与えられるべきテストデータが作成される。また、各パラメータが取り得る値等がコメントとして記載されていた場合には(図10のタグ"@param.range"等を用いた記載が存在した場合)、ソースコード解析部12は、さらに、境界値試験を行うためのテストデータ(図11の「生成される入力値」欄参照)等を自動作成する。
FIG. 9 shows a description example of a comment for creating the
このソースコード解析部12の処理結果は、テストケース作成部13に転送され、ソースコード解析部12によって検出されたメソッドについて、ソースコード解析部12によって作成されたテストデータを全て網羅するテストケース24が作成される。そして、この第3実施形態の単体テストプログラム作成システム1におけるテストプログラム作成部11は、このテストケース24を順次読み出して、目的の値をパラメータとして与えた状況下で目的のメソッドをテストするためのテストプログラム22を作成して出力する。テストケース24は、中間ファイルとして作成されるので、テストケースを追加し、当該追加したテストケース用のテストプログラム22を併せて作成することも可能である。
The processing result of the source
なお、図9に示すように、メソッド"RegistUser"は、第3パラメータとしてオブジェクト"list"を受け取る(図9のc2)。そして、このオブジェクト"list"について、タグ"@param.mock"を用いることにより、当該オブジェクト"list"に与える値を設定することができる(図9のc3)。 As shown in FIG. 9, the method “RegistUser” receives the object “list” as the third parameter (c2 in FIG. 9). Then, by using the tag “@ param.mock” for this object “list”, a value to be given to the object “list” can be set (c3 in FIG. 9).
つまり、この第3実施形態の単体テストプログラム作成システム1においても、テスト担当者は、ソースコード23にコメントを記載するだけで、構造体を引数とするメソッドについて、その構造体を目的の値に設定した上でテストするためのテストプログラム22を簡単に作成することが可能となる。加えて、この第3実施形態の単体テストプログラム作成システム1では、境界値試験を行うためのテストプログラム22等を自動作成することが可能となる。
That is, also in the unit test
(第4実施形態)
次に、この発明の第4実施形態について説明する。
(Fourth embodiment)
Next explained is the fourth embodiment of the invention.
前述した第3実施形態の単体テストプログラム作成システム1では、ソースコード23内に、目的のメソッドに対するコメントとして、そのメソッドに与えるテストデータの範囲や値等を記載した。
In the unit test
これに対して、この第4実施形態の単体テストプログラム作成システム1は、検査対象の変数に対して所定のコメントを記載することで、当該検査対象の変数についての検証を行うためのテストプログラム22を作成するようにしたものである。図12は、第4実施形態におけるソースコード23の一部分の一例を示す図である。
On the other hand, the unit test
図12には、変数"num"について定義する箇所の記載例が示されている。そして、ここでは、この変数"num"が検査対象であるものと想定する(図12のd1)。この場合、テスト担当者は、この変数"num"に対してコメント("Verified data")を記載する(図12のd2)。 FIG. 12 shows a description example of a part that defines the variable “num”. Here, it is assumed that this variable “num” is an inspection target (d1 in FIG. 12). In this case, the tester writes a comment (“Verified data”) for this variable “num” (d2 in FIG. 12).
一方、このようなコメントが記載されたソースコード23が入力されると、ソースコード解析部12によって解析が施され、まず、コメントに基づき検査対象の変数が検出される。検査対象の変数を検出すると、ソースコード解析部12は、続いて、この変数を引数や戻り値として含むオブジェクトが存在しないかを検索する。検出されたら、その変数と当該変数を引数や戻り値として含むオブジェクトとをテストプログラム作成部11に転送する。
On the other hand, when the
そして、ソースコード解析部12の処理結果を受け取ったテストプログラム作成部11は、この変数についての検証を行うためのテストプログラム22を作成する。図13は、テストプログラム作成部11によってテストプログラム22が作成される原理を説明するための図である。
The test
図13中のe1は、ソースコード解析部12によって検出された、変数"num"を引数として含むオブジェクトに関するソースコード23内における記載箇所である。一方、図13中のe2は、このような記載箇所が検出された場合に、テストプログラム作成部11によって作成されるテストプログラム22を示す。
E1 in FIG. 13 is a description location in the
図13に示すように、テストプログラム作成部11は、変数"num"に対して"10"を与えたオブジェクトが存在した場合、その"10"を用いて変数"num"を検証するテストプログラム22を作成して出力する。
As shown in FIG. 13, when there is an object that gives “10” to the variable “num”, the test
このように、この単体テストプログラム作成システム1によれば、テスト担当者は、ソースコード23のコメントを記載するだけで、検査対象の変数について検証するためのテストプログラム22を簡単に作成することが可能となる。
As described above, according to the unit test
なお、前述の第3実施形態において説明したソースコード23に目的のメソッドに対してコメントを記載する手法と、この第4実施形態において説明したソースコード23に検証対象の変数に対してコメントを記載する手法とは、組み合わせて実施することが可能である。
Note that a method for writing a comment for a target method in the
以上のように、本発明のテストプログラム作成装置(単体テストプログラム作成システム1)によれば、例えば、階層構造を持つ構造体群を受け取って動作するプログラムをテストするためのテストプログラムを簡単に作成することが可能となる。 As described above, according to the test program creation apparatus (unit test program creation system 1) of the present invention, for example, a test program for testing a program that operates by receiving a structure group having a hierarchical structure is easily created. It becomes possible.
なお、本発明は、上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。更に、異なる実施形態に構成要素を適宜組み合わせてもよい。 Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of components disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, you may combine a component suitably in different embodiment.
1…単体テストプログラム作成システム、11…テストプログラム作成部、12…ソースコード解析部、13…テストケース作成部、21…テストデータ定義データ、22…テストプログラム、23…ソースコード、24…テストケース。
DESCRIPTION OF
Claims (5)
前記階層構造を持つ構造体群の各値を定義するテストデータ定義データを入力する入力手段と、
前記入力手段により入力されたテストデータ定義データで定義される各値を持つ前記階層構造を持つ構造体群を生成する手続きと、当該生成した構造体群の最上位に位置する構造体を引数としてテスト対象の前記プログラムを呼び出す手続きとを有する前記テストプログラムを作成するテストプログラム作成手段と、
を具備することを特徴とするテストプログラム作成装置。 A test program creation device for creating a test program for testing a program that operates by receiving a structure positioned at the top of a structure group having a hierarchical structure as an argument,
Input means for inputting test data definition data defining each value of the structure group having the hierarchical structure;
A procedure for generating a structure group having the hierarchical structure having each value defined by the test data definition data input by the input means, and a structure positioned at the top of the generated structure group as arguments Test program creating means for creating the test program having a procedure for calling the program to be tested;
A test program creation device comprising:
前記テストプログラム作成手段は、前記テキストデータ定義データ中に埋め込まれたタグに基づき階層構造を解釈し、前記テストデータ定義データで定義される各値を持つ前記階層構造を持つ構造体群を生成する手続きを作成する、
ことを特徴とする請求項1記載のテストプログラム作成装置。 The test data definition data is text data that is described in XML (extensible markup language) and defines each value of the structure group having the hierarchical structure along the structure by expressing the hierarchical structure with a tag.
The test program creation means interprets a hierarchical structure based on a tag embedded in the text data definition data, and generates a structure group having the hierarchical structure having each value defined by the test data definition data. Create a procedure,
The test program creation device according to claim 1.
前記テストプログラム作成手段は、前記テキストデータ定義データ中で設定されたインデントに基づき階層構造を解釈し、当該テストデータ定義データで定義される各値を持つ前記階層構造を持つ構造体群を生成する手続きを作成する、
ことを特徴とする請求項1記載のテストプログラム作成装置。 The test data definition data is text data that defines each value of the structure group having the hierarchical structure along the structure by expressing the hierarchical structure by indentation,
The test program creation means interprets a hierarchical structure based on an indent set in the text data definition data, and generates a structure group having the hierarchical structure having each value defined by the test data definition data. Create a procedure,
The test program creation device according to claim 1.
テスト対象の前記プログラムのソースコードであって、前記構造体の各値を定義するテストデータ定義データが前記関数に対するコメント文として記載されたソースコードを入力する入力手段と、
前記入力手段により入力されたソースコードを解析し、当該ソースコード内に記載されたコメント文に基づき、テスト対象の関数を検出すると共に、当該検出した関数に対して前記構造体として供給すべきテストデータを作成するテストケース作成手段と、
前記構造体として前記テストケース作成手段により作成されたテストデータを生成する手続きと、当該生成した前記構造体を引数として前記テスト対象の関数を呼び出す手続きとを有する前記テストプログラムを作成するテストプログラム作成手段と、
を具備することを特徴とするテストプログラム作成装置。 A test program creation device for creating a test program for executing a test in units of functions for a program having a procedure for calling a function that operates by receiving a structure as an argument,
Input means for inputting source code of the program to be tested, in which test data definition data defining each value of the structure is described as a comment statement for the function;
Analyzing the source code input by the input means, detecting a test target function based on a comment sentence described in the source code, and supplying the detected function as the structure A test case creation means for creating data;
Test program creation for creating the test program having a procedure for generating test data created by the test case creation means as the structure and a procedure for calling the function to be tested with the created structure as an argument Means,
A test program creation device comprising:
前記入力手段により入力されたソースコードを解析し、当該ソースコード内に記載されたコメント文に基づき、検査対象の変数を検出すると共に、当該検出した変数を引数または戻り値とする関数を検出し、当該検出した関数が引数または戻り値とする前記検出した変数を検証するための手続きを有するテストプログラムを作成するテストプログラム作成手段と、
を具備することを特徴とするテストプログラム作成装置。 Input means for inputting source code of a program to be tested, which is a source code in which a comment sentence for specifying a variable to be inspected is written;
Analyzes the source code input by the input means, detects a variable to be inspected based on a comment sentence described in the source code, and detects a function having the detected variable as an argument or a return value. A test program creating means for creating a test program having a procedure for verifying the detected variable as an argument or a return value of the detected function;
A test program creation device comprising:
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009256483A JP2011100420A (en) | 2009-11-09 | 2009-11-09 | Test program creation device |
CN2010105365795A CN102053909A (en) | 2009-11-09 | 2010-11-04 | Test program generating device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009256483A JP2011100420A (en) | 2009-11-09 | 2009-11-09 | Test program creation device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011100420A true JP2011100420A (en) | 2011-05-19 |
Family
ID=43958254
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009256483A Pending JP2011100420A (en) | 2009-11-09 | 2009-11-09 | Test program creation device |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP2011100420A (en) |
CN (1) | CN102053909A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013108730A1 (en) * | 2012-01-20 | 2013-07-25 | 日立オートモティブシステムズ株式会社 | Software verification support device, software verification support method, software verification support program |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102629227B (en) * | 2012-02-28 | 2015-07-22 | 中科开元信息技术(北京)有限公司 | Method for assisting function verification of interface of embedded system |
CN103605777B (en) * | 2013-11-28 | 2017-04-12 | 北京国双科技有限公司 | database index processing method and device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02247742A (en) * | 1989-03-20 | 1990-10-03 | Fujitsu Ltd | Test program forming processing system |
JPH0391039A (en) * | 1989-09-04 | 1991-04-16 | Fuji Electric Co Ltd | Program for test for software and method for preparing test data |
JPH05197589A (en) * | 1991-11-22 | 1993-08-06 | Nec Corp | Automatic generation system of test program |
JP2001084162A (en) * | 1999-09-10 | 2001-03-30 | Toshiba Corp | Program testing method and storage medium |
JP2004070561A (en) * | 2002-08-05 | 2004-03-04 | Funai Electric Co Ltd | Debugging device |
JP2005293578A (en) * | 2004-03-31 | 2005-10-20 | Microsoft Corp | Test case inheritance controlled via attribute |
JP2007058383A (en) * | 2005-08-23 | 2007-03-08 | Nomura Research Institute Ltd | Operation verification system for program and operation verification program |
JP2007316875A (en) * | 2006-05-25 | 2007-12-06 | Hitachi Ltd | Apparatus and method for automatic regression test |
-
2009
- 2009-11-09 JP JP2009256483A patent/JP2011100420A/en active Pending
-
2010
- 2010-11-04 CN CN2010105365795A patent/CN102053909A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02247742A (en) * | 1989-03-20 | 1990-10-03 | Fujitsu Ltd | Test program forming processing system |
JPH0391039A (en) * | 1989-09-04 | 1991-04-16 | Fuji Electric Co Ltd | Program for test for software and method for preparing test data |
JPH05197589A (en) * | 1991-11-22 | 1993-08-06 | Nec Corp | Automatic generation system of test program |
JP2001084162A (en) * | 1999-09-10 | 2001-03-30 | Toshiba Corp | Program testing method and storage medium |
JP2004070561A (en) * | 2002-08-05 | 2004-03-04 | Funai Electric Co Ltd | Debugging device |
JP2005293578A (en) * | 2004-03-31 | 2005-10-20 | Microsoft Corp | Test case inheritance controlled via attribute |
JP2007058383A (en) * | 2005-08-23 | 2007-03-08 | Nomura Research Institute Ltd | Operation verification system for program and operation verification program |
JP2007316875A (en) * | 2006-05-25 | 2007-12-06 | Hitachi Ltd | Apparatus and method for automatic regression test |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013108730A1 (en) * | 2012-01-20 | 2013-07-25 | 日立オートモティブシステムズ株式会社 | Software verification support device, software verification support method, software verification support program |
JP2013149164A (en) * | 2012-01-20 | 2013-08-01 | Hitachi Automotive Systems Ltd | Software verification support device, software verification support method, and software verification support program |
Also Published As
Publication number | Publication date |
---|---|
CN102053909A (en) | 2011-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5659238B2 (en) | Source code conversion method and source code conversion program | |
WO2012032890A1 (en) | Source code conversion method and source code conversion program | |
US20150135164A1 (en) | Integrated Software Testing Management | |
JP5176478B2 (en) | Data flow analysis device, data flow analysis method, and data flow analysis program | |
CN103294596A (en) | Early warning method for contract-type software fault based on program invariants | |
Kammer et al. | Gesture formalization for multitouch | |
Kresse et al. | Development and maintenance efforts testing graphical user interfaces: a comparison | |
JP2011100420A (en) | Test program creation device | |
JP5814603B2 (en) | Test specification creation support apparatus, method and program | |
Wiederseiner et al. | An open-source tool for automated generation of black-box xunit test code and its industrial evaluation | |
JP5163172B2 (en) | Software test item editing support apparatus and software test item editing support method | |
Nazir et al. | Identifying software features as birthmark | |
Salihu et al. | Comparative analysis of GUI reverse engineering techniques | |
US20080276187A1 (en) | Iconic Programming System with Disabling and Enabling of Dependent Objects | |
McFadden et al. | Survey of aspect mining case study software and benchmarks | |
Ulmer et al. | Virtual testing of high lift systems | |
JP5755861B2 (en) | Test case generation apparatus, test case generation method, and test case generation program | |
JP2007257397A (en) | Contention state detection process additional program, contention state detection process adding apparatus and contention state detection process adding method | |
Arcega et al. | On the influence of models at run-time traces in dynamic feature location | |
JP5736588B2 (en) | Source code conversion method and source code conversion program | |
Ibrahim et al. | An eclipse plug-in tool for generating test cases from source codes | |
JP5755103B2 (en) | Block diagram processing apparatus and block diagram processing method | |
US8930759B2 (en) | Stream generation | |
Oliveira et al. | Verification of plastic interactive systems | |
JP2004280231A (en) | Verification method for software |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110824 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110906 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20120207 |