JP5561135B2 - Data generation method, program, and apparatus - Google Patents
Data generation method, program, and apparatus Download PDFInfo
- Publication number
- JP5561135B2 JP5561135B2 JP2010269517A JP2010269517A JP5561135B2 JP 5561135 B2 JP5561135 B2 JP 5561135B2 JP 2010269517 A JP2010269517 A JP 2010269517A JP 2010269517 A JP2010269517 A JP 2010269517A JP 5561135 B2 JP5561135 B2 JP 5561135B2
- Authority
- JP
- Japan
- Prior art keywords
- property
- screen
- screen transition
- program
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
本発明は,ソフトウェアの動作確認テストに関連し,特に,システム仕様を表現したモデルが,システムに要求されるプロパティを満たすか否かを検査するモデル検査において使用されるテストデータを生成する技術に関する。 The present invention relates to a software operation confirmation test, and more particularly to a technique for generating test data used in model checking for checking whether a model expressing a system specification satisfies a property required for the system. .
ソフトウェアのモデル検査とは,モデルに該当するプログラムが仕様として満たすべき性質(プロパティと呼ぶ)を満足するか否かを,該プログラムを網羅的に実行し,実行時のプログラム状態においてプロパティが成立するかをチェックすることによって検査する手法である。 Software model checking is to comprehensively execute whether a program corresponding to a model satisfies a property (referred to as a property) that must be satisfied as a specification, and the property is established in the program state at the time of execution. This is an inspection method by checking whether or not.
ここで,モデルとは,開発するシステムの挙動や処理内容の記述であり,記述の詳細度レベルによって種々のモデルがある。例えば,概要設計のレベルでは,UML(Unified Modeling Language)を用いて,システムが処理する情報の静的構造や処理シーケンスを記述したモデルが利用される。また,開発仕様を厳密に記述する場合には,仕様記述言語を用いて開発仕様をモデルとして記述することも行われている。さらに,開発システムの動的な側面をモデル化する場合には,例えば,Promela等のモデル記述用の専用言語を用いて状態遷移等を記述することも行われている。Promelaで記述されたモデルに対しては,SPINモデルチェッカというツールを用いてモデル検査を実行することができる。 Here, the model is a description of the behavior and processing contents of the system to be developed, and there are various models depending on the level of detail of the description. For example, at the level of the outline design, a model describing the static structure and processing sequence of information processed by the system using UML (Unified Modeling Language) is used. In addition, when a development specification is described strictly, a specification description language is used to describe the development specification as a model. Furthermore, when modeling dynamic aspects of a development system, for example, state transitions are described using a model description language such as Promela. Model checking can be executed on a model described in Promela using a tool called SPIN model checker.
Java(登録商標)等の実行可能なプログラム言語を用いて記述されたプログラムも,最も記述が詳細なモデルであると見なされる。プログラムをモデルとするモデル検査は,特に,プログラムモデル検査と呼ばれるが,ここでは,以後単にモデル検査と表記する。Javaで記述されたプログラムに対するモデル検査ツールには,例えば,JPF(Java Path Finder)がある。本出願で扱うモデルは,特にWebアプリケーションのサーバ側の業務ロジックを記述したものである。 A program written using an executable program language such as Java (registered trademark) is also considered to be a model with the most detailed description. Model checking using a program as a model is particularly called program model checking, but is hereinafter simply referred to as model checking. As a model checking tool for a program written in Java, for example, there is a JPF (Java Path Finder). The model dealt with in this application describes the business logic on the server side of the Web application.
一般に,Webアプリケーション・プログラムに対するモデル検査では,観測するプログラム状態として,ブラウザ等に表示される画面状態とサーバ側のデータベースの状態すなわちデータベースに格納されているデータ値とが用いられる。 In general, in model checking for a Web application program, a screen state displayed on a browser or the like and a database state on the server side, that is, a data value stored in the database, are used as a program state to be observed.
モデル検査の処理の手順は,まず,検査対象のプログラムに対して画面とデータベースの初期状態を設定し,次いで,ドライバを用いて,プログラムに対して次々にイベントを起こすことによって検査対象プログラムを駆動する。このとき,ドライバは,検査対象プログラムが種々の状態になりうるように,イベントや入力データを網羅的に選択する。そして,イベントを駆動する中で,プログラム状態がプロパティを満たしているかどうかを検査することによって,プロパティ違反(バグ)が発生していないことを確認する。 The model checking process consists of first setting the initial state of the screen and database for the program to be checked, and then using the driver to drive the program to be checked by raising events one after another. To do. At this time, the driver comprehensively selects events and input data so that the inspection target program can be in various states. Then, while driving the event, it is checked whether the property violation (bug) has occurred by checking whether the program state satisfies the property.
ここで,イベントとは,画面上の項目にデータを入力してボタンを押下する等のユーザ操作である。また,プロパティは,モデル(プログラム)が満たすべきロジックの性質を記述したものである。具体的には,検査対象のイベントおよび評価対象のイベントに関する事前条件と事後条件を含んだ構成を持ち,事前条件と事後条件は一階述語論理や時相論理等を用いた論理式で記述され,コンピュータ等によって処理可能である。 Here, an event is a user operation such as inputting data into an item on the screen and pressing a button. The property describes the logic properties that the model (program) should satisfy. Specifically, it has a configuration that includes preconditions and postconditions related to the events to be inspected and the events to be evaluated, and the preconditions and postconditions are described by logical expressions using first-order predicate logic, temporal logic, etc. Can be processed by a computer or the like.
モデル検査におけるプロパティ検査は,検査対象に対するイベントについて,イベント駆動前のプログラム状態において事前条件が「真」であるとき,イベント駆動後のプログラム状態において事後条件が「真」であることを確認することである。つまり,事前条件が真であると評価されなければ事後条件は評価されず,プログラムの実行中に,事前条件が一度も真とならなかったプロパティは,一度も検査されないことになる。それゆえ,全てのプロパティの事前条件が少なくとも一度は真となるような状態に,ドライバとプログラム初期状態を調整する必要がある。 In the property check in model checking, for the event to be checked, when the precondition is “true” in the program state before event driving, it is confirmed that the postcondition is “true” in the program state after event driving. It is. That is, if the precondition is not evaluated to be true, the postcondition is not evaluated, and any property for which the precondition has never been true will not be checked during program execution. Therefore, it is necessary to adjust the driver and program initial state so that all property preconditions are true at least once.
特に,Webアプリケーションに対するモデル検査では,画面データはドライバに設定され,データベース・データ(DBデータ)はプログラム初期状態として設定される。そのため,プロパティ自体,および,DBデータに関する共通制約を利用して,その事前条件に記述されている制約を真とするような画面データとDBデータを生成するという技術が従来から存在する。 In particular, in model checking for a Web application, screen data is set in a driver, and database data (DB data) is set as an initial program state. For this reason, there has conventionally been a technique of generating screen data and DB data that make the constraint described in the preconditions true by using the properties themselves and common constraints on the DB data.
また,近年,コンピュータの性能が飛躍的に向上していることを背景として,SAT(SATisfiability problem)やSMT(Satisfiability Modulo Theories)といった論理式の充足可能性問題を解くツール(ソルバ)を利用してプロパティの事前条件の充足解を求めることが検討されている。 In recent years, with the dramatic improvement in computer performance, a tool (solver) that solves the satisfiability problem of logical formulas such as SAT (SATisability probabilities) and SMT (Satisfiability Modulo Theories) is used. It is considered to find a satisfactory solution for the property precondition.
なお,本発明者は,SAT,SMT等の技術を利用して,画面データとDBデータを生成する技術を検討している。プロパティの事前条件からデータの満たすべき制約条件を構築し,SMTソルバを用いてデータ制約条件を満たす具体的なデータ値を生成するものである。SMTソルバが論理式の充足可能性問題を解くとは,例えば,論理式を入力してデータが満たすべき条件範囲を出力することである。 The inventor is examining a technique for generating screen data and DB data using techniques such as SAT and SMT. A constraint condition to be satisfied by data is constructed from property preconditions, and a specific data value that satisfies the data constraint condition is generated using an SMT solver. The SMT solver solves the satisfiability problem of a logical expression, for example, by inputting a logical expression and outputting a condition range that the data should satisfy.
しかしながら,従来技術では,各々のプロパティの事前条件をデータの制約条件とする充足可能性問題として個別に解き,事前条件を成立させるようなデータを生成させている。すなわち,従来技術では,依存関係,因果関係等のプロパティの前後関係を考慮して,データを生成することができなかった。 However, in the prior art, data that can be solved individually as a satisfiability problem using the preconditions of each property as data constraint conditions, and the preconditions are satisfied is generated. In other words, in the prior art, data cannot be generated in consideration of the context of properties such as dependency relationships and causal relationships.
そのため,検査対象プログラムの実行経路上において,プロパティが前後関係を持って設定されている場合に,従来技術を用いて生成されたデータを検査対象プログラムに入力して駆動しても,実行経路において後に該当するプロパティの事前条件が真になるとは限らないという問題があった。プロパティの事前条件が真にならなければ,検査対象プログラムが,該プロパティを満たすかどうかを評価したことにならないため,従来技術で生成されたデータは不十分であった。 Therefore, if the properties are set in a context on the execution path of the program to be inspected, even if the data generated using the prior art is input to the program to be inspected and driven, There was a problem that the precondition of the corresponding property was not necessarily true later. If the property precondition does not become true, the program to be inspected does not evaluate whether or not the property is satisfied. Therefore, the data generated by the prior art is insufficient.
上述の従来技術の課題への対応として,プロパティの前後関係を単純に考慮しようとしても,以下の理由により困難であった。 In order to deal with the above-mentioned problems of the prior art, it is difficult to simply consider the context of properties for the following reasons.
(1) プロパティの前後関係は,プロパティの記述のみからは決定することができない。 (1) Property context cannot be determined from property descriptions alone.
(2) プロパティの記述のみからは,プロパティの事前条件を構成する項目のうち,どの項目が当該イベントで入力されるデータであるのかを判定することができない。 (2) From only the description of the property, it is not possible to determine which of the items constituting the property precondition is the data input in the event.
本発明は,上記課題に鑑みてなされたものであり,その目的とするところは,検査対象プログラムの実行経路上において,プロパティが前後関係を持って設定されている場合に,該プロパティの事前条件が真となるようなデータを生成することができる技術を提供することである。 The present invention has been made in view of the above problems, and its object is to provide a precondition for the property when the property is set in a context on the execution path of the program to be inspected. It is to provide a technique capable of generating data such that is true.
本発明の一態様として開示されるデータ生成方法は,プログラムの動作確認のためのテストデータを生成する方法において,コンピュータが,1)検査対象となるプログラムで実行される画面間の遷移を示す画面遷移情報,各画面が備える項目を示す画面項目情報,および,前記プログラムが満たすべき仕様を示すプロパティを読み込む画面情報設定処理ステップと,2)前記プロパティが,前記画面遷移情報に示される画面遷移上のどの画面遷移の仕様に該当するか判定し,該当すると判定されたプロパティを画面遷移に関連付けるプロパティ配置処理ステップと,3)前記画面遷移に関連付けられたプロパティについて,該プロパティの事前条件が,前記プログラムの画面遷移上の直近イベントでの入力項目に起因するかを判定し,該事前条件が前記直近イベントでの入力項目に起因する場合に,判定を真とする入力判定処理ステップと,4)前記プロパティの事前条件が直近イベントでの入力項目ではない場合に,前記プログラムの画面遷移を遡りながらプロパティを取得し,該取得したプロパティに対する入力項目の判定が真となるまでプロパティの収集を繰り返し,取得したプロパティ群を依存プロパティとして抽出するプロパティ収集処理ステップと,5)前記依存プロパティの事前条件および事後条件ならびに連結条件を用いて,データ生成のための制約条件を生成するデータ制約生成処理ステップとを実行するものである。 A data generation method disclosed as one aspect of the present invention is a method for generating test data for confirming the operation of a program, in which a computer shows 1) transition between screens executed by a program to be inspected. Transition information, screen item information indicating an item included in each screen, and a screen information setting processing step for reading a property indicating a specification to be satisfied by the program; and 2) on the screen transition indicated by the screen transition information. A property placement processing step for determining which screen transition specification of which one corresponds to, and associating the property determined to be relevant to the screen transition, and 3) for the property associated with the screen transition, Determine whether it is caused by the input item at the most recent event on the screen transition of the program. An input determination processing step in which the determination is true when the condition is caused by the input item at the most recent event; and 4) screen transition of the program when the property precondition is not the input item at the most recent event. Collecting properties until the input item judgment for the acquired property is true, and collecting the acquired property group as a dependent property; A data constraint generation processing step for generating a constraint condition for data generation using the precondition, the postcondition and the connection condition is executed.
また,本発明の別の一態様として開示されるデータ生成プログラムは,コンピュータに,上記の処理方法で実現される各処理を実行させるためのものである。 A data generation program disclosed as another embodiment of the present invention is for causing a computer to execute each process realized by the above processing method.
また,本発明の別の一態様として開示されるデータ生成装置は,上記の処理方法で実現される処理を実行する各処理部を備えるものである。 In addition, a data generation apparatus disclosed as another aspect of the present invention includes each processing unit that executes processing realized by the above processing method.
本発明の一態様として開示したデータ生成装置は,検査対象プログラムの実行経路上において,プロパティが前後関係を持って設定されている場合に,該プロパティの事前条件が真となるようなデータを生成することができ,モデル検査のためのデータ生成処理の手間を軽減させることができる。 The data generation apparatus disclosed as one aspect of the present invention generates data such that the property precondition is true when the property is set in a context on the execution path of the inspection target program. It is possible to reduce the labor of data generation processing for model checking.
以下,本発明の一態様として開示されるデータ生成装置を,画面とデータベース(DB)を利用するプログラムを検査対象としてモデル検査を実施する際に,使用されるテストデータを生成する実施例をもとに説明する。 In the following, an embodiment for generating test data to be used when performing model checking for a program that uses a screen and a database (DB) as a check target is also disclosed in the data generating device disclosed as one aspect of the present invention. And explained.
図1は,データ生成とモデル検査を実行するモデル検査装置の全体の一例を示す図である。 FIG. 1 is a diagram illustrating an example of an entire model checking apparatus that performs data generation and model checking.
図1に示すモデル検査装置1は,データ生成装置3と検査実行装置5とを備え,入出力装置(図示しない)と接続されている。データ生成装置3が,本発明の一態様として開示される装置である。
A
データ生成装置3および検査実行装置5は,それぞれ,制御部10および記憶部20を備え,入出力装置に接続されている。
Each of the
モデル検査装置1では,入出力装置から入力および操作によって,データ生成装置3が,モデル検査のためのテストデータ25を生成し,検査実行装置5が,データ生成装置3で生成されたテストデータ25を使用して検査対象プログラム27のモデル検査を実行する。
In the
モデル検査装置1は,コンピュータまたは専用のハードウェアによって実現される。
The
制御部10は,データ生成装置3,検査実行装置5以外に,図1には示されていない,入出力装置,外部記録装置などの周辺機器との情報のやり取りを制御する。制御部10の実現には,CPU(Central Processing Unit)やプログラマブルなデバイス(FPGA(Field Programmable Gate Array),PLD(Programmable Logic Device)など)を用いることができる。データ生成装置3および検査実行装置5は,ソフトウェア(コンピュータプログラム)としてコンピュータに実装され,実行されるものであってもよい。また,このソフトウェアは,コンピュータで読み取り可能な記録媒体に記録しておくことができる。
The
記憶部20は,データ生成装置3および検査実行装置5が使用するデータを記憶する。記憶部20は,例えばROM(Read Only Memory),RAM(Random Access Memory),ハードディスクなどのメモリである。記憶部20は,入出力装置から入力される入力データ,ドライバ,データベーススタブ,ネットワークスタブなどが格納されている。また,記憶部20は,パラメータ値,変数値などのデータを記録してもよく,ワークエリアとして用いることもできる。
The
データ生成装置3の記憶部として,記憶部20は,プロパティ21,データベース(DB)情報22,画面遷移情報23,および画面項目情報24を記憶する。
As a storage unit of the
データ生成装置3の処理手段として,制御部10は,データ制約生成部31およびデータ生成部33を有する。
As processing means of the
データ制約生成部31は,記憶部20に記憶されたプロパティ21,DB情報22,画面遷移情報23,および画面項目情報24を用いて,テストデータ25の生成における制約条件となるデータ制約を生成する。
The data
データ生成部33は,データ制約生成部31が生成したデータ制約を満たすテストデータ25を生成する。
The
検査実行装置5の記憶部として,記憶部20は,テストデータ25,検査対象プログラム27を記憶する。
As a storage unit of the
検査実行装置5の処理手段として,制御部10は,ドライバ51および検査実行部53を有する。
As processing means of the
ドライバ51は,テストデータ25を使用して,モデルである検査対象プログラム27に対するイベントを発生させる。
The
検査実行部53は,ドライバ51によって検査対象プログラム27を駆動してプログラム状態を遷移させ,遷移したプログラム状態においてプロパティ21が成立するかどうかを調査する。
The
なお,図1では,データ生成装置3および検査実行装置5を備えるモデル検査装置1が1つの物理的装置として実施される場合の構成例を示すが,データ生成装置3および検査実行装置5が,それぞれ別個の装置として構成されるようにしてもよい。
FIG. 1 shows a configuration example in which the
図2は,データ生成装置3のブロック構成例を示す図である。
FIG. 2 is a diagram illustrating a block configuration example of the
データ生成装置3のデータ制約生成部31は,画面情報設定部311,プロパティ配置部312,入力判定部313,依存プロパティ収集部314,プロパティ補完部315,依存プロパティ整理部316,および制約生成部317を備える。
The data
画面情報設定部311は,検査対象プログラム27の画面遷移情報23と画面項目情報24とを取得して設定する。
The screen
プロパティ配置部312は,プロパティ21を取得し,プロパティ21各々が画面遷移上のどの遷移の仕様に該当するか判定し,該当する画面遷移に配置する。
The
入力判定部313は,画面遷移上に配置されたプロパティ21を順に選択し,選択したプロパティ21の事前条件が,画面遷移上の直近イベントでの入力項目に起因するか判定する。
The
依存プロパティ収集部314は,プロパティ21の事前条件が直近イベントの入力項目に起因しないと判定された場合に,画面遷移情報23をもとに,画面遷移上を遡及して配置されたプロパティ21を取得し,取得したプロパティ21の入力判定が真となるまで,画面遷移の遡及とプロパティ取得とを繰り返し,プロパティ列を収集する。あるプロパティから画面遷移を遡って収集されたプロパティ列を,依存プロパティと呼び,依存プロパティの集合を,依存プロパティ・リストと呼ぶ。
When it is determined that the precondition of the
プロパティ補完部315は,依存プロパティ収集部314によって入力判定が真となるプロパティ21を抽出できなかった場合に,入力判定を真とするために不足しているプロパティを補完する。
When the dependent
依存プロパティ整理部316は,依存プロパティ・リストから,重複部分やデータ推移として無関係なプロパティ21を除外して,依存プロパティ・リストを整理する。
The dependency
データ制約生成部317は,依存プロパティ・リストの事前条件および事後条件ならびに連結条件を利用して,テストデータ25の生成処理における制約条件(データ制約)を生成する。
The data
データ生成部33は,データ制約条件保持部331およびデータ制約ソルバ332を備える。
The
データ制約条件保持部331は,データ制約生成部31によって生成されたデータ制約を保持する。
The data constraint
データ制約ソルバ332は,SMTソルバ等の既知技術を用いて,データ制約条件保持部28が保持するデータ制約を満たすテストデータ25を生成する。
The
以下に,検査対象がオンラインショッピングのWebアプリケーション・プログラムである場合の処理を例に,データ生成装置3の処理をより具体的に説明する。
Hereinafter, the process of the
なお,データ生成装置3は,特定のプログラム言語の種別,アプリケーションのアーキテクチャまたはフレームワークなどに限定されるものではない。
The
図3は,検査対象のWebアプリケーションでの画面遷移の例を示す図である。 FIG. 3 is a diagram illustrating an example of screen transition in the Web application to be inspected.
以下の説明で,画面とは,HTML等で記述されたWebページ記述(画面プログラム)を,Webブラウザで表示したページを意味する。例えば,Javaを利用したWebアプリケーションでは,画面としてのWebページは,JSP(Java Server Pages)で記述され,利用時にServletにコンパイルされて実行処理され,処理結果がHTML形式でWebブラウザに送信されることによって,画面(Webページ)が表示される。 In the following description, a screen means a page in which a Web page description (screen program) described in HTML or the like is displayed on a Web browser. For example, in a Web application using Java, a Web page as a screen is described in JSP (Java Server Pages), compiled into Servlet at the time of use, executed, and the processing result is transmitted to the Web browser in HTML format. As a result, a screen (Web page) is displayed.
図3に示す例では,オンラインショッピングのWebアプリケーションの一部として,ログイン画面41,商品選択画面42,商品検索画面43,確認画面44,支払画面45,および完了画面46の画面遷移を示している。
The example shown in FIG. 3 shows screen transitions of a
ログイン画面41は,画面項目として「ID」411および「パスワード」412,ならびに操作ボタンとして「ログインボタン」413を備える。ID411は,顧客の識別情報の入力項目であり,パスワード412は,顧客のパスワードの入力項目である。ログイン画面41で,ID411とパスワード412とに入力があり,ログインボタン413が押下されると,商品選択画面42に遷移する。
The
商品選択画面42は,入力項目として「数量」421,操作ボタンとして「商品検索ボタン」422および「確認ボタン」423,ならびに表示項目として「氏名」424および「会員種別」425を備える。数量421は,商品の購入数の入力項目であり,氏名424および会員種別425は,ログイン画面41での入力項目に対応した表示項目である。
The
商品選択画面42では,ログイン画面41での入力(ID,パスワード)にもとづいて,後述する顧客データベース221に格納された顧客データを検索し,該当した顧客名と会員種別が,氏名424および会員種別425にそれぞれ表示される。
In the
商品選択画面42で,商品検索ボタン422が押下されると,商品検索画面43に遷移し,数量421に入力があり,確認ボタン423が押下されると,確認画面44に遷移する。
When the
商品検索画面43は,操作ボタンとして「商品追加ボタン」431を備える。商品追加ボタン431が押下されると,図3の画面遷移例では省略した商品検索操作画面に遷移して商品検索操作が行われ,選択された商品の一覧を追加した商品選択画面42へ遷移する。
The
確認画面44は,商品選択画面42の表示項目の再表示であり,入力項目がなく,操作ボタンとして「戻るボタン」441および「支払ボタン」442のみを備える。
The
確認画面44で,戻るボタン441が押下されると,商品選択画面42へ遷移し,支払ボタン442が押下されると,支払画面45へ遷移する。
When the
支払画面45は,顧客の氏名および会員種別を含む顧客情報の表示項目,選択された商品の一覧(商品名,価格,数量,割引率,割引額,金額)を含む商品情報の表示項目451,ならびに操作ボタンとして「戻るボタン」453および「購入確定ボタン」452を備える。
The
支払画面45で,戻るボタン453が押下されると,確認画面44へ遷移し,購入確定ボタン452が押下されると,購入処理が実行されて,完了画面46に遷移し,購入が完了する。
When the
検査対象のWebアプリケーションでは,図3に示すように6個の画面間でボタン押下のイベントにより,画面が遷移する仕様となっている。 In the Web application to be inspected, as shown in FIG. 3, the screen is changed by an event of a button press between six screens.
図4は,確認画面44および支払画面45間の遷移において,確認画面44の会員種別の値(“ゴールド”か“ノーマル”か)の相違により,支払画面45の表示項目451の割引率の値が異なる遷移があることを示す図である。
FIG. 4 shows the discount rate value of the
確認画面44の表示項目,すなわち,商品選択画面42の表示項目の会員種別の値が“ゴールド”である場合には,イベントにより支払画面45aへ遷移する。支払画面45aでは,個人情報の表示項目のうち会員種別471の値が“ゴールド”となり,商品情報の表示項目で割引率472の値が“0.1”となる。一方,会員種別が“ノーマル”である場合には支払画面45bへ遷移し,支払画面45bでは,会員種別473の値が“ノーマル”,割引率474の値が“0”となる。
When the display item of the
図5は,データベース情報22の例を示す図である。
FIG. 5 is a diagram illustrating an example of the
オンラインショッピングのWebアプリケーションでは,データベース情報22として顧客データベース221および商品データベース222の情報が使用される。
In the online shopping Web application, information of the
図5(A)は,顧客データベース221の構成例を示す図である。顧客データベース221は,ID,PW,氏名,種別などの顧客データを格納する。IDは顧客の識別情報,PWは顧客のパスワード,氏名は顧客の名前,種別は会員種別を示す情報である。
FIG. 5A is a diagram illustrating a configuration example of the
図5(B)は,商品データベース222の構成例を示す図である。商品データベース222は,商品名,価格,在庫数など取り扱う商品データを格納する。商品名は商品を識別する情報,価格は商品単価,在庫数は在庫する商品数を示す情報である。
FIG. 5B is a diagram illustrating a configuration example of the
なお,図3および図4に示す画面遷移では,図5に示す顧客データベース221と商品データベース222が使用されるものとする。一例として,ログイン画面41では,ID411とパスワード412の入力にもとづいて,顧客データベース221が検索され,該当する顧客データがあればログインが許可され,なければログインが拒否される。また,商品検索画面43での商品検索は,商品データベース222に格納された商品データが検索される。この場合に,商品データベース222の商品データが適切に画面に表示される等の仕様をプロパティで記述することができる。
3 and FIG. 4, the
図6は,プロパティの例を示す図である。 FIG. 6 is a diagram illustrating an example of a property.
図6に示すプロパティ21は,図3および図4に示す画面遷移があるWebアプリケーションのプロパティの仕様例である。各プロパティは,外部仕様レベルでのプロパティの記述に,プロパティを識別するプロパティ名が対応付けられている。ここで,外部仕様レベルでのプロパティとは,画面に表示される画面項目の値やデータベースの格納データに関して記述された仕様である。
A
図6に示すプロパティ記述例において,“⇒(論理包含,導出)”の前の部分を事前条件と,後の部分を事後条件と呼ぶ。このプロパティ記述では,検査対象プログラム27が事前条件を「真」とする状態にあるとき,遷移後の状態が事後条件を「真」とすることを要求することを示す。
In the property description example shown in FIG. 6, the part before “⇒ (logical inclusion, derivation)” is called a precondition and the part after is called a postcondition. This property description indicates that when the
また,“記号#”は変数を示し,画面やデータベースが変数やフィールドを保持する場合に“保持元#変数”と記述される。 “Symbol #” indicates a variable, and is described as “holding source #variable” when the screen or database holds variables or fields.
また,“COUNT(DB名,条件)”は,指定されたデータベースに格納されたテーブルで,条件を満たすレコード個数を取得する関数であるとする。 Further, it is assumed that “COUNT (DB name, condition)” is a function that acquires the number of records that satisfy a condition in a table stored in a specified database.
また,“DB#フィールド名.where(条件)”は,指定されたデータベースにおいて,条件を満たすレコードの指定フィールドの値を表すとする。 Also, “DB # field name.where (condition)” represents the value of the designated field of the record that satisfies the condition in the designated database.
図6に示すプロパティP1の記述「(COUNT(顧客DB,(顧客DB#ID=ログイン画面#ID)AND(顧客DB#PW=ログイン画面#パスワード))=1)@ログインボタン押下 ⇒ (商品選択画面#氏名=顧客DB#名前.where(顧客DB#ID=ログイン画面#ID))AND(商品選択画面#会員種別=顧客DB#種別.where(顧客DB#ID=ログイン画面#ID))」は,
「ログインボタン押下時に,顧客DBに格納されたデータのうち,((顧客DB#ID=ログイン画面#ID)AND(pw=ログイン画面#PW))の条件を満たすデータの個数が1であるならば,商品選択画面の氏名の値は,顧客DBの(ID=ログイン画面#ID)を満たすデータの名前フィールドの値と等しく,商品選択画面の会員種別の値は,顧客DBの(ID=ログイン画面#ID)を満たすデータの会員種別フィールドの値と等しい」ことを意味する。
Description of property P1 shown in FIG. 6 “(COUNT (customer DB, (customer DB # ID = login screen #ID) AND (customer DB # PW = login screen #password)) = 1) @ login button pressed ⇒ (product selection Screen # name = customer DB # name.where (customer DB # ID = login screen #ID)) AND (product selection screen #member type = customer DB # type.where (customer DB # ID = login screen #ID)) ” Is
“When the number of data stored in the customer DB satisfying the condition of ((customer DB # ID = login screen #ID) AND (pw = login screen #PW)) among the data stored in the customer DB when the login button is pressed is 1. For example, the name value of the product selection screen is equal to the value of the name field of the data satisfying (ID = login screen #ID) of the customer DB, and the member type value of the product selection screen is (ID = login) of the customer DB. It is equal to the value of the member type field of the data satisfying the screen #ID).
図7は,画面遷移情報23の例を示す図である。本実施例では,画面遷移情報23は,図7(A)に示す画面一覧テーブル231および図7(B)に示す画面遷移テーブル232として保持される。
FIG. 7 is a diagram illustrating an example of the
画面一覧テーブル231は,検査対象プログラム27で表示される画面の一覧を示すテーブルであり,各画面について,識別番号および画面名が対応付けられている。
The screen list table 231 is a table showing a list of screens displayed by the
画面遷移テーブル232は,画面遷移を示すテーブルであり,No,遷移元画面,イベント,遷移先画面などが格納される。Noは遷移を識別する番号,遷移元画面は遷移元となる画面を特定する情報,イベントは遷移を生じる操作,遷移先画面は遷移先となる画面を特定する情報である。 The screen transition table 232 is a table indicating screen transition, and stores No, transition source screen, event, transition destination screen, and the like. No is a number for identifying a transition, a transition source screen is information for identifying a screen as a transition source, an event is an operation for causing a transition, and a transition destination screen is information for identifying a screen as a transition destination.
図8は,画面項目情報24の例を示す図である。本実施例では,画面項目情報24は,各画面の画面項目テーブルとして保持される。
FIG. 8 is a diagram illustrating an example of the
画面項目テーブルは,各画面が備える項目を示すテーブルであり,No,項目名,変数名,入出力,要否などが格納される。Noは項目を識別する番号,項目名は項目の名称,変数名は項目に入力/出力される値の変数名,入出力は項目の種別(入力/出力),要否はデータ推移に関係するかを示す情報(関係がある場合は“要”)である。 The screen item table is a table showing items provided in each screen, and stores No, item name, variable name, input / output, necessity and the like. No is the item identification number, item name is the item name, variable name is the variable name of the value input / output to the item, input / output is the item type (input / output), necessity is related to data transition This is information (or “necessary” if there is a relationship).
図8(A)はログイン画面41の画面項目テーブル例,図8(B)は商品選択画面42の画面項目テーブル例,図8(C)は確認画面44の画面項目テーブル例,図8(D)は支払画面45の画面項目テーブル例を示す。
8A is a screen item table example of the
以下,データ生成装置3のデータ制約生成部31の処理動作について,図3に示す画面遷移を持つWebアプリケーションを例に説明する。
Hereinafter, the processing operation of the data
図9は,データ制約生成部31の処理フロー例を示す図である。
FIG. 9 is a diagram illustrating a processing flow example of the data
情報取得処理(ステップS1): 画面情報設定部311は,記憶部20から,検査対象プログラム27の画面遷移情報23および画面項目情報24を読み込む。
Information Acquisition Process (Step S1): The screen
プロパティ配置処理(ステップS2): プロパティ配置部312は,プロパティ21を読み込み,画面遷移情報23および画面項目情報24にもとづいて,プロパティ21各々が,画面遷移上のどの遷移の仕様に該当するかを判定し,プロパティ21を該当する画面遷移に関連付けて,画面遷移上に配置する。
Property arrangement process (step S2): The
プロパティの入力判定処理(ステップS3): 入力判定部313は,画面遷移に配置されたプロパティ21を順に選択し,選択したプロパティ21の事前条件が,画面遷移上で直近イベントでの入力項目に起因するかを判定する。事前条件が入力項目に起因する場合に,そのプロパティ21の入力判定を「真」とする。
Property input determination process (step S3): The
プロパティ遡及取得処理(ステップS4): 依存プロパティ収集部314は,プロパティ21の事前条件が直近イベントの入力項目に起因していない場合に,画面遷移上を遡って画面遷移に配置されたプロパティ21を取得し,取得したプロパティ21の入力項目の判定が真となるまで,プロパティ取得を繰り返す。
Property retroactive acquisition processing (step S4): If the
依存プロパティ抽出処理(ステップS5): 依存プロパティ収集部314は,取得したプロパティ21をもとに,入力判定が真となるまで収集したプロパティの集合(プロパティ列)を,依存プロパティとして抽出する。
Dependent Property Extraction Processing (Step S5): Based on the acquired
プロパティ補完処理(ステップS6): プロパティ補完部315は,依存プロパティ収集部314によって入力判定が真となるプロパティ21を抽出できなかった場合に,入力判定を真とするために不足しているプロパティを補完する。
Property complement processing (step S6): When the dependency
依存プロパティ整理処理(ステップS7): 依存プロパティ整理部316は,抽出された依存プロパティの中で,重複またはデータ推移として無関係なプロパティ21を除外する。
Dependent Property Organizing Process (Step S7): The dependent
制約条件生成処理(ステップS8): データ制約生成部317は,依存プロパティにおいて,連続するプロパティの事前条件および事後条件ならびに連結条件にもとづいて,テストデータ25の生成の制約条件となるデータ制約を生成する。
Constraint Condition Generation Processing (Step S8): The data
図10は,プロパティ配置処理(ステップS2)のより詳細な処理フロー例を示す図である。 FIG. 10 is a diagram showing a more detailed processing flow example of the property arrangement processing (step S2).
プロパティ配置部312は,画面情報設定部311が保持する画面遷移情報23,画面項目情報24を読み込み,記憶部20からプロパティ21を読み込む(ステップS10)。プロパティ配置部312は,読み込んだプロパティ21を順に選択して,未処理のプロパティ21があれば(ステップS11のY),プロパティ21を事前条件と事後条件とに分け,各条件に含まれる変数およびイベントを抽出し(ステップS12),未処理のプロパティ21がなければ(ステップS11のN),ステップS17の処理へ進む。
The
さらに,プロパティ配置部312は,画面遷移テーブル232から,ステップS12の処理で抽出したイベントと一致するイベントを含む行を全て抽出する(ステップS13)。プロパティ配置部312は,画面遷移テーブル232から抽出した行を順に選択して,未処理の抽出行があれば(ステップS14のY),ステップS15の処理へ進み,未処理の抽出行がなければ(ステップS14のN),ステップS11の処理へ戻る。
Furthermore, the
ステップS15で,プロパティ配置部312は,抽出された変数,イベントにおいて,事前条件または事後条件の変数が,それぞれ,抽出された画面遷移テーブル232の行の遷移元画面または遷移後画面のものと一致するかを判定する(ステップS15)。
In step S15, the
抽出された変数,イベントにおいて,遷移元画面または遷移後画面の変数が一致すると判定した場合に(ステップS15のY),プロパティ配置部312は,一致した画面遷移テーブルの行とプロパティとを関連付けて,結果テーブルに格納する(ステップS16)。一方,抽出された変数,イベントにおいて,変数が一致しないと判定した場合に(ステップS15のN),プロパティ配置部312は,ステップS14の処理へ戻る。
When it is determined that the variables of the transition source screen or the post-transition screen match in the extracted variables and events (Y in step S15), the
ステップS11で,未処理のプロパティがなければ(ステップS11のN),プロパティ配置部312は,結果テーブルを保持して(ステップS17),処理を終了する。
If there is no unprocessed property in step S11 (N in step S11), the
図11は,プロパティ配置部312によって,各プロパティ21から抽出される情報(事前条件の変数,イベント,事後条件の変数)をテーブルとして示す図である。
FIG. 11 is a diagram showing information (precondition variables, events, postcondition variables) extracted from each
図11により,プロパティP1から,事前条件の変数として「ログイン画面#ID,ログイン画面#パスワード,顧客DB#ID,顧客DB#PW」が,イベントとして「ログインボタン」が,事後条件の変数として「商品選択画面#氏名,商品選択画面#会員種別,ログイン画面#ID,顧客DB#ID,顧客DB#名前,顧客DB#種別」が,それぞれ抽出されたことがわかる。 Referring to FIG. 11, from the property P1, “login screen #ID, login screen #password, customer DB # ID, customer DB # PW” as precondition variables, “login button” as event, and “postcondition variable” It can be seen that the product selection screen #name, product selection screen #member type, login screen #ID, customer DB #ID, customer DB #name, customer DB #type are extracted.
図12は,プロパティ配置部312で生成される結果テーブルの例を示す図である。
FIG. 12 is a diagram illustrating an example of a result table generated by the
プロパティ配置部312の結果テーブルでは,各遷移の内容(遷移元画面,イベント,遷移先画面)に,関連付けられたプロパティ21が設定される。
In the result table of the
図13は,プロパティ配置部213の処理結果(結果テーブル)を,画面遷移上に対応付けて示す図である。 FIG. 13 is a diagram showing the processing result (result table) of the property arrangement unit 213 in association with the screen transition.
画面遷移上で,一例として,配置結果テーブルのNo.1のログイン画面41から商品選択画面42への画面遷移に対しプロパティP1が関連付けて設置されていることが表されている。また,確認画面44から支払画面45aへの画面遷移に対し,プロパティP5,P7,P8が,確認画面44から支払画面45bへの画面遷移に対し,プロパティP6,P7,P8が,それぞれ設置されている。
On the screen transition, as an example, the placement result table No. 1 indicates that the property P1 is associated with the screen transition from the
図14は,プロパティの入力判定処理(ステップS3)のより詳細な処理フロー例を示す図である。 FIG. 14 is a diagram showing a more detailed process flow example of the property input determination process (step S3).
入力判定部313は,プロパティ配置部312の結果テーブルから,画面遷移上で各画面遷移に配置されたプロパティの集合を取得する(ステップS20)。入力判定部313は,取得したプロパティの集合から,プロパティ21を順に選択し(ステップS21),未選択のプロパティ21があれば(ステップS22のY),事前条件の画面変数を抽出し(ステップS23),未選択のプロパティ21がなければ(ステップS22のN),ステップS210の処理へ進む。
The
さらに,入力判定部313は,抽出した画面変数を順に選択し(ステップS24),未選択の事前条件の画面変数があれば(ステップS25のY),ステップS27の処理へ進み,未選択の画面変数がなければ(ステップS25のN),そのプロパティ21の入力判定を,「真(OK)」として(ステップS26),ステップS21の処理へ戻る。
Further, the
ステップS27で,入力判定部313は,選択した事前条件の画面変数が,そのプロパティ21のイベントが生じる画面での入力項目であるかを判定する。選択した事前条件の画面変数が,そのプロパティ21のイベントが生じる画面での入力項目であれば(ステップS27のY),抽出した事前条件の画面変数の入力判定を「真(OK)」として(ステップS28),ステップS24の処理へ戻る。事前条件の画面変数が入力項目でなければ(ステップS27のN),入力判定部313は,そのプロパティの入力判定を「偽(NG)」として(ステップS29),ステップS21の処理へ戻る。
In step S27, the
ステップS210で,入力判定部313は,結果を出力して,処理を終了する。
In step S210, the
図15は,入力判定部313の処理結果(結果テーブル)例を示す図である。
FIG. 15 is a diagram illustrating an example of a processing result (result table) of the
入力判定部313が出力する結果テーブルでは,各プロパティ21について,プロパティの入力判定の結果,および,プロパティに含まれる事前条件の変数ごとの入力判定結果(個別入力判定)が設定される。画面変数の個別入力判定に「偽(NG)」が1つでもある場合には,そのプロパティの入力判定の結果は「偽(NG)」と判定される。
In the result table output by the
また,プロパティに事前条件の画面変数が含まれない場合には,事前条件の画面変数に「なし」が,個別入力判定に「真(OK)」が記録される。 If the property does not include a precondition screen variable, “none” is recorded in the precondition screen variable, and “true (OK)” is recorded in the individual input determination.
図16は,入力判定部313の処理の結果を,画面遷移に対応付けて示す図である。
FIG. 16 is a diagram illustrating the processing result of the
図16に示す画面遷移には,各遷移に配置されたプロパティ21に,図15に示す結果テーブルの内容に対応した入力判定の結果が設定されている。例えば,ログイン画面41から商品選択画面42への遷移に配置されたプロパティP1の入力判定は「真(OK)」であることを示している。
In the screen transition shown in FIG. 16, the result of input determination corresponding to the contents of the result table shown in FIG. 15 is set in the
図17は,プロパティ遡及取得処理(ステップS4)および依存プロパティ抽出処理(ステップS5)のより詳細な処理フロー例を示す図である。 FIG. 17 is a diagram showing a more detailed process flow example of the property retroactive acquisition process (step S4) and the dependency property extraction process (step S5).
依存プロパティ収集部314は,入力判定部313の結果テーブルから,入力判定が「偽(NG)」とされたプロパティ21の集合を取得する(ステップS30)。依存プロパティ収集部314は,取得したプロパティの集合からプロパティを順に選択し(ステップS31),未選択のプロパティがあれば(ステップS32のY),入力判定部313で個別入力判定が「偽(NG)」であった変数を取得して,未解決変数とする(ステップS33)。未処理のプロパティがなければ(ステップS32のN),ステップS312の処理へ進む。
The dependency
依存プロパティ収集部314は,入力判定部313の結果テーブルを用いて,そのプロパティ21を起点として画面遷移を遡り,遷移に配置されたプロパティ21を取得し(ステップS34),プロパティ21が取得できたかを判定する(ステップS35)。
The dependency
画面遷移を遡ってプロパティ21が取得できた場合に(ステップS35のY),依存プロパティ収集部314は,取得したプロパティ21の事前条件および事後条件に未解決変数が含まれ,かつ,未解決変数を含む条件式が未解決変数との等式であるかを判定する(ステップS36)。依存プロパティ収集部314は,その未解決変数が,ステップS36の判定条件を満たす場合に(ステップS36のY),ステップS38の処理へ進む。画面遷移を遡ってプロパティが取得できなかった場合(ステップS35のN),または,遡って取得したプロパティにおいて未解決変数が上記のステップS36の判定条件を満たさなかった場合(ステップS36のN)に,ステップS37の処理へ進む。
When the
ステップS37では,依存プロパティ収集部314は,図18に例示する作業テーブルに,選択したプロパティ21を,未解決プロパティとして「未解決(×)」を記録し,ステップS31の処理へ戻る。図18に示す作業テーブルは,プロパティごとに,未解決変数,依存プロパティ,依存プロパティの事後条件が含む遷移元変数,解決の状態を示す。
In step S37, the dependency
ステップS38では,依存プロパティ収集部314は,画面遷移を遡って取得したプロパティ21を依存プロパティ・リストに追加し,作業テーブルに,未解決変数およびその未解決変数と等号で関係付けられた変数を「遷移元変数」として記録する。さらに,依存プロパティ収集部314は,画面遷移を遡って取得したプロパティ21の入力判定が「真(OK)」であるかを判定する(ステップS39)。
In step S38, the dependency
依存プロパティ収集部314は,画面遷移を遡って取得したプロパティ21の入力判定が真であれば(ステップS39のY),作業テーブルの該当する未解決変数の解決欄に「解決(○)」を記録する(ステップS310)。プロパティの入力判定が真でなければ(ステップS39のN),依存プロパティ収集部314は,作業テーブルの該当する未解決変数の解決欄に「未解決(×)」を記録し,遷移元画面の画面変数を未解決変数に追加して(ステップS310),ステップS31の処理へ戻る。
If the input determination of the
ステップS312では,依存プロパティ収集部314は,処理結果として,依存プロパティ・リストを出力して,処理を終了する。
In step S312, the dependency
図19は,依存プロパティ収集部の出力結果である依存プロパティで・リストの例を示す図である。 FIG. 19 is a diagram illustrating an example of a list of dependency properties that are output results of the dependency property collection unit.
依存プロパティ・リストには出力された依存プロパティ列の一覧が記録され,依存プロパティ列ごとに,識別番号(No)と,依存プロパティ列に含まれるプロパティ21が記録される。例えば,No=1の依存プロパティ列は,プロパティP3,プロパティP1を要素とするプロパティの集合であることを示す。
A list of output dependency property columns is recorded in the dependency property list, and an identification number (No) and a
図20は,依存プロパティ収集部314の処理の結果を,画面遷移に対応付けて示す図である。
FIG. 20 is a diagram illustrating the processing result of the dependency
図20に示す画面遷移には,各遷移に設置されたプロパティ21に,図19に示す依存プロパティ・リスト中の対応する依存プロパティ列が設定されている。例えば,商品選択画面42から確認画面44への遷移のプロパティP3に対して,プロパティ列{プロパティP3,プロパティP1}が対応付けられている。
In the screen transition shown in FIG. 20, the corresponding dependency property column in the dependency property list shown in FIG. 19 is set in the
図21は,プロパティ整理処理(ステップS7)のより詳細な処理フロー例を示す図である。 FIG. 21 is a diagram showing a more detailed processing flow example of the property organizing process (step S7).
依存プロパティ整理部316は,依存プロパティ・リスト(依存プロパティ列の集合)を取得する(ステップS40)。依存プロパティ整理部316は,依存プロパティ・リストから,依存プロパティ列を順に選択し(ステップS41),未選択の依存プロパティ列があれば(ステップS42のY),ステップS43の処理へ進み,未選択の依存プロパティ列がなければ(ステップS42のN),ステップS46の処理へ進む。
The dependency
ステップS43では,依存プロパティ整理部316は,選択した依存プロパティ列と,依存プロパティ・リストの他の依存プロパティ列とを比較し,選択した依存プロパティ列が他の依存プロパティ列に含まれるかを調べて(ステップS44)。
In step S43, the dependency
ここで,依存プロパティ列L1が,依存プロパティ列L2に含まれるとは,以下の包含条件C1または包含条件C2が成立することを意味する。 Here, the dependency property string L1 being included in the dependency property string L2 means that the following inclusion condition C1 or inclusion condition C2 is satisfied.
包含条件C1=依存プロパティ列L1の全ての要素プロパティが,依存プロパティ列L2の要素である。 Inclusion condition C1 = All element properties of the dependency property string L1 are elements of the dependency property string L2.
包含条件C2=依存プロパティ列L1と依存プロパティ列L2は,2番目以降のプロパティ要素は同一で1番目のプロパティ要素だけが相違であり,かつ,依存プロパティ列L1の1番目のプロパティの事前条件が,依存プロパティ列L2の1番目のプロパティの事前条件に含まれる。 Inclusion condition C2 = the dependency property column L1 and the dependency property column L2 are the same in the second and subsequent property elements, differ only in the first property element, and the precondition of the first property in the dependency property column L1 is , Included in the precondition of the first property of the dependency property column L2.
依存プロパティ整理部316は,選択した依存プロパティ列が他の依存プロパティ列に含まれる場合に(ステップS44のY),その選択した依存プロパティ列を,依存プロパティ・リストから削除する(ステップS45)。選択した依存プロパティ列が他の依存プロパティ列に含まれない場合に(ステップS44のN),依存プロパティ整理部316は,ステップS41の処理へ戻る。
When the selected dependency property column is included in another dependency property column (Y in step S44), the dependency
ステップS46では,依存プロパティ整理部316は,処理結果を出力し,処理を終了する。
In step S46, the dependency
図22は,依存プロパティ整理部の処理結果(結果テーブル)の例を示す図である。 FIG. 22 is a diagram illustrating an example of a processing result (result table) of the dependency property organizing unit.
図22に示す依存プロパティ・リストにおいて,No=1の依存プロパティ列は,包含条件C1により,No=2および3の依存プロパティ列に含まれる。また,No=4の依存プロパティ列は,包含条件C2によりNo=2および3の依存プロパティ列に含まれる。よって,依存プロパティ整理部316によって,依存プロパティ・リストから,No=1および4の依存プロパティ列が削除される。
In the dependency property list shown in FIG. 22, the dependency property column of No = 1 is included in the dependency property columns of No = 2 and 3 by the inclusion condition C1. Further, the dependency property string of No = 4 is included in the dependency property strings of No = 2 and 3 by the inclusion condition C2. Therefore, the dependency
図23は,制約条件生成処理(ステップS8)のより詳細な処理フロー例を示す図である。 FIG. 23 is a diagram showing a more detailed process flow example of the constraint condition generation process (step S8).
データ制約生成部317は,依存プロパティ整理部316の結果テーブルから,依存プロパティ・リストを取得する(ステップS50)。データ制約生成部317は,依存プロパティ・リストから依存プロパティ列を順に選択し(ステップS51),未選択の依存プロパティ列があれば(ステップS52のY),ステップS53の処理へ進み,未選択の依存プロパティ列がなければ(ステップS52のN),ステップS54の処理へ進む。
The data
ステップS53では,データ制約生成部317は,選択した依存プロパティ列の1番目のプロパティの事前条件,2番目から最後までのプロパティの事前条件および事後条件を,ANDで結合してデータ制約として結果テーブルに保存し,ステップS51の処理へ戻る。
In step S53, the data
ステップS54では,データ制約生成部317は,結果テーブルを出力する。
In step S54, the data
図24は,データ制約生成部の処理結果(結果テーブル)の例を示す図である。 FIG. 24 is a diagram illustrating an example of a processing result (result table) of the data constraint generation unit.
データ制約生成部317の結果テーブルでは,データ制約ごとに,識別番号(No),および依存プロパティ列を構成するプロパティ要素(依存プロパティ),データ制約の内容が記録される。
In the result table of the data
例えば,No=1のデータ制約として,
「(確認画面#会員種別=“ゴールド”)AND(商品選択画面#会員種別!=“”)AND(商品選択画面#数量>0)AND(商品選択画面#氏名=確認画面#氏名)AND(商品選択画面#会員種別=確認画面#会員種別)AND(商品選択画面#数量=確認画面#数量)AND(商品選択画面#商品名=確認画面#商品名)AND(商品選択画面#価格=確認画面#価格)AND(COUNT(顧客DB,(顧客DB#ID=ログイン画面#ID)AND(顧客DB#PW=ログイン画面#パスワード))=1)AND(商品選択画面#氏名=顧客DB#名前.where(顧客DB#ID=ログイン画面#ID))AND(商品選択画面#会員種別=顧客DB#種別.where(顧客DB#ID=ログイン画面#ID))」
という制約条件の記述が生成され,記録される。
For example, as a data constraint of No = 1,
“(Confirmation screen #member type =“ gold ”) AND (product selection screen #member type! =“ ”) AND (product selection screen #quantity> 0) AND (product selection screen # name = confirmation screen #name) AND ( Product selection screen #Member type = confirmation screen #Member type) AND (Product selection screen # Quantity = Confirmation screen #Quantity) AND (Product selection screen #Product name = Confirmation screen #Product name) AND (Product selection screen # Price = Confirmation) Screen #price AND (COUNT (customer DB, (customer DB # ID = login screen #ID) AND (customer DB # PW = login screen #password)) = 1) AND (product selection screen # name = customer DB # name .Where (customer DB # ID = login screen #ID)) AND (product selection screen #member type = customer DB # type.where (customer DB # ID = login screen #ID)) ”
A description of the constraint condition is generated and recorded.
プロパティ補完処理(ステップS6)は,依存プロパティ収集部314によって,入力判定が真となるプロパティ・リストを抽出できなかった場合のみ,依存プロパティ収集部314によって実行される。
The property complementing process (step S6) is executed by the dependency
図25および図26は,入力判定が真とならないプロパティの例を示す図である。 25 and 26 are diagrams illustrating examples of properties for which the input determination is not true.
図25に示すプロパティ・リストでは,図6に例示するプロパティ21と比べて,プロパティP3の事後条件において,「(商品選択画面#会員種別=確認画面#会員種別)」の条件がない。このような条件の欠落は,プロパティP3で,遷移元画面である商品選択画面42と遷移先画面である確認画面44において,表示項目の会員種別が同一であるとして省略されていることなどから生じる。
In the property list shown in FIG. 25, the condition “(product selection screen #member type = confirmation screen # member type)” is not included in the post condition of the property P3 as compared with the
また,図26に示すプロパティ・リストでは,図6に示すプロパティP3自体がない。このようなプロパティ21の欠落は,遷移元画面である商品選択画面42と遷移先画面である確認画面44の表示項目が全て同一であることなどから生じる。
Further, in the property list shown in FIG. 26, there is no property P3 itself shown in FIG. Such missing of the
図25および図26のいずれの例でも,図6に示すプロパティP3の事後条件の「(商品選択画面#会員種別=確認画面#会員種別)」がないために,依存プロパティ・リスト収集部314によって,入力判定が真となるプロパティを抽出することができない。
In both the examples of FIG. 25 and FIG. 26, since there is no “(product selection screen #member type = confirmation screen #member type)” of the post condition of the property P3 shown in FIG. 6, the dependent property
図27は,プロパティ補完処理(ステップS6)のより詳細な処理フロー例を示す図である。 FIG. 27 is a diagram showing a more detailed processing flow example of the property complementing process (step S6).
プロパティ補完部315は,記憶部20から,画面遷移情報23,画面項目情報24,およびプロパティ21と,プロパティ配置手段312の結果テーブルとを読み込む(ステップS60)。プロパティ補完部315は,画面遷移情報23から,遷移関係にある画面の組を取得する(ステップS61)。プロパティ補完部315は,未処理の画面の組があれば(ステップS62のY),ステップS63の処理へ進み,未処理の画面の組がなければ(ステップS62のN),ステップS69の処理へ進む。
The
ステップS63の処理では,プロパティ補完部315は,その画面の組の遷移に配置されたプロパティを取得し,プロパティが取得できれば(ステップS64のY),ステップS65の処理へ進み,プロパティが取得できなければ(ステップS64のN),ステップS68の処理へ進む。
In the process of step S63, the
ステップS65では,プロパティ補完部315は,遷移元画面の画面項目のうち,取得したプロパティの事後条件に登場しない画面項目があるかを調べ,登場しない画面項目があれば(ステップS65のY),その画面項目を収集する(ステップS66)。さらに,プロパティ補完部315は,遷移元画面の未登場の画面項目に関してプロパティを生成して(ステップS67),ステップS61の処理へ戻る。プロパティ補完部315は,登場しない画面項目がなければ(ステップS65のN),ステップS61の処理へ戻る。
In step S65, the
遷移元画面の未登場の画面項目に関するプロパティの生成は,例えば以下のように行う。 For example, the property generation for the screen item that has not appeared in the transition source screen is performed as follows.
・ 事前条件は「TRUE」とする,
・ イベントは,この画面間の遷移を起こすイベントとする,
・ 事後条件は,未登場の画面項目が,遷移先画面において未登場の画面項目名と同名の画面項目と等しいとする。このとき,遷移先画面に,未登場の画面項目名と同名の画面項目がない場合でも,遷移先画面に該名の画面項目があるとして,上記の条件を生成する。
・ The precondition is "TRUE".
• The event is an event that causes a transition between the screens.
• The post-condition is that a screen item that has not appeared is the same as the screen item that has the same name as the screen item that has not appeared in the transition destination screen. At this time, even if there is no screen item with the same name as a screen item name that has not yet appeared in the transition destination screen, the above condition is generated assuming that there is a screen item with that name in the transition destination screen.
ステップS64の処理では,プロパティが取得できなければ(ステップS64のN),プロパティ補完部315は,遷移元画面の全ての画面項目を,非存在の画面項目として(ステップS68)ステップS67の処理へ進む。
If the property cannot be acquired in the process of step S64 (N in step S64), the
ステップS69では,プロパティ補完部315は,処理結果(結果テーブル)を保持する。
In step S69, the
図28は,プロパティ補完部の処理結果の例を示す図である。 FIG. 28 is a diagram illustrating an example of the processing result of the property complementing unit.
図28(A)に示す結果テーブルは,図25に示すプロパティに対する補完として生成されたプロパティ記述である。 The result table shown in FIG. 28A is a property description generated as a complement to the property shown in FIG.
プロパティ補完部315によって,遷移元画面である商品選択画面42の画面項目のうち,取得したプロパティP3の事後条件に登場しない項目として「会員種別」が特定され,遷移先画面である確認画面44の同一名の項目とをもとに,「(商品選択画面#会員種別=確認画面#会員種別)」が生成される。さらに,事前条件が「TRUE」であり,イベントが,この遷移を起こす「確認ボタン押下」であり,事後条件が「(商品選択画面#会員種別=確認画面#会員種別)」であるプロパティ記述が生成される。
Of the screen items of the
図28(B)は,図26に示すプロパティに対する補完として生成されたプロパティ記述である。 FIG. 28B shows a property description generated as a complement to the property shown in FIG.
プロパティ補完部315によって,遷移元画面である商品選択画面42の全ての画面項目を用いて,「(商品選択画面#氏名=確認画面#氏名)AND(商品選択画面#会員種別=確認画面#会員種別)AND(商品選択画面#数量=確認画面#数量)AND(商品選択画面#商品名=確認画面#商品名)AND(商品選択画面#価格=確認画面#価格)」が生成される。そして,事前条件が「TRUE」であり,イベントが,この遷移を起こす「確認ボタン押下」であり,事後条件が上記の生成された記述であるプロパティ記述が生成される。
By using all the screen items of the
以上説明したように,データ生成装置3では,データ制約生成部31がプロパティ事前条件からテストデータ25の生成のためのデータ制約を生成し,データ生成部33が,SMTソルバでそのデータ制約を解くことによって,モデル検査用のテストデータを生成することができる。
As described above, in the
データ生成装置3によれば,実行経路上においてプロパティが前後関係を持って設定されている検査対象プログラムについて,そのプロパティの事前条件が真となるようなデータを生成のためのデータ制約を決定できるようになり,モデル検査のためのテストデータ生成の処理負担を軽減させることができる。
According to the
また,データ生成装置3によれば,前後関係を持つプロパティにもとづいて構成されたデータ制約(制約条件)が,SMTソルバやSATソルバを利用したデータ生成部33に指定されることによって,データ制約を満たす具体的なデータを生成することができる。
Further, according to the
1 モデル検査装置
10 制御部
20 記憶部
21 プロパティ
22 データベース(DB)情報
23 画面遷移情報
24 画面項目情報
25 テストデータ
27 検査対象プログラム
3 データ生成装置
31 データ制約生成部
311 画面情報設定部
312 プロパティ配置部
313 入力判定部
314 依存プロパティ収集部
315 プロパティ補完部
316 依存プロパティ整理部
317 データ制約生成部
33 データ生成部
331 データ制約条件保持部
332 データ制約ソルバ
5 検査実行装置
51 ドライバ
53 検査実行部
DESCRIPTION OF
Claims (5)
コンピュータが,
検査対象となるプログラムで実行される画面間の遷移を示す画面遷移情報,各画面が備える項目を示す画面項目情報,および,前記プログラムが満たすべき仕様を示すプロパティを読み込む画面情報設定処理ステップと,
前記プロパティが,前記画面遷移情報に示される画面遷移上のどの画面遷移の仕様に該当するか判定し,該当すると判定されたプロパティを画面遷移に関連付けるプロパティ配置処理ステップと,
前記画面遷移に関連付けられたプロパティについて,該プロパティの事前条件が,前記プログラムの画面遷移上の直近イベントでの入力項目に起因するかを判定し,該事前条件が前記直近イベントでの入力項目に起因する場合に,判定を真とする入力判定処理ステップと,
前記プロパティの事前条件が直近イベントでの入力項目ではない場合に,前記プログラムの画面遷移を遡りながらプロパティを取得し,該取得したプロパティに対する入力項目の判定が真となるまでプロパティの収集を繰り返し,取得したプロパティ群を依存プロパティとして抽出するプロパティ収集処理ステップと,
前記依存プロパティの事前条件および事後条件ならびに連結条件を用いて,データ生成のための制約条件を生成するデータ制約生成処理ステップとを
実行することを特徴とするデータ生成方法。 In a data generation method for generating test data for program operation check,
Computer
Screen information setting process step for reading screen transition information indicating transitions between screens executed by the program to be inspected, screen item information indicating items included in each screen, and properties indicating specifications to be satisfied by the program;
A property placement processing step for determining which screen transition specification on the screen transition indicated in the screen transition information corresponds to the property, and associating the determined property with the screen transition;
For the property associated with the screen transition, it is determined whether the precondition of the property is caused by the input item at the most recent event on the screen transition of the program, and the precondition is set as the input item at the most recent event. An input determination processing step in which the determination is true, if any,
If the property precondition is not an input item at the most recent event, acquire the property by going back to the screen transition of the program, and repeat the property collection until the input item determination for the acquired property is true, A property collection processing step for extracting the acquired property group as a dependent property;
A data generation method characterized by executing a data constraint generation processing step of generating a constraint condition for data generation using the precondition and postcondition of the dependency property, and the connection condition.
前記画面遷移情報,画面項目情報および前記プロパティをもとに,前記依存プロパティにおいて入力判定を真とするために不足しているプロパティを特定し,補完するプロパティ補完処理ステップを,
実行することを特徴とする請求項1に記載のデータ生成方法。 Said computer further comprising:
Based on the screen transition information, the screen item information, and the property, a property completion processing step for identifying and complementing a property that is insufficient to make the input determination true in the dependency property,
The data generation method according to claim 1, wherein the data generation method is executed.
前記依存プロパティに含まれる重複部分またはデータ推移と無関係なプロパティを除外するプロパティ整理処理ステップを,
実行することを特徴とする請求項1または請求項2に記載のデータ生成方法。 Said computer further comprising:
Property reorganization processing step for excluding duplicate parts included in the dependency property or properties unrelated to data transition,
The data generation method according to claim 1, wherein the data generation method is executed.
コンピュータに,
検査対象となるプログラムで実行される画面間の遷移を示す画面遷移情報,各画面が備える項目を示す画面項目情報,および,前記プログラムが満たすべき仕様を示すプロパティを読み込む画面情報設定処理と,
前記プロパティが,前記画面遷移情報に示される画面遷移上のどの画面遷移の仕様に該当するか判定し,該当すると判定されたプロパティを画面遷移に関連付けるプロパティ配置処理と,
前記画面遷移に関連付けられたプロパティについて,該プロパティの事前条件が,前記プログラムの画面遷移上の直近イベントでの入力項目に起因するかを判定し,該事前条件が前記直近イベントでの入力項目に起因する場合に,判定を真とする入力判定処理と,
前記プロパティの事前条件が直近イベントでの入力項目ではない場合に,前記プログラムの画面遷移を遡りながらプロパティを取得し,該取得したプロパティに対する入力項目の判定が真となるまでプロパティの収集を繰り返し,取得したプロパティ群を依存プロパティとして抽出するプロパティ収集処理と,
前記依存プロパティの事前条件および事後条件ならびに連結条件を用いて,データ生成のための制約条件を生成するデータ制約生成処理とを
実行させるためのデータ生成プログラム。 A data generation process for generating test data for checking the operation of a program,
Computer
Screen information setting processing for reading screen transition information indicating transitions between screens executed by the program to be inspected, screen item information indicating items included in each screen, and properties indicating specifications to be satisfied by the program;
A property placement process for determining which screen transition specification on the screen transition indicated in the screen transition information corresponds to the property, and associating the determined property with the screen transition;
For the property associated with the screen transition, it is determined whether the precondition of the property is caused by the input item at the most recent event on the screen transition of the program, and the precondition is set as the input item at the most recent event. If it is, input judgment processing that makes the judgment true,
If the property precondition is not an input item at the most recent event, acquire the property by going back to the screen transition of the program, and repeat the property collection until the input item determination for the acquired property is true, Property collection processing that extracts the acquired property group as a dependent property;
A data generation program for executing a data constraint generation process for generating a constraint condition for data generation using the precondition and postcondition of the dependency property, and the connection condition.
検査対象となるプログラムで実行される画面間の遷移を示す画面遷移情報,各画面が備える項目を示す画面項目情報,および,前記プログラムが満たすべき仕様を示すプロパティを読み込む画面情報設定部と,
前記読み込まれた画面遷移情報,画面項目情報およびプロパティを記憶する記憶部と,
前記プロパティが,前記画面遷移情報に示される画面遷移上のどの画面遷移の仕様に該当するか判定し,該当すると判定されたプロパティを画面遷移に関連付けるプロパティ配置部と,
前記画面遷移に関連付けられたプロパティについて,該プロパティの事前条件が,前記プログラムの画面遷移上の直近イベントでの入力項目に起因するかを判定し,該事前条件が前記直近イベントでの入力項目に起因する場合に,判定を真とする入力判定部と,
前記プロパティの事前条件が直近イベントでの入力項目ではない場合に,前記プログラムの画面遷移を遡りながらプロパティを取得し,該取得したプロパティに対する入力項目の判定が真となるまでプロパティの収集を繰り返し,取得したプロパティ群を依存プロパティとして抽出するプロパティ収集部と,
前記依存プロパティの事前条件および事後条件ならびに連結条件を用いて,データ生成のための制約条件を生成するデータ制約生成部とを
備えることを特徴とするデータ生成装置。 In a data generation device that generates test data for checking the operation of a program,
Screen transition information indicating transitions between screens executed by the program to be inspected, screen item information indicating items included in each screen, and a screen information setting unit for reading properties indicating specifications to be satisfied by the program,
A storage unit for storing the read screen transition information, screen item information, and properties;
Determining which screen transition specification on the screen transition indicated by the screen transition information corresponds to the property, and a property placement unit for associating the determined property with the screen transition;
For the property associated with the screen transition, it is determined whether the precondition of the property is caused by the input item at the most recent event on the screen transition of the program, and the precondition is set as the input item at the most recent event. An input determination unit that makes the determination true if
If the property precondition is not an input item at the most recent event, acquire the property by going back to the screen transition of the program, and repeat the property collection until the input item determination for the acquired property is true, A property collection unit that extracts the acquired property group as a dependent property;
A data generation apparatus comprising: a data constraint generation unit configured to generate a constraint condition for data generation using the precondition and postcondition of the dependency property and the connection condition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010269517A JP5561135B2 (en) | 2010-12-02 | 2010-12-02 | Data generation method, program, and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010269517A JP5561135B2 (en) | 2010-12-02 | 2010-12-02 | Data generation method, program, and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012118873A JP2012118873A (en) | 2012-06-21 |
JP5561135B2 true JP5561135B2 (en) | 2014-07-30 |
Family
ID=46501588
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010269517A Expired - Fee Related JP5561135B2 (en) | 2010-12-02 | 2010-12-02 | Data generation method, program, and apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5561135B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11586935B2 (en) * | 2017-04-11 | 2023-02-21 | Siemens Industry Software Inc. | Systems and methods to semantically compare product configuration models |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5884657B2 (en) * | 2012-06-22 | 2016-03-15 | 富士通株式会社 | Program, test case generation method, and test case generation apparatus |
US9892027B2 (en) * | 2014-07-09 | 2018-02-13 | Fujitsu Limited | Event-driven software testing |
JP6007222B2 (en) * | 2014-10-15 | 2016-10-12 | 日本電信電話株式会社 | Abnormal test data generation device, method, and program capable of efficiently covering specifications for multiple input variables |
JP6007221B2 (en) * | 2014-10-15 | 2016-10-12 | 日本電信電話株式会社 | Abnormal test data generation apparatus, method, and program for multiple input variables |
JP6007223B2 (en) * | 2014-10-15 | 2016-10-12 | 日本電信電話株式会社 | Abnormal system test data generation device, method, and program with high visibility for multiple input variables |
JP6007220B2 (en) * | 2014-10-15 | 2016-10-12 | 日本電信電話株式会社 | Normal test data generation apparatus, method and program for multiple input variables |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008293382A (en) * | 2007-05-25 | 2008-12-04 | Fuji Electric Holdings Co Ltd | Automatic test specification generation system |
-
2010
- 2010-12-02 JP JP2010269517A patent/JP5561135B2/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11586935B2 (en) * | 2017-04-11 | 2023-02-21 | Siemens Industry Software Inc. | Systems and methods to semantically compare product configuration models |
Also Published As
Publication number | Publication date |
---|---|
JP2012118873A (en) | 2012-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5561135B2 (en) | Data generation method, program, and apparatus | |
Elbaum et al. | Improving web application testing with user session data | |
Henard et al. | Bypassing the combinatorial explosion: Using similarity to generate and prioritize t-wise test configurations for software product lines | |
AU2012100128A4 (en) | A computer implemented system and method for indexing and optionally annotating use cases and generating test scenarios therefrom | |
Neto et al. | A systematic mapping study of software product lines testing | |
Geng et al. | Improving web navigation usability by comparing actual and anticipated usage | |
US20140331212A1 (en) | Computer implemented system and method for indexing and annotating use cases and generating test scenarios therefrom | |
Hobeck et al. | Process mining on blockchain data: a case study of Augur | |
US9672317B2 (en) | Quality of results system | |
Andry et al. | Online voucher e-commerce testing using ISO 9126 model | |
JP6120607B2 (en) | Requirement detection apparatus and requirement detection program | |
Eladawy et al. | A new algorithm for repairing web-locators using optimization techniques | |
JP5282522B2 (en) | Information management apparatus, information management method, and information management program | |
JP5900212B2 (en) | Test data generation apparatus, program, and method | |
JP2014002565A (en) | Effect range extraction method and effect range extraction program of application program | |
JP5900197B2 (en) | Route condition selection apparatus, program, and method | |
JP2008117029A (en) | Method for checking out invalid procedure during creation of operational work procedure, method for generating command for preventing occurrence of failure, automatic execution command generation system, and program therefor | |
US20240046178A1 (en) | Machine learning predictive modeling with natural language processing of end-user communications | |
JP5471718B2 (en) | Property analysis apparatus, property analysis method, and property analysis program | |
JP5561142B2 (en) | DATA GENERATION DEVICE, DATA GENERATION METHOD, AND PROGRAM | |
Ogata et al. | An automation of check focusing on CRUD for requirements analysis model in UML | |
Nikiforova et al. | Data quality model-based testing of information systems: Two-level testing of the insurance system | |
Dobolyi | An exploration of user-visible errors in web-based applications to improve web-based applications | |
Cookland | Flattening Event Data Extracted From SAP For Process Discovery | |
KR101995055B1 (en) | System and method for collecting contents log data based on mobile environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130904 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140430 |
|
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: 20140513 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140526 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5561135 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |