[go: up one dir, main page]

JP5404720B2 - Test item generation apparatus, method, and program for executing single abnormal scenario any number of times - Google Patents

Test item generation apparatus, method, and program for executing single abnormal scenario any number of times Download PDF

Info

Publication number
JP5404720B2
JP5404720B2 JP2011195930A JP2011195930A JP5404720B2 JP 5404720 B2 JP5404720 B2 JP 5404720B2 JP 2011195930 A JP2011195930 A JP 2011195930A JP 2011195930 A JP2011195930 A JP 2011195930A JP 5404720 B2 JP5404720 B2 JP 5404720B2
Authority
JP
Japan
Prior art keywords
path
test
loop
edge
test path
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2011195930A
Other languages
Japanese (ja)
Other versions
JP2013058074A (en
Inventor
治門 丹野
暁晶 張
隆 星野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NTT Inc
NTT Inc USA
Original Assignee
Nippon Telegraph and Telephone Corp
NTT Inc USA
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp, NTT Inc USA filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2011195930A priority Critical patent/JP5404720B2/en
Publication of JP2013058074A publication Critical patent/JP2013058074A/en
Application granted granted Critical
Publication of JP5404720B2 publication Critical patent/JP5404720B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Description

本発明は、単独の異常系シナリオを任意回数実行するテスト項目生成装置及び方法及びプログラムに係り、特に、ユースケース記述に基づいて、特定の単独の異常系シナリオを任意の回数実行するテスト用にテスト項目を生成するための単独の異常系シナリオを任意回数実行するテスト項目生成装置及び方法及びプログラムに関する。   The present invention relates to a test item generation apparatus, method, and program for executing a single abnormal scenario any number of times, and particularly for a test that executes a specific single abnormal scenario any number of times based on a use case description. The present invention relates to a test item generation apparatus, method, and program for executing a single abnormal scenario for generating test items an arbitrary number of times.

従来のユースケース記述に基づいてシナリオテスト用のテスト項目を抽出する方法として、UMLのアクティビティ図(ユースケース記述と同じフロー構造)を入力として、ループを0回、1回通るような経路の順列を生成する方法がある(例えば、非特許文献1参照)。   As a method for extracting test items for scenario tests based on conventional use case descriptions, UML activity diagrams (the same flow structure as use case descriptions) are used as input, and the permutation of routes that pass once through the loop There is a method of generating (see, for example, Non-Patent Document 1).

また、画面遷移図(ユースケース記述と同じフロー構造)の各エッジを少なくとも1回は必ず通るテスト経路(テスト項目)を抽出することが可能な技術がある(例えば、特許文献1参照)。   In addition, there is a technique capable of extracting a test path (test item) that always passes through each edge of a screen transition diagram (the same flow structure as the use case description) at least once (see, for example, Patent Document 1).

特開平9−223040号公報JP-A-9-223040

張暁晶、星野隆. "設計モデルを用いたテスト項目抽出とテストデータ生成手法", 電子情報通信学会技術研究報告. KBSE, 知能ソフトウェア工学, Technical report of IEICE. KBSE 109(41) pp. 37-42, 20090514.Akira Zhang, Takashi Hoshino. “Test Item Extraction and Test Data Generation Method Using Design Model”, IEICE Technical Report. KBSE, Intelligent Software Engineering, Technical report of IEICE. KBSE 109 (41) pp. 37-42 , 20090514.

しかしながら、非特許文献1の技術は、特定の以上系シナリオを複数回(2回以上)実行するテスト経路を抽出することができない。   However, the technique of Non-Patent Document 1 cannot extract a test path for executing a specific above-described scenario a plurality of times (two or more times).

また、特許文献1の技術は、当該技術により抽出したテスト経路に、特定の異常系シナリオのみを実行するテスト経路が含まれている保証、特定の異常系シナリオのみを複数回実行するテストケースが含まれている保証のどちらもない。   In addition, the technique of Patent Document 1 guarantees that the test path extracted by the technique includes a test path that executes only a specific abnormal scenario, and a test case that executes only a specific abnormal scenario multiple times. There is no warranty included.

このように、ユースケース記述に基づいたシナリオテスト用のテスト項目抽出において、通常のテストでは、ノード網羅、エッジ網羅などよく用いられる既存の網羅基準では、他の異常系のシナリオを実行してしまったり、特定の異常シナリオを1度しか実行しなかったり、等を検出できないという問題がある。   In this way, in the test item extraction for scenario tests based on use case descriptions, other abnormal scenarios are executed in the normal coverage test using existing coverage criteria such as node coverage and edge coverage. There is a problem that a specific abnormal scenario is executed only once, or the like cannot be detected.

本発明は、上記の点に鑑みなされたもので、特定の異常系シナリオのみを複数回実行したときに起こるエラーを検出可能なシナリオテスト用のテスト項目を生成するための単独の異常系シナリオを任意回数実行するテスト項目生成装置及び方法及びプログラムを提供することを目的とする。   The present invention has been made in view of the above points, and provides a single abnormal scenario for generating a test item for scenario testing that can detect an error that occurs when only a specific abnormal scenario is executed a plurality of times. An object of the present invention is to provide a test item generation apparatus, method, and program which are executed an arbitrary number of times.

上記の課題を解決するため、本発明(請求項1)は、ユーザとシステムの間のインタラクションの流れを示すユースケース記述に基づいて、シナリオテスト用のテスト項目を抽出する単独の異常系シナリオを任意回数実行するテスト項目生成装置であって、
入力された設計モデルから、ユースケース記述を取得する設計モデル入力手段と、
前記ユースケース記述からループ経路を含まない全てのテスト経路(以下、「ループ無し経路」と記す)を抽出し、テスト経路集合に加えるループ無しテスト経路抽出手段と、
前記ユースケース記述からループ経路を含むテスト経路(以下「ループ有り経路」と記す)を抽出し、前記テスト経路集合の前記ループ無し経路と該ループ有り経路をつなぎ合わせた新たなテスト経路を生成し、新規追加分テスト経路集合に加えるループ有りテスト経路補完手段と、
前記新規追加分テスト経路集合から、特定の異常系シナリオのみを含むテスト経路を対象異常系テスト経路として抽出し、異常系テスト経路集合に加えるフィルタリング手段と、
前記異常系テスト経路集合の各異常系テスト経路中のループ箇所を複製して実行経路記憶手段に格納するループ経路複製手段と、
を有する実行経路抽出手段と、
前記実行経路記憶手段から前記テスト経路を読み出して、該テスト経路に対するテスト項目を生成するテスト項目生成手段と、を有する。
In order to solve the above-described problem, the present invention (Claim 1) provides a single abnormal scenario for extracting test items for scenario testing based on a use case description indicating a flow of interaction between a user and a system. A test item generation device that is executed an arbitrary number of times,
A design model input means for obtaining a use case description from the input design model;
Extracting all test paths that do not include loop paths from the use case description (hereinafter referred to as “loop without loops”), and adding the test path extraction means without loops to the test path set;
A test path including a loop path (hereinafter referred to as “path with loop”) is extracted from the use case description, and a new test path is generated by connecting the path without loop and the path with loop of the test path set. , A test path complementing means with a loop to be added to the newly added test path set,
Filtering means for extracting a test path including only a specific abnormal system scenario as a target abnormal system test path from the newly added test path set, and adding it to the abnormal system test path set;
Loop path duplicating means for duplicating and storing the loop location in each abnormal test path of the abnormal test path set in the execution path storage means;
Execution path extraction means having
Test item generation means for reading the test path from the execution path storage means and generating test items for the test path.

また、本発明(請求項2)は、前記ループ有りテスト経路補完手段に、
前記ユースケース記述の矢印部分に相当するエッジのうち、前記ループ無し経路に存在しないエッジをループ経路エッジキューに加える手段と、
前記ループ経路エッジキューの先頭のエッジXを取り出して、該エッジXを前記ループ無しテスト経路につなげて前記新たなテスト経路を生成し、ループ経路に印を付与する処理を、該ループ経路エッジキューが空になるまで繰り返す手段と、
を含み、
前記フィルタリング手段に、
前記新規追加分テスト経路集合から、ループ経路に前記印が付与されている対象異常系エッジのみを含むテスト経路を対象異常系テスト経路として抽出する手段を含む。
Further, the present invention (Claim 2) provides the test path complementing means with a loop,
Means for adding, to the loop path edge queue, an edge that does not exist in the loop-less path among edges corresponding to the arrow portion of the use case description;
The process of extracting the leading edge X of the loop path edge queue, connecting the edge X to the loopless test path to generate the new test path, and marking the loop path is performed by the loop path edge queue. Means to repeat until is empty,
Including
In the filtering means,
Wherein the newly added partial test path set, including means for extracting a test path containing only target the abnormal system edge the mark loop path is assigned as the target abnormal based test path.

また、本発明(請求項3)は、前記ループ経路複製手段に、
ユーザから指定された回数分だけ、前記異常系テスト経路中のループ箇所を複製する手段を含む。
Further, according to the present invention (Claim 3), the loop path duplicating means includes:
Means for replicating the loop portion in the abnormal test path for the number of times designated by the user;

本発明によれば、ユースケース記述からループ経路を含まない経路、ループ経路を抽出し、ループ経路を含まない経路にループ経路をつなぎ新たな経路を生成することにより、ユースケース記述中のループ経路n種類(L1,L2,…,Ln)をそれぞれつなぐパターン、つながないパターンの組合せの個数分、新しいテスト経路を作成できる。つまり、ループを含まない経路1つに対し、2のn乗通りの新しいテスト経路を生成することができる。   According to the present invention, a route that does not include a loop route, a loop route is extracted from the use case description, and a loop route is generated by connecting the loop route to a route that does not include the loop route. New test paths can be created for the number of combinations of patterns that connect n types (L1, L2,..., Ln) and patterns that do not connect. In other words, 2 n new test paths can be generated for one path that does not include a loop.

また、フィルタリングを行うことにより、任意の異常系シナリオのみを含む経路を得ることができ、特定の異常系シナリオのみを複数回実行したときに起こるエラー(ある異常系シナリオを実行するときに使用する変数Xが不正な値になっている場合にシステムが想定と違う動作を起こすエラー)を検出可能なテスト経路を抽出することが可能となる。   Also, by filtering, it is possible to obtain a route that includes only an arbitrary abnormal scenario, and an error that occurs when only a specific abnormal scenario is executed multiple times (used when executing an abnormal scenario) It is possible to extract a test path that can detect an error that causes the system to operate differently from the expected when the variable X has an incorrect value.

さらに、ループ経路を含むテスト経路において、異常系シナリオを含むループ経路をユーザが指定した回数分だけ複製してテスト経路へ挿入することにより、特定の異常系シナリオのみを複数回実行したときにこるエラーを検出可能なテスト経路を抽出することが可能となる。   Furthermore, in a test path including a loop path, a loop path including an abnormal scenario is duplicated as many times as specified by the user and inserted into the test path, so that only a specific abnormal scenario is executed multiple times. It is possible to extract a test path capable of detecting an error.

本発明の一実施の形態におけるシナリオテストのテスト項目生成装置の構成図である。It is a block diagram of the test item generation apparatus of the scenario test in one embodiment of this invention. 本発明の一実施の形態における実行経路抽出部の構成図である。It is a block diagram of the execution path | route extraction part in one embodiment of this invention. 本発明の一実施の形態における概要動作のフローチャートである。It is a flowchart of the outline | summary operation | movement in one embodiment of this invention. 本発明の一実施の形態におけるステップ130の詳細フローチャートである。It is a detailed flowchart of step 130 in one embodiment of the present invention. 本発明の一実施の形態における入力(ユースケース記述)のデータ構造の例である。It is an example of the data structure of the input (use case description) in one embodiment of this invention. 本発明の一実施の形態におけるユースケース記述のイメージである。It is an image of the use case description in one embodiment of this invention. 本発明の一実施の形態におけるステップ230の詳細フローチャートである。It is a detailed flowchart of step 230 in one embodiment of the present invention. 本発明の一実施の形態におけるステップ320の詳細フローチャートである。It is a detailed flowchart of step 320 in one embodiment of the present invention. 本発明の一実施の形態におけるステップ440の詳細フローチャートである。It is a detailed flowchart of step 440 in one embodiment of this invention. 本発明の一実施の形態におけるステップ330の詳細フローチャートである。It is a detailed flowchart of step 330 in one embodiment of this invention. 本発明の一実施の形態におけるステップ660の詳細フローチャートである。It is a detailed flowchart of step 660 in one embodiment of this invention. 本発明の一実施の形態における出力(テスト経路)のデータ構造の例である。It is an example of the data structure of the output (test path | route) in one embodiment of this invention. 本発明の一実施の形態におけるステップ340の詳細フローチャートである。It is a detailed flowchart of step 340 in one embodiment of this invention. 本発明の一実施の形態におけるステップ350の詳細フローチャートである。It is a detailed flowchart of step 350 in one embodiment of the present invention. 本発明の一実施の形態におけるユースケース記述から異常経路を抽出する例である。It is an example which extracts an abnormal path | route from the use case description in one embodiment of this invention. 本発明の一実施の形態におけるループ有りテスト経路を補完する例である。It is an example which complements the test path with a loop in one embodiment of the present invention.

以下図面と共に、本発明の実施の形態を説明する。   Embodiments of the present invention will be described below with reference to the drawings.

まず、最初に本明細書中で使用する用語について説明する。   First, terms used in this specification will be described first.

・シナリオテスト:要求定義に基づき、ユーザが行う業務を想定してシナリオを作成して、システムが想定シナリオ通りに振舞うかを確認するテスト。   ・ Scenario test: A test that confirms whether the system behaves according to the assumed scenario by creating a scenario based on the requirements defined by the user.

・テスト項目:シナリオテストにおけるテスト項目は、テストシナリオと確認観点を含む。「テストシナリオ」は、画面と操作で構成されたシーケンスであり、「確認観点」は画面遷移の正しさ、画面表示内容の正しさ、データベース破壊の有無、等がある。   Test items: Test items in the scenario test include a test scenario and a confirmation viewpoint. “Test scenario” is a sequence composed of screens and operations, and “confirmation viewpoint” includes correctness of screen transitions, correctness of screen display contents, presence / absence of database destruction, and the like.

・画面遷移図:設計ドキュメントの一種である。特定の機能内における各画面間の遷移を示す。   Screen transition diagram: A type of design document. Shows transitions between screens within a specific function.

・ユースケース記述:設計ドキュメントの一種である。要求を明確化するための記法でもある。ユーザとシステム間のインタラクションの流れを示す。流れは、「基本フロー」に沿って進むが、「代替フロー」、「例外フロー」に分岐することもある。   Use case description: A type of design document. It is also a notation to clarify requirements. The flow of interaction between the user and the system is shown. The flow proceeds along the “basic flow”, but may branch into an “alternate flow” and an “exception flow”.

・正常系シナリオ:ユースケース記述における基本フローを指す。1つ以上のエッジから構成される。   ・ Normal scenario: Refers to the basic flow in use case description. Consists of one or more edges.

・異常系シナリオ:ユースケース記述における代替フロー、例外フローの総称であり、1つ以上のエッジから構成され、正常系シナリオから分岐して正常系シナリオに戻る。   ・ Abnormal scenario: A generic term for alternative flows and exception flows in use case descriptions. It consists of one or more edges, branches from the normal scenario, and returns to the normal scenario.

・特定の異常系シナリオのみを複数回実行したときに起こるエラー:ある異常系シナリオを実行するときに使用する変数Xが不正な値になっている場合にシステムが想定と違う動作を起こすエラーがある。変数Xの値を改変する他の異常系シナリオを一緒に実行すると、変数Xが不正な値とはならず、エラーを検出できない可能性があるため、他の異常系シナリオを実行しないようにする必要がある。   -An error that occurs when only a specific abnormal scenario is executed multiple times: An error that causes the system to operate differently than expected when the variable X used when executing an abnormal scenario is an invalid value is there. If another abnormal scenario that modifies the value of variable X is executed together, variable X will not be an invalid value and an error may not be detected, so other abnormal scenarios are not executed. There is a need.

例1)異常系シナリオ「買い物の途中でキャンセル」では、買物カゴ変数を参照するが、買物カゴ変数が正しく初期化されておらず、NULL参照エラーでプログラムが停止する場合。但し、買物カゴ変数の正しい初期かを行う別の異常系シナリオがあった場合、そこを実行しないようにする必要がある。   Example 1) In the abnormal scenario “cancel in the middle of shopping”, the shopping basket variable is referenced, but the shopping basket variable is not correctly initialized and the program stops due to a NULL reference error. However, if there is another abnormal scenario that determines whether the shopping basket variable is the correct initial value, it is necessary not to execute it.

例2)異常系シナリオ「ログイン失敗」でエラーログを留め、ログイン失敗を何度も繰り返すとエラーログを記録できる限界値を超えてプログラムが停止する場合。但し、エラーログを全て削除する別の異常系シナリオがあった場合、そこを実行しないようにする必要がある。   Example 2) When the error log is retained in the abnormal scenario “login failure”, and the program stops after exceeding the limit value that can record the error log after repeated login failures. However, if there is another abnormal scenario that deletes all error logs, it is necessary not to execute it.

・ループ経路:1つ以上のエッジから構成される。以下の2つの場合がある。   Loop path: Consists of one or more edges. There are two cases:

1)2つ以上のエッジE0, E1,…,En
(ただし、E0≠Ei(i=1,…,n)で構成され、Enの次のエッジのいずれかにE0が含まれる部分経路;
2)1つのエッジE0から構成され、E0の次のエッジにE0が含まれる部分経路;
・エッジ:ユースケース記述の矢印部分。両側(始点と終点)にノードが接続されている(但し、開始エッジのみ、始点にノードが接続されていない)。
1) Two or more edges E0, E1, ..., En
(Provided that E0 ≠ Ei (i = 1,..., N), and a partial path in which E0 is included in any of the next edges of En;
2) a partial path composed of one edge E0 and including E0 at the next edge of E0;
Edge: Arrow part of use case description. Nodes are connected to both sides (start point and end point) (however, only the start edge, no node is connected to the start point).

・ノード:ユースケース記述内の節部分。エッジ(始点との接続)群を保持している。   Node: A section in a use case description. Holds the edge (connection to the start point) group.

・開始エッジ:ユースケース記述に1つ存在し、経路の開始を表すエッジ。   Start edge: An edge that exists in the use case description and represents the start of a route.

・終了エッジ:ユースケース記述に1つ以上存在し、経路の終了を表すエッジ。   End edge: One or more edges in the use case description that represent the end of the route.

・エッジ用スタック:ユースケース記述内で辿ったエッジを順番通りに保存するためのスタック。   Edge stack: A stack for storing the edges traced in the use case description in order.

・次展開エッジ群:次に辿るエッジ(自ノードと始点で接続しているエッジ)の候補群。   Next development edge group: A candidate group of edges to be traced next (edges connected to the own node at the start point).

・次展開エッジ群用スタック:これまで辿った経路中で、まだ辿っていない次展開エッジ群を保存しておくスタックである。   Stack for next expanded edge group: A stack for storing the next expanded edge group that has not been traced in the path traced so far.

・前エッジ群:自ノードと終点で接続しているエッジ群。   Front edge group: An edge group connected to its own node at its end point.

・現在次展開エッジ群:次展開エッジ群用スタックの最上位のもの。   Current next developed edge group: the top of the next developed edge group stack.

・現在ループ経路:これまでの経路(エッジ用スタックに積まれているエッジ)において、スタック最上位のエッジから最上位に最も近い現在エッジまでの経路である。   Current loop route: This is a route from the top edge of the stack to the current edge closest to the top of the previous routes (edges stacked on the edge stack).

・ループ出現回数:ループが経路中に何回出現したかの回数。   Loop appearance count: The number of times the loop has appeared in the route.

図1は、本発明の一実施の形態におけるテスト項目生成装置の構成を示す。   FIG. 1 shows a configuration of a test item generation apparatus according to an embodiment of the present invention.

同図に示すテスト項目生成装置は、設計情報読込部1、設計モデル分析部2、実行経路抽出部3、時刻経路記憶部5、テスト項目生成部6から構成され、ユーザ端末20に接続されている。   The test item generation apparatus shown in FIG. 1 includes a design information reading unit 1, a design model analysis unit 2, an execution path extraction unit 3, a time path storage unit 5, and a test item generation unit 6, and is connected to a user terminal 20. Yes.

設計情報読込部1は、ユーザ端末20から入力された設計モデル(XMIファイル)を読み込み設計モデル分析部2に渡す。   The design information reading unit 1 reads the design model (XMI file) input from the user terminal 20 and passes it to the design model analysis unit 2.

設計モデル分析部2は、入力された設計モデルからユースケース記述(UML Activity)画面遷移図を抽出し設計モデル(XML形式)を生成し、実行経路抽出部3に渡す。   The design model analysis unit 2 extracts a use case description (UML Activity) screen transition diagram from the input design model, generates a design model (XML format), and passes it to the execution path extraction unit 3.

実行経路抽出部3は、図2に示すように、設計モデル入力部31、ループ無し経路抽出部32、ループ有りテスト経路補完部33、フィルタリング部34、ループ経路複製部35、から構成される。設計モデル入力部31からユースケース記述が入力されると、ループ無し経路抽出部32において、ユースケース記述からループ経路を含まない全テスト経路を抽出し、ループ有りテスト経路補完部33においてループ経路をつなぎ、フィルタリング部34において任意の異常系シナリオのみを含むテスト経路を抽出し、ループ経路複製部35において異常系シナリオを含むループ経路をユーザが指定した回数分だけ複製して実行経路記憶部5に格納する。   As illustrated in FIG. 2, the execution path extraction unit 3 includes a design model input unit 31, a loopless path extraction unit 32, a looped test path complementation unit 33, a filtering unit 34, and a loop path replication unit 35. When the use case description is input from the design model input unit 31, the loop-less route extraction unit 32 extracts all the test routes that do not include the loop route from the use case description, and the test route supplement unit 33 with the loop extracts the loop route. Then, the test path including only an arbitrary abnormal scenario is extracted by the filtering unit 34, and the loop path including the abnormal scenario is duplicated by the number of times designated by the user in the loop path duplicating unit 35 and is stored in the execution path storage unit 5. Store.

実行経路記憶部5は、実行経路抽出部3で抽出されたテスト経路を格納する。   The execution path storage unit 5 stores the test path extracted by the execution path extraction unit 3.

テスト項目生成部6は、実行経路記憶部5からテスト経路を読み出してテスト項目表を生成してユーザ端末20に出力する。   The test item generation unit 6 reads the test path from the execution path storage unit 5, generates a test item table, and outputs it to the user terminal 20.

図3は、本発明の一実施の形態における概要動作のフローチャートである。   FIG. 3 is a flowchart of an outline operation in one embodiment of the present invention.

ステップ110) 設計情報読込部1は、ユーザ端末20から設計ドキュメント群を読み込む。   Step 110) The design information reading unit 1 reads a design document group from the user terminal 20.

ステップ120) 設計モデル分析部2は、読み込んだ設計ドキュメント群から設計モデル(XML形式)を生成する。ここで、設計モデル(XML形式)を生成する手法として、「XStream http://xstream.codehaus.org/tutorial.html」を用いるものとする。生成された設計モデルを実行経路抽出部3に出力する。   Step 120) The design model analysis unit 2 generates a design model (XML format) from the read design document group. Here, “XStream http://xstream.codehaus.org/tutorial.html” is used as a method for generating a design model (XML format). The generated design model is output to the execution path extraction unit 3.

ステップ130) 実行経路抽出部3は、設計モデルからループ無しテスト経路、ループ経路を抽出し、異常系シナリオ(代替フロー・例外フロー)を含むループ経路を指定された数分複製してテスト経路(テスト項目)を抽出し、実行経路記憶部5に格納する。詳細な処理については図4で詳述する。 Step 130) The execution path extraction unit 3 extracts a test path without a loop and a loop path from the design model, duplicates a specified number of loop paths including an abnormal scenario (alternate flow / exception flow), and the test path ( Test item) is extracted and stored in the execution path storage unit 5. Detailed processing will be described in detail with reference to FIG.

ステップ140) テスト項目生成部6は、実行経路記憶部5からテスト経路を読み込んで、テスト項目表を生成してユーザ端末20に出力する。   Step 140) The test item generation unit 6 reads the test path from the execution path storage unit 5, generates a test item table, and outputs it to the user terminal 20.

次に、上記の実行経路抽出部3におけるステップ130の処理について詳述する。   Next, the processing of step 130 in the execution path extraction unit 3 will be described in detail.

図4は、本発明の一実施の形態におけるステップ130の詳細フローチャートである。   FIG. 4 is a detailed flowchart of step 130 in one embodiment of the present invention.

ステップ210) 実行経路抽出部3の設計モデル入力部31は、設計モデル分析部2で生成された設計モデル(XMLファイル)を読み込み、当該設計モデル内のユースケース記述を抽出し、ユースケース記述リストを生成し、メモリ(図示せず)に格納する。図5に示すように、ユースケース記述には、ノードID,ノード内テキスト、前エッジ群、次展開エッジ群、エッジID、始点接続ノードID、終点接続ノードID、遷移条件、種類が含まれている。図5のユースケース記述の構造イメージを図6に示す。   Step 210) The design model input unit 31 of the execution path extraction unit 3 reads the design model (XML file) generated by the design model analysis unit 2, extracts use case descriptions in the design model, and uses case description list Is generated and stored in a memory (not shown). As shown in FIG. 5, the use case description includes a node ID, intra-node text, previous edge group, next expanded edge group, edge ID, start point connection node ID, end point connection node ID, transition condition, and type. Yes. A structural image of the use case description of FIG. 5 is shown in FIG.

ステップ220) 実行経路抽出部3のループ無し経路抽出部32は、ユースケース記述リスト読み込む。   Step 220) The loopless route extraction unit 32 of the execution route extraction unit 3 reads the use case description list.

ステップ230) 実行経路抽出部3のループ無し経路抽出部32、ループ有りテスト経路補完部33は、ユースケース記述リストから異常系テスト経路を抽出する。詳細な処理については図7で詳述する。   Step 230) The loopless path extraction unit 32 and the looped test path complementation unit 33 of the execution path extraction unit 3 extract an abnormal test path from the use case description list. Detailed processing will be described in detail with reference to FIG.

ステップ240) 実行経路抽出部3のフィルタリング部34は、フィルタリングを行い、フィルタリング後のテスト項目の異常系経路をテスト項目としてまとめる処理を全異常系テスト経路に対して行う。   Step 240) The filtering unit 34 of the execution path extracting unit 3 performs filtering, and performs a process for collecting the abnormal system paths of the test items after filtering as test items on all the abnormal test paths.

ステップ250) フィルタリング部34は、テスト項目群を要素としてもつテスト項目表を作成して実行経路記憶部5に格納する。   Step 250) The filtering unit 34 creates a test item table having the test item group as an element and stores it in the execution path storage unit 5.

次に、上記のステップ230のユースケース記述リストから異常系テスト経路を抽出する処理について説明する。   Next, processing for extracting an abnormal test path from the use case description list in step 230 will be described.

図7は、本発明の一実施の形態におけるステップ230の詳細フローチャートである。   FIG. 7 is a detailed flowchart of step 230 in one embodiment of the present invention.

ステップ310) 実行経路抽出部3のループ無し経路抽出部32は、ユースケース記述を読み込む。   Step 310) The loopless route extraction unit 32 of the execution route extraction unit 3 reads the use case description.

ステップ320) ループ無し経路抽出部32は、ユースケース記述からループ無し経路を抽出し、メモリ(図示せず)上のテスト経路集合に加える。詳細な処理は図8で詳述する。   Step 320) The loopless path extraction unit 32 extracts a loopless path from the use case description and adds it to a test path set on a memory (not shown). Detailed processing will be described in detail with reference to FIG.

ステップ330) ループ有りテスト経路補完部33は、ユースケース記述からループ有りテスト経路を抽出し、メモリ(図示せず)上のテスト経路集合に加える。詳細な処理は図10で詳述する。   Step 330) The test path complementing unit with loop 33 extracts the test path with loop from the use case description and adds it to the test path set on the memory (not shown). Detailed processing will be described in detail with reference to FIG.

ステップ340) フィルタリング部34は、メモリ(図示せず)からテスト経路集合を読み出し、その中から特定の異常系のシナリオのみを含むテスト経路を抽出する。詳細については図13で詳述する。   Step 340) The filtering unit 34 reads a test path set from a memory (not shown), and extracts a test path including only a specific abnormal scenario from the test path set. Details will be described in detail with reference to FIG.

ステップ350) ループ経路複製部35は、ステップ340で抽出された異常系テスト経路集合と、ユーザ端末20から外部パラメータとしてループ回数を取得して、異常系テスト経路集合の各異常系テスト経路中のループ箇所をユーザ指定回数分だけ複製し、これを異常系テスト経路集合として実行経路記憶部5に格納する。詳細な処理は図14で詳述する。   Step 350) The loop path duplicating unit 35 acquires the abnormal test path set extracted in Step 340 and the number of loops as an external parameter from the user terminal 20, and in each abnormal test path of the abnormal test path set. The loop portion is duplicated as many times as specified by the user and stored in the execution path storage unit 5 as an abnormal test path set. Detailed processing will be described in detail with reference to FIG.

上記のステップ320における、ループ無し経路抽出部32によるループ無し経路抽出処理について説明する。   The loopless route extraction process by the loopless route extraction unit 32 in step 320 will be described.

図8は、本発明の一実施の形態におけるステップ320の詳細フローチャートである。   FIG. 8 is a detailed flowchart of step 320 in one embodiment of the present invention.

ステップ410) ループ無し経路抽出部32は、ユースケース記述から初期次展開エッジ群(初期エッジのみ追加したもの)をメモリ(図示せず)の次展開エッジ群スタックに積む。   Step 410) The loopless path extracting unit 32 loads the initial next expanded edge group (added only the initial edge) from the use case description into the next expanded edge group stack of the memory (not shown).

ステップ415) 次展開エッジ群スタックが空である場合は、処理を終了し、空でない場合は、ステップ416に移行する。   Step 415) If the next developed edge group stack is empty, the process is terminated. If not, the process proceeds to Step 416.

ステップ416) 次展開エッジ群用スタックの最上位にある次展開エッジ群に要素がある場合はステップ420に移行し、ない場合はステップ480に移行する。   Step 416) If there is an element in the next development edge group at the top of the stack for the next development edge group, the process proceeds to step 420. If there is no element, the process proceeds to step 480.

ステップ420) メモリ(図示せず)の次展開エッジ群スタックの最上位にある要素(現在(次展開エッジ群)から1つエッジを得て現在エッジとする。   Step 420) One edge is obtained from the element (current (next development edge group)) at the top of the next development edge group stack of the memory (not shown) and is set as the current edge.

ステップ430) 現在エッジ群から現在エッジ群を取り除く。   Step 430) Remove the current edge group from the current edge group.

ステップ440) 経路(エッジ用スタックに積まれているエッジの列)内のループ出現回数を計算する。詳細については図9で詳述する。   Step 440) Calculate the number of occurrences of the loop in the path (a sequence of edges stacked on the edge stack). Details will be described in detail with reference to FIG.

ステップ445) ステップ440で求められたループ出現回数が0より大きい場合はステップ415に戻り、0以下の場合はステップ450に移行する。   Step 445) If the number of occurrences of the loop obtained in Step 440 is greater than 0, the process returns to Step 415, and if it is 0 or less, the process proceeds to Step 450.

ステップ450) 現在エッジをエッジ用スタックに積む。   Step 450) Stack the current edge onto the edge stack.

ステップ460) 現在のエッジの持つ終点接続ノードIDに基づいて、ユースケース記述からノードを取得し、そのノードのエッジ(始点との接続)群を取得し、その取得したエッジ(始点との接続)群を、次展開エッジとして、次展開エッジ群スタックに積む。   Step 460) Based on the end point connection node ID of the current edge, the node is acquired from the use case description, the edge (connection with the start point) group of the node is acquired, and the acquired edge (connection with the start point) The group is loaded on the next expansion edge group stack as the next expansion edge.

ステップ470) 経路(エッジ用スタックに積まれているエッジの列)をテスト経路としてテスト経路集合に加え、ステップ415に戻る。   Step 470) The path (sequence of edges stacked on the edge stack) is added as a test path to the test path set, and the process returns to Step 415.

ステップ480) ステップ416で次展開エッジ群用スタックの最上位にある次展開エッジ群に要素がない場合は、次展開エッジ群用スタックをホップする。   Step 480) If there is no element in the next development edge group at the top of the next development edge group stack in Step 416, the next development edge group stack is hopped.

ステップ490) エッジ用スタックが空でなければエッジ用スタックをホップし、処理を終了する。   Step 490) If the edge stack is not empty, the edge stack is hopped and the process is terminated.

次に、ループ無し経路抽出部32における、上記のステップ440の経路(エッジ用スタックに積まれているエッジの列)内の現在ループ経路の出現回数を計算する処理について説明する。   Next, a process of calculating the number of appearances of the current loop path in the path of the above-described step 440 (sequence of edges stacked on the edge stack) in the loopless path extraction unit 32 will be described.

図9は、本発明の一実施の形態におけるステップ440の詳細フローチャートである。   FIG. 9 is a detailed flowchart of step 440 in one embodiment of the present invention.

ステップ510) ループ無し経路抽出部32は、ステップ420で選択された現在エッジを読み込む。   Step 510) The loopless path extraction unit 32 reads the current edge selected in Step 420.

ステップ520) 経路(エッジ用スタックに積まれているエッジの列)を読み込む。   Step 520) Read a path (a sequence of edges stacked on the edge stack).

ステップ530) 経路を複製し、複製した経路を探索途中経路とする。   Step 530) The route is duplicated, and the duplicated route is set as a search-in-progress route.

ステップ540) 探索途中経路の先頭から一番近い現在エッジまでを現在ループ経路をとして抽出する。   Step 540) The current loop route is extracted from the beginning of the route being searched to the nearest current edge.

ステップ550) 探索途中経路内で現在ループ経路が何回出現するか(ループ出現回数)を、文献1「R. S. Boyer; J. S. Moore (1977)."A fast string searching algorithm". Comm. ACM 20: 762-772」等の手法を用いて計算する。   Step 550) How many times the current loop path appears in the search path (the number of loop occurrences) is described in Reference 1 “RS Boyer; JS Moore (1977).“ A fast string searching algorithm ”. Comm. ACM 20: 762 -772 "etc.

図7のステップ330のループ有りテスト経路補完部33の処理について説明する。   The process of the looped test route complementing unit 33 in step 330 of FIG. 7 will be described.

図10は、本発明の一実施の形態におけるステップ330の詳細フローチャートである。   FIG. 10 is a detailed flowchart of step 330 in one embodiment of the present invention.

ステップ610) ループ有りテスト経路補完部33は、ユースケース記述を読み込む。   Step 610) The test path complement unit 33 with loop reads the use case description.

ステップ620) メモリ(図示せず)からステップ320で生成されたテスト経路集合を読み込む。   Step 620) The test path set generated in Step 320 is read from a memory (not shown).

ステップ630) エッジを格納するループ経路エッジキューをメモリ(図示せず)上に用意する。   Step 630) A loop path edge queue for storing edges is prepared on a memory (not shown).

ステップ640) ユースケース記述を構成するエッジのうち、テスト経路集合の中のテスト経路に存在しないエッジ、言い換えると、ループ経路中に存在するエッジを全てループ経路エッジキューに追加する。   Step 640) Among the edges constituting the use case description, all edges that do not exist in the test path in the test path set, in other words, all edges that exist in the loop path are added to the loop path edge queue.

ステップ650) ループ経路エッジキューから1つエッジ(ループ経路エッジ)を取り出す。   Step 650) Extract one edge (loop path edge) from the loop path edge queue.

ステップ660) ループ経路エッジキューにループ経路エッジが含まれる場合は、ループ経路エッジを含むループ経路をテスト経路集合に含まれるテスト経路につなぎ、新しいテスト経路を複数作成し、これを新規追加分テスト経路集合とする。詳細な処理は図11で詳述する。   Step 660) When the loop path edge is included in the loop path edge queue, the loop path including the loop path edge is connected to the test path included in the test path set, and a plurality of new test paths are created, and this is newly added test. Let it be a route set. Detailed processing will be described in detail with reference to FIG.

ステップ670) ループ経路エッジキューから、新規追加分テスト経路集合のテスト経路に含まれるエッジを全て除く。   Step 670) Remove all edges included in the test path of the newly added test path set from the loop path edge queue.

ステップ680) 新規追加分テスト経路集合をテスト経路集合に加える。   Step 680) Add the newly added test path set to the test path set.

ステップ690) ステップ650において、ループ経路エッジキューにループ経路エッジが含まれていない場合は、ループ経路エッジをループ経路エッジキューに入れなおす。   Step 690) In step 650, if the loop path edge queue does not include the loop path edge, the loop path edge is re-entered in the loop path edge queue.

次に、ループ有りテスト経路補完部33における、上記のステップ660のループ経路エッジを含むループ経路をテスト経路につなぎ、新しいテスト経路を作成する処理について説明する。   Next, a process of creating a new test path by connecting the loop path including the loop path edge in step 660 to the test path in the test path complementing unit 33 with loop will be described.

図11は、本発明の一実施の形態におけるステップ660の詳細フローチャートである。   FIG. 11 is a detailed flowchart of step 660 in one embodiment of the present invention.

ステップ710) ループ有りテスト経路補完部33は、ユースケース記述を読み込む。   Step 710) The test route complementing unit with loop 33 reads the use case description.

ステップ720) テスト経路集合を読み込む。   Step 720) Read test path set.

ステップ730) ループ経路エッジキューからループ経路エッジを読み込む。   Step 730) Read the loop path edge from the loop path edge queue.

ステップ740) テスト経路集合から、テスト経路(あるエッジEが経路中に存在し、エッジEの終点接続ノードIDに対応するノードの次展開エッジ群にループ経路エッジが含まれる)を、前半経路用テスト経路集合として全て選び出す。   Step 740) From the test path set, a test path (a certain edge E exists in the path and a loop path edge is included in the next developed edge group of the node corresponding to the end point connection node ID of the edge E) is used for the first half path. Select all as test path set.

ステップ750) テスト経路集合からループ経路エッジに関する後半経路集合を抽出する。後半経路集合とは、ユースケース記述からループ経路エッジを始点としたテスト経路(後半経路)の集合である。   Step 750) Extract the second half path set related to the loop path edge from the test path set. The latter half route set is a set of test routes (second half route) starting from the loop route edge based on the use case description.

ステップ760) メモリ上に新規追加分テスト経路集合(最初は空)を用意する。   Step 760) A newly added test path set (initially empty) is prepared on the memory.

ステップ770) 終了エッジに最も近いループ経路エッジから終了エッジまでの部分経路を前半経路として取り出す。   Step 770) The partial path from the loop path edge closest to the end edge to the end edge is taken out as the first half path.

ステップ780) 前半経路と後半経路をループ経路エッジXで接続して新しい経路(新規追加分テスト経路)を作成する。   Step 780) The first half path and the second half path are connected by the loop path edge X to create a new path (newly added test path).

ステップ785) 上記で作成された新規追加分テスト経路に印を付ける。具体的には、新規追加分テスト経路とループ経路エッジを取得し、新規追加分テスト経路のループ経路エッジから、ループ経路エッジを次展開エッジ群にもつエッジまでの部分経路を構成するエッジすべてにループ経路であることの印を付ける。   Step 785) Mark the newly added test path created above. Specifically, the newly added test path and the loop path edge are acquired, and all edges constituting the partial path from the loop path edge of the newly added test path to the edge having the loop path edge as the next development edge group are obtained. Mark it as a loop path.

ステップ790) 新追加分テスト経路を新規追加分テスト経路集合へ加える。その結果の例を図12に示す。   Step 790) Add the newly added test path to the newly added test path set. An example of the result is shown in FIG.

上記のようにループ有りテスト経路補完部33は、抽出したループ経路を含まないテスト経路に対し、ループ経路をつないでいくことにより新しいテスト経路(新規追加分テスト経路)を生成する。   As described above, the test path complementing unit with loop 33 generates a new test path (new added test path) by connecting the loop path to the test path not including the extracted loop path.

次に、フィルタリング部34の図7のステップ340におけるフィルタリング処理について説明する。   Next, the filtering process in step 340 of FIG.

図13は、本発明の一実施の形態におけるステップ340の詳細フローチャートである。   FIG. 13 is a detailed flowchart of step 340 in one embodiment of the present invention.

ステップ810) フィルタリング部34は、メモリ(図示せず)からユースケース記述を読み込む。   Step 810) The filtering unit 34 reads a use case description from a memory (not shown).

ステップ820) メモリ(図示せず)からステップ330で出力された新規追加分テスト経路集合を読み出す。   Step 820) The newly added test path set output in Step 330 is read from a memory (not shown).

ステップ830) メモリ(図示せず)上に異常系テスト経路集合を用意する。なお、初回は空集合とする。   Step 830) An abnormal test path set is prepared on a memory (not shown). The first time is an empty set.

ステップ840) ユースケース記述から全異常系エッジの集合(以下「異常系エッジ集合」と記す)を取得する。取得できない場合はステップ350に移行する。   Step 840) A set of all abnormal system edges (hereinafter referred to as “abnormal system edge set”) is acquired from the use case description. If it cannot be obtained, the process proceeds to step 350.

ステップ850) 異常系エッジ集合が空でない場合は、異常系エッジ集合から異常系エッジを対象異常系エッジとして1つ取り出す。   Step 850) If the abnormal system edge set is not empty, one abnormal system edge is extracted from the abnormal system edge set as a target abnormal system edge.

ステップ860) ステップ820で読み出した新規追加分テスト経路集合から対象異常系エッジのみを含むテスト経路を、対象異常系テスト経路として1つ選ぶ。ここで、条件(対象異常系エッジのみを含むテスト経路)を満たすテスト経路がない場合は、対象異常系エッジを含み、かつ、含まれる異常系エッジの数が最小であるテスト経路を選ぶ。   Step 860) One test path including only the target abnormal system edge is selected as the target abnormal system test path from the newly added test path set read in Step 820. Here, when there is no test path that satisfies the condition (test path including only the target abnormal system edge), a test path that includes the target abnormal system edge and that includes the minimum number of abnormal system edges is selected.

ステップ870) 対象異常系テスト経路に含まれる異常系エッジを異常系エッジ集合から除く。   Step 870) The abnormal system edge included in the target abnormal system test path is removed from the abnormal system edge set.

ステップ880) 対象異常系テスト経路を異常系テスト経路集合に加える。但し、対象異常系エッジにループ経路の印が付いていない場合は加えない。   Step 880) Add the target abnormal test path to the abnormal test path set. However, it is not added when the loop path is not marked on the target abnormal system edge.

次に、ステップ350のループ経路複製部35によるループ経路を複製する処理について説明する。   Next, the process of duplicating the loop path by the loop path duplicating unit 35 in step 350 will be described.

図14は、本発明の一実施の形態におけるステップ350の詳細フローチャートである。   FIG. 14 is a detailed flowchart of step 350 in one embodiment of the present invention.

ステップ910) ループ経路複製部35は、ステップ340(ステップ880)で生成された異常系テスト経路集合をメモリ(図示せず)から読み込む。   Step 910) The loop path duplicating unit 35 reads the abnormal test path set generated in Step 340 (Step 880) from a memory (not shown).

ステップ920) ユーザ指定のループ回数をユーザ端末20から取得する。   Step 920) The user-specified loop count is acquired from the user terminal 20.

ステップ930) 異常系テスト経路のループ経路の印の追加箇所をユーザ指定ループ回数分複製し、実行経路記憶部5に格納する。   Step 930) Duplicated portions of the loop path mark of the abnormal test path are duplicated by the number of times specified by the user and stored in the execution path storage unit 5.

上記のステップ230の異常系テスト経路の抽出処理について具体的に説明する。   The abnormal system test path extraction process in step 230 will be specifically described.

図15は、本発明の一実施の形態におけるユースケース記述から異常系テスト経路を抽出する例を示す。同図において、太線の矢印は正常系エッジを示し、破線の矢印は異常系エッジを示す。   FIG. 15 shows an example in which an abnormal test path is extracted from the use case description according to the embodiment of the present invention. In the figure, a thick arrow indicates a normal edge, and a broken arrow indicates an abnormal edge.

ユースケース記述から、正常系シナリオ
ABCD
があり、異常系シナリオとして、
(1)X
(2)YZ
(3)W
がある。ループ無し経路抽出部32において、ループ無し経路として、
・ABCD
・ABCW
をテスト経路集合として抽出する(ステップ320)。
From the use case description, normal scenario ABCD
As an abnormal scenario,
(1) X
(2) YZ
(3) W
There is. In the loopless route extraction unit 32, as a loopless route,
・ ABCD
・ ABCW
Are extracted as a test path set (step 320).

これにより、ループ経路を含まない全テスト経路は「ループ経路に含まれない異常系シナリオ」の全ての組合せを網羅するテスト経路の最小セットになっており、複数種類の異常系シナリオの全ての組合せを網羅するテスト経路の最小セットを抽出できる。   As a result, all test paths that do not include a loop path are a minimum set of test paths that cover all combinations of “abnormal system scenarios that are not included in the loop path”, and all combinations of multiple types of abnormal system scenarios. The minimum set of test paths that cover

次に、ループ有りテスト経路補完部33において、以下のループ有り経路を補完する(ステップ330)。   Next, the looped test route complementing unit 33 supplements the following looped route (step 330).

・ABCD(ループ無し)
・ABCW(ループ無し)
・ABAXBCD(ループあり)
・ABYZBCD(ループあり)
・ABXBYZBCD(ループあり)
・ABXBCW(ループあり)
・ABAYZBCW(ループあり)
・ABXBYZBCW(ループあり)
上記の経路のうち、ABCDは正常系シナリオであるので、フィルタリング34により、取り除かれる(ステップ340)。その結果、異常系テスト経路集合として、
・A⇒B⇒C⇒W(ループ無し)
・A⇒B⇒A⇒X⇒B⇒C⇒D(ループあり)
・A⇒B⇒Y⇒Z⇒B⇒C⇒D(ループあり)
・A⇒B⇒X⇒B⇒Y⇒Z⇒B⇒C⇒D(ループあり)
・A⇒B⇒X⇒B⇒C⇒W(ループあり)
・A⇒B⇒A⇒Y⇒Z⇒B⇒C⇒W(ループあり)
・A⇒B⇒X⇒B⇒Y⇒Z⇒B⇒C⇒W(ループあり)
が残る。これらは、上記の(1)〜(3)の異常系シナリオ3つの全組合せであるので、以下の7パターンとなる。
-ABCD (no loop)
・ ABCW (no loop)
・ ABAXBCD (with loop)
・ ABYZBCD (with loop)
・ ABXBYZBCD (with loop)
・ ABXBCW (with loop)
・ ABAYZBCW (with loop)
・ ABXBYZBCW (with loop)
Of the above paths, ABCD is a normal scenario and is removed by filtering 34 (step 340). As a result, as an abnormal test path set,
・ A⇒B⇒C⇒W (no loop)
・ A⇒B⇒A⇒X⇒B⇒C⇒D (with loop)
・ A⇒B⇒Y⇒Z⇒B⇒C⇒D (with loop)
・ A⇒B⇒X⇒B⇒Y⇒Z⇒B⇒C⇒D (with loop)
・ A⇒B⇒X⇒B⇒C⇒W (with loop)
・ A⇒B⇒A⇒Y⇒Z⇒B⇒C⇒W (with loop)
・ A⇒B⇒X⇒B⇒Y⇒Z⇒B⇒C⇒W (with loop)
Remains. Since these are all combinations of the above three abnormal system scenarios (1) to (3), the following seven patterns are obtained.

・(1)
・(2)
・(3)
・(1)(2)
・(2)(3)
・(1)(3)
・(1)(2)(3)
上記の7つのパターンが異常系テスト集合となり、実行経路記憶部5に格納される。
・ (1)
(2)
・ (3)
・ (1) (2)
・ (2) (3)
・ (1) (3)
・ (1) (2) (3)
The above seven patterns form an abnormal test set and are stored in the execution path storage unit 5.

次に、ループ有りテスト経路補完部33における図8のステップ330のループ有りテスト経路を補完する例を示す。   Next, an example of complementing the looped test path in step 330 of FIG.

図16は、本発明の一実施の形態におけるループ有りテスト経路を補完する例を示す。   FIG. 16 shows an example of complementing the looped test path according to the embodiment of the present invention.

ユースケース記述では、以下の2つの経路がループ無しテスト経路として抽出されているものとする。   In the use case description, it is assumed that the following two routes are extracted as loopless test routes.

・A⇒B⇒C⇒D
・A⇒B⇒C⇒W
ループ有りテスト経路補完部33は、メモリ上にループ経路エッジキューを用意し、ループ無しテスト経路に存在しないエッジを全て加える。図16の例では、ループ経路エッジキューには、
[X,Y,Z,W]
が追加される(ステップ630,640)。
・ A⇒B⇒C⇒D
・ A⇒B⇒C⇒W
The test path complementing unit with loop 33 prepares a loop path edge queue on the memory and adds all the edges that do not exist in the test path without a loop. In the example of FIG. 16, the loop path edge queue includes
[X, Y, Z, W]
Is added (steps 630 and 640).

次に、ループ絵経路エッジキューの先頭のXを取り出す(ステップ650)。ループ経路エッジXを経路ABCD,ABCWにつなげ、新しい経路を生成する(ステップ660)。図14の例において、前半経路A⇒B、後半経路B⇒C⇒D、後半経路B⇒C⇒Wの間にループ経路エッジXをつなげることにより、新規追加分テスト経路
A⇒B⇒X⇒B⇒C⇒D
A⇒B⇒X⇒B⇒C⇒W
の2つが生成され、これらをテスト経路集合に加えると、
・A⇒B⇒C⇒D
・A⇒B⇒C⇒W
・A⇒B⇒X⇒B⇒C⇒D
・A⇒B⇒X⇒B⇒C⇒W
となる。上記の処理をループ経路エッジキュー[Y,Z,W]のそれぞれに対して行う(ステップ680)。
Next, the head X of the loop picture path edge queue is extracted (step 650). The loop path edge X is connected to the paths ABCD and ABCW to generate a new path (step 660). In the example of FIG. 14, by connecting the loop path edge X between the first half path A⇒B, the second half path B⇒C⇒D, and the second half path B⇒C⇒W, the newly added test path A⇒B⇒X⇒ B⇒C⇒D
A⇒B⇒X⇒B⇒C⇒W
Are generated and added to the test path set,
・ A⇒B⇒C⇒D
・ A⇒B⇒C⇒W
・ A⇒B⇒X⇒B⇒C⇒D
・ A⇒B⇒X⇒B⇒C⇒W
It becomes. The above processing is performed for each of the loop path edge queues [Y, Z, W] (step 680).

上記のループ無しテスト経路抽出部32で抽出した各テスト経路は「ループ経路に含まれない異常系シナリオ」の組合せを網羅するテスト経路の最小セットであり、それに対して、ループ有りテスト経路補完部33において、ループ経路に含まれる異常系シナリオを全組合せ分つなぐため、結果としてできるテスト経路は「全ての異常系シナリオ」の組合せを網羅するテスト経路の最小セットとなっている。つまり、ループ無しテスト経路抽出部32により得られた組合せ数Aとループ有りテスト経路補完部33により得られた組合せ数Bにより、
A×B=全組合せ数
となる。これは、異常系シナリオの全組合せのテスト経路のみを抽出しているため、全順列で抽出する従来技術より、圧倒的に少ないメモリ使用量でテスト項目を得ることが可能となる。
Each test path extracted by the above-described loop-less test path extraction unit 32 is a minimum set of test paths covering a combination of “abnormal system scenarios not included in the loop path”. In 33, since all abnormal scenarios included in the loop route are connected to each other, the resulting test route is the minimum set of test routes that cover the combinations of “all abnormal scenarios”. That is, the number of combinations A obtained by the test path extraction unit 32 without loop and the number B of combinations obtained by the test path complementing unit 33 with loop
A × B = total number of combinations. This is because only test paths of all combinations of abnormal scenarios are extracted, so that it is possible to obtain test items with a memory usage that is overwhelmingly smaller than in the conventional technique that extracts all permutations.

なお、図1に示すテスト項目生成装置10の各構成要素の動作をプログラムとして構築し、テスト項目生成装置として利用されるコンピュータにインストールして実行させる、または、ネットワークを介して流通させることが可能である。   The operation of each component of the test item generation device 10 shown in FIG. 1 can be constructed as a program, installed on a computer used as the test item generation device, executed, or distributed via a network. It is.

本発明は、上記の実施の形態に限定されることなく、特許請求の範囲内において、種々変更・応用が可能である。   The present invention is not limited to the above-described embodiments, and various modifications and applications are possible within the scope of the claims.

1 設計情報読込部
2 設計モデル分析部
3 実行経路抽出部
5 実行経路記憶部
6 テスト項目生成部
10 テスト項目生成装置
20 ユーザ端末
31 設計モデル入力部
32 ループ無し経路抽出部
33 ループ有りテスト経路補完部
34 フィルタリング部
35 ループ経路複製部
DESCRIPTION OF SYMBOLS 1 Design information reading part 2 Design model analysis part 3 Execution path extraction part 5 Execution path storage part 6 Test item generation part 10 Test item generation apparatus 20 User terminal 31 Design model input part 32 Loop without path extraction part 33 Test path complement with a loop Unit 34 filtering unit 35 loop path duplicating unit

Claims (7)

ユーザとシステムの間のインタラクションの流れを示すユースケース記述に基づいて、シナリオテスト用のテスト項目を抽出する単独の異常系シナリオを任意回数実行するテスト項目生成装置であって、
入力された設計モデルから、ユースケース記述を取得する設計モデル入力手段と、
前記ユースケース記述からループ経路を含まない全てのテスト経路(以下、「ループ無し経路」と記す)を抽出し、テスト経路集合に加えるループ無しテスト経路抽出手段と、
前記ユースケース記述からループ経路を含むテスト経路(以下「ループ有り経路」と記す)を抽出し、前記テスト経路集合の前記ループ無し経路と該ループ有り経路をつなぎ合わせた新たなテスト経路を生成し、新規追加分テスト経路集合に加えるループ有りテスト経路補完手段と、
前記新規追加分テスト経路集合から、特定の異常系シナリオのみを含むテスト経路を対象異常系テスト経路として抽出し、異常系テスト経路集合に加えるフィルタリング手段と、
前記異常系テスト経路集合の各異常系テスト経路中のループ箇所を複製して実行経路記憶手段に格納するループ経路複製手段と、
を有する実行経路抽出手段と、
前記実行経路記憶手段から前記テスト経路を読み出して、該テスト経路に対するテスト項目を生成するテスト項目生成手段と、
を有することを特徴とする単独の異常系シナリオを任意回数実行するテスト項目生成装置。
A test item generation device that executes a single abnormal scenario that extracts test items for scenario testing based on a use case description indicating a flow of interaction between a user and a system,
A design model input means for obtaining a use case description from the input design model;
Extracting all test paths that do not include loop paths from the use case description (hereinafter referred to as “loop without loops”), and adding the test path extraction means without loops to the test path set;
A test path including a loop path (hereinafter referred to as “path with loop”) is extracted from the use case description, and a new test path is generated by connecting the path without loop and the path with loop of the test path set. , A test path complementing means with a loop to be added to the newly added test path set,
Filtering means for extracting a test path including only a specific abnormal system scenario as a target abnormal system test path from the newly added test path set, and adding it to the abnormal system test path set;
Loop path duplicating means for duplicating and storing the loop location in each abnormal test path of the abnormal test path set in the execution path storage means;
Execution path extraction means having
A test item generation unit that reads the test path from the execution path storage unit and generates a test item for the test path;
A test item generation device that executes a single abnormal scenario any number of times.
前記ループ有りテスト経路補完手段は、
前記ユースケース記述の矢印部分に相当するエッジのうち、前記ループ無し経路に存在しないエッジをループ経路エッジキューに加える手段と、
前記ループ経路エッジキューの先頭のエッジXを取り出して、該エッジXを前記ループ無しテスト経路につなげて前記新たなテスト経路を生成し、ループ経路に印を付与する処理を、該ループ経路エッジキューが空になるまで繰り返す手段と、
を含み、
前記フィルタリング手段は、
前記新規追加分テスト経路集合から、ループ経路に前記印が付与されている対象異常系エッジのみを含むテスト経路を対象異常系テスト経路として抽出する手段を含む
請求項1記載の単独の異常系シナリオを任意回数実行するテスト項目生成装置。
The looped test path complement means is:
Means for adding, to the loop path edge queue, an edge that does not exist in the loop-less path among edges corresponding to the arrow portion of the use case description;
The process of extracting the leading edge X of the loop path edge queue, connecting the edge X to the loopless test path to generate the new test path, and marking the loop path is performed by the loop path edge queue. Means to repeat until is empty,
Including
The filtering means includes
2. The single abnormal system scenario according to claim 1, further comprising means for extracting, from the newly added test path set, a test path including only a target abnormal system edge having the mark added to a loop path as a target abnormal system test path. Is a test item generation device that executes the number of times.
前記ループ経路複製手段は、
ユーザから指定された回数分だけ、前記異常系テスト経路中のループ箇所を複製する手段を含む
請求項1記載の単独の異常系シナリオを任意回数実行するテスト項目生成装置。
The loop path duplicating means includes
2. The test item generating apparatus for executing a single abnormal system scenario an arbitrary number of times according to claim 1, further comprising means for duplicating a loop portion in the abnormal system test path by the number of times designated by a user.
ユーザとシステムの間のインタラクションの流れを示すユースケース記述に基づいたシナリオテスト用のテスト項目を抽出するテスト項目抽出方法であって、
設計モデル入力手段が、入力された設計モデルから、ユースケース記述を取得する設計モデル入力ステップと、
ループ無しテスト経路抽出手段が前記ユースケース記述からループ経路を含まない全てのテスト経路(以下、「ループ無し経路」と記す)を抽出し、テスト経路集合に加えるループ無しテスト経路抽出ステップと、
ループ有りテスト経路補完手段が、前記ユースケース記述からループ経路を含むテスト経路(以下「ループ有り経路」と記す)を抽出し、前記テスト経路集合の前記ループ無し経路と該ループ有り経路をつなぎ合わせた新たなテスト経路を生成し、新規追加分テスト経路集合に加えるループ有りテスト経路補完ステップと、
フィルタリング手段が、前記新規追加分テスト経路集合から、特定の異常系シナリオのみを含むテスト経路を対象異常系テスト経路として抽出し、異常系テスト経路集合に加えるフィルタリングステップと、
ループ経路複製手段が、前記異常系テスト経路集合の各異常系テスト経路中のループ箇所を複製して実行経路記憶手段に格納するループ経路複製ステップと、
を含む実行経路抽出過程と、
テスト項目生成手段が、前記実行経路記憶手段から前記テスト経路を読み出して、該テスト経路に対するテスト項目を生成するテスト項目生成過程と、
を行うことを特徴とする単独の異常系シナリオを任意回数実行するテスト項目生成方法。
A test item extraction method for extracting test items for scenario testing based on a use case description indicating a flow of interaction between a user and a system,
A design model input step in which the design model input means obtains a use case description from the input design model;
A test path extraction means without a loop extracts all test paths that do not include a loop path from the use case description (hereinafter referred to as `` path without loop ''), and adds a test path without loop to add to the test path set;
A test route complementing means with a loop extracts a test route including a loop route from the use case description (hereinafter referred to as a “route with a loop”), and connects the route without the loop and the route with the loop of the test route set. A test path complementing step with a loop that generates a new test path and adds it to the newly added test path set,
A filtering step for extracting a test path including only a specific abnormal system scenario as a target abnormal system test path from the newly added test path set, and adding the test path to the abnormal system test path set;
A loop path duplicating step, wherein the loop path duplicating means duplicates and stores the loop location in each abnormal test path of the abnormal test path set in the execution path storage means;
An execution path extraction process including
A test item generating step for reading the test path from the execution path storage unit and generating a test item for the test path;
A test item generation method for executing a single abnormal scenario characterized by performing an arbitrary number of times.
前記ループ有りテスト経路補完ステップにおいて、
前記ユースケース記述の矢印部分に相当するエッジのうち、前記ループ無し経路に存在しないエッジをループ経路エッジキューに加え、
前記ループ経路エッジキューの先頭のエッジXを取り出して、該エッジXを前記ループ無しテスト経路につなげて前記新たなテスト経路を生成し、ループ経路に印を付与する処理を、該ループ経路エッジキューが空になるまで繰り返し、
前記フィルタリングステップにおいて、
前記新規追加分テスト経路集合から、ループ経路に前記印が付与されている対象異常系エッジのみを含むテスト経路を対象異常系テスト経路として抽出する
請求項4記載の単独の異常系シナリオを任意回数実行するテスト項目生成方法。
In the looped test path completion step,
Of the edges corresponding to the arrow part of the use case description, an edge that does not exist in the loop-less path is added to the loop path edge queue,
The process of extracting the leading edge X of the loop path edge queue, connecting the edge X to the loopless test path to generate the new test path, and marking the loop path is performed by the loop path edge queue. Repeat until is empty,
In the filtering step,
5. The single abnormal system scenario according to claim 4, wherein a test path including only a target abnormal system edge in which the mark is given to a loop path is extracted as a target abnormal system test path from the newly added test path set any number of times. Test item generation method to be executed.
前記ループ経路複製ステップにおいて、
ユーザから指定された回数分だけ、前記異常系テスト経路中のループ箇所を複製する
請求項4記載の単独の異常系シナリオを任意回数実行するテスト項目生成方法。
In the loop path duplication step,
5. The test item generation method for executing a single abnormal scenario according to claim 4, wherein the loop location in the abnormal test path is duplicated as many times as specified by the user.
コンピュータを、
請求項1乃至3のいずれか1項に記載のテスト項目生成装置の各手段として機能させるためのテスト項目生成プログラム。
Computer
A test item generation program for causing each of the means of the test item generation apparatus according to any one of claims 1 to 3 to function.
JP2011195930A 2011-09-08 2011-09-08 Test item generation apparatus, method, and program for executing single abnormal scenario any number of times Active JP5404720B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011195930A JP5404720B2 (en) 2011-09-08 2011-09-08 Test item generation apparatus, method, and program for executing single abnormal scenario any number of times

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011195930A JP5404720B2 (en) 2011-09-08 2011-09-08 Test item generation apparatus, method, and program for executing single abnormal scenario any number of times

Publications (2)

Publication Number Publication Date
JP2013058074A JP2013058074A (en) 2013-03-28
JP5404720B2 true JP5404720B2 (en) 2014-02-05

Family

ID=48133920

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011195930A Active JP5404720B2 (en) 2011-09-08 2011-09-08 Test item generation apparatus, method, and program for executing single abnormal scenario any number of times

Country Status (1)

Country Link
JP (1) JP5404720B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110457207A (en) * 2019-07-12 2019-11-15 平安普惠企业管理有限公司 Test method and related equipment based on machine learning model

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03216739A (en) * 1990-01-20 1991-09-24 Fujitsu Ltd Random execution system for test item
JPH11259336A (en) * 1998-03-09 1999-09-24 Mitsubishi Electric Corp Test procedure extraction system
JPH11306039A (en) * 1998-04-23 1999-11-05 Fujitsu Ltd Test program execution control device, test program execution control method, and computer-readable recording medium storing program for causing a computer to execute the method
JP4591030B2 (en) * 2004-10-13 2010-12-01 横河電機株式会社 Test scenario creation method, test scenario creation device, and test scenario creation program
US20090089618A1 (en) * 2007-10-01 2009-04-02 Fujitsu Limited System and Method for Providing Automatic Test Generation for Web Applications
US8869111B2 (en) * 2009-01-15 2014-10-21 Infosys Limited Method and system for generating test cases for a software application

Also Published As

Publication number Publication date
JP2013058074A (en) 2013-03-28

Similar Documents

Publication Publication Date Title
CN110928772B (en) A test method and device
Vanden Broucke et al. Fodina: A robust and flexible heuristic process discovery technique
US20110016452A1 (en) Method and system for identifying regression test cases for a software
JP2012094046A (en) Device fault analysis apparatus, device fault analysis method and device fault analysis program
CN106126416A (en) A kind of service combination path derivation method based on flow process layout
Oluwagbemi et al. Automatic generation of test cases from activity diagrams for UML based testing (UBT)
JP5404720B2 (en) Test item generation apparatus, method, and program for executing single abnormal scenario any number of times
JP5514143B2 (en) Test data generation apparatus and method
JP5164919B2 (en) Test data generation method, apparatus and program
JP5384587B2 (en) Test item generation apparatus, method and program for combination of abnormal scenarios
JP5404721B2 (en) Test item generation apparatus, method and program for scenario test
JP5514144B2 (en) Test data generation apparatus and method
Ulrich et al. Specification-based testing of concurrent systems
CN119690521A (en) Pipeline task generation method and related equipment
KR101681154B1 (en) Method of constructing data collector, server performing the same and storage medium for the same
JP5514145B2 (en) Test data generation apparatus and method
JP2021068097A (en) Brittleness analyzing device
JP4893811B2 (en) Verification support program and verification support device
JP2011159202A (en) Test item generating method, device, and program
Andrade et al. Testing interruptions in reactive systems
Amyot et al. UCM-based generation of test goals
JP5216732B2 (en) Wireless tag reading control device, wireless tag reading control program
JP5478540B2 (en) Test input data generation apparatus, method, and program
US20250209235A1 (en) System configuration derivation device, system configuration derivation method, and storage medium
JP5514146B2 (en) Test data generation apparatus and method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130626

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130730

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130930

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20131004

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131029

R150 Certificate of patent or registration of utility model

Ref document number: 5404720

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350