JP2016081231A - Abnormal system test data generating device, method, and program, permitting ready recognition of multiple input variables - Google Patents

Abnormal system test data generating device, method, and program, permitting ready recognition of multiple input variables Download PDF

Info

Publication number
JP2016081231A
JP2016081231A JP2014210776A JP2014210776A JP2016081231A JP 2016081231 A JP2016081231 A JP 2016081231A JP 2014210776 A JP2014210776 A JP 2014210776A JP 2014210776 A JP2014210776 A JP 2014210776A JP 2016081231 A JP2016081231 A JP 2016081231A
Authority
JP
Japan
Prior art keywords
group
value
conditional expression
candidate
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014210776A
Other languages
Japanese (ja)
Other versions
JP6007223B2 (en
Inventor
暁晶 張
Xiao Jing Zhang
暁晶 張
治門 丹野
Haruto Tanno
治門 丹野
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2014210776A priority Critical patent/JP6007223B2/en
Publication of JP2016081231A publication Critical patent/JP2016081231A/en
Application granted granted Critical
Publication of JP6007223B2 publication Critical patent/JP6007223B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a device for generating abnormal system test data permitting ready recognition of multiple input variables including input variables having mutually dependent relations among one another.SOLUTION: A variables classifying unit 15 classifies multiple input variables into groups on the basis of the presence or absence of any relation of dependence in conditional expressions to be satisfied by the multiple input variables, and associates the conditional expressions with groups to which related variables belong. A value candidate generating unit 16 generates for each group value candidates on the basis of the conditional expressions associated with the group. A combination generating unit 17 selects, regarding each conditional expression, from each of the other groups for each candidate not satisfying the pertinent conditional expression out of the candidates regarding the group to which variables related to the conditional expression belong, one simple value each dependent on the data pattern of the variables of the pertinent other group, and generates combinations of candidates; the candidates selected from other groups regarding any one conditional expression are common to all the combinations regarding the pertinent conditional expression.SELECTED DRAWING: Figure 3

Description

本発明は、複数入力変数に対する視認性が高い異常系テストデータ生成装置、方法、及びプログラムに関する。   The present invention relates to an abnormal test data generation apparatus, method, and program having high visibility for a plurality of input variables.

従来、プログラムのブラックボックステストのためにプログラムの入力変数に対して入力されるテストデータを、ソフトウェア設計に基づいて自動生成する技術が有る(例えば、特許文献1及び特許文献2参照)。   2. Description of the Related Art Conventionally, there is a technique for automatically generating test data input to a program input variable for a program black box test based on software design (see, for example, Patent Documents 1 and 2).

このような技術を利用することで、プログラムのテストに効果的、かつ、効率的なテストデータを導出することができる。   By using such a technique, it is possible to derive test data that is effective and efficient for testing the program.

特開2010−267023号公報JP 2010-267023 A 特開2012−181782号公報JP 2012-181782 A 特開2012−221313号公報JP 2012-221313 A

しかしながら、従来において、相互に依存関係を有する2以上の入力変数を含む複数の入力変数に関して、効率的、かつ、効果的なテストデータを生成するのは困難であった。   However, conventionally, it has been difficult to generate efficient and effective test data for a plurality of input variables including two or more input variables having a dependency relationship with each other.

ここで、入力変数の依存関係とは、入力変数が満たすべき制約において、一方の入力変数の値が、他方の入力変数の値に依存する関係をいう。斯かる制約の一例として、入力変数がX及びYである場合に、X+Y≦100であるといったような制約が挙げられる。この場合、当該制約を満たすために、入力変数Xの値と入力変数Yの値とは相互に依存する。   Here, the input variable dependency relationship refers to a relationship in which the value of one input variable depends on the value of the other input variable in a constraint to be satisfied by the input variable. An example of such a constraint is a constraint such that X + Y ≦ 100 when the input variables are X and Y. In this case, in order to satisfy the restriction, the value of the input variable X and the value of the input variable Y are mutually dependent.

そして、テスト対象のプログラムに対し異常なテストデータを入力した際に、入力チェックが正しく動作することを確認するテストにおいて、適切で、かつ、視認性が高く、レビューやテストを実施し易い異常系のテストデータの生成は重要である。ここで、視認性が高いとは、複数の入力変数のうちのいずれの入力変数に着目したテストデータであるのかについて、区別し易いことをいう。   In the test to confirm that the input check works correctly when abnormal test data is input to the program under test, the abnormal system is appropriate and has high visibility and is easy to conduct reviews and tests. The generation of test data is important. Here, high visibility means that it is easy to distinguish which input variable among a plurality of input variables is the test data.

本発明は、上記の点に鑑みてなされたものであって、相互に依存関係を有する入力変数を含む複数の入力変数に対する視認性が高い異常系のテストデータを生成することを目的とする。   The present invention has been made in view of the above points, and an object of the present invention is to generate abnormal test data having high visibility for a plurality of input variables including input variables having a mutual dependency.

そこで上記課題を解決するため、開示のテストデータ生成装置は、テスト対象のプログラムにおける複数の入力変数が満たすべき1以上の条件式に基づいて、前記入力変数間の依存関係の有無を判定し、前記依存関係の有無に基づいて前記複数の入力変数を1以上のグループに分類して、前記各条件式を当該条件式に関連する入力変数が属するグループに関連付ける変数分類部と、前記グループごとに、当該グループに関連付けられた前記条件式に基づいて、当該グループに属する入力変数の値の候補を生成する値候補生成部と、前記各条件式について、当該条件式に関連する入力変数が属する第一のグループに関して生成された候補のうち、前記第一のグループに関連付けられたいずれかの条件式を満たさない前記候補ごとに、前記第一のグループ以外の第二のグループのそれぞれから、当該第二のグループに属する入力変数のデータ型に依存して設定された単純値を、前記条件式に基づいて生成された候補に対して優先的に1つずつ選択して、前記候補の組み合わせを生成する組み合わせ生成部とを有し、前記組み合わせ生成部が一つの前記条件式について前記第二のグループから選択する前記単純値又は前記候補は、当該条件式に関して生成される全ての前記組み合わせに対して共通である。   Therefore, in order to solve the above-described problem, the disclosed test data generation device determines whether or not there is a dependency between the input variables based on one or more conditional expressions to be satisfied by a plurality of input variables in the test target program, A variable classification unit that classifies the plurality of input variables into one or more groups based on the presence or absence of the dependency relationship, associates each conditional expression with a group to which an input variable related to the conditional expression belongs, and for each group A value candidate generating unit that generates a value candidate of an input variable belonging to the group based on the conditional expression associated with the group, and for each conditional expression, the input variable associated with the conditional expression For each candidate generated for one group that does not satisfy any of the conditional expressions associated with the first group, the first From each of the second groups other than the loop, the simple value set depending on the data type of the input variable belonging to the second group is preferentially given to the candidate generated based on the conditional expression. A combination generation unit that selects one by one and generates the combination of candidates, and the combination generation unit selects one simple conditional expression from the second group or the candidate This is common to all the combinations generated for the conditional expression.

相互に依存関係を有する入力変数を含む複数の入力変数に対する視認性が高い異常系のテストデータを生成することができる。   It is possible to generate abnormal test data with high visibility with respect to a plurality of input variables including input variables having dependency relations with each other.

本発明の実施の形態におけるテストデータ生成システムの構成例を示す図である。It is a figure which shows the structural example of the test data generation system in embodiment of this invention. 本発明の実施の形態におけるテストデータ生成装置のハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of the test data generation apparatus in embodiment of this invention. 本発明の実施の形態におけるテストデータ生成装置の機能構成例を示す図である。It is a figure which shows the function structural example of the test data generation apparatus in embodiment of this invention. テストデータ生成装置が実行する処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence which a test data generation apparatus performs. 設計モデルのデータ構造の定義の一例を示す図である。It is a figure which shows an example of the definition of the data structure of a design model. 設計モデルの一例を示す図である。It is a figure which shows an example of a design model. テスト項目一覧の抽出例を示す図である。It is a figure which shows the example of extraction of a test item list. 一つのテスト項目に関するテストデータ生成条件の一例を示す図である。It is a figure which shows an example of the test data generation conditions regarding one test item. テストデータ生成条件が各変数集合に振り分けられた例を示す図である。It is a figure which shows the example by which the test data generation conditions were distributed to each variable set. 変数集合ごとの値候補の生成例を示す図である。It is a figure which shows the example of a production | generation of the value candidate for every variable set. テストモデルの一例を示す図である。It is a figure which shows an example of a test model. テストモデルのデータ構造の定義の一例を示す図である。It is a figure which shows an example of the definition of the data structure of a test model. 入力変数の分類処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of the classification process of an input variable. ドメインテスト技法を用いた値候補の生成処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of the production | generation process of the value candidate using a domain test technique. 値候補の生成処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of a value candidate production | generation process. inポイントの値候補の生成処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of the production | generation process of an in point value candidate. outポイントの値候補の生成処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of the production | generation process of an out point value candidate. テストケースの生成処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of the production | generation process of a test case.

以下、図面に基づいて本発明の実施の形態を説明する。図1は、本発明の実施の形態におけるテストデータ生成システムの構成例を示す図である。図1において、テストデータ生成装置10は、LAN(Local Area Network)又はインターネット等のネットワークを介して1以上のユーザ端末20に通信可能に接続されている。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a diagram illustrating a configuration example of a test data generation system according to an embodiment of the present invention. In FIG. 1, a test data generation device 10 is communicably connected to one or more user terminals 20 via a network such as a LAN (Local Area Network) or the Internet.

テストデータ生成装置10は、プログラムのブラックボックステストに利用される、プログラムの入力変数に対する入力用のテストデータを生成するコンピュータである。ユーザ端末20は、テストデータ生成装置10に対するユーザインタフェースとして機能する端末である。なお、テストデータ生成装置10が、ディスプレイ等の表示装置や、マウス及びキーボート等の入力装置を備え、ユーザによって直接操作可能とされてもよい。   The test data generation device 10 is a computer that generates test data for input with respect to an input variable of a program used for a black box test of the program. The user terminal 20 is a terminal that functions as a user interface for the test data generation device 10. Note that the test data generation device 10 may include a display device such as a display, and input devices such as a mouse and a keyboard, and may be directly operable by the user.

図2は、本発明の実施の形態におけるテストデータ生成装置のハードウェア構成例を示す図である。図2のテストデータ生成装置10は、それぞれバスBで相互に接続されているドライブ装置100、補助記憶装置102、メモリ装置103、CPU104、及びインタフェース装置105等を有する。   FIG. 2 is a diagram illustrating a hardware configuration example of the test data generation apparatus according to the embodiment of the present invention. The test data generation device 10 in FIG. 2 includes a drive device 100, an auxiliary storage device 102, a memory device 103, a CPU 104, an interface device 105, and the like that are mutually connected by a bus B.

テストデータ生成装置10での処理を実現するプログラムは、CD−ROM等の記録媒体101によって提供される。プログラムを記憶した記録媒体101がドライブ装置100にセットされると、プログラムが記録媒体101からドライブ装置100を介して補助記憶装置102にインストールされる。但し、プログラムのインストールは必ずしも記録媒体101より行う必要はなく、ネットワークを介して他のコンピュータよりダウンロードするようにしてもよい。補助記憶装置102は、インストールされたプログラムを格納すると共に、必要なファイルやデータ等を格納する。   A program for realizing processing in the test data generation apparatus 10 is provided by a recording medium 101 such as a CD-ROM. When the recording medium 101 storing the program is set in the drive device 100, the program is installed from the recording medium 101 to the auxiliary storage device 102 via the drive device 100. However, the program need not be installed from the recording medium 101 and may be downloaded from another computer via a network. The auxiliary storage device 102 stores the installed program and also stores necessary files and data.

メモリ装置103は、プログラムの起動指示があった場合に、補助記憶装置102からプログラムを読み出して格納する。CPU104は、メモリ装置103に格納されたプログラムに従ってテストデータ生成装置10に係る機能を実行する。インタフェース装置105は、ネットワークに接続するためのインタフェースとして用いられる。   The memory device 103 reads the program from the auxiliary storage device 102 and stores it when there is an instruction to start the program. The CPU 104 executes functions related to the test data generation device 10 in accordance with a program stored in the memory device 103. The interface device 105 is used as an interface for connecting to a network.

図3は、本発明の実施の形態におけるテストデータ生成装置の機能構成例を示す図である。図3において、テストデータ生成装置10は、設計モデル抽出部11、設計モデル分析部12、テスト項目抽出部13、条件抽出部14、変数分類部15、値候補生成部16、及び組み合わせ生成部17等を有する。これら各部は、テストデータ生成装置10にインストールされた1以上のプログラムが、CPU104に実行させる処理により実現される。テストデータ生成装置10は、また、値候補記憶部111を利用する。値候補記憶部111は、メモリ装置103若しくは補助記憶装置102、又はテストデータ生成装置10にネットワークを介して接続される記憶装置等を用いて実現可能である。   FIG. 3 is a diagram illustrating a functional configuration example of the test data generation apparatus according to the embodiment of the present invention. In FIG. 3, the test data generation apparatus 10 includes a design model extraction unit 11, a design model analysis unit 12, a test item extraction unit 13, a condition extraction unit 14, a variable classification unit 15, a value candidate generation unit 16, and a combination generation unit 17. Etc. Each of these units is realized by processing that one or more programs installed in the test data generation apparatus 10 cause the CPU 104 to execute. The test data generation device 10 also uses the value candidate storage unit 111. The value candidate storage unit 111 can be realized using the memory device 103 or the auxiliary storage device 102, or a storage device connected to the test data generation device 10 via a network.

設計モデル抽出部11は、ユーザ端末20から設計書データを受信し、設計書データから設計モデルを抽出する。設計書データとは、ソフトウェアの設計書を示すデータをいう。また、設計モデルとは、ソフトウェアの仕様に関する情報をいう。例えば、設計モデルには、入力変数に関する制約等が含まれている。設計モデル分析部12は、設計モデルを分析し、設計モデルに含まれる1以上のビジネスロジックのそれぞれを、テスト対象として抽出する。ビジネスロジックとは、例えば、ソフトウェアが有する機能群のうちの一つの機能、又はソフトウェアがコンピュータに実行させる複数の処理手順のうちの一つの処理手順に対応する概念、又は当該処理手順をコンピュータに実行させるプログラムに対応する概念等である。また、設計モデル内には、ビジネスロジックごとに、当該ビジネスロジックに対する入力変数や、各入力変数に対する制約等が定義されている。   The design model extraction unit 11 receives design document data from the user terminal 20 and extracts a design model from the design document data. Design document data refers to data indicating a software design document. The design model refers to information related to software specifications. For example, the design model includes constraints on input variables. The design model analysis unit 12 analyzes the design model and extracts each of one or more business logics included in the design model as a test target. The business logic is, for example, one function in a function group included in software, a concept corresponding to one processing procedure among a plurality of processing procedures executed by the software on the computer, or execution of the processing procedure on the computer. A concept corresponding to the program to be executed. In the design model, for each business logic, input variables for the business logic, constraints for each input variable, and the like are defined.

テスト項目抽出部13は、各テスト対象(各ビジネスロジック)からテスト項目の一覧(以下、「テスト項目一覧」という。)を抽出する。テスト項目一覧は、各テスト対象に含まれる入力変数に関する制約等に基づいて抽出される。条件抽出部14は、テスト項目ごとに、当該テスト項目において着目される入力変数に対するテストデータを生成するための条件式(以下、「テストデータ生成条件」という。)を設計モデルから抽出する。   The test item extraction unit 13 extracts a list of test items (hereinafter referred to as “test item list”) from each test target (each business logic). The list of test items is extracted based on restrictions on input variables included in each test target. The condition extraction unit 14 extracts, for each test item, a conditional expression (hereinafter referred to as “test data generation condition”) for generating test data for the input variable focused on in the test item from the design model.

変数分類部15は、テスト項目ごとに、当該テスト項目に関するテストデータ生成条件を解析し、当該テスト項目に関する入力変数を、依存関係の有無に基づいて分類する。分類の結果生成されるグループを、以下、「変数集合」という。変数分類部15は、また、各テストデータ生成条件を、当該テストデータ生成条件に関係する入力変数が属する変数集合に振り分ける(関連付ける)。   For each test item, the variable classification unit 15 analyzes the test data generation condition regarding the test item, and classifies the input variable regarding the test item based on the presence or absence of the dependency. A group generated as a result of classification is hereinafter referred to as a “variable set”. The variable classification unit 15 also assigns (associates) each test data generation condition to a variable set to which an input variable related to the test data generation condition belongs.

値候補生成部16は、変数集合ごとに、当該変数集合に振り分けられたテストデータ生成条件に基づいて、当該変数集合に属する各入力変数のテストデータの候補(以下、「値候補」という。)を生成する。なお、値候補生成部16は、変数集合の特徴(変数集合に含まれる入力変数間の依存関係の有無)に基づいて、値候補の生成方法を切り替える。値候補記憶部111は、値候補生成部16によって生成された値候補を記憶する。   The value candidate generator 16 for each variable set, based on the test data generation conditions assigned to the variable set, test data candidates of the input variables belonging to the variable set (hereinafter referred to as “value candidates”). Is generated. The value candidate generation unit 16 switches the method of generating value candidates based on the characteristics of the variable set (whether there is a dependency relationship between input variables included in the variable set). The value candidate storage unit 111 stores the value candidates generated by the value candidate generation unit 16.

組み合わせ生成部17は、各入力変数の値候補の組み合わせに関して1通り以上の組みをテストデータとして生成する。組み合わせ生成部17は、生成されたテストデータを含むテストモデルを生成し、当該テストモデルの内容をテストケース表としてユーザ端末20に出力する。   The combination generation unit 17 generates one or more combinations as test data for combinations of value candidates for each input variable. The combination generation unit 17 generates a test model including the generated test data, and outputs the content of the test model to the user terminal 20 as a test case table.

以下、テストデータ生成装置10が実行する処理手順について説明する。図4は、テストデータ生成装置が実行する処理手順の一例を説明するためのフローチャートである。   Hereinafter, a processing procedure executed by the test data generation apparatus 10 will be described. FIG. 4 is a flowchart for explaining an example of a processing procedure executed by the test data generation apparatus.

ユーザ端末20に対するユーザによる指示入力に応じ、ユーザ端末20は、ソフトウェアの設計書データを、テストデータ生成装置10に送信する。当該設計書データは、テストデータ生成装置10において設計モデル抽出部11によって受信される。設計モデル抽出部11は、図5に示されるような設計モデルのデータ構造の定義に基づいて設計書データを分析して、図6に示されるような設計モデルを抽出する(S100)。   In response to an instruction input by the user to the user terminal 20, the user terminal 20 transmits software design document data to the test data generation device 10. The design document data is received by the design model extraction unit 11 in the test data generation apparatus 10. The design model extraction unit 11 analyzes the design document data based on the definition of the data structure of the design model as shown in FIG. 5, and extracts the design model as shown in FIG. 6 (S100).

図5は、設計モデルのデータ構造の定義の一例を示す図である。図5では、設計モデルのデータ構造が、BNF(Backus-Naur Form)によって定義されている。   FIG. 5 is a diagram illustrating an example of the definition of the data structure of the design model. In FIG. 5, the data structure of the design model is defined by BNF (Backus-Naur Form).

図5によれば、本実施の形態において、設計モデルは、1以上のビジネスロジックを含む。ビジネスロジックは、ビジネスロジックID、1以上の入力変数、1以上の入力制約、及び1以上のドメイン定義等を含む。入力変数とは、ビジネスロジックに対して入力される変数である。入力制約とは、入力変数に関する制約情報である。ドメイン定義とは、ビジネスロジックの振る舞いごと(出力結果ごと)に、当該振る舞いを引き起こすために入力変数が満たすべき条件の定義である。   According to FIG. 5, in the present embodiment, the design model includes one or more business logics. The business logic includes a business logic ID, one or more input variables, one or more input constraints, one or more domain definitions, and the like. An input variable is a variable input to business logic. An input constraint is constraint information related to an input variable. A domain definition is a definition of a condition that an input variable must satisfy in order to cause the behavior for each business logic behavior (for each output result).

なお、入力変数、入力制約、及びドメイン定義より下層の構造に関する説明については省略する。   Note that descriptions of input variables, input constraints, and structures below the domain definition are omitted.

図6は、設計モデルの一例を示す図である。図6に示されるように、本実施の形態では、設計モデルに二つのビジネスロジックが含まれている。一つは、「夫婦型保険の加入判定処理」であり、もう一つは、「夫婦型保険の料金計算処理」である。「夫婦型保険の加入判定処理」は、夫婦型保険への加入の可否を判定する処理(ビジネスロジック)である。「夫婦型保険の料金計算処理」は、「夫婦型保険の加入判定処理」において加入が可能であると判定された場合に、加入対象の夫婦型保険の料金を計算する処理(ビジネスロジック)である。なお、本実施の形態において、「夫婦型保険の料金計算処理」に関するテストデータの生成の説明については、便宜上、省略される。   FIG. 6 is a diagram illustrating an example of a design model. As shown in FIG. 6, in this embodiment, the design model includes two business logics. One is the “judgment-type insurance enrollment determination process”, and the other is “the couple-type insurance charge calculation process”. The “judgment type insurance enrollment determination process” is a process (business logic) for determining whether or not the couple type insurance can be enrolled. “Couple-type insurance fee calculation processing” is a process (business logic) that calculates the fee for couple-type insurance to be enrolled when it is determined that “joint-type insurance subscription determination processing” is possible. is there. In the present embodiment, the description of the test data generation related to the “couple-type insurance fee calculation process” is omitted for the sake of convenience.

「夫婦型保険の加入判定処理」には、夫年齢、妻年齢、プラン名、又は備考を変数IDとする4つの入力変数が有る。夫年齢は、夫の年齢が入力される整数型の変数である。妻年齢は、妻の年齢が入力される整数型の入力変数である。プラン名は、夫婦型保険に属する複数のプランのうち、加入対象とするプランのプラン名が入力される列挙型の入力変数である。備考は、任意の文字列が入力される文字列型の変数である。なお、夫年齢、妻年齢、及びプラン名については、入力が必須とされている。一方、備考については、入力は必須とされていない。   There are four input variables with the husband ID, wife age, plan name, or remarks as variable IDs in the “coupled insurance enrollment determination process”. Husband age is an integer type variable into which the age of the husband is input. The wife age is an integer type input variable into which the wife's age is input. The plan name is an enumerated input variable into which a plan name of a plan to be subscribed among a plurality of plans belonging to the couple-type insurance is input. The comment is a character string type variable into which an arbitrary character string is input. Note that the husband age, wife age, and plan name must be entered. On the other hand, input is not required for remarks.

入力制約としては、それぞれ制約(1)、制約(2)、制約(3)、制約(4)を入力制約IDとする4つの入力制約が有る。制約(1)は、式(1)を含む。式(1)は、夫年齢が18歳以上であることを示す。制約(2)は、式(2)を含む。式(2)は、妻年齢が16歳以上であることを示す。なお、制約(1)及び制約(2)の少なくともいずれか一方に違反した場合、「年齢不正」のエラーメッセージが表示される。制約(3)は、式(3)を含む。式(3)は、備考の長さが10文字以下であることを示す。制約(4)は、式(4)を含む。式(4)は、備考の各文字が、全角の漢字又は全角のカタカナであることを示す。なお、制約(3)及び制約(4)の少なくともいずれか一方に違反した場合、「備考不正」のエラーメッセージが表示される。   As the input constraints, there are four input constraints having the constraint (1), the constraint (2), the constraint (3), and the constraint (4) as input constraint IDs, respectively. Constraint (1) includes equation (1). Formula (1) indicates that the husband's age is 18 years or older. Constraint (2) includes equation (2). Equation (2) indicates that the wife is 16 years old or older. If at least one of the constraint (1) and the constraint (2) is violated, an error message “age invalid” is displayed. Constraint (3) includes equation (3). Equation (3) indicates that the remark length is 10 characters or less. Constraint (4) includes equation (4). Formula (4) shows that each character of the remarks is a full-width kanji or a full-width katakana. When at least one of constraint (3) and constraint (4) is violated, an error message “remarks illegal” is displayed.

ドメイン定義としては、それぞれドメイン1、ドメイン2をドメインIDとする2つのドメイン定義が有る。ドメイン1は、式(5)を含む。式(5)は、夫年齢と妻年齢との差が20歳以下であることを示す。式(5)が満たされる場合、加入は可能であると判定され、「夫婦型保険の料金計算処理」を起動させるためのボタンが表示される。ドメイン2は、式(6)を含む。式(6)は、夫年齢と妻年齢との差が20歳を超えることを示す。式(6)が満たされる場合、加入はできないと判定され、個人型保険へのリンクが表示される。   As domain definitions, there are two domain definitions in which domain 1 and domain 2 are domain IDs, respectively. Domain 1 includes formula (5). Equation (5) indicates that the difference between the husband's age and the wife's age is 20 years old or less. If the expression (5) is satisfied, it is determined that the subscription is possible, and a button for starting the “couple calculation insurance fee calculation process” is displayed. Domain 2 includes formula (6). Equation (6) shows that the difference between the husband's age and the wife's age is over 20 years. If equation (6) is satisfied, it is determined that the subscription is not possible, and a link to personal insurance is displayed.

上記の式(5)及び式(6)から明らかなように、本実施の形態において、夫年齢と妻年齢とが、相互に依存関係を有する入力変数の一例である。すなわち、式(5)又は式(6)を満たすために、夫年齢の値と妻年齢との値は、他方の値に依存する。   As is clear from the above formulas (5) and (6), in the present embodiment, the husband age and the wife age are examples of input variables having a dependency relationship with each other. That is, in order to satisfy Expression (5) or Expression (6), the value of the husband age and the value of the wife age depend on the other value.

なお、設計モデルは、例えば、特許文献2に示されるように、表形式のデータによって与えられてもよい。   The design model may be given by tabular data as disclosed in Patent Document 2, for example.

続いて、設計モデル分析部12は、設計モデルを分析し、設計モデルに含まれる各ビジネスロジックを、それぞれテスト対象として抽出する(S110)。すなわち、本実施の形態において、1つのビジネスロジックは、1つのテスト対象となる。続くステップS120〜S180は、テスト対象ごと(ビジネスロジックごと)に実行される。以下、処理対象とされているテスト対象を、「着目テスト対象」という。   Subsequently, the design model analysis unit 12 analyzes the design model and extracts each business logic included in the design model as a test target (S110). That is, in the present embodiment, one business logic is one test target. Subsequent steps S120 to S180 are executed for each test target (for each business logic). Hereinafter, a test target that is a processing target is referred to as a “target test target”.

ステップS120において、テスト項目抽出部13は、着目テスト対象からテスト項目一覧を抽出する。具体的には、テスト項目抽出部13は、着目テスト対象に含まれる、各入力制約、各ドメイン定義に対するテスト項目をそれぞれ生成する。例えば、着目テスト対象に、入力制約がn個、ドメイン定義がm個含まれる場合、an+bm件のテスト項目が抽出される。係数a及びbは、1つの設計要素(入力制約又はドメイン定義等)に関して複数の観点から複数件のテスト項目が生成されてもよいことを示す。本実施の形態では、a=1、b=1であるとする。   In step S120, the test item extraction unit 13 extracts a test item list from the target test target. Specifically, the test item extraction unit 13 generates test items for each input constraint and each domain definition included in the target test target. For example, when the target test target includes n input constraints and m domain definitions, an + bm test items are extracted. The coefficients a and b indicate that a plurality of test items may be generated from a plurality of viewpoints regarding one design element (such as an input constraint or a domain definition). In this embodiment, it is assumed that a = 1 and b = 1.

図7は、テスト項目一覧の抽出例を示す図である。図7には、テスト項目IDが1〜6の6個のテスト項目を含むテスト項目一覧が抽出された例が示されている。各テスト項目は、テスト項目ID、着目設計要素、及びテスト項目内容等を含む。テスト項目IDは、各テスト項目の識別情報である。着目設計要素は、当該テスト項目の抽出元となった設計要素(入力制約又はドメイン定義)である。テスト項目内容は、テスト項目の内容を示す情報である。   FIG. 7 is a diagram illustrating an example of extracting a test item list. FIG. 7 shows an example in which a test item list including six test items having test item IDs 1 to 6 is extracted. Each test item includes a test item ID, a target design element, test item contents, and the like. The test item ID is identification information of each test item. The target design element is a design element (input constraint or domain definition) from which the test item is extracted. The test item content is information indicating the content of the test item.

図7において、テスト項目IDが1であるテスト項目(以下、「テスト項目1」といい、他のテスト項目も同様の命名規則に従う。)は、図6に示される設計モデルの入力制約の制約(1)に基づいて抽出されたテスト項目である。テスト項目2、テスト項目3、テスト項目4は、それぞれ、制約(2)、制約(3)、制約(4)に基づいて抽出されたテスト項目である。テスト項目5は、ドメイン定義のドメイン1に基づいて抽出されたテスト項目である。テスト項目6は、ドメイン2に基づいて抽出されたテスト項目である。   In FIG. 7, the test item whose test item ID is 1 (hereinafter referred to as “test item 1”, and other test items follow the same naming convention) is the constraint of the input constraints of the design model shown in FIG. This is a test item extracted based on (1). Test item 2, test item 3, and test item 4 are test items extracted based on constraint (2), constraint (3), and constraint (4), respectively. Test item 5 is a test item extracted based on domain 1 of the domain definition. The test item 6 is a test item extracted based on the domain 2.

続くステップS130〜S180は、ステップS120において抽出されたテスト項目ごとに実行される。以下、処理対象とされているテスト項目を「着目テスト項目」という。   Subsequent steps S130 to S180 are executed for each test item extracted in step S120. Hereinafter, the test item to be processed is referred to as “target test item”.

ステップS130において、条件抽出部14は、着目テスト項目に対応するテストデータの生成条件(以下、「テストデータ生成条件」という。)を抽出する(S130)。具体的には、着目テスト項目が、入力制約に基づいて抽出されたテスト項目1〜4のいずれかである場合、着目テスト項目の入力制約に加え、他の全ての入力制約の式も取得され、テストデータ生成条件が生成される。したがって、テスト項目1〜4に関しては、それぞれ制約(1)〜制約(4)のそれぞれの式を含むテストデータ生成条件が生成される。一方、着目テスト項目が、ドメイン定義に基づいて抽出されたテスト項目5又は6である場合、当該テスト項目において着目されているドメイン定義に加え、全ての入力制約の式も取得され、テストデータ生成条件が生成される。したがって、例えば、テスト項目5に関しては、図8に示されるようなテストデータ生成条件が生成される。   In step S130, the condition extraction unit 14 extracts a test data generation condition (hereinafter referred to as “test data generation condition”) corresponding to the test item of interest (S130). Specifically, when the target test item is one of the test items 1 to 4 extracted based on the input constraint, in addition to the input constraint of the target test item, all other input constraint expressions are also acquired. Test data generation conditions are generated. Therefore, for the test items 1 to 4, test data generation conditions including the respective expressions of constraint (1) to constraint (4) are generated. On the other hand, when the test item of interest is the test item 5 or 6 extracted based on the domain definition, in addition to the domain definition of interest in the test item, all input constraint expressions are also acquired, and test data is generated. A condition is generated. Therefore, for example, for the test item 5, test data generation conditions as shown in FIG. 8 are generated.

図8は、一つのテスト項目に関するテストデータ生成条件の一例を示す図である。図8に示されるようにテスト項目5に関しては、式(1)〜式(5)の5つのテストデータ生成条件が生成される。式(1)〜式(4)は、制約(1)〜制約(4)に関するテストデータ生成条件であり、式(5)は、ドメイン1に関するテストデータ生成条件である。   FIG. 8 is a diagram illustrating an example of test data generation conditions for one test item. As shown in FIG. 8, for the test item 5, five test data generation conditions of Formula (1) to Formula (5) are generated. Expressions (1) to (4) are test data generation conditions for constraints (1) to (4), and Expression (5) is a test data generation condition for domain 1.

なお、テスト項目6に関しては、式(5)の代わりにドメイン2に関する式(6)を含むテストデータ生成条件が生成される。ドメイン定義に基づくテスト項目に関して全ての入力制約のそれぞれに関するテストデータ生成条件が生成されるのは、全ての入力制約が満たされていないと、ドメイン定義に関するテストを正しく実行することができないからである。   For the test item 6, a test data generation condition including Expression (6) regarding the domain 2 is generated instead of Expression (5). The test data generation condition for each of the input constraints for the test items based on the domain definition is generated because the test for the domain definition cannot be executed correctly unless all the input constraints are satisfied. .

続いて、変数分類部15は、各テストデータ生成条件を解析し、各テストデータ生成条件に関する入力変数を、依存関係の有無に基づいて変数集合に分類し、各テストデータ生成条件を各変数集合に振り分ける(S140)。   Subsequently, the variable classifying unit 15 analyzes each test data generation condition, classifies the input variable related to each test data generation condition into a variable set based on the presence or absence of dependency, and sets each test data generation condition to each variable set. (S140).

図9は、テストデータ生成条件が各変数集合に振り分けられた例を示す図である。図9には、図8に示したテストデータ生成条件が、変数集合1〜3の3つの変数集合に振り分けられた例が示されている。   FIG. 9 is a diagram illustrating an example in which the test data generation conditions are distributed to each variable set. FIG. 9 shows an example in which the test data generation conditions shown in FIG. 8 are distributed to three variable sets 1 to 3.

変数集合1は、夫年齢及び妻年齢を含む変数集合である。すなわち、夫年齢と妻年齢とは相互に依存関係を有するため、同じ変数集合に含まれる。変数集合2は、プラン名を含む変数集合である。変数集合3は、備考を含む変数集合である。プラン名及び備考のそれぞれは、他の入力変数と依存関係を有さないため、それぞれ単独で変数集合を形成する。   The variable set 1 is a variable set including husband age and wife age. That is, since husband age and wife age have a dependency relationship with each other, they are included in the same variable set. The variable set 2 is a variable set including a plan name. The variable set 3 is a variable set including remarks. Since each of the plan name and remarks has no dependency relationship with other input variables, a variable set is formed independently.

各変数集合には、当該変数集合に含まれる入力変数に関する式を含むテストデータ生成条件が振り分けられる。したがって、変数集合1には式(1)、式(2)、及び式(5)が振り分けられ、変数集合3には式(3)及び式(4)が振り分けられている。なお、プラン名に関する式は無いため、変数集合2に振り分けられるテストデータ生成条件は無い。   Each variable set is assigned a test data generation condition including an expression relating to an input variable included in the variable set. Therefore, Expression (1), Expression (2), and Expression (5) are assigned to the variable set 1, and Expression (3) and Expression (4) are assigned to the variable set 3. Since there is no formula related to the plan name, there is no test data generation condition assigned to the variable set 2.

続くステップS150〜S170は、変数集合ごとに実行される。以下、処理対象とされている変数集合を、「着目変数集合」という。   Subsequent steps S150 to S170 are executed for each variable set. Hereinafter, the variable set to be processed is referred to as a “target variable set”.

ステップS150において、値候補生成部16は、着目変数集合に2以上の入力変数が含まれているか否かを判定する。例えば、着目変数集合が変数集合1であれば、2以上の入力変数が含まれていると判定される。着目変数集合が変数集合2又は3であれば、2以上の入力変数は含まれていないと判定される。   In step S150, the value candidate generator 16 determines whether or not two or more input variables are included in the target variable set. For example, if the target variable set is the variable set 1, it is determined that two or more input variables are included. If the target variable set is the variable set 2 or 3, it is determined that two or more input variables are not included.

着目変数集合に2以上の変数集合が含まれていない場合(S150でNO)、値候補生成部16は、着目変数集合に含まれる1つの入力変数に関する値候補を、例えば、特許文献1又は特許文献2に記載された手法を用いて生成する(S160)。値候補生成部16は、生成された値候補を、当該値候補の特徴を示す情報に関連付けて、値候補記憶部111に記憶する。   When two or more variable sets are not included in the target variable set (NO in S150), the value candidate generating unit 16 selects a value candidate related to one input variable included in the target variable set, for example, Patent Document 1 or Patent It produces | generates using the method described in the literature 2 (S160). The value candidate generation unit 16 stores the generated value candidate in the value candidate storage unit 111 in association with information indicating the feature of the value candidate.

一方、着目変数集合に2以上の変数集合が含まれている場合(S150でYES)、値候補生成部16は、着目変数集合に含まれる入力変数に関する値候補を、ドメインテスト技法を用いて生成する(S170)。値候補生成部16は、生成された値候補を、当該値候補の特徴を示す情報に関連付けて、値候補記憶部111に記憶する。なお、ステップS170の詳細については後述される。   On the other hand, if the target variable set includes two or more variable sets (YES in S150), the value candidate generating unit 16 generates a value candidate for the input variable included in the target variable set using the domain test technique. (S170). The value candidate generation unit 16 stores the generated value candidate in the value candidate storage unit 111 in association with information indicating the feature of the value candidate. Details of step S170 will be described later.

なお、ステップS160及びステップS170において、値候補生成部16は、正常値の値候補として、入力変数のデータ型に依存した単純値を取得する。単純値とは、データ型ごとに予め設定された、視認性の高い単純な値(固定値)である。例えば、整数型であれば、0が単純値の一例として挙げられる。但し、視認性の高さに関する評価は、人によって異なる可能性も有る。したがって、単純値は、所定の値に限定されず、任意に設定されてよい。なお、単純値は、例えば、データ型ごとに、補助記憶装置102、又はテストデータ生成装置10にネットワークを介して接続可能な記憶装置等に記憶されている。1つのデータ型に、複数の単純値が設定されていてもよい。   In step S160 and step S170, the value candidate generation unit 16 acquires a simple value depending on the data type of the input variable as a normal value value candidate. The simple value is a simple value (fixed value) that is preset for each data type and has high visibility. For example, in the case of an integer type, 0 is an example of a simple value. However, the evaluation regarding the high visibility may be different depending on the person. Therefore, the simple value is not limited to a predetermined value, and may be set arbitrarily. The simple value is stored in, for example, the auxiliary storage device 102 or a storage device that can be connected to the test data generation device 10 via a network for each data type. A plurality of simple values may be set for one data type.

変数集合1〜3に関して、ステップS150〜S170が実行されると、値候補記憶部111には、図10に示されるような値候補が記憶される。   When steps S150 to S170 are executed for the variable sets 1 to 3, the value candidate storage unit 111 stores the value candidates as shown in FIG.

図10は、変数集合ごとの値候補の生成例を示す図である図10には、変数集合1に含まれる夫年齢及び妻年齢の組に関して、inポイント、outポイント、onポイント、並びに2つの正常値のoffポイント及び2つの異常値のoffポイント、並びに単純値の8通りの値候補が生成され、変数集合2に含まれるプラン名に関して、2つの正常値及び1つの異常値を含む3通りの値候補が生成され、変数集合3に含まれる備考に関して5つの正常値(単純値を含む)及び4つの異常値を含む9通りの値候補が生成された例が示されている。   FIG. 10 is a diagram illustrating an example of generation of value candidates for each variable set. FIG. 10 shows in point, out point, on point, and two points for the husband age and wife age group included in the variable set 1. Normal value off points and two abnormal value off points, and eight kinds of simple value candidates are generated, and three kinds of plan names included in the variable set 2 include two normal values and one abnormal value. An example is shown in which nine value candidates including five normal values (including simple values) and four abnormal values are generated for the remarks included in the variable set 3.

本実施の形態において、変数集合2及び変数集合3については、ステップS160において正常値及び異常値が値候補として生成されるため、これらの入力変数の値候補の特徴には、「正常値」又は「異常値」が含まれている。また、変数集合1については、ステップS170において、正常値及び異常値が値候補として生成されるため、これらの入力変数の値候補の特徴には「正常値」又は「異常値」が含まれている。   In the present embodiment, for the variable set 2 and the variable set 3, normal values and abnormal values are generated as value candidates in step S160. "Abnormal value" is included. For variable set 1, normal values and abnormal values are generated as value candidates in step S <b> 170, and therefore, the characteristics of these input variable value candidates include “normal value” or “abnormal value”. Yes.

また、変数集合1の値候補については、(inポイント)、(outポイント)、(onポイント)、(offポイント)が特徴に含まれている。「onポイント」は、当該値候補が、onポイントであることを示す。onポイントとは、入力制約又はドメイン定義に基づいて求まる同値クラスの境界上の値である。「outポイント」は、当該値候補が、outポイントであることを示す。outポイントとは、同値クラス外の値である。「inポイント」は、当該値候補が、inポイントであることを示す。inポイントは、同値クラス内の値である。「offポイント」は、当該値候補が、offポイントであることを示す。offポイントとは、onポイントがのる境界を、変数ごとにプラス側およびマイナス側にずらして得られる境界近傍の値である。但し、式(5)のように、onポイントが一つである場合、onポイントからプラス側及びマイナス側のそれぞれに1ずれた値がoffポイントとなる。   Further, regarding the value candidates of the variable set 1, (in point), (out point), (on point), and (off point) are included in the feature. “On point” indicates that the value candidate is an on point. The “on point” is a value on the boundary of the equivalence class obtained based on the input constraint or the domain definition. “Out point” indicates that the value candidate is an out point. The out point is a value outside the equivalence class. “In point” indicates that the value candidate is an in point. The in point is a value in the equivalence class. The “off point” indicates that the value candidate is an off point. The off point is a value in the vicinity of the boundary obtained by shifting the boundary where the on point is placed to the plus side and the minus side for each variable. However, when there is only one on point as shown in Expression (5), a value shifted by 1 from the on point to each of the plus side and the minus side becomes the off point.

また、変数集合1のinポイント若しくはoutポイントの値候補及び変数集合3の値候補については、(境界値分析)又は(同値分割)が特徴に含まれている。「境界値分析」は、境界値分析に基づく値候補であることを示す。「同値分割」は、同値分割に基づく値候補であることを示す。   In addition, the value candidate of the in point or the out point of the variable set 1 and the value candidate of the variable set 3 include (boundary value analysis) or (equivalent division) as features. “Boundary value analysis” indicates a value candidate based on boundary value analysis. “Equivalent division” indicates a value candidate based on the equivalent division.

また、変数集合1及び変数集合3のそれぞれには、(単純値)を特徴に含む正常値の値候補が含まれている。「単純値」は、単純値であることを示す。なお、厳密には、単純値は、必ずしも正常値になるとは限らない。単純値は、入力制約やドメイン定義等とは無関係に、データ型に依存して予め設定される値だからである。したがって、例えば、変数集合1の単純値の値候補である(0,0)は、夫年齢及び妻年齢に対する入力制約を満たしていないが、便宜的に正常値の値候補として生成される。   Further, each of the variable set 1 and the variable set 3 includes a normal value candidate including (simple value) as a feature. “Simple value” indicates a simple value. Strictly speaking, a simple value is not necessarily a normal value. This is because the simple value is a value that is set in advance depending on the data type, regardless of input constraints, domain definitions, and the like. Therefore, for example, (0, 0), which is a simple value candidate of the variable set 1, does not satisfy the input constraints on the husband age and wife age, but is generated as a normal value candidate for convenience.

また、プラン名が属する変数集合2には、単純値の値候補が含まれていない。これは、プラン名のデータ型が列挙型であるからである。すなわち、列挙型については、特定の入力変数に依存しない単純値を設定するのは困難である。そこで、本実施の形態では、列挙型については、単純値が設定されておらず、したがって、変数集合2には、単純値の値候補は含まれていない。   The variable set 2 to which the plan name belongs does not include a simple value candidate. This is because the data type of the plan name is an enumeration type. That is, it is difficult to set a simple value that does not depend on a specific input variable for the enumeration type. Therefore, in the present embodiment, no simple value is set for the enumeration type, and therefore the variable set 2 does not include a simple value candidate.

続いて、組み合わせ生成部17は、着目テスト項目に関して生成された値候補を組み合わせてテストケースを生成する(S180)。具体的には、組み合わせ生成部17は、着目テスト項目に関する変数集合のうち、テスト項目の着目設計要素の式が属している変数集合の異常値の値候補ごとに、その他の各変数集合から1つの単純値の値候補を選択して、テストデータを生成する。但し、単純値が値候補に含まれない変数集合からは、単純値でも境界値でもない1つの正常値が選択される。例えば、着目テスト項目がテスト項目5であれば、その着目設計要素がドメイン1であり、ドメイン1の式(5)は変数集合1の条件であるため、図10における、変数集合1の3通りの異常値の値候補ごとに、変数集合2及び変数集合3のそれぞれから1つの正常値又は単純値の値候補が選択されて、値候補の組み合わせがテストデータとして生成される。したがって、この場合、3通りの組み合わせが生成される。   Subsequently, the combination generation unit 17 generates a test case by combining the value candidates generated for the target test item (S180). Specifically, the combination generation unit 17 calculates 1 from each of the other variable sets for each abnormal value candidate of the variable set to which the expression of the target design element of the test item belongs among the variable sets related to the target test item. Selects simple value candidates and generates test data. However, one normal value that is neither a simple value nor a boundary value is selected from a variable set whose simple value is not included in the value candidates. For example, if the target test item is test item 5, the target design element is domain 1, and the expression (5) of domain 1 is the condition of variable set 1, and therefore, three types of variable set 1 in FIG. For each of the abnormal value candidate, one normal value or simple value candidate is selected from each of the variable set 2 and the variable set 3, and a combination of value candidates is generated as test data. Therefore, in this case, three combinations are generated.

テストケースの生成の結果、全ての入力変数に対して具体値が割り当てられる。組み合わせ生成部17は、生成された組み合わせごとにテストケースを生成する。   As a result of test case generation, specific values are assigned to all input variables. The combination generation unit 17 generates a test case for each generated combination.

ステップS130〜ステップS180が全てのテスト項目について実行され、更に、ステップS120〜ステップS180が全てのテスト対象(ビジネスロジック)について実行されると、組み合わせ生成部17は、ステップS180において生成されたテストケースに基づいてテストモデルを生成し、生成されたテストモデルの内容をテストケース表として、ユーザ端末20に送信する(S190)。   When steps S130 to S180 are executed for all test items, and further, when steps S120 to S180 are executed for all test objects (business logic), the combination generation unit 17 generates the test case generated in step S180. A test model is generated based on the above and the contents of the generated test model are transmitted to the user terminal 20 as a test case table (S190).

図11は、テストモデルの一例を示す図である。図11に示されるように、テストモデルは、テスト対象ごとに、テスト項目を含む。また、テスト項目ごとに、1以上のテストケースが含まれる。1つのテスト項目に対応するテストケースは、ステップS180において生成される。   FIG. 11 is a diagram illustrating an example of a test model. As shown in FIG. 11, the test model includes a test item for each test target. Each test item includes one or more test cases. A test case corresponding to one test item is generated in step S180.

1つのテストケースは、テストケースID、入力変数ごとの具体値、期待結果、及びテストケース特徴を含む。テストケースIDは、テストケースごとの識別情報である。入力変数ごとの具体値は、ステップS180において生成される値候補の組み合わせである。1つのテスト項目に対して複数のテストケースが生成されるのは、当該組み合わせが複数有るためである。期待結果は、テストによって期待される結果である。期待結果の内容は、設計モデルの入力制約又はドメイン定義に基づいて生成される。すなわち、入力制約に基づくテスト項目に関するテストケースの期待結果は、当該入力制約の「結果」に基づいて生成される。ドメイン定義に基づくテスト項目に関するテストケースの期待結果は、当該ドメイン定義の「結果」に基づいて生成される。テストケース特徴は、テストケースの特徴である。テストケース特徴の内容は、当該テストケースにおいて選択された値候補に関して値候補記憶部111に記憶されている特徴に基づいて生成される。   One test case includes a test case ID, a specific value for each input variable, an expected result, and a test case feature. The test case ID is identification information for each test case. The specific value for each input variable is a combination of value candidates generated in step S180. A plurality of test cases are generated for one test item because there are a plurality of such combinations. The expected result is the result expected by the test. The content of the expected result is generated based on the input constraint or domain definition of the design model. That is, the expected result of the test case related to the test item based on the input constraint is generated based on the “result” of the input constraint. The expected result of the test case regarding the test item based on the domain definition is generated based on the “result” of the domain definition. A test case feature is a feature of a test case. The content of the test case feature is generated based on the feature stored in the value candidate storage unit 111 for the value candidate selected in the test case.

テストモデルの内容を示すテストケース表は、例えば、特許文献2に記載された手法を用いて生成されてもよい。   The test case table indicating the contents of the test model may be generated using, for example, the technique described in Patent Document 2.

なお、上記において説明したテストモデルの構造を厳密に定義すると、例えば、図12に示されるようになる。   If the structure of the test model described above is strictly defined, for example, as shown in FIG.

図12は、テストモデルのデータ構造の定義の一例を示す図である。図12では、テストモデルのデータ構造がBNFによって定義されている。   FIG. 12 is a diagram illustrating an example of the definition of the data structure of the test model. In FIG. 12, the data structure of the test model is defined by BNF.

続いて、ステップS140の詳細について説明する。図13は、入力変数の分類処理の処理手順の一例を説明するためのフローチャートである。   Next, details of step S140 will be described. FIG. 13 is a flowchart for explaining an example of a processing procedure of input variable classification processing.

ステップS200において、変数分類部15は、ステップS130において条件抽出部14によって抽出されたテストデータ生成条件を条件抽出部14から取得する。続くステップS210〜S260は、テストデータ生成条件ごとに実行される。以下、処理対象とされているテストデータ生成条件を、「着目条件」という。   In step S200, the variable classification unit 15 acquires the test data generation conditions extracted by the condition extraction unit 14 in step S130 from the condition extraction unit 14. The subsequent steps S210 to S260 are executed for each test data generation condition. Hereinafter, the test data generation condition that is the processing target is referred to as a “target condition”.

ステップS210において、変数分類部15は、着目条件が扱う入力変数x1〜xn(nは、着目条件が扱う入力変数の個数)を特定する。続いて、変数分類部15は、x1〜xnの全てを含む変数集合Aが生成済みであるか否かを判定する(S220)。変数集合Aが生成済みでない場合(S220でNO)、変数分類部15は、変数集合Aを生成し、着目条件を、変数集合Aに振り分ける(S230)。続いて、変数分類部15は、変数集合Aの部分集合となる変数集合Bが生成済みであるか否かを判定する(S240)。変数集合Bが生成されている場合(S240でYES)、変数分類部15は、変数集合Bに振り分けられているテストデータ生成条件を、変数集合Aに振り分け、変数集合Bを削除する(S250)。   In step S210, the variable classification unit 15 identifies input variables x1 to xn handled by the target condition (n is the number of input variables handled by the target condition). Subsequently, the variable classification unit 15 determines whether or not the variable set A including all of x1 to xn has been generated (S220). When the variable set A has not been generated (NO in S220), the variable classification unit 15 generates the variable set A and distributes the target condition to the variable set A (S230). Subsequently, the variable classification unit 15 determines whether or not a variable set B that is a subset of the variable set A has been generated (S240). When the variable set B is generated (YES in S240), the variable classification unit 15 distributes the test data generation conditions distributed to the variable set B to the variable set A, and deletes the variable set B (S250). .

一方、x1〜xnの全てを含む変数集合Aが生成済みである場合(S220でYES)、変数分類部15は、着目条件を変数集合Aに振り分ける(S260)。   On the other hand, when the variable set A including all of x1 to xn has been generated (YES in S220), the variable classification unit 15 distributes the target condition to the variable set A (S260).

全てのテストデータ生成条件に関してステップS210〜S260が実行されると、変数分類部15は、設計モデルに含まれる入力変数の中で、既に生成されたいずれの変数集合にも含まれていない入力変数の有無を判定する(S270)。該当する入力変数が1以上有る場合(S270でYES)、変数分類部15は、該当する入力変数ごとに、変数集合を生成する(S280)。例えば、本実施の形態において、プラン名は、いずれのテストデータ生成条件にも含まれない。したがって、プラン名が属する変数集合は、ステップS230では生成されず、ステップS280において生成される。   When steps S210 to S260 are executed for all test data generation conditions, the variable classification unit 15 selects input variables that are not included in any of the already generated variable sets from among the input variables included in the design model. Whether or not there is is determined (S270). When there is one or more corresponding input variables (YES in S270), the variable classification unit 15 generates a variable set for each corresponding input variable (S280). For example, in the present embodiment, the plan name is not included in any test data generation condition. Therefore, the variable set to which the plan name belongs is not generated in step S230, but is generated in step S280.

図8に示したテストデータ生成条件を、図13の処理手順に当てはめて説明する。まず、式(1)が着目条件とされる。式(1)が扱う入力変数は、夫年齢であることが特定される(S210)。夫年齢を含む変数集合は生成されていないため(S220でNO)、夫年齢を含む変数集合が生成され、当該変数集合に式(1)が振り分けられる(S230)。当該変数集合の部分集合となる変数集合は生成されていない。したがって、式(2)が着目条件とされる。式(2)〜式(4)についても、同様の手順で、それぞれの変数集合が生成される。   The test data generation conditions shown in FIG. 8 will be described with reference to the processing procedure of FIG. First, the expression (1) is set as the target condition. The input variable handled by Equation (1) is specified to be the husband's age (S210). Since a variable set including the husband's age has not been generated (NO in S220), a variable set including the husband's age is generated, and Expression (1) is assigned to the variable set (S230). A variable set that is a subset of the variable set is not generated. Therefore, the expression (2) is set as the target condition. Also for Expressions (2) to (4), each variable set is generated in the same procedure.

式(5)が着目条件とされた場合、式(5)が扱う入力変数は、夫年齢及び妻年齢であることが特定される(S210)。夫年齢及び妻年齢の双方を含む変数集合は生成されていないため(S220でNO)、夫年齢及び妻年齢の双方を含む変数集合(以下、「変数集合(5)」という。)が生成され、変数集合5に式(5)が振り分けられる(S230)。変数集合(5)の部分集合となる変数集合としては、式(1)に関して生成された変数集合(以下、「変数集合(1)」という。)と式(2)に関して生成された変数集合(以下、「変数集合(2)」という。)とが有る(S240でYES)。そこで、式(1)と式(2)とが、変数集合(5)に統合され、変数集合(1)及び変数集合(2)は削除される(S250)。その結果、図9に示したような変数集合が生成される。   When Expression (5) is set as the target condition, it is specified that the input variables handled by Expression (5) are husband age and wife age (S210). Since a variable set including both husband age and wife age has not been generated (NO in S220), a variable set including both husband age and wife age (hereinafter referred to as “variable set (5)”) is generated. The expression (5) is distributed to the variable set 5 (S230). As a variable set that is a subset of the variable set (5), a variable set generated with respect to the expression (1) (hereinafter referred to as “variable set (1)”) and a variable set generated with respect to the expression (2) ( (Hereinafter referred to as “variable set (2)”) (YES in S240). Therefore, the expressions (1) and (2) are integrated into the variable set (5), and the variable sets (1) and (2) are deleted (S250). As a result, a variable set as shown in FIG. 9 is generated.

続いて、図4のステップS170の詳細について説明する。図14は、ドメインテスト技法を用いた値候補の生成処理の処理手順の一例を説明するためのフローチャートである。   Next, details of step S170 in FIG. 4 will be described. FIG. 14 is a flowchart for explaining an example of a processing procedure of value candidate generation processing using the domain test technique.

ステップS300において、値候補生成部16は、1以上のテストデータ生成条件を読み込む。ここで読み込まれるテストデータ生成条件(以下、「着目条件」という。)は、図4のステップS170の時点の着目変数集合に振り分けられたテストデータ生成条件である。続いて、値候補生成部16は、着目条件が属する着目変数集合に含まれている入力変数のデータ型に基づいて処理を分岐させる(S310)。   In step S300, the value candidate generator 16 reads one or more test data generation conditions. The test data generation conditions read here (hereinafter referred to as “target conditions”) are test data generation conditions distributed to the target variable set at the time of step S170 in FIG. Subsequently, the value candidate generation unit 16 branches the process based on the data type of the input variable included in the target variable set to which the target condition belongs (S310).

着目変数集合に含まれている各入力変数の全てが整数型である場合、値候補生成部16は、着目条件に関するinポイント、outポイント、onポイント、及びoffポイントを当該各入力変数の値候補として求める(S320)。   When all the input variables included in the target variable set are integer types, the value candidate generation unit 16 sets the in point, the out point, the on point, and the off point related to the target condition as value candidates for the input variable. (S320).

なお、本実施の形態において、テスト項目5が着目テスト項目であり、図9の変数集合1(夫年齢、妻年齢)が着目変数集合である場合に、ステップS320が実行される。   In the present embodiment, when the test item 5 is the target test item and the variable set 1 (husband age, wife age) in FIG. 9 is the target variable set, step S320 is executed.

一方、着目変数集合に含まれている各入力変数の全てが文字列型である場合、値候補生成部16は、着目条件の中で当該入力変数の文字列長に関するテストデータ生成条件を抽出する(S330)。続いて、値候補生成部16は、抽出されたテストデータ生成条件に基づいて、inポイント、outポイント、onポイント、及びoffポイントを求める(S340)。続いて、値候補生成部16は、inポイント、outポイント、onポイント、及びoffポイントごとに、文字列長以外の着目条件も満たすような文字列を値候補として生成する(S350)。なお、例えば、「string1の長さ>=string2の長さ」といったような入力制約を有する入力変数(ここでは、string1及びstring2)が有る場合に、ステップS350が実行される。なお、着目条件の中に、文字列長に関するテストデータ生成条件が無い場合、ステップS340は実行されなくてよい。   On the other hand, when all of the input variables included in the target variable set are character string types, the value candidate generating unit 16 extracts test data generation conditions related to the character string length of the input variables in the target conditions. (S330). Subsequently, the value candidate generator 16 obtains an in point, an out point, an on point, and an off point based on the extracted test data generation conditions (S340). Subsequently, the value candidate generating unit 16 generates a character string that satisfies a target condition other than the character string length as a value candidate for each of the in point, the out point, the on point, and the off point (S350). For example, if there is an input variable (here, string1 and string2) having an input constraint such as “length of string1> = length of string2”, step S350 is executed. Note that if there is no test data generation condition related to the character string length in the condition of interest, step S340 need not be executed.

また、着目変数集合に含まれている各入力変数の全てが実数型、列挙型、日付型、又は時刻型等、整数型及び文字列型のいずれでもない場合、値候補生成部16は、着目条件の境界値を、整数型に変換する(S360)。例えば、実数型であれば当該境界値に10(nは、当該境界値の小数点以下の桁数)を乗ずることにより整数型に変換することができる。また、列挙型であれば、列挙される値を列挙の順序関係を保持したまま、整数に置換してもよい。例えば、列挙される値が{社長、部長、課長、係長、社員}であれば、これらは、{5、4、3、2、1}に置換されてもよい。その上で、着目条件の境界値が、置換後の整数に置き換えられればよい。また、日付型や時刻型については、UNIX(登録商標)時刻等のシステム時刻に変換してもよい。例えば、日本標準時の「2001−09−09 10:46:40」という値は、「1000000000」というUNIX(登録商標)時刻に変換されてもよい。 When all the input variables included in the target variable set are not of any integer type or character string type, such as a real number type, an enumeration type, a date type, or a time type, the value candidate generating unit 16 The boundary value of the condition is converted into an integer type (S360). For example, if it is a real number type, it can be converted to an integer type by multiplying the boundary value by 10 n (n is the number of digits after the decimal point of the boundary value). In the case of an enumeration type, the enumerated values may be replaced with integers while maintaining the enumeration order relationship. For example, if the listed values are {president, department manager, section manager, section manager, employee}, these may be replaced with {5, 4, 3, 2, 1}. In addition, the boundary value of the target condition may be replaced with the replaced integer. Further, the date type and the time type may be converted into system time such as UNIX (registered trademark) time. For example, a value of “2001-09-09 10:46:40” in Japanese standard time may be converted to a UNIX (registered trademark) time of “1000000000”.

続いて、値候補生成部16は、境界値が整数型に変換された着目条件に基づいて、inポイント、outポイント、onポイント、及びoffポイントを求める(S370)。続いて、値候補生成部16は、求められたinポイント、outポイント、onポイント、及びoffポイントを、ステップS360とは逆の変換を行うことにより、元のデータ型に復元する。復元後の値が、値候補である。   Subsequently, the value candidate generation unit 16 obtains an in point, an out point, an on point, and an off point based on the focus condition in which the boundary value is converted into the integer type (S370). Subsequently, the value candidate generation unit 16 restores the obtained in point, out point, on point, and off point to the original data type by performing a reverse conversion to step S360. The restored value is a value candidate.

ステップS320、S350、又はS380に続いて、値候補生成部16は、生成された値候補を、値候補記憶部111に記憶する(S390)。この際、値候補生成部16は、着目変数集合に含まれている各入力変数のそれぞれのデータ型に依存した単純値を取得し、取得された単純値についても、着目変数集合の値候補として、値候補記憶部111に記憶する。当該値候補には、特徴として「正常値(単純値)」が付与される。   Subsequent to step S320, S350, or S380, the value candidate generation unit 16 stores the generated value candidate in the value candidate storage unit 111 (S390). At this time, the value candidate generation unit 16 acquires a simple value depending on the data type of each input variable included in the target variable set, and the acquired simple value is also a value candidate of the target variable set. And stored in the value candidate storage unit 111. The value candidate is given “normal value (simple value)” as a feature.

なお、着目変数集合に属する各入力変数のデータ型が相互に異なる場合は、ステップS310の前において、ステップS360において説明したように、全ての着目条件の境界値が整数型に変換されてもよい。この場合、ステップS320の実行後に、各値候補に関して、ステップS380と同様の逆変換が行われればよい。   When the data types of the input variables belonging to the target variable set are different from each other, all the boundary values of the target condition may be converted to the integer type as described in step S360 before step S310. . In this case, after the execution of step S320, the inverse transformation similar to that in step S380 may be performed for each value candidate.

続いて、ステップS320、ステップS340、及びステップS370の詳細について説明する。   Next, details of step S320, step S340, and step S370 will be described.

図15は、値候補の生成処理の処理手順の一例を説明するためのフローチャートである。   FIG. 15 is a flowchart for explaining an example of a processing procedure of value candidate generation processing.

ステップS510において、値候補生成部16は、着目条件のinポイントを求めて値候補とし、当該値候補に、特徴として「正常値(同値分割)」を付与する。続いて、値候補生成部16は、着目条件のoutポイントを求めて値候補とし、当該値候補に、特徴として「異常値(同値分割)」を付与する(S520)。続いて、値候補生成部16は、着目条件のonポイントを求めて値候補とし、当該値候補に、特徴として「正常値(境界値分析)」又は「異常値(境界値分析)」を付与する(S530)。続いて、値候補生成部16は、着目条件のoffポイントを求めて値候補とし、当該値候補に、特徴として「異常値(境界値分析)」又は「正常値(境界値分析)」を付与する(S540)。   In step S510, the value candidate generation unit 16 obtains an in point of the target condition and sets it as a value candidate. Subsequently, the value candidate generating unit 16 obtains an out point of the target condition and sets it as a value candidate, and gives “abnormal value (same value division)” as a feature to the value candidate (S520). Subsequently, the value candidate generation unit 16 obtains an on point of the target condition and sets it as a value candidate, and gives “normal value (boundary value analysis)” or “abnormal value (boundary value analysis)” as a feature to the value candidate. (S530). Subsequently, the value candidate generation unit 16 obtains an off point of the target condition and sets it as a value candidate, and assigns “abnormal value (boundary value analysis)” or “normal value (boundary value analysis)” as a feature to the value candidate. (S540).

ステップS530及びステップS540に関して、付与される特徴が「正常値」又は「異常値」のいずれか一方に固定されないのは、onポイント及びoffポイントについては、着目条件によって、正常値又は異常値のいずれかに変化するからである。したがって、onポイント又はoffポイントが、全ての着目条件を満たす場合、当該onポイント又は当該offポイントは正常値とされ、onポイント又はoffポイントが、いずれかの着目条件を満たさない場合、当該onポイント又は当該offポイントは異常値とされればよい。   Regarding step S530 and step S540, the added feature is not fixed to either “normal value” or “abnormal value”. For the on point and the off point, either the normal value or the abnormal value is determined depending on the condition of interest. Because it changes. Therefore, when the on point or the off point satisfies all the target conditions, the on point or the off point is set to a normal value, and when the on point or the off point does not satisfy any of the target conditions, the on point Alternatively, the off point may be an abnormal value.

なお、ステップS530及びステップS540では、公知の方法を用いてonポイント又はoffポイントが求められてもよい。例えば、特許文献3に記載された方法が用いられてもよい。特許文献3に記載された方法によれば、onポイントが正常値であるか若しくは異常値であるか、offポイントが正常値であるか若しくは異常値であるかについても得ることができる。   In step S530 and step S540, an on point or an off point may be obtained using a known method. For example, the method described in Patent Document 3 may be used. According to the method described in Patent Literature 3, it is possible to obtain whether the on point is a normal value or an abnormal value, and whether the off point is a normal value or an abnormal value.

続いて、ステップS510の詳細について説明する。図16は、inポイントの値候補の生成処理の処理手順の一例を説明するためのフローチャートである。   Next, details of step S510 will be described. FIG. 16 is a flowchart for explaining an example of the processing procedure of in point value candidate generation processing.

ステップS600において、値候補生成部16は、1以上のテストデータ生成条件を読み込む(S600)。ここで読み込まれるテストデータ生成条件は、図15のステップS510の時点における着目条件である。   In step S600, the value candidate generator 16 reads one or more test data generation conditions (S600). The test data generation conditions read here are the focus conditions at the time of step S510 in FIG.

続いて、値候補生成部16は、inポイントを求めるための制約式を生成する(S610)。具体的には、着目条件を構成する式E1〜Em(mは、着目条件の個数)が取得され、「E1 and E2 and … and Em」というような、正常値(ドメイン内に収まる値)を得るための制約式が生成される。例えば、着目変数集合が、図9の変数集合1である場合、「夫年齢>=18 and 妻年齢>=16 and |夫年齢−妻年齢|<=20」という制約式が生成される。   Subsequently, the value candidate generation unit 16 generates a constraint equation for obtaining the in point (S610). Specifically, expressions E1 to Em (m is the number of target conditions) constituting the target condition are acquired, and normal values (values that fall within the domain) such as “E1 and E2 and. A constraint equation is generated for obtaining. For example, if the target variable set is the variable set 1 in FIG. 9, a constraint expression “husband age> = 18 and wife age> = 16 and | husband age-wife age | <= 20” is generated.

続いて、値候補生成部16は、公知の制約ソルバを用いて制約式の解を得て、任意の1つの解を、inポイントの値候補として生成する(S620)。なお、着目変数集合に複数の入力変数が属する場合、複数の入力変数に関してinポイントの値候補が生成される。   Subsequently, the value candidate generation unit 16 obtains a solution of the constraint equation using a known constraint solver, and generates any one solution as an in-point value candidate (S620). When a plurality of input variables belong to the target variable set, in-point value candidates are generated for the plurality of input variables.

続いて、ステップS520の詳細について説明する。図17は、outポイントの値候補の生成処理の処理手順の一例を説明するためのフローチャートである。   Next, details of step S520 will be described. FIG. 17 is a flowchart for explaining an example of a processing procedure of out point value candidate generation processing.

ステップS700において、値候補生成部16は、1以上のテストデータ生成条件を読み込む(S700)。ここで読み込まれるテストデータ生成条件は、図15のステップS520の時点における着目条件である。   In step S700, the value candidate generator 16 reads one or more test data generation conditions (S700). The test data generation conditions read here are the conditions of interest at the time of step S520 in FIG.

続いて、値候補生成部16は、outポイントを求めるための制約式を生成する(S710)。具体的には、着目条件を構成する式E1〜Em(mは、着目条件の個数)が取得され、「Not(E1 and E2 and … and Em)」というような、異常値(ドメイン外となる値)を得るための制約式が生成される。例えば、着目変数集合が、図9の変数集合1である場合、「Not(夫年齢>=18 and 妻年齢>=16 and |夫年齢−妻年齢|<=20)」という制約式が生成される。   Subsequently, the value candidate generation unit 16 generates a constraint equation for obtaining the out point (S710). Specifically, the expressions E1 to Em (m is the number of the target conditions) constituting the target condition are acquired, and an abnormal value (outside the domain) such as “Not (E1 and E2 and ... and Em)” is obtained. Value) is generated. For example, when the target variable set is the variable set 1 of FIG. 9, a constraint expression “Not (husband age> = 18 and wife age> = 16 and | husband age−wife age | <= 20)” is generated. The

続いて、値候補生成部16は、公知の制約ソルバを用いて制約式の解を得て、任意の1つの解を、outポイントの値候補として生成する(S720)。なお、着目変数集合に複数の入力変数が属する場合、複数の入力変数に関してoutポイントの値候補が生成される。   Subsequently, the value candidate generation unit 16 obtains a solution of the constraint equation using a known constraint solver, and generates any one solution as a value candidate of the out point (S720). When a plurality of input variables belong to the target variable set, out point value candidates are generated for the plurality of input variables.

続いて、図4のステップS180の詳細について説明する。図18は、テストケースの生成処理の処理手順の一例を説明するためのフローチャートである。   Next, details of step S180 in FIG. 4 will be described. FIG. 18 is a flowchart for explaining an example of a processing procedure of test case generation processing.

ステップS400において、組み合わせ生成部17は、1以上のテストデータ生成条件を読み込む。ここで読み込まれるテストデータ生成条件は、図4のステップS180の時点の着目テスト項目に関する全てのテストデータ生成条件である。例えば、テスト項目5が着目テスト項目である場合、図8に示される式(1)〜式(5)が読み込まれる。   In step S400, the combination generation unit 17 reads one or more test data generation conditions. The test data generation conditions read here are all test data generation conditions related to the target test item at the time of step S180 in FIG. For example, when the test item 5 is the target test item, the equations (1) to (5) shown in FIG. 8 are read.

続いて、組み合わせ生成部17は、着目テスト項目に関する各変数集合に関して生成された全ての値候補を値候補記憶部111から取得する(S410)。続いて、組み合わせ生成部17は、ステップS400において読み込まれたテストデータ生成条件のうち、着目テスト項目において着目されているテストデータ生成条件を取得する(S420)。着目テスト項目において着目されているテストデータ生成条件とは、着目テスト項目の生成の元となったテストデータ生成条件をいう。例えば、テスト項目5において着目されているテストデータ生成条件は、式(5)である。以下、ステップS420において取得されたテストデータ生成条件を、「着目条件」という。   Subsequently, the combination generation unit 17 acquires all value candidates generated for each variable set related to the target test item from the value candidate storage unit 111 (S410). Subsequently, the combination generation unit 17 acquires the test data generation condition focused on the target test item among the test data generation conditions read in step S400 (S420). The test data generation condition focused on the target test item is a test data generation condition that is a source of generation of the target test item. For example, the test data generation condition focused on in the test item 5 is Expression (5). Hereinafter, the test data generation conditions acquired in step S420 are referred to as “target conditions”.

続いて、組み合わせ生成部17は、着目条件が扱う1以上の入力変数(以下、当該1以上の入力変数をまとめて「変数x」という。)が属する変数集合の値候補を、ステップS410において取得された値候補の中から取得する(S430)。例えば、着目条件が式(5)であれば、変数集合1の値候補(図10参照)が取得される。続いて、組み合わせ生成部17は、ステップS430において取得された値候補の中から、異常値である全ての値候補を選択する(S440)。異常値であるか否かは、値候補の特徴に「異常値」が含まれているか否かに基づいて特定可能である。   Subsequently, the combination generation unit 17 acquires value candidates of a variable set to which one or more input variables handled by the target condition (hereinafter, the one or more input variables are collectively referred to as “variable x”) in step S410. The obtained value candidates are acquired (S430). For example, if the target condition is Expression (5), a value candidate of the variable set 1 (see FIG. 10) is acquired. Subsequently, the combination generation unit 17 selects all value candidates that are abnormal values from the value candidates acquired in step S430 (S440). Whether or not it is an abnormal value can be specified based on whether or not an “abnormal value” is included in the feature of the value candidate.

続いて、組み合わせ生成部17は、変数x以外の残りの入力変数(以下、「変数y1〜ym」という。mは、変数x以外の入力変数の個数である。)のそれぞれが属する変数集合の値候補を、ステップS410において取得された値候補の中から取得する(S450)。続いて、組み合わせ生成部17は、ステップS450において取得された値候補の中から、変数y1〜ymのそれぞれごとに、一つの単純値の値候補を優先的に選択する(S460)。したがって、m個の値候補が取得される。但し、境界値である正常値は極力除かれる。変数xに関するテストデータを生成する際に、変数y1〜ymに関して境界値が選択された場合、バグ発生時にどの入力変数に起因したバグかの原因の切り分けが困難になってしまうからである。なお、境界値であることは、値候補の特徴に「境界値分析」が含まれていることに基づいて特定可能である。また、組み合わせ生成部17は、プラン名のように単純値が無い入力変数については、単純値ではない一つの正常値の値候補を選択する。また、組み合わせ生成部17は、設計モデル(図6)において、入力が必須とされていない入力変数の値候補は、空欄とする。   Subsequently, the combination generation unit 17 sets the variable set to which each of the remaining input variables other than the variable x (hereinafter referred to as “variables y1 to ym”. M is the number of input variables other than the variable x). A value candidate is acquired from the value candidates acquired in step S410 (S450). Subsequently, the combination generation unit 17 preferentially selects one simple value candidate for each of the variables y1 to ym from the value candidates acquired in step S450 (S460). Therefore, m value candidates are acquired. However, normal values that are boundary values are excluded as much as possible. This is because, when the test data related to the variable x is generated, if a boundary value is selected for the variables y1 to ym, it becomes difficult to isolate the cause of the bug caused by which input variable when the bug occurs. The boundary value can be specified based on the fact that “value analysis” is included in the feature of the value candidate. Further, the combination generation unit 17 selects one normal value candidate that is not a simple value for an input variable that does not have a simple value such as a plan name. In addition, the combination generation unit 17 sets blank input variable value candidates that are not required to be input in the design model (FIG. 6).

続いて、組み合わせ生成部17は、変数xに関してステップS440において選択された1以上の異常値の値候補と、変数y1〜ymに関して、ステップS460において一つずつ選択された単純値又は正常値の値候補との全ての組み合わせをテストケースとして生成する(S470)。この際、変数xが複数の場合、変数xごとに値候補の組み合わせが生成されるが、変数y1〜ymについては、各組み合わせに対して共通の値候補が選択される。   Subsequently, the combination generation unit 17 selects one or more abnormal value candidate values selected in step S440 for the variable x, and simple values or normal value values selected one by one in step S460 for the variables y1 to ym. All combinations with candidates are generated as test cases (S470). At this time, if there are a plurality of variables x, a combination of value candidates is generated for each variable x. For variables y1 to ym, a common value candidate is selected for each combination.

例えば、着目テスト項目がテスト項目5であり、着目条件が式(5)である場合、変数xは、夫年齢及び妻年齢である。また、変数y1〜ymは、プラン名及び備考である。したがって、夫年齢及び妻年齢に関しては、図10に示される8通りの値候補のうち、3通りの異常値の値候補が選択される。プラン名に関しては、図10に示される3通りの値候補のうち、任意の一つの正常値の値候補が、夫年齢及び妻年齢に関する3通りの異常値に対して共通に(固定的に)選択される。備考に関しては、必須ではないため空欄とされる。すなわち、備考についても、夫年齢及び妻年齢に関する3通りの異常値に対して共通の値となる。したがって、これらの入力変数の値候補の全ての組み合わせは、3通りとなる。斯かる3通りの組み合わせが、図11において、テスト項目5に対するテストケース5−1〜5−3として示されている。図11に示されるテストケース5−1〜5−3において、プラン名の値及び備考の値は、それぞれ共通である。なお、備考が必須である場合、備考については、一つの単純値の値候補が、テストケース5−1〜5−3に対して共通に選択される。また、備考が必須でない場合であっても、備考に関する一つの単純値の値候補が、テストケース5−1〜5−3に関して共通に選択されてもよい。   For example, when the focused test item is the test item 5 and the focused condition is Expression (5), the variable x is the husband age and the wife age. Variables y1 to ym are a plan name and remarks. Therefore, regarding the husband age and the wife age, among the eight value candidates shown in FIG. 10, three kinds of abnormal value candidates are selected. Regarding the plan name, among the three value candidates shown in FIG. 10, any one normal value value candidate is common (fixed) to the three abnormal values related to the husband age and wife age. Selected. Remarks are left blank because they are not essential. That is, the remarks are also common values for the three abnormal values related to the husband age and the wife age. Therefore, there are three combinations of these input variable value candidates. Such three combinations are shown as test cases 5-1 to 5-3 for the test item 5 in FIG. In test cases 5-1 to 5-3 shown in FIG. 11, the value of the plan name and the value of the remarks are common. If remarks are essential, one simple value candidate is selected for remarks for test cases 5-1 to 5-3. Even if the remarks are not essential, one simple value candidate regarding the remarks may be selected in common for the test cases 5-1 to 5-3.

また、例えば、着目テスト項目がテスト項目3であり、着目条件が式(3)である場合、変数xは、備考である。また、変数y1〜ymは、夫年齢、妻年齢、及びプラン名である。また、式(3)に関する備考の異常値の値候補としては、図10に示される4通りの異常値のうちの境界値分析に関する2通りの異常値が生成される。したがって、テスト項目3に関して、備考については、2通りの異常値の値候補が選択される。プラン名に関しては、任意の一つの正常値の値候補が選択される。夫年齢及び妻年齢については、一つの単純値が選択される。したがって、これらの入力変数の値候補の全ての組み合わせは、2通りとなる。斯かる2通りの組み合わせが、図11において、テスト項目3に対するテストケース3−1及び3−2として示されている。図11に示されるテストケース3−1及び3−2において、夫年齢及び妻年齢の値、並びにプラン名の値は、それぞれ共通である。   Further, for example, when the target test item is the test item 3 and the target condition is Expression (3), the variable x is a remark. Variables y1 to ym are husband age, wife age, and plan name. Further, as the abnormal value candidate for the remarks related to the expression (3), two abnormal values related to boundary value analysis among the four abnormal values shown in FIG. 10 are generated. Therefore, regarding the test item 3, two types of abnormal value candidates are selected for remarks. For the plan name, any one normal value value candidate is selected. One simple value is selected for husband age and wife age. Accordingly, there are two combinations of these input variable value candidates. Such two combinations are shown as test cases 3-1 and 3-2 for the test item 3 in FIG. In test cases 3-1 and 3-2 shown in FIG. 11, the values of husband age and wife age, and the value of the plan name are the same.

なお、図18の処理は、テスト項目ごとに実行される。各テスト項目は、入力制約又はドメイン定義の式ごとに生成される。したがって、図18の処理は、入力制約又はドメイン定義の各式について、当該式(着目条件)が扱う(当該式に関連する)入力変数(変数x)が属する第一の変数集合に関連付けられたいずれかの式を満たさない(すなわち、異常値の)値候補ごとに、前記第一の変数集合以外の第二の変数集合のそれぞれから、当該第二の変数集合に属する入力変数のデータ型に依存して設定された単純値を優先的に1つずつ選択して、値候補の組み合わせを生成する処理に相当する。更に、一つの式について前記第二のグループから選択される値候補は、当該式に関して生成される全ての前記組み合わせに対して共通である
上述したように、本実施の形態によれば、設計モデルからテストデータ生成条件が抽出され、テストデータ生成条件に基づいて、入力変数間の相互依存関係の有無が判定され、当該判定結果に基づいて、入力変数が変数集合に分類される。変数集合ごとに候補値が生成される際、一つの入力変数のみが属する変数集合と、相互に依存関係を有する複数の変数が属する変数集合とでは、相互に異なる方法によって値候補が生成される。
Note that the processing of FIG. 18 is executed for each test item. Each test item is generated for each input constraint or domain definition expression. Therefore, the processing in FIG. 18 is associated with the first variable set to which the input variable (variable x) handled (related to the formula) handled by the formula (target condition) belongs for each formula of the input constraint or domain definition. For each value candidate that does not satisfy any of the expressions (that is, an abnormal value), the data type of the input variable belonging to the second variable set is changed from each of the second variable sets other than the first variable set. This corresponds to a process of selecting one by one preferentially set depending on the priority and generating a combination of value candidates. Furthermore, value candidates selected from the second group for one expression are common to all the combinations generated for the expression. As described above, according to the present embodiment, the design model The test data generation conditions are extracted from the test data. Based on the test data generation conditions, it is determined whether or not there is an interdependency between the input variables. Based on the determination result, the input variables are classified into variable sets. When candidate values are generated for each variable set, value candidates are generated by different methods for variable sets to which only one input variable belongs and variable sets to which a plurality of variables having mutual dependency relationships belong. .

また、本実施の形態によれば、テスト項目ごとにテストデータを生成する際に、当該テスト項目の生成元となったテストデータ生成条件(図18における着目条件)が扱う入力変数(図18における変数x)に関しては、値候補の中から異常値の値候補が網羅的に選択され、当該入力変数以外の入力変数(図18における変数y1〜ym)に関しては、値候補の中から1つの単純値が優先的に選択されて、当該異常値の値候補ごとに、値候補の組み合わせが生成される。   Further, according to the present embodiment, when test data is generated for each test item, the input variable (in FIG. 18) handled by the test data generation condition (the attention condition in FIG. 18) that is the generation source of the test item. Regarding the variable x), the abnormal value candidate is comprehensively selected from the value candidates, and for the input variables other than the input variable (variables y1 to ym in FIG. 18), one simple value candidate is selected from the value candidates. A value is preferentially selected, and a combination of value candidates is generated for each value candidate of the abnormal value.

その結果、相互に依存関係の有る入力変数、依存関係を有さない入力変数を含んだ複数の入力変数に対して、各入力変数がそれぞれ仕様に違反し、かつ、データ型固有の単純値を含む異常系のテストデータを生成できる。   As a result, for input variables that have mutually dependent relationships and multiple input variables that include input variables that do not have a dependent relationship, each input variable violates the specification, and a simple value unique to the data type Including abnormal test data can be generated.

したがって、例えば、プログラムに対し異常なテストデータを入力した際に、入力チェックが正しく動作することを確認するテストにおいて、適切で、かつ、視認性が高く、レビューやテストを実施し易いテストデータを得ることができる。   Therefore, for example, when abnormal test data is input to a program, test data that is appropriate, has high visibility, and is easy to perform reviews and tests in a test that confirms that the input check operates correctly. Can be obtained.

以上、本発明の実施例について詳述したが、本発明は斯かる特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。   As mentioned above, although the Example of this invention was explained in full detail, this invention is not limited to such specific embodiment, In the range of the summary of this invention described in the claim, various deformation | transformation・ Change is possible.

10 テストデータ生成装置
11 設計モデル抽出部
12 設計モデル分析部
13 テスト項目抽出部
14 条件抽出部
15 変数分類部
16 値候補生成部
17 組み合わせ生成部
20 ユーザ端末
100 ドライブ装置
101 記録媒体
102 補助記憶装置
103 メモリ装置
104 CPU
105 インタフェース装置
111 値候補記憶部
B バス
DESCRIPTION OF SYMBOLS 10 Test data generation apparatus 11 Design model extraction part 12 Design model analysis part 13 Test item extraction part 14 Condition extraction part 15 Variable classification part 16 Value candidate generation part 17 Combination generation part 20 User terminal 100 Drive apparatus 101 Recording medium 102 Auxiliary storage device 103 memory device 104 CPU
105 Interface device 111 Value candidate storage unit B bus

Claims (5)

テスト対象のプログラムにおける複数の入力変数が満たすべき1以上の条件式に基づいて、前記入力変数間の依存関係の有無を判定し、前記依存関係の有無に基づいて前記複数の入力変数を1以上のグループに分類して、前記各条件式を当該条件式に関連する入力変数が属するグループに関連付ける変数分類部と、
前記グループごとに、当該グループに関連付けられた前記条件式に基づいて、当該グループに属する入力変数の値の候補を生成する値候補生成部と、
前記各条件式について、当該条件式に関連する入力変数が属する第一のグループに関して生成された候補のうち、前記第一のグループに関連付けられたいずれかの条件式を満たさない前記候補ごとに、前記第一のグループ以外の第二のグループのそれぞれから、当該第二のグループに属する入力変数のデータ型に依存して設定された単純値を、前記条件式に基づいて生成された候補に対して優先的に1つずつ選択して、前記候補の組み合わせを生成する組み合わせ生成部とを有し、
前記組み合わせ生成部が一つの前記条件式について前記第二のグループから選択する前記単純値又は前記候補は、当該条件式に関して生成される全ての前記組み合わせに対して共通である、
ことを特徴とするテストデータ生成装置。
Based on one or more conditional expressions to be satisfied by a plurality of input variables in the program to be tested, it is determined whether or not there is a dependency relationship between the input variables, and one or more input variables are determined based on the presence or absence of the dependency relationship. A variable classifying unit that associates each conditional expression with a group to which an input variable related to the conditional expression belongs,
For each group, based on the conditional expression associated with the group, a value candidate generation unit that generates candidates for the values of input variables belonging to the group;
For each conditional expression, among the candidates generated for the first group to which the input variable related to the conditional expression belongs, for each candidate that does not satisfy any of the conditional expressions associated with the first group, From each of the second groups other than the first group, a simple value set depending on the data type of the input variable belonging to the second group is set for the candidate generated based on the conditional expression. A combination generation unit that preferentially selects one by one and generates the candidate combination,
The simple value or the candidate that the combination generation unit selects from the second group for one conditional expression is common to all the combinations generated for the conditional expression.
A test data generation apparatus characterized by the above.
前記値候補生成部は、複数の入力変数が含まれる前記グループと、一つの入力変数が含まれる前記グループとについて、相互に異なる方法によって前記入力変数の値の候補を生成する、
ことを特徴とする請求項1記載のテストデータ生成装置。
The value candidate generation unit generates a candidate for the value of the input variable by a different method for the group including a plurality of input variables and the group including a single input variable.
The test data generation apparatus according to claim 1, wherein:
前記値候補生成部は、複数の入力変数が含まれる前記グループについては、当該グループに関連付けられた前記条件式に基づくonポイント、outポイント、inポイント、及びoffポイントを前記入力変数の値の候補として求め、
前記組み合わせ生成部は、前記複数の入力変数が含まれるグループが前記第一のグループである場合は、前記outポイント、前記onポイント、前記offポイントのうち、当該グループに関連付けられたいずれかの前記条件式を満たない候補ごとに前記組み合わせを生成し、前記複数の入力変数が含まれるグループが前記第二のグループである場合は、前記onポイント、前記inポイント、及び前記offポイントのうち、当該グループに関連付けられた全ての前記条件式を満たす候補を選択する、
ことを特徴とする請求項1又は2記載のテストデータ生成装置。
For the group including a plurality of input variables, the value candidate generator generates on-point, out-point, in-point, and off-point based on the conditional expression associated with the group as candidates for the value of the input variable. As sought
When the group including the plurality of input variables is the first group, the combination generation unit is configured to select one of the out point, the on point, and the off point associated with the group. The combination is generated for each candidate that does not satisfy the conditional expression, and when the group including the plurality of input variables is the second group, among the on point, the in point, and the off point, Selecting candidates that satisfy all the conditional expressions associated with the group;
The test data generation apparatus according to claim 1 or 2, wherein
コンピュータが、
テスト対象のプログラムにおける複数の入力変数が満たすべき1以上の条件式に基づいて、前記入力変数間の依存関係の有無を判定し、前記依存関係の有無に基づいて前記複数の入力変数を1以上のグループに分類して、前記各条件式を当該条件式に関連する入力変数が属するグループに関連付ける変数分類手順と、
前記グループごとに、当該グループに関連付けられた前記条件式に基づいて、当該グループに属する入力変数の値の候補を生成する値候補生成手順と、
前記各条件式について、当該条件式に関連する入力変数が属する第一のグループに関して生成された候補のうち、前記第一のグループに関連付けられたいずれかの条件式を満たさない前記候補ごとに、前記第一のグループ以外の第二のグループのそれぞれから、当該第二のグループに属する入力変数のデータ型に依存して設定された単純値を、前記条件式に基づいて生成された候補に対して優先的に1つずつ選択して、前記候補の組み合わせを生成する組み合わせ生成部とを有し、
前記組み合わせ手順において一つの前記条件式について前記第二のグループから選択される前記単純値又は前記候補は、当該条件式に関して生成される全ての前記組み合わせに対して共通である、
ことを特徴とするテストデータ生成方法。
Computer
Based on one or more conditional expressions to be satisfied by a plurality of input variables in the program to be tested, it is determined whether or not there is a dependency relationship between the input variables, and one or more input variables are determined based on the presence or absence of the dependency relationship. A variable classification procedure for classifying each conditional expression to a group to which an input variable related to the conditional expression belongs,
For each group, based on the conditional expression associated with the group, a value candidate generation procedure for generating candidates for values of input variables belonging to the group;
For each conditional expression, among the candidates generated for the first group to which the input variable related to the conditional expression belongs, for each candidate that does not satisfy any of the conditional expressions associated with the first group, From each of the second groups other than the first group, a simple value set depending on the data type of the input variable belonging to the second group is set for the candidate generated based on the conditional expression. A combination generation unit that preferentially selects one by one and generates the candidate combination,
The simple value or the candidate selected from the second group for one conditional expression in the combination procedure is common to all the combinations generated for the conditional expression.
A test data generation method characterized by the above.
コンピュータに、
テスト対象のプログラムにおける複数の入力変数が満たすべき1以上の条件式に基づいて、前記入力変数間の依存関係の有無を判定し、前記依存関係の有無に基づいて前記複数の入力変数を1以上のグループに分類して、前記各条件式を当該条件式に関連する入力変数が属するグループに関連付ける変数分類手順と、
前記グループごとに、当該グループに関連付けられた前記条件式に基づいて、当該グループに属する入力変数の値の候補を生成する値候補生成手順と、
前記各条件式について、当該条件式に関連する入力変数が属する第一のグループに関して生成された候補のうち、前記第一のグループに関連付けられたいずれかの条件式を満たさない前記候補ごとに、前記第一のグループ以外の第二のグループのそれぞれから、当該第二のグループに属する入力変数のデータ型に依存して設定された単純値を、前記条件式に基づいて生成された候補に対して優先的に1つずつ選択して、前記候補の組み合わせを生成する組み合わせ生成部とを有し、
前記組み合わせ手順において一つの前記条件式について前記第二のグループから選択される前記単純値又は前記候補は、当該条件式に関して生成される全ての前記組み合わせに対して共通である、
ことを特徴とするテストデータ生成プログラム。
On the computer,
Based on one or more conditional expressions to be satisfied by a plurality of input variables in the program to be tested, it is determined whether or not there is a dependency relationship between the input variables, and one or more input variables are determined based on the presence or absence of the dependency relationship. A variable classification procedure for classifying each conditional expression to a group to which an input variable related to the conditional expression belongs,
For each group, based on the conditional expression associated with the group, a value candidate generation procedure for generating candidates for values of input variables belonging to the group;
For each conditional expression, among the candidates generated for the first group to which the input variable related to the conditional expression belongs, for each candidate that does not satisfy any of the conditional expressions associated with the first group, From each of the second groups other than the first group, a simple value set depending on the data type of the input variable belonging to the second group is set for the candidate generated based on the conditional expression. A combination generation unit that preferentially selects one by one and generates the candidate combination,
The simple value or the candidate selected from the second group for one conditional expression in the combination procedure is common to all the combinations generated for the conditional expression.
A test data generation program characterized by that.
JP2014210776A 2014-10-15 2014-10-15 Abnormal system test data generation device, method, and program with high visibility for multiple input variables Active JP6007223B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014210776A JP6007223B2 (en) 2014-10-15 2014-10-15 Abnormal system test data generation device, method, and program with high visibility for multiple input variables

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014210776A JP6007223B2 (en) 2014-10-15 2014-10-15 Abnormal system test data generation device, method, and program with high visibility for multiple input variables

Publications (2)

Publication Number Publication Date
JP2016081231A true JP2016081231A (en) 2016-05-16
JP6007223B2 JP6007223B2 (en) 2016-10-12

Family

ID=55958641

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014210776A Active JP6007223B2 (en) 2014-10-15 2014-10-15 Abnormal system test data generation device, method, and program with high visibility for multiple input variables

Country Status (1)

Country Link
JP (1) JP6007223B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001356936A (en) * 2000-04-11 2001-12-26 Fujitsu Ltd Test support device and supporting method of gui system program
JP2010097446A (en) * 2008-10-17 2010-04-30 Hitachi Ltd Test data generation method, program and apparatus
JP2010267022A (en) * 2009-05-13 2010-11-25 Nippon Telegr & Teleph Corp <Ntt> Test data generation method, device and program
JP2012118873A (en) * 2010-12-02 2012-06-21 Fujitsu Ltd Data production method, program and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001356936A (en) * 2000-04-11 2001-12-26 Fujitsu Ltd Test support device and supporting method of gui system program
JP2010097446A (en) * 2008-10-17 2010-04-30 Hitachi Ltd Test data generation method, program and apparatus
JP2010267022A (en) * 2009-05-13 2010-11-25 Nippon Telegr & Teleph Corp <Ntt> Test data generation method, device and program
JP2012118873A (en) * 2010-12-02 2012-06-21 Fujitsu Ltd Data production method, program and apparatus

Also Published As

Publication number Publication date
JP6007223B2 (en) 2016-10-12

Similar Documents

Publication Publication Date Title
US11727203B2 (en) Information processing system, feature description method and feature description program
JP5629239B2 (en) Apparatus and method for testing operation of software
WO2019222462A1 (en) Identification of sensitive data using machine learning
KR101390220B1 (en) Method for recommending appropriate developers for software bug fixing and apparatus thereof
JP5521807B2 (en) Failure cause estimation apparatus, failure cause estimation program, and failure cause estimation method
JPWO2018186314A1 (en) Analyzer, analysis method and analysis program
CN110728328A (en) Training method and device for classification model
JP6696568B2 (en) Item recommendation method, item recommendation program and item recommendation device
JP2017146888A (en) Design support device and method and program
CN112633461A (en) Application assistance system and method, and computer-readable recording medium
JP6007221B2 (en) Abnormal test data generation apparatus, method, and program for multiple input variables
JPWO2016063502A1 (en) Knowledge management device, knowledge management method, and program recording medium
JP2018195643A (en) Classification program, classification device, and classification method
US20200387505A1 (en) Information processing system, feature description method and feature description program
JP6007220B2 (en) Normal test data generation apparatus, method and program for multiple input variables
JP6007223B2 (en) Abnormal system test data generation device, method, and program with high visibility for multiple input variables
JP6509590B2 (en) User&#39;s emotion analysis device and program for goods
JP6007222B2 (en) Abnormal test data generation device, method, and program capable of efficiently covering specifications for multiple input variables
JP6751960B1 (en) Information processing system and information processing method
CN114881521A (en) Service evaluation method, device, electronic equipment and storage medium
JP6190341B2 (en) DATA GENERATION DEVICE, DATA GENERATION METHOD, AND PROGRAM
JP6455087B2 (en) Form information processing program, form information processing apparatus, and form information processing method
CN111522748A (en) Automatic test case generation method and device, server and storage medium
CN114830147A (en) Control method, control program, and information processing apparatus
CN116738216B (en) Association processing method and device for early warning big data

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160620

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160628

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160817

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: 20160906

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160912

R150 Certificate of patent or registration of utility model

Ref document number: 6007223

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150