JP2004280231A - Verification method for software - Google Patents

Verification method for software Download PDF

Info

Publication number
JP2004280231A
JP2004280231A JP2003067715A JP2003067715A JP2004280231A JP 2004280231 A JP2004280231 A JP 2004280231A JP 2003067715 A JP2003067715 A JP 2003067715A JP 2003067715 A JP2003067715 A JP 2003067715A JP 2004280231 A JP2004280231 A JP 2004280231A
Authority
JP
Japan
Prior art keywords
test
factor analysis
analysis table
input
software
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003067715A
Other languages
Japanese (ja)
Inventor
Hisaaki Goto
久明 後藤
Suehiro Orita
末広 折田
Toshiaki Higuchi
俊昭 樋口
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2003067715A priority Critical patent/JP2004280231A/en
Publication of JP2004280231A publication Critical patent/JP2004280231A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an automatic execution tool for automatically executing operation confirmation of an application to improve quality of software. <P>SOLUTION: This verification method for the software for automatically testing the quality of the software has: a condition extraction step for extracting operation environment conditions and input conditions to the target application program; a factor analysis table creation step for analyzing a value which the input conditions and the operation environment conditions extracted in the condition extraction step can have, and creating a two-dimensional factor analysis table; a test item table creation step for combining an input condition group with an environment condition group to decide an item to be tested, on the basis of the factor analysis table created in the factor analysis table creation step; and a test script generation step for generating a test script according to the test item created in the test item table creation step. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
アプリケーションプログラムの動作確認を自動的に実行し、ソフトウエアの品質向上のための自動実行ツールの技術に関する。
【0002】
【従来の技術】
アプリケーションプログラムの動作確認に対し、従来の自動テストツールは、時系列に沿ってマウス操作やキー入力を行うことによって記録・再生することを基本としている。自動テストツールは、テストスクリプトを自動生成する操作レコーダ、あるいは、テストスクリプトを実行して結果を集計するテストツール等のサブシステムから構成されており、これらの自動化によって、アプリケーションの自動テスト等への適用がなされている。また、一連の処理手順を記述したテストスクリプトは、開発言語に依存することなく、自由に作成・編集が行える便宜をユーザに与えている(例えば、特許文献1、2参照)。
【0003】
【特許文献1】
特開平8−305609号公報(第2〜8頁)
【0004】
【特許文献2】
特開平9−218804号公報(第2〜8頁)
【0005】
【発明が解決しようとする課題】
しかしながら、マウス操作やキー入力を時系列に沿って記録・再生する従来の方法では、以下のように、
1)実際にプログラムが動き始める段階にならなければ、テストスクリプトを作成することができない。
2)また、ブラックボックステストでは、プログラムの外部仕様に基づいて、どのような入力をプログラムに与えるか、あるいはどのような環境条件下でプログラムを動作させるかを考慮してテスト項目を作成するため、記録・再生する方法では、実際に動いているプログラムに基づくテストとなり、外部仕様に基づいていない。
3)さらに、ブラックボックステストは、網羅性の観点から、テスト項目を設定するに当たり、要因分析表に記入された因子群について、それらの状態を組み合わせることにより行っている。このため、組み合わせの回数分だけマウス操作やキー入力を行なわねばならず、コストがかかる上、単純操作の繰り返しによる操作ミスを引き起こす恐れがある。
4)テストスクリプトを開発者が自由に作成・編集を行うことができるとしても、テスト項目設定、要因分析表に記入された因子群を要素としたテストスクリプトとなっていないため、それらの状態を容易に組み合わせることができない。
【0006】
などの欠点を抱えている。
そこで、本発明では、上記の問題を解決するため、マウス操作によるクリック、キーボード操作による入力等に対し、GUI(Graphic User Interface)がどのように反応するかのテスト、ブラックボックステスト、とくに、リグレッションテスト(回帰テスト)に適したソフトウエアの検証技術を提供する。
【0007】
【課題を解決するための手段】
第一の発明は、ソフトウエアの品質を自動的にテストするソフトウエアの検証方法であって、対象とするアプリケーションプログラムへの入力条件および動作環境条件を抽出する条件抽出ステップと、前記条件抽出ステップで抽出された入力条件および動作環境条件の取り得る値を分析して二次元の要因分析表を作成する要因分析表作成ステップと、前記要因分析表作成ステップで作成した要因分析表に基づき、入力条件群および環境条件群を組み合わせてテストすべき項目を決定するテスト項目表作成ステップと、前記テスト項目表作成ステップで作成されたテスト項目にしたがってテストスクリプトを生成するテストスクリプト生成ステップとを有することを特徴とするソフトウエアの検証方法に関する。
【0008】
すなわち、第一の発明の方法によれば、条件抽出ステップにおいて、外部仕様に基づいたプログラムに対する入力条件及び動作条件を抽出し、要因分析表作成ステップでテストの因子を網羅し、テスト項目表作成ステップでその因子の組み合わせからテスト項目を作成し、テストスクリプト生成ステップでテスト項目表に対応したスクリプトが自動生成される。
【0009】
上記の発明によって、プログラムの外部仕様に基づいた入力条件および環境条件を考慮したテストが効率的に実行される。
第二の発明は、前記テストスクリプト生成ステップにおいて、前記要因分析表の各因子をオブジェクトとして定義し、その状態をメソッドやプロパティとして定義し、これらを組み合わせた前記テスト項目にしたがってテストスクリプトを生成する上記第一の発明に記載のソフトウエアの検証方法に関する。
【0010】
すなわち、第二の発明の方法によれば、文章表現で記述されたプログラムの外部仕様を、いったん、オブジェクトとして要因と状態からなる二次元の要因分析表とし、テスト項目を設計することとなる。これによって、文章表現となっているユーザマニュアルやプログラムの外部仕様を直接にテスト項目を作成するときの困難性や漏れ発生が克服される。
【0011】
第三の発明は、対象とするアプリケーションプログラムの動作環境上の条件をオブジェクトとして定義し、テストした後の復帰や状態が作り出されるまでの一連の操作を自動的に繰り返すことによって、状態の遷移を起こさせることを特徴とする上記第一あるいは第二の発明に記載のソフトウエアの検証方法に関する。
すなわち、第三の発明の方法によれば、オブジェクトとして定義したプログラムの動作環境条件にしたがってテスト後の復帰や次の状態を作る操作を自動化することで状態の遷移を容易になり、テスト工数の削減が図れる。
【0012】
第四の発明は、各テスト項目に対し期待される出力データ値やプログラムの振舞を予めオブジェクトとして定義しておくことで、テスト結果の判定を自動化させることを特徴とする上記第一乃至第三の発明のいずれかに記載のソフトウエアの検証方法に関する。
すなわち、第四の発明によれば、予め定義した各テスト項目の出力データ値やプログラムの振舞にしたがって、テスト結果が自動的に判定されることになり、判定するための評価工数を削減することができる。
【0013】
第五の発明は、対象とするアプリケーションプログラムの動作環境上の条件をオブジェクトとして記録しておき、前記テストスクリプトを実行する直前に現在の動作環境と比較することで、前記アプリケーションプログラムの外部仕様変更を検出する上記第一乃至第四の発明のいずれかに記載のソフトウエアの検証方法に関する。
【0014】
すなわち、第五の発明によれば、記憶部にプログラムの動作環境を格納しておくことにより、テストスクリプトの実行前に、この格納された動作環境を参照し、現在の動作環境と比較できるため、変更された外部仕様を容易に検出することができる。
【0015】
【発明の実施の形態】
以下、図面にもとづいて本発明の実施形態を説明する。
図1は、本発明の基本システム構成を示す。ソフトウエアの検証システムは、ユーザが対象とするアプリケーションプログラムテストのための入力条件および使用環境条件を入力するキーボード等の入力手段2、ソフトウエア検証装置1、記憶装置3、プリンタ4、およびディスプレイ5で構成される。
【0016】
また、ソフトウエア検証装置1は、条件抽出手段11、要素分析表作成手段12、テスト項目表作成手段13、編集手段14、およびテストスクリプト生成手段15を有する。さらに、記憶装置3には、生成したテストスクリプト31、およびプログラム環境条件32が格納されている。
記憶装置3におけるプログラム環境条件32は、オブジェクトとして格納しておき、テストスクリプトを実行する直前で現在の動作環境と比較し、プログラムの外部仕様の変更がないかどうかの検出させるために使用されるものである。
【0017】
ここで、本実施の形態のソフトウエア検証装置1はコンピュータであり、条件抽出手段11、要素分析表作成手段12、テスト項目表作成手段13、編集手段14、およびテストスクリプト生成手段15の各手段は、該コンピュータ上で、あらかじめ内蔵された当該プログラムが実行されることにより実現されるものである。また、当該プログラムは、フロッピーディスク、コンパクトディスク等のコンピュータ読み取り可能な記録媒体に記録され、図には示していないが内蔵された媒体読取装置にセットしインストールすることによって、実行可能な状態としてもよい。
【0018】
図2は、本発明の実施の形態になるソフトウエア検証装置の構成を示す。ユ−ザが、キーボードやマウス操作等による入力手段2によって、要因分析およびテスト項目のパラメータ値を入力し、また、スクリプト表現した要因分析を入力したのを受けて、ソフトウエア検証装置1では、対応する二次元形式の要因分析表t0、テスト項目表t1、および要因分析表t2を作成し、これらの表データは編集手段14によって解析、編集され、その結果として、テストスクリプトが生成され、生成したテストスクリプト31を記憶装置3に格納処理する構成となっている。
【0019】
図3は、本発明の実施の形態になるデータの処理フローを示す。
ブラックボックステストを行うにあたっては、アプリケーションプログラムの外部仕様に基づき、どのような入力をプログラムに与えるか、あるいは、どのような環境条件下でプログラムを動作させるかを考慮してテスト項目を作成することが重要となる。
【0020】
ユーザのデータ入力では、入力プログラムの外部仕様(機能)を扱いやすい大きさに分割し、プログラムに対する入力条件および動作環境上の条件を抽出する。そして、抽出された入力条件、環境条件群について、それぞれ取り得る値を分析し、入力条件、環境条件群の各々の組合せを決定しテスト項目とする。
また、テスト結果判定のため、各テスト項目に対して期待される出力データ値やプログラムの振る舞いを定義しておく。
【0021】
以下、図3にしたがって、ユーザの上記条件の入力を受けてのソフトウエア検証装置1におけるデータの処理フローを説明する。
まず、ステップS1において、ユーザによって入力された要因分析のパラメータ値を取得、抽出して要因分析表t0が形成される。ステップS2、S3において、同様に、ユーザによるテスト項目のパラメータ値の入力を受けて、テスト項目表t1が形成され、およびスクリプト表現になる要因分析の入力を受けて、要因分析表t2が形成される。
【0022】
つぎに、ステップS4 において、編集手段14によって、これらt0、t1、およびt2の表データが2が解析、編集され、テストスクリプトが生成される。さらに、ステップS5において、この生成したテストスクリプトは、記憶装置3に格納される。
そして、後に、この格納されたテストスクリプト31は、マウス操作等のイベント動作に応じて、起動時に、記憶装置3からダウンロードされ、テストが実行される。
【0023】
図4は、本発明の実施の形態になる要因分析表の例を示す。要因分析表は、入力A11、入力B12、ボタン操作13、および出力データ値/プログラムの振舞14の項目を有する複数のレコードで構成され、各レコードには、各項目において取り得る値を示している。
入力A11、入力B12は、プログラムへの入力条件となるテスト因子であり、ボタン操作13は、マウスのクリック操作を示しており、出力データ値/プログラムの振舞14は、テスト項目で期待される出力データ値やプログラムの振る舞いを示している。入力A11、入力B12は、何もない、最小値、最大値の3通りの値を取り、ボタン操作13は、押す/押さない(ブランク)の状態があり、出力データ値/プログラムの振舞14は、出力なし、Aを出力、Bを出力の3つの状態を掲げている。このように、要因分析では、いくつかの要因となる因子群とそれらの状態の可能な範囲が示される。
【0024】
上記のような一つの要因分析表からは、因子群とその状態の組合せによって、複数個のテスト項目が設定されることとなる。この場合、テスト項目中の因子は、二つの要因分析表にまたがらないように設定する。
図5は、本発明の実施の形態になるテスト項目表の例を示す。図4の要素分析表と同様に、テスト項目表は、入力A11、入力B12、ボタン操作13、および出力データ値/プログラムの振舞14の項目を有する複数のレコードで構成され、各レコードは、図4の要素分析表の因子群とその状態の組合せによって作られる複数のテスト項目で構成されている。
【0025】
ここで、ユーザ・マニュアルや大半のプログラムの外部仕様書は文章表現で記述されており、それから直接にテスト項目を作成することは困難であり、漏れも生じやすい。上記要因分析は、文章表現で記述された外部仕様を、いったん、要因と状態の二次元の表(要因分析表)に形式化し、テスト項目を設計する方法を用いている。そして、テスト項目の設定は要因分析表に記入された因子群について、それらの状態を組み合わせることにより行っている。
【0026】
図6は、本発明の実施の形態になる要因分析表 (スクリプト表現)の例を示す。テストスクリプト作成の前段階として、図4の要因分析表をスクリプト表現で書き直した場合を示している。例では、空間的な配置が同じ別表としてスクリプト表現を記述している。要因分析表の見出し部分(要因)は、オブジェクトとして表現する。要因分析表の本文部分(状態)は、オブジェクトのプロパティやメソッドの利用方法を記述する。例えば、value = ””はプロパティに空の値を代入することを表し、click() はボタンをクリックするメソッドを表すという具合である。
【0027】
図7は、本発明の実施の形態になるテスト項目表 (スクリプト表現)の例を示す。本例のスクリプト表現のテスト項目表は、人手による入力も可能であるが、ユーザが、組合せによる項目数の多いテスト項目表を入力するのは、実際には、煩雑である。ここでのテスト項目表(スクリプト表現)は、要素分析表t0、テスト項目表t1、および要素分析表t2から、テスト項目表の展開順序に従って、プログラム的手段により自動的に作成した場合を想定している。
【0028】
そして、テスト項目表(スクリプト表現)からテストスクリプトの生成は、見出し部分(要因)と本文部分(状態)を結合することで、プログラム的手段により自動的に生成することができる。
図8は、本発明の実施の形態になるテストスクリプト生成のフローチャートを示す。ソフトウエア検証装置1のテストスクリプト生成手段15による生成処理のフローを以下に示す。本例では、要素分析表t0、テスト項目表t1、およびスクリプト表現した要素分析表t2をもとに、
まず、ステップS11において、生成するテストスクリプトの出力領域を初期化する。つぎに、ステップS12において、テスト項目表t1にしたがって、行方向の繰り返しの判定を行う。行方向にテスト項目があれば、ステップS13に移行し、前処理として、例えば、”テスト項目1”等のコメントのスクリプトを生成する。
【0029】
さらに、ステップS14において、テスト項目表t1にしたがって、列方向の処理項目があれば、ステップS15に移行して、スクリプト表現した要素分析表t2をもとにテストスクリプトを生成する。そして、ステップS14において、列方向の処理項目がなければ、ステップS16に進み、後処理として、例えば、”OK”あるいは”NG”等の結果の判定を行うスクリプト(文字列)を出力する。
【0030】
これによって、一つのテスト項目が完了し、ステップS12に戻り、つぎの行のテスト項目がなくなるまで繰り返し処理を行う。
図9は、本発明の実施の形態になるテストスクリプトの生成例を示す。図8のフローチャートにしたがって生成したテストスクリプトの例を示している。
以下、テスト項目1とテスト項目2を例に取り上げて説明する。
【0031】
テスト項目1のスクリプトは、「入力A→なし、入力B→なし、ボタン→押下を条件とするテストに対し、期待される出力値が”なし”であれば、”OK”、そうでなければ、”NG”の判定結果を出力する。」ことを示している。
テスト項目2のスクリプトは、「入力A→最大値、入力B→なし、ボタン→押下を条件とするテストに対し、期待される出力値が入力Aの”最大値”であれば、”OK”、そうでなければ、”NG”の判定結果を出力する。」ことを示している。
【0032】
以上、記述してきたように、要因分析技法を用いることによって、ブラックボックステストにおける要因と状態を組み合わせた多数のテスト項目も、本発明のように簡易な要因分析表とテスト項目表を作成することで、効率的にアプリケーションプログラムのテストを行うことができる。
また、以上のような操作により、テストスクリプトのスケルトンとすることができ、作成されたテストスクリプトは開発言語に依存することなく、ユーザが自由に作成・編集を行うことが可能となる。
【0033】
(付記1) ソフトウエアの品質を自動的にテストするソフトウエアの検証方法であって、
対象とするアプリケーションプログラムへの入力条件および動作環境条件を抽出する条件抽出ステップと、
前記条件抽出ステップで抽出された入力条件および動作環境条件の取り得る値を分析して二次元の要因分析表を作成する要因分析表作成ステップと、
前記要因分析表作成ステップで作成した要因分析表に基づき、入力条件群および環境条件群を組み合わせてテストすべき項目を決定するテスト項目表作成ステップと、
前記テスト項目表作成ステップで作成されたテスト項目にしたがってテストスクリプトを生成するテストスクリプト生成ステップとを有することを特徴とするソフトウエアの検証方法。
【0034】
(付記2) 前記テストスクリプト生成ステップにおいて、前記要因分析表の各因子をオブジェクトとして定義し、その状態をメソッドやプロパティとして定義し、これらを組み合わせた前記テスト項目にしたがってテストスクリプトを生成する付記1記載のソフトウエアの検証方法。
(付記3) 対象とするアプリケーションプログラムの動作環境上の条件をオブジェクトとして定義し、テストした後の復帰や状態が作り出されるまでの一連の操作を自動的に繰り返すことによって、状態の遷移を起こさせることを特徴とする付記1あるいは付記2に記載のソフトウエアの検証方法。
【0035】
(付記4) 各テスト項目に対し期待される出力データ値やプログラムの振舞を予めオブジェクトとして定義しておくことで、テスト結果の判定を自動化させることを特徴とする付記1乃至付記3のいずれかに記載のソフトウエアの検証方法。
(付記5) 対象とするアプリケーションプログラムの動作環境上の条件をオブジェクトとして記録し、テストスクリプトを実行する直前に現在の動作環境と比較することで、前記アプリケーションプログラムの外部仕様変更を検出する付記1乃至付記4記載のソフトウエアの検証方法。
【0036】
(付記6) ソフトウエアの品質を自動的にテストするソフトウエアの検証プログラムであって、
コンピュータに、
対象とするアプリケーションプログラムへの入力条件および動作環境条件を抽出する条件抽出ステップと、
前記条件抽出ステップで抽出された入力条件および動作環境条件の取り得る値を分析して二次元の要因分析表を作成する要因分析表作成ステップと、
前記要因分析表作成ステップで作成した要因分析表に基づき、入力条件群および環境条件群を組み合わせてテストすべき項目を決定するテスト項目表作成ステップと、
前記テスト項目表作成ステップで作成されたテスト項目にしたがってテストスクリプトを生成するテストスクリプト生成ステップとを実行させるソフトウエアの検証プログラム。
【0037】
(付記7) ソフトウエアの品質を自動的にテストするソフトウエアの検証装置であって、
対象とするアプリケーションプログラムへの入力条件および動作環境条件を抽出する条件抽出手段と、
前記条件抽出手段で抽出された入力条件および動作環境条件の取り得る値を分析して二次元の要因分析表を作成する要因分析表作成手段と、
前記要因分析表作成手段で作成した要因分析表に基づき、入力条件群および環境条件群を組み合わせてテストすべき項目を決定するテスト項目表作成手段と、前記テスト項目表作成手段で作成されたテスト項目にしたがってテストスクリプトを生成するテストスクリプト生成手段とを有することを特徴とするソフトウエアの検証装置。
【0038】
【発明の効果】
マウス操作やキー入力を時系列に沿って記録・再生する従来の方法では、1)実際にプログラムが動き始める段階にならなければ、テストスクリプトを作成することができない、2)ブラックボックステストでは、プログラムの外部仕様に基づいて、どのような入力をプログラムに与えるか、あるいはどのような環境条件下でプログラムを動作させるかを考慮してテスト項目を作成する。このため、記録・再生する方法では、実際に動いているプログラムに基づくテストとなり、外部仕様に基づいていない、3)ブラックボックステストは、網羅性の観点から、テスト項目設定、要因分析表に記入された因子群について、それらの状態を組み合わせることにより行う。このため、マウス操作やキー入力を時系列に沿って記録・再生する方法では、組み合わせの回数分だけマウス操作やキー入力をおこなわねばならず、コストがかかる上、単純操作の繰り返しによる操作ミスを引き起こす恐れがある、4)テストスクリプトを開発者が自由に作成・編集を行うことができるとしても、テスト項目設定、要因分析表に記入された因子群を要素としたテストスクリプトではないため、それらの状態を容易に組み合わせることができない、などの欠点を抱えていた。
【0039】
本発明によれば、実際にプログラムが動き始める前からテストスクリプトを作成することができ、プログラムの外部仕様に基づいてテストを行い、テスト項目表にしたがって自動的にスクリプトが組み合わされるため、コストがかからず、操作ミスを引き起こすこともない、といった効果や効能が期待できる。
【図面の簡単な説明】
【図1】本発明の基本システム構成を示す図である。
【図2】本発明の実施の形態になるソフトウエア検証装置の構成を示す図である。
【図3】本発明の実施の形態になるソフトウエア検証装置におけるデータの処理フローを示す図である。
【図4】本発明の実施の形態になる要因分析表の例を示す図である。
【図5】本発明の実施の形態になるテスト項目表の例を示す図である。
【図6】本発明の実施の形態になる要因分析表(スクリプト表現)の例を示す図である。
【図7】本発明の実施の形態になるテスト項目表(スクリプト表現)の例を示す図である。
【図8】本発明の実施の形態になるテストスクリプト生成のフローチャートを示す図である。
【図9】本発明の実施の形態になるテストスクリプトの生成例を示す図である。
【符号の説明】
1 ソフトウエア検証装置
2 入力手段
3 記憶装置
4 プリンタ
5 ディスプレイ
11 条件抽出手段
12 要素分析表作成手段
13 テスト項目表作成手段
14 編集手段
15 テストスクリプト生成手段
31 テストスクリプト
32 プログラム環境条件
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a technology of an automatic execution tool for automatically executing an operation check of an application program and improving software quality.
[0002]
[Prior art]
In contrast to the operation check of an application program, a conventional automatic test tool is based on recording and reproduction by performing mouse operation and key input in a time series. Automated test tools consist of subsystems such as an operation recorder that automatically generates test scripts or test tools that execute test scripts and aggregate the results. Application has been made. A test script describing a series of processing procedures provides a user with the convenience of freely creating and editing without depending on a development language (for example, see Patent Documents 1 and 2).
[0003]
[Patent Document 1]
JP-A-8-305609 (pages 2 to 8)
[0004]
[Patent Document 2]
JP-A-9-218804 (pages 2 to 8)
[0005]
[Problems to be solved by the invention]
However, in the conventional method of recording and reproducing mouse operation and key input in time series, as described below,
1) A test script cannot be created unless the program actually starts to run.
2) In the black box test, test items are created in consideration of what input is given to the program or under what environmental conditions the program is operated based on the external specifications of the program. However, the recording / reproducing method is a test based on an actually running program and is not based on external specifications.
3) Further, from the viewpoint of completeness, the black box test is performed by setting the test items by combining the states of the factor groups entered in the factor analysis table. For this reason, mouse operations and key inputs must be performed by the number of times of the combination, which increases costs and may cause an operation error due to repeated simple operations.
4) Even if the developer can freely create and edit test scripts, since the test script is not a test script that includes the test item setting and the factor group entered in the factor analysis table, the state of those Cannot be easily combined.
[0006]
It has drawbacks such as.
Therefore, in the present invention, in order to solve the above problem, a test of how a GUI (Graphic User Interface) responds to a click by a mouse operation, an input by a keyboard operation, and the like, a black box test, particularly a regression Provide software verification technology suitable for testing (regression testing).
[0007]
[Means for Solving the Problems]
A first invention is a software verification method for automatically testing software quality, comprising: a condition extracting step of extracting input conditions and operating environment conditions for a target application program; and the condition extracting step. A factor analysis table creating step of creating a two-dimensional factor analysis table by analyzing the possible values of the input conditions and operating environment conditions extracted in the above, based on the factor analysis table created in the factor analysis table creating step, A test item table creating step of determining an item to be tested by combining a condition group and an environmental condition group; and a test script generating step of generating a test script according to the test items created in the test item table creating step. And a method for verifying software.
[0008]
That is, according to the method of the first invention, in the condition extracting step, input conditions and operating conditions for the program based on the external specification are extracted, and in the factor analysis table creating step, the test factors are covered, and the test item table is created. In the step, a test item is created from the combination of the factors, and in the test script generation step, a script corresponding to the test item table is automatically generated.
[0009]
According to the above invention, a test in consideration of input conditions and environmental conditions based on external specifications of a program is efficiently executed.
According to a second aspect, in the test script generation step, each factor of the factor analysis table is defined as an object, its state is defined as a method or a property, and a test script is generated according to the test item obtained by combining these. The present invention relates to the software verification method according to the first invention.
[0010]
That is, according to the method of the second invention, the external specification of the program described in the sentence expression is once converted into an object as a two-dimensional factor analysis table including factors and states, and test items are designed. As a result, it is possible to overcome difficulties and omissions when directly creating test items based on a textual representation of a user manual or an external specification of a program.
[0011]
The third invention defines a condition in the operating environment of the target application program as an object, and automatically returns to the state after the test and repeats a series of operations until the state is created, thereby performing state transition. The present invention also relates to the software verification method according to the first or second invention, characterized in that the software verification is performed.
That is, according to the method of the third invention, the transition of the state is facilitated by automating the operation after the test and the operation of creating the next state in accordance with the operating environment conditions of the program defined as the object, and the test man-hour is reduced. Reduction can be achieved.
[0012]
The fourth invention is characterized in that the output data value expected for each test item and the behavior of the program are defined in advance as objects, thereby automating the determination of the test results. The invention relates to a method for verifying software.
That is, according to the fourth aspect, the test result is automatically determined according to the output data value of each test item defined in advance or the behavior of the program, and the number of evaluation steps for the determination is reduced. Can be.
[0013]
According to a fifth aspect of the present invention, an external specification change of the application program is performed by recording a condition on an operation environment of a target application program as an object and comparing the condition with a current operation environment immediately before executing the test script. The present invention relates to the software verification method according to any one of the first to fourth inventions, wherein
[0014]
That is, according to the fifth aspect, by storing the operating environment of the program in the storage unit, the stored operating environment can be referred to and compared with the current operating environment before execution of the test script. In addition, the changed external specification can be easily detected.
[0015]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 shows a basic system configuration of the present invention. The software verification system includes an input unit 2 such as a keyboard for inputting an input condition and a use environment condition for an application program test to be performed by a user, a software verification device 1, a storage device 3, a printer 4, and a display 5. It consists of.
[0016]
Further, the software verification device 1 includes a condition extracting unit 11, an element analysis table creating unit 12, a test item table creating unit 13, an editing unit 14, and a test script creating unit 15. Further, the storage device 3 stores the generated test script 31 and the program environment condition 32.
The program environment condition 32 in the storage device 3 is stored as an object, and is used to compare with the current operating environment immediately before executing the test script and to detect whether there is a change in the external specification of the program. Things.
[0017]
Here, the software verification device 1 according to the present embodiment is a computer, and includes a condition extraction unit 11, an element analysis table creation unit 12, a test item table creation unit 13, an editing unit 14, and a test script creation unit 15. Is realized by executing the program stored in advance on the computer. Further, the program is recorded on a computer-readable recording medium such as a floppy disk or a compact disk, and is set in a built-in medium reading device (not shown), and is installed so as to be executable. Good.
[0018]
FIG. 2 shows the configuration of the software verification device according to the embodiment of the present invention. In response to the user inputting the factor analysis and the parameter values of the test items by the input means 2 using a keyboard, a mouse, or the like, and receiving the factor analysis expressed as a script, the software verification device 1 A corresponding two-dimensional factor analysis table t0, test item table t1, and factor analysis table t2 are created, and these table data are analyzed and edited by the editing unit 14, and as a result, a test script is generated and generated. The stored test script 31 is stored in the storage device 3.
[0019]
FIG. 3 shows a data processing flow according to the embodiment of the present invention.
When performing a black box test, test items should be created based on the external specifications of the application program, considering what input should be given to the program, or under what environmental conditions the program should be operated. Is important.
[0020]
In user data input, the external specifications (functions) of the input program are divided into easy-to-handle sizes, and input conditions and operating environment conditions for the program are extracted. Then, possible values of the extracted input condition and environmental condition group are analyzed, and each combination of the input condition and environmental condition group is determined and set as a test item.
In order to determine the test result, an expected output data value and a program behavior for each test item are defined.
[0021]
Hereinafter, a data processing flow in the software verification device 1 in response to the user's input of the above conditions will be described with reference to FIG.
First, in step S1, a parameter value of the factor analysis input by the user is obtained and extracted to form a factor analysis table t0. In steps S2 and S3, similarly, the test item table t1 is formed by receiving the input of the parameter value of the test item by the user, and the factor analysis table t2 is formed by receiving the factor analysis input that becomes a script expression. You.
[0022]
Next, in step S4, the editing means 14 analyzes and edits the table data 2 of t0, t1, and t2 to generate a test script. Further, in step S5, the generated test script is stored in the storage device 3.
Then, later, the stored test script 31 is downloaded from the storage device 3 at the time of startup according to an event operation such as a mouse operation, and the test is executed.
[0023]
FIG. 4 shows an example of a factor analysis table according to the embodiment of the present invention. The factor analysis table is composed of a plurality of records having items of input A11, input B12, button operation 13, and output data value / program behavior 14, and each record indicates a value that can be taken in each item. .
The input A11 and the input B12 are test factors as input conditions to the program, the button operation 13 indicates a mouse click operation, and the output data value / program behavior 14 indicates the output expected in the test item. Indicates data values and program behavior. The input A11 and the input B12 take three values, that is, nothing, a minimum value, and a maximum value. The button operation 13 has a state of pressing / not pressing (blank), and the output data value / program behavior 14 , No output, A output, and B output. As described above, the factor analysis indicates a group of factors serving as some factors and a possible range of their states.
[0024]
From one factor analysis table as described above, a plurality of test items are set according to a combination of a factor group and its state. In this case, the factors in the test items are set so as not to extend over the two factor analysis tables.
FIG. 5 shows an example of a test item table according to the embodiment of the present invention. Similar to the element analysis table of FIG. 4, the test item table is composed of a plurality of records having items of an input A11, an input B12, a button operation 13, and an output data value / program behavior 14. It consists of a plurality of test items created by combining the factor groups and their states in the element analysis table of No. 4.
[0025]
Here, user manuals and external specifications of most programs are described in textual expressions, and it is difficult to create test items directly from them, and leaks are likely to occur. The factor analysis uses a method in which external specifications described in a sentence expression are once formalized into a two-dimensional table of factor and state (factor analysis table) and test items are designed. The test items are set by combining the states of the factor groups entered in the factor analysis table.
[0026]
FIG. 6 shows an example of a factor analysis table (script expression) according to the embodiment of the present invention. A case where the factor analysis table in FIG. 4 is rewritten in a script expression as a pre-stage of test script creation is shown. In the example, the script expression is described as a separate table having the same spatial arrangement. The head part (factor) of the factor analysis table is expressed as an object. The body part (state) of the factor analysis table describes how to use the properties and methods of the object. For example, value = "" indicates that an empty value is substituted for a property, and click () indicates a method of clicking a button.
[0027]
FIG. 7 shows an example of a test item table (script expression) according to the embodiment of the present invention. Although the test item table in the script expression of this example can be manually input, it is actually complicated for the user to input a test item table having a large number of items by combination. The test item table (script expression) here is assumed to be automatically created by programmatic means from the element analysis table t0, the test item table t1, and the element analysis table t2 in accordance with the test item table expansion order. ing.
[0028]
The test script can be automatically generated from the test item table (script expression) by programmatic means by combining the heading part (factor) and the text part (state).
FIG. 8 shows a flowchart of test script generation according to the embodiment of the present invention. The flow of the generation processing by the test script generation unit 15 of the software verification device 1 will be described below. In this example, based on the element analysis table t0, the test item table t1, and the element analysis table t2 expressed by script,
First, in step S11, an output area of a test script to be generated is initialized. Next, in step S12, repetition in the row direction is determined according to the test item table t1. If there is a test item in the line direction, the process proceeds to step S13, and a script of a comment such as "test item 1" is generated as preprocessing.
[0029]
Further, in step S14, if there is a processing item in the column direction according to the test item table t1, the process proceeds to step S15, and a test script is generated based on the element analysis table t2 expressed as a script. If there is no processing item in the column direction in step S14, the process proceeds to step S16, and a script (character string) for determining a result such as "OK" or "NG" is output as post-processing.
[0030]
As a result, one test item is completed, the process returns to step S12, and the process is repeated until there are no more test items in the next row.
FIG. 9 shows an example of generating a test script according to the embodiment of the present invention. 9 illustrates an example of a test script generated according to the flowchart of FIG.
Hereinafter, test item 1 and test item 2 will be described as examples.
[0031]
The script of the test item 1 is “OK” if the expected output value is “none” for the test under the condition of input A → none, input B → none, button → press, otherwise , “NG” is output. ”
The script of test item 2 is “OK” if the expected output value is the “maximum value” of input A for the test on the condition that input A → maximum value, input B → none, button → press. Otherwise, a determination result of "NG" is output. "
[0032]
As described above, by using the factor analysis technique, it is possible to create a simple factor analysis table and a test item table as in the present invention for a large number of test items combining factors and states in a black box test. Thus, the application program can be efficiently tested.
In addition, by the above operation, the skeleton of the test script can be used, and the created test script can be freely created and edited by the user without depending on the development language.
[0033]
(Appendix 1) A software verification method for automatically testing software quality,
A condition extraction step of extracting input conditions and operating environment conditions for a target application program;
A factor analysis table creating step of creating a two-dimensional factor analysis table by analyzing possible values of the input conditions and operating environment conditions extracted in the condition extraction step,
Based on the factor analysis table created in the factor analysis table creating step, a test item table creating step of determining an item to be tested by combining the input condition group and the environmental condition group,
A test script generating step of generating a test script according to the test items created in the test item table creating step.
[0034]
(Supplementary Note 2) In the test script generation step, each factor in the factor analysis table is defined as an object, its state is defined as a method or a property, and a test script is generated according to the test item obtained by combining these. Verification method of the described software.
(Supplementary Note 3) The condition of the operating environment of the target application program is defined as an object, and a state transition is caused by automatically repeating a series of operations until returning to the state after the test or until the state is created. The software verification method according to Supplementary Note 1 or 2, characterized in that:
[0035]
(Supplementary note 4) Any one of supplementary notes 1 to 3, characterized in that the output data value expected for each test item and the behavior of the program are defined in advance as objects, thereby automatically judging the test results. Verification method of software described in.
(Supplementary Note 5) Supplementary note 1 that records a condition on the operating environment of the target application program as an object and compares the condition with the current operating environment immediately before executing the test script, thereby detecting a change in the external specification of the application program. 4. The software verification method according to any one of claims 4 to 7.
[0036]
(Supplementary Note 6) A software verification program for automatically testing software quality,
On the computer,
A condition extraction step of extracting input conditions and operating environment conditions for a target application program;
A factor analysis table creating step of creating a two-dimensional factor analysis table by analyzing possible values of the input conditions and operating environment conditions extracted in the condition extraction step,
Based on the factor analysis table created in the factor analysis table creating step, a test item table creating step of determining an item to be tested by combining the input condition group and the environmental condition group,
A software verification program for executing a test script generation step of generating a test script according to the test items created in the test item table creation step.
[0037]
(Appendix 7) A software verification device for automatically testing software quality,
Condition extraction means for extracting input conditions and operating environment conditions for a target application program;
Factor analysis table creating means for analyzing possible values of the input conditions and operating environment conditions extracted by the condition extracting means to create a two-dimensional factor analysis table,
A test item table creating unit that determines an item to be tested by combining an input condition group and an environmental condition group based on the factor analysis table created by the factor analysis table creating unit; and a test created by the test item table creating unit. A software verification device for generating a test script according to an item.
[0038]
【The invention's effect】
In the conventional method of recording and reproducing mouse operation and key input in time series, 1) a test script cannot be created unless the program actually starts to operate. 2) In a black box test, Based on the external specifications of the program, test items are created in consideration of what input is given to the program or under what environmental conditions the program is operated. For this reason, the recording / reproducing method is based on the program that is actually running and is not based on external specifications. 3) Black box tests are based on completeness. This is performed by combining the states of the set of factors. For this reason, in the method of recording and reproducing mouse operations and key inputs in chronological order, mouse operations and key inputs must be performed as many times as the number of combinations, which is costly, and operation errors due to repeated simple operations are eliminated. 4) Even if developers can freely create and edit test scripts, they are not test scripts that use the factors set in the test item setting and factor analysis tables. However, there are drawbacks such as that the states cannot be easily combined.
[0039]
According to the present invention, a test script can be created before the program actually starts to operate, a test is performed based on the external specifications of the program, and the scripts are automatically combined according to the test item table. It can be expected to have the effect and effect that no operation error is caused.
[Brief description of the drawings]
FIG. 1 is a diagram showing a basic system configuration of the present invention.
FIG. 2 is a diagram showing a configuration of a software verification device according to an embodiment of the present invention.
FIG. 3 is a diagram showing a data processing flow in the software verification device according to the embodiment of the present invention.
FIG. 4 is a diagram showing an example of a factor analysis table according to the embodiment of the present invention.
FIG. 5 is a diagram showing an example of a test item table according to the embodiment of the present invention.
FIG. 6 is a diagram showing an example of a factor analysis table (script expression) according to the embodiment of the present invention;
FIG. 7 is a diagram showing an example of a test item table (script expression) according to the embodiment of the present invention;
FIG. 8 is a diagram showing a flowchart of test script generation according to the embodiment of the present invention.
FIG. 9 is a diagram illustrating an example of generating a test script according to an embodiment of the present invention.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Software verification apparatus 2 Input means 3 Storage device 4 Printer 5 Display 11 Condition extraction means 12 Element analysis table creation means 13 Test item table creation means 14 Editing means 15 Test script generation means 31 Test script 32 Program environment conditions

Claims (5)

ソフトウエアの品質を自動的にテストするソフトウエアの検証方法であって、
対象とするアプリケーションプログラムへの入力条件および動作環境条件を抽出する条件抽出ステップと、
前記条件抽出ステップで抽出された入力条件および動作環境条件の取り得る値を分析して二次元の要因分析表を作成する要因分析表作成ステップと、
前記要因分析表作成ステップで作成した要因分析表に基づき、入力条件群および環境条件群を組み合わせてテストすべき項目を決定するテスト項目表作成ステップと、
前記テスト項目表作成ステップで作成されたテスト項目にしたがってテストスクリプトを生成するテストスクリプト生成ステップとを有することを特徴とするソフトウエアの検証方法。
A software verification method for automatically testing software quality,
A condition extraction step of extracting input conditions and operating environment conditions for a target application program;
A factor analysis table creating step of creating a two-dimensional factor analysis table by analyzing possible values of the input conditions and operating environment conditions extracted in the condition extraction step,
Based on the factor analysis table created in the factor analysis table creation step, a test item table creation step of determining an item to be tested by combining the input condition group and the environmental condition group,
A test script generating step of generating a test script according to the test items created in the test item table creating step.
前記テストスクリプト生成ステップにおいて、前記要因分析表の各因子をオブジェクトとして定義し、その状態をメソッドやプロパティとして定義し、これらを組み合わせた前記テスト項目にしたがってテストスクリプトを生成する請求項1記載のソフトウエアの検証方法。2. The software according to claim 1, wherein, in the test script generation step, each factor of the factor analysis table is defined as an object, its state is defined as a method or a property, and a test script is generated according to the test item in which these are combined. How to verify the wear. 対象とするアプリケーションプログラムの動作環境上の条件をオブジェクトとして定義し、テストした後の復帰や状態が作り出されるまでの一連の操作を自動的に繰り返すことによって、状態の遷移を起こさせることを特徴とする請求項1あるいは請求項2に記載のソフトウエアの検証方法。It is characterized by defining the operating environment conditions of the target application program as an object, and causing a state transition by automatically repeating a series of operations until returning to the state after the test or creating a state. The software verification method according to claim 1 or 2, wherein 各テスト項目に対し期待される出力データ値やプログラムの振舞を予めオブジェクトとして定義しておくことで、テスト結果の判定を自動化させることを特徴とする請求項1乃至請求項3のいずれかに記載のソフトウエアの検証方法。4. The method according to claim 1, wherein an expected output data value and a behavior of the program for each test item are defined in advance as an object, thereby automatically determining a test result. Software verification method. 対象とするアプリケーションプログラムの動作環境上の条件をオブジェクトとして記録しておき、前記テストスクリプトを実行する直前に現在の動作環境と比較することで、前記アプリケーションプログラムの外部仕様変更を検出することを特徴とする請求項1乃至請求項4のいずれかに記載のソフトウエアの検証方法。A condition on the operating environment of the target application program is recorded as an object, and a change in the external specification of the application program is detected by comparing with a current operating environment immediately before executing the test script. The software verification method according to any one of claims 1 to 4, wherein:
JP2003067715A 2003-03-13 2003-03-13 Verification method for software Pending JP2004280231A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003067715A JP2004280231A (en) 2003-03-13 2003-03-13 Verification method for software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003067715A JP2004280231A (en) 2003-03-13 2003-03-13 Verification method for software

Publications (1)

Publication Number Publication Date
JP2004280231A true JP2004280231A (en) 2004-10-07

Family

ID=33285248

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003067715A Pending JP2004280231A (en) 2003-03-13 2003-03-13 Verification method for software

Country Status (1)

Country Link
JP (1) JP2004280231A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7685260B2 (en) 2005-12-22 2010-03-23 International Business Machines Corporation Method for analyzing state transition in web page
JP2020017073A (en) * 2018-07-25 2020-01-30 株式会社野村総合研究所 Test management server and system
JPWO2020021586A1 (en) * 2018-07-23 2021-01-07 三菱電機株式会社 System verification device and system verification method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7685260B2 (en) 2005-12-22 2010-03-23 International Business Machines Corporation Method for analyzing state transition in web page
JPWO2020021586A1 (en) * 2018-07-23 2021-01-07 三菱電機株式会社 System verification device and system verification method
JP2020017073A (en) * 2018-07-25 2020-01-30 株式会社野村総合研究所 Test management server and system
JP7182044B2 (en) 2018-07-25 2022-12-02 株式会社野村総合研究所 Test management server and system

Similar Documents

Publication Publication Date Title
Babić et al. Fudge: fuzz driver generation at scale
Gyimóthy et al. Empirical validation of object-oriented metrics on open source software for fault prediction
US7996819B2 (en) Generating functional test scripts
Kaur et al. Comparative study of automated testing tools: Testcomplete and quicktest pro
Fowkes et al. Autofolding for source code summarization
US8402434B2 (en) Graphical user interface (GUI) script generation and documentation
US20060010429A1 (en) Method, system and program for model based software development with test case generation and evaluation
US20120116561A1 (en) Program testing apparatus, method of testing a program, and program testing program
US7895575B2 (en) Apparatus and method for generating test driver
Selim et al. Model transformation testing: The state of the art
JP4946651B2 (en) Specification verification program, computer-readable recording medium recording the program, specification verification apparatus, and specification verification method
Campos et al. Systematic automation of scenario-based testing of user interfaces
US20140214396A1 (en) Specification properties creation for a visual model of a system
Alimadadi et al. Inferring hierarchical motifs from execution traces
González et al. Test data generation for model transformations combining partition and constraint analysis
Krüger Understanding the re-engineering of variant-rich systems: an empirical work on economics, knowledge, traceability, and practices
Mao et al. User behavior pattern mining and reuse across similar Android apps
US9189372B2 (en) Trace coverage analysis
Al-Zain et al. Automated user interface testing for web applications and TestComplete
TWI373711B (en) Method for testing controls of application software automatically
JP2004280231A (en) Verification method for software
US20080052587A1 (en) Unit Test Extender
JP7380851B2 (en) Test script generation device, test script generation method and program
Su et al. Constructing a system knowledge graph of user tasks and failures from bug reports to support soap opera testing
JP2011100420A (en) Test program creation device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051209

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080605

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080617

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20081014