JP6268029B2 - Test case generation apparatus and test case generation method - Google Patents

Test case generation apparatus and test case generation method Download PDF

Info

Publication number
JP6268029B2
JP6268029B2 JP2014084670A JP2014084670A JP6268029B2 JP 6268029 B2 JP6268029 B2 JP 6268029B2 JP 2014084670 A JP2014084670 A JP 2014084670A JP 2014084670 A JP2014084670 A JP 2014084670A JP 6268029 B2 JP6268029 B2 JP 6268029B2
Authority
JP
Japan
Prior art keywords
condition
item
rule
result
test case
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
JP2014084670A
Other languages
Japanese (ja)
Other versions
JP2015204065A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2014084670A priority Critical patent/JP6268029B2/en
Publication of JP2015204065A publication Critical patent/JP2015204065A/en
Application granted granted Critical
Publication of JP6268029B2 publication Critical patent/JP6268029B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明は、テストケース生成装置及びテストケース生成方法に関するものであり、具体的には、処理の流れに関わるソフトウェア仕様から、実行パスベース、及び入出力ベース双方を考慮した適宜なカバレッジを満たすテストケースを効率的に生成可能とする技術に関する。   The present invention relates to a test case generation apparatus and a test case generation method, and more specifically, a test that satisfies appropriate coverage in consideration of both an execution path base and an input / output base from a software specification related to a processing flow. The present invention relates to a technique that enables efficient generation of cases.

ソフトウェア開発では、顧客からの要望等を要件定義として纏め、この要件定義に基づき、必要となる機能の設計、詳細化を行い、その実装を行う。こうして開発されるソフトウェアに関するテストは、実装が仕様通りに行われているかを確認するための工程であり、ソフトウェアの品質を確保する重要な工程である。   In software development, customer requirements are summarized as a requirement definition, and necessary functions are designed and detailed based on the requirement definition and implemented. The software test developed in this way is a process for confirming whether the implementation is performed as specified, and is an important process for ensuring the quality of the software.

上述したテスト工程における確認項目のうち、特にソフトウェアの機能に着目したテストを機能テストと呼ぶ。なお、こうした機能に関わるテスト以外には、例えば、処理性能を確認するための性能テスト、負荷テストなどがある。   Among the confirmation items in the above-described test process, a test that pays particular attention to the function of software is called a function test. In addition to the tests related to these functions, for example, there are a performance test and a load test for confirming the processing performance.

機能テストの実施に当たっては、ソフトウェアにおける処理の流れや、入力データ間の制約条件等の設計情報に着目し、実装したソフトウェアが期待された動作するか確認することになる。その際、機能が取りうる処理の流れ、或いは、取りうる入力データの組合せの全てを確認することが困難な場合には、カバレッジ基準を設定し、そのカバレッジを満たすようテストを行う。   In performing the function test, attention is paid to design information such as a flow of processing in software and constraints between input data, and it is confirmed whether the installed software operates as expected. At that time, when it is difficult to confirm all of the processing flow that can be taken by the function or all possible combinations of input data, a coverage standard is set and a test is performed to satisfy the coverage.

そうしたカバレッジ基準のうち、実装コードベースのカバレッジ基準としては、各実行ステートメントが少なくとも一回は実行される実行パス網羅(C0網羅)や、条件分岐に着目し、各条件分岐において、各分岐を少なくとも一回は通過するようにテストを行う条件網羅(C1網羅)などが知られている。   Among such coverage standards, implementation code-based coverage standards include execution path coverage (C0 coverage) in which each execution statement is executed at least once, conditional branching, and at least each branch in each conditional branch. Conditional coverage (C1 coverage) for performing a test so as to pass once is known.

また、状態遷移図などの設計書をベースとした場合には、各状態遷移を少なくとも一回は通過するようにテストを行う遷移パス網羅、或いは、入力データの取りうる値の組合せが設計情報として与えられている場合には、取りうる組合せに着目し、少なくともN組の組合せが1回は現れるようにテストを行うn−wise網羅など、様々なカバレッジ基準
が知られている。
In addition, when a design document such as a state transition diagram is used as a base, the design information includes the transition path coverage that tests each state transition so that it passes at least once, or a combination of values that the input data can take. When given, various coverage criteria are known, such as n-wise coverage, in which attention is paid to possible combinations and a test is performed so that at least N combinations appear once.

これらのカバレッジ基準のうち、ソフトウェア開発に伴い作成した設計書の記載内容、或いは、開発基準等にあわせたカバレッジ基準を採用し、上述のテストを実施することになる。こうしたソフトウェアのテストに伴うテストケースの生成技術として、以下のような技術が従来から提案されている。すなわち、UML(Unified Modeling Language)のシーケンス図を元に、当該シーケンス図に関連するクラス図のOCL(Object Constraint Language)表現を与えることで、シーケンス図から抽出される実行パスと、クラス図のOCL表現から与えられる事前・事後条件を元に、実行パスベースと入出力ベース双方のカバレッジ基準を評価し、テストケースを自動生成する方法(非特許文献1参照)などである。ここで、実行パスベースのカバレッジ基準とは、処理の流れに着目し、実行ステートメントや分岐条件の実行可否をカバレッジを評価するカバレッジ基準であり、入出力ベースのカバレッジ基準とは、入力、出力、或いは、入出力の対応関係から、取り得る組み合わせに対してカバレッジを評価するカバレッジ基準である。前者は主にホワイトボックステスト、後者は主にブラックボックステストのカバレッジを評価するために用いられる。なお、例えば、前述のC0網羅
やC1網羅は、実行パスベースであり、n−wise網羅は、入出力ベースのカバレッジ基準である。
Among these coverage standards, the above-mentioned test is performed by adopting the coverage standard in accordance with the description content of the design document created with software development or the development standard. Conventionally, the following techniques have been proposed as test case generation techniques for such software testing. In other words, based on a UML (Unified Modeling Language) sequence diagram, an OCL (Object Constraint Language) representation of the class diagram related to the sequence diagram is given, and the execution path extracted from the sequence diagram and the OCL of the class diagram A method of automatically generating test cases by evaluating coverage criteria for both execution path base and input / output base based on pre- and post-conditions given from expressions (see Non-Patent Document 1). Here, the execution path-based coverage standard is a coverage standard that focuses on the flow of processing and evaluates the coverage of execution statements and branch conditions, and the input / output-based coverage standard is an input, output, Alternatively, it is a coverage criterion for evaluating coverage with respect to possible combinations from input / output correspondences. The former is mainly used to evaluate the coverage of the white box test, and the latter is mainly used to evaluate the coverage of the black box test. For example, the above-described C0 coverage and C1 coverage are execution path-based, and n-wise coverage is an input / output-based coverage standard.

Li Bao−Lin, Li Zhi−shu, Li Qing, Chen Yan Hong、”Test case automation generation from UML sequence diagram expression”、2007 International Conference on Computational Intelligence and Security、IEEE Computer Society、 pp.1048−1052、2007.Li Bao-Lin, Li Zhi-shu, Li Qing, Chen Yan Hong, "Test case auto generation and encouraging enumeration ensemble co-expression", 2007 Int. 1048-1052, 2007.

上述の従来技術においては、UMLのシーケンス図とクラス図を元に、機能テストを実施するためのテストケースの自動生成を行っている。また、その自動生成に当たっては、実行パス及び入出力の双方のカバレッジを考慮したテストケースの生成が可能である。しかしながら、シーケンス図とクラス図のOCL表現により、処理の流れを示す仕様(シーケンス図)と、当該シーケンス図に関連する事前、事後条件の双方を予め設計しておく必要がある。また、処理の流れを示す仕様は、シーケンス図であり、事前、事後条件の記述は、OCL(Object Constraint Language)を前提としている。従って、テストケース生成に際して事前に設計、定義しておくべき事項が多く、適用性が限定的となりがちであり、工程数も増え開発効率が良好とは言えない。   In the above-described conventional technology, a test case for performing a function test is automatically generated based on a UML sequence diagram and a class diagram. Further, in the automatic generation, it is possible to generate a test case considering the coverage of both the execution path and the input / output. However, it is necessary to design in advance both specifications (sequence diagram) indicating the flow of processing and pre- and post-conditions related to the sequence diagram by OCL expression of the sequence diagram and the class diagram. In addition, the specification showing the flow of processing is a sequence diagram, and the description of pre-conditions and post-conditions is premised on OCL (Object Constraint Language). Therefore, there are many items that should be designed and defined in advance when generating a test case, the applicability tends to be limited, the number of processes increases, and the development efficiency cannot be said to be good.

そこで本発明の目的は、処理の流れに関わるソフトウェア仕様から、実行パスベース及び入出力ベース双方を考慮した適宜なカバレッジを満たすテストケースを効率的に生成可能とする技術を提供することにある。   Accordingly, an object of the present invention is to provide a technique that can efficiently generate a test case satisfying appropriate coverage in consideration of both an execution path base and an input / output base from a software specification related to a processing flow.

上記課題を解決する本発明のテストケース生成装置は、ソフトウェアにおける処理の流れに関わる仕様情報と、テストケースのカバレッジ基準の情報と、前記仕様情報のうち、前記流れでの分岐条件を示す条件項目及び前記条件項目以外の実行内容を示す結果項目の各表記を特定し、前記各表記から前記条件項目及び前記結果項目とその項目値とを抽出する抽出ルールと、前記仕様情報に対応する仕様内の実行パスにおける開始条件及び終了条件と、を含む抽出ルール情報と、を格納した記憶装置と、前記抽出ルール情報における前記抽出ルールにより、前記仕様情報より、前記条件項目と、前記結果項目と、前記条件項目および前記結果項目のそれぞれ取りうる項目値と、を条件結果項目として抽出し記憶装置に格納する条件結果項目抽出処理と、前記仕様情報より、該当仕様内の各実行パスを抽出するに際し、前記仕様情報と前記抽出ルール情報が示す前記開始条件とに基づき、前記流れの中での開始点特定に応じて実行パス抽出を開始し、前記流れの中での前記終了条件に応じて特定した終了点までをひとつの実行パスとして抽出する実行パス抽出処理と、前記条件結果項目および前記項目値に基づき、各条件項目の項目値の組み合わせとこれに対応する結果項目の項目値のパターンたるルールを生成し、当該各ルールが示す処理内容と前記実行パスとの対応関係を特定して、前記ルールと前記実行パスとの対応関係を示す条件結果対応表を生成し記憶装置に格納する条件結果対応表生成処理と、前記カバレッジ基準の情報が示す条件に対応したルールないし実行パスを、前記条件結果対応表で検索し、当該検索したルールないし実行パスと前記仕様情報とに基づき、所定の生成アルゴリズムによりテストケースを生成するテストケース生成処理と、を実行する演算装置と、を備えることを特徴とする。 The test case generation apparatus of the present invention that solves the above-described problem is a condition item indicating a branch condition in the flow among the specification information relating to the flow of processing in software, the information on the coverage criteria of the test case, and the specification information And specifying each notation of the result item indicating the execution contents other than the condition item, an extraction rule for extracting the condition item and the result item and the item value from each notation, and the specification corresponding to the specification information a start condition and end condition in the execution path, a storage device for storing the extracted rule information, a containing, by the extraction rules in the extraction rule information, from the specification information, and the condition items, and the result item, Condition result item extraction that extracts the condition item and the item values that can be taken by the result item as condition result items and stores them in a storage device Execution and management, from the specification information, appropriate for the extracts each execution path in the specification, the basis of the specification information and the start condition of the shown extraction rule information, depending on the starting point specified in the flow Based on the execution path extraction process for starting path extraction and extracting up to the end point specified according to the end condition in the flow as one execution path , the condition result item and the item value, A rule that is a pattern of item value combinations of item values and corresponding item values of the result item is generated, and a correspondence relationship between the processing content indicated by each rule and the execution path is specified, and the rule and the execution path A condition result correspondence table generating process for generating a condition result correspondence table indicating the correspondence relationship between the rule and the execution path corresponding to the condition indicated by the information on the coverage criterion, A test case generation process for searching a condition result correspondence table, and generating a test case by a predetermined generation algorithm based on the searched rule or execution path and the specification information. Features.

また、本発明のテストケース生成方法は、ソフトウェアにおける処理の流れに関わる仕様情報と、テストケースのカバレッジ基準の情報と、前記仕様情報のうち、前記流れでの分岐条件を示す条件項目及び前記条件項目以外の実行内容を示す結果項目の各表記を特定し、前記各表記から前記条件項目及び前記結果項目とその項目値とを抽出する抽出ルールと、前記仕様情報に対応する仕様内の実行パスにおける開始条件及び終了条件と、を含む抽出ルール情報と、を格納した記憶装置を備えるコンピュータが、前記抽出ルール情報における前記抽出ルールにより、前記仕様情報より、前記条件項目と、前記結果項目と、前記条件項目および前記結果項目のそれぞれ取りうる項目値と、を条件結果項目として抽出し記憶装置に格納する条件結果項目抽出処理と、前記仕様情報より、該当仕様内の各実行パスを抽出するに際し、前記仕様情報と前記抽出ルール情報が示す前記開始条件とに基づき、前記流れの中での開始点特定に応じて実行パス抽出を開始し、前記流れの中での前記終了条件に応じて特定した終了点までをひとつの実行パスとして抽出する実行パス抽出処理と、前記条件結果項目および前記項目値に基づき、各条件項目の項目値の組み合わせとこれに対応する結果項目の項目値のパターンたるルールを生成し、当該各ルールが示す処理内容と前記実行パスとの対応関係を特定して、前記ルールと前記実行パスとの対応関係を示す条件結果対応表を生成し記憶装置に格納する条件結果対応表生成処理と、前記カバレッジ基準の情報が示す条件に対応したルールないし実行パスを、前記条件結果対応表で検索し、当該検索したルールないし実行パスと前記仕様情報とに基づき、所定の生成アルゴリズムによりテストケースを生成するテストケース生成処理と、を実行することを特徴とする。 In addition, the test case generation method of the present invention includes specification information relating to a process flow in software, coverage standard information of a test case, and condition items indicating branch conditions in the flow of the specification information and the conditions An extraction rule that identifies each notation of the result item indicating the execution content other than the item, extracts the condition item, the result item, and the item value from each notation, and an execution path in the specification corresponding to the specification information computer including a start condition and end condition, the extraction rule information including a storage device for storing a found by the extraction rules in the extraction rule information in, from the specification information, and the condition items, and the result item, A condition result for extracting the item value that can be taken by each of the condition item and the result item as a condition result item and storing it in a storage device Eye extraction processing, from the specification information, when extracts each execution path in the corresponding specifications, based on the said start condition indicated by the extracted rule information and the specification information, depending on the starting point specified in the flow Execution path extraction, based on the execution path extraction process for extracting up to the end point specified according to the end condition in the flow as one execution path , the condition result item and the item value, A rule which is a combination of item values of each condition item and a corresponding item value pattern of the result item is generated, the correspondence between the processing content indicated by each rule and the execution path is specified, and the rule and the rule A condition result correspondence table generating process for generating a condition result correspondence table indicating a correspondence relationship with the execution path and storing it in the storage device, and a rule or an execution path corresponding to the condition indicated by the information of the coverage criterion. And a test case generation process for generating a test case by a predetermined generation algorithm based on the searched rule or execution path and the specification information. .

本発明によれば、処理の流れに関わるソフトウェア仕様から、実行パスベース及び入出力ベース双方を考慮した適宜なカバレッジを満たすテストケースを効率的に生成可能となる。   According to the present invention, it is possible to efficiently generate a test case satisfying appropriate coverage in consideration of both the execution path base and the input / output base from the software specifications related to the processing flow.

第一の実施例におけるテストケース生成装置のハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of the test case production | generation apparatus in a 1st Example. 第一の実施例におけるテストケース生成装置の構成を示す図である。It is a figure which shows the structure of the test case production | generation apparatus in a 1st Example. 第一の実施例におけるテストケース生成方法の全体処理の流れを示す図である。It is a figure which shows the flow of the whole process of the test case production | generation method in a 1st Example. 第一の実施例におけるテストケース生成処理の概要を示す図である。It is a figure which shows the outline | summary of the test case production | generation process in a 1st Example. 第一の実施例におけるカバレッジ基準一覧表の例を示す図である。It is a figure which shows the example of the coverage reference | standard list in a 1st Example. 第一の実施例における処理の流れに関わる仕様例を示す図である。It is a figure which shows the example of a specification regarding the flow of the process in a 1st Example. 第一、及び、第二の実施例における、条件結果項目の抽出するための処理の概要を示す図である。It is a figure which shows the outline | summary of the process for extracting a condition result item in a 1st and 2nd Example. 第一の実施例における仕様例の条件結果項目を示す図である。It is a figure which shows the condition result item of the example of a specification in a 1st Example. 第一の実施例における仕様例の抽出された実行パスの例を示す図である。It is a figure which shows the example of the execution path extracted of the example of a specification in a 1st Example. 第一の実施例におけるルール一覧表の例を示す図である。It is a figure which shows the example of the rule list in a 1st Example. 第一の実施例における仕様例から生成されたルールに基づき生成した条件結果対応表と、生成テストケースの一例を示す図である。It is a figure which shows an example of the conditions result corresponding table produced | generated based on the rule produced | generated from the example of a specification in a 1st Example, and a production | generation test case. 第二の実施例における処理の流れに関わる仕様例を示す図である。It is a figure which shows the example of a specification regarding the flow of the process in a 2nd Example. 第二の実施例における条件結果項目例を示す図である。It is a figure which shows the example of a condition result item in a 2nd Example. 第二の実施例における仕様例から実行パスを抽出するための抽出ルールの一例を示す図である。It is a figure which shows an example of the extraction rule for extracting an execution path from the example of a specification in a 2nd Example. 第二の実施例における補足ルール一覧を示す図である。It is a figure which shows the supplementary rule list | wrist in a 2nd Example. 第一、及び、第二の実施例における、実行パスを抽出するための処理の概要を示す図である。It is a figure which shows the outline | summary of the process for extracting an execution path in a 1st and 2nd Example. 第二の実施例における仕様例の抽出された実行パスの例を示す図である。It is a figure which shows the example of the execution path extracted of the example of a specification in a 2nd Example. 第二の実施例におけるルール一覧表の例を示す図である。It is a figure which shows the example of the rule list in a 2nd Example. 第二の実施例における仕様例から生成されたルールに基づき生成した条件結果対応表と、生成テストケースの一例を示す図である。It is a figure which shows an example of the condition result corresponding table produced | generated based on the rule produced | generated from the example of a specification in a 2nd Example, and a production | generation test case.

以下に本発明の実施形態について図面を用いて詳細に説明する。図1は、第一の実施例におけるテストケース生成装置100を実現するハードウェア構成例を示す図である。テストケース生成装置100は、演算装置たるCPU(Central Processor Unit)201、揮発性記憶装置で構成されるRAM(Random Access Memory)202、SSD(Solid State Drive)やハードディスクドライブなど適宜な不揮発性記憶装置で構成される外部記憶装置203、当該テストケース生成装置100の各構成201〜206を接続する内部パスたるインターフェイス204、処理データの表示を行うディスプレイ等の表示装置205、およびユーザから
のキー入力や音声入力を受け付ける入力装置206、を備える。なお、外部記憶装置203内には、本実施形態のテストケース生成装置100として必要な機能を実装する為のプログラム210の他に、後述する記憶部111〜117の記憶領域が確保されている。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a diagram illustrating a hardware configuration example that implements the test case generation apparatus 100 according to the first embodiment. The test case generation device 100 includes a CPU (Central Processor Unit) 201 that is an arithmetic device, a RAM (Random Access Memory) 202 that includes a volatile storage device, an SSD (Solid State Drive), a hard disk drive, and other appropriate nonvolatile storage devices. An external storage device 203 constituted by the interface, an interface 204 as an internal path connecting the components 201 to 206 of the test case generation device 100, a display device 205 such as a display for displaying processing data, and a key input from a user An input device 206 that receives voice input is provided. In the external storage device 203, in addition to the program 210 for implementing functions necessary as the test case generation device 100 of the present embodiment, storage areas of storage units 111 to 117 described later are secured.

また上述のCPU201は、外部記憶装置203に保持されるプログラム210をRAM202に読み出すなどして実行し装置自体の統括制御を行なうとともに各種判定、演算及び制御処理を行なう。このようにRAM202上にロードしたプログラム210を実行することで、後述する機能部、すなわち記述形式検証部101、仕様入力部102、条件結果項目抽出部107、条件結果項目補正部103、テスト仕様生成部104、テスト仕様登録部105、実行パス抽出部108、テストケース生成部109、条件結果対応表生成部110の各処理部をプロセスとして具現化する。   In addition, the CPU 201 described above executes the program 210 held in the external storage device 203 by reading it into the RAM 202 to perform overall control of the device itself and perform various determinations, calculations, and control processes. By executing the program 210 loaded on the RAM 202 in this way, functional units described later, that is, a description format verification unit 101, a specification input unit 102, a condition result item extraction unit 107, a condition result item correction unit 103, a test specification generation Each processing unit of the unit 104, the test specification registration unit 105, the execution path extraction unit 108, the test case generation unit 109, and the condition result correspondence table generation unit 110 is embodied as a process.

次に、こうしたハードウェア構成のテストケース生成装置100が備える各機能について図2に基づき説明する。図2は第一の実施例におけるテストケース生成装置100の構成例を示す図である。図2に示すテストケース生成装置100は、処理の流れに関わるソフトウェア仕様から、実行パスベース及び入出力ベース双方を考慮した適宜なカバレッジを満たすテストケースを効率的に生成可能とするとするコンピュータ装置である。   Next, each function provided in the test case generation device 100 having such a hardware configuration will be described with reference to FIG. FIG. 2 is a diagram illustrating a configuration example of the test case generation device 100 in the first embodiment. A test case generation apparatus 100 shown in FIG. 2 is a computer apparatus that can efficiently generate a test case that satisfies appropriate coverage in consideration of both an execution path base and an input / output base from a software specification related to a processing flow. is there.

このテストケース生成装置100は、上述の通り、外部記憶装置203に備えるプログラム210をRAM202にロードし実行することで実装される、以下の機能部を備えている。すなわち、記述形式検証部101、仕様入力部102、条件結果項目補正部103、テスト仕様生成部104、テスト仕様登録部105、結果項目抽出部107、実行パス抽出部108、テストケース生成部109、および条件結果対応生成部110の各処理部である。   As described above, the test case generation device 100 includes the following functional units that are implemented by loading the program 210 provided in the external storage device 203 into the RAM 202 and executing it. That is, description format verification unit 101, specification input unit 102, condition result item correction unit 103, test specification generation unit 104, test specification registration unit 105, result item extraction unit 107, execution path extraction unit 108, test case generation unit 109, And each processing unit of the condition result correspondence generation unit 110.

上述の機能部のうち仕様入力部102は、テストケース生成対象となるソフトウェアの処理の流れに関わる仕様のユーザ入力を入力装置206より受け付け、外部記憶装置203の仕様記憶部111に格納する機能を果たす。また、記述形式検証部101は、入力装置206で入力された上述の処理の流れに関わる仕様の記述形式が、予め定めた所望形式、文法に基づいたものか検証する機能を果たす。   Of the above-described functional units, the specification input unit 102 has a function of accepting user input of specifications related to the processing flow of software to be generated as a test case from the input device 206 and storing it in the specification storage unit 111 of the external storage device 203. Fulfill. The description format verification unit 101 also has a function of verifying whether the specification description format related to the above-described processing flow input by the input device 206 is based on a predetermined desired format and grammar.

また、条件結果項目抽出部107は、上述のように入力装置206で入力された処理の流れに関わる仕様から、当該流れでの分岐条件を示す条件項目と、該条件項目以外の実行内容を示す結果項目と、上述の条件項目および結果項目のそれぞれ取りうる項目値と、を条件結果項目として抽出し、これを条件結果項目記憶部112に格納する機能を果たす。また、条件結果項目補正部103は、ユーザ入力を入力装置206で受け付けて、条件結果項目抽出部107が抽出した条件結果項目に関して、修正を行う機能を果たす。   In addition, the condition result item extraction unit 107 indicates a condition item indicating a branch condition in the flow and an execution content other than the condition item based on the specification related to the flow of processing input by the input device 206 as described above. The result item and the item value that can be taken by each of the condition item and the result item are extracted as the condition result item, and the function is stored in the condition result item storage unit 112. In addition, the condition result item correction unit 103 has a function of accepting user input by the input device 206 and correcting the condition result item extracted by the condition result item extraction unit 107.

また、実行パス抽出部108は、上述の条件結果項目記憶部112に格納された条件結果項目、及び、仕様記憶部111に格納された上述の処理の流れに関わる仕様から、テストケースを生成するための実行パスを抽出し、これを実行パス記憶部113に格納する機能を果たす。   In addition, the execution path extraction unit 108 generates a test case from the condition result items stored in the above-described condition result item storage unit 112 and the specifications related to the above-described processing flow stored in the specification storage unit 111. The function of extracting the execution path for this purpose and storing it in the execution path storage unit 113 is achieved.

また、テストケース生成部115は、上述の仕様記憶部111に格納された処理の流れを示す仕様、及び、条件結果項目記憶部112内に記憶された条件結果項目、及び、実行パス記憶部113内に格納された実行パスを受け取り、カバレッジ基準記憶部115に格納された、カバレッジ基準の内、ユーザ指定されたカバレッジ基準を満たすテストケースを生成する機能を果たす。なお、カバレッジ基準記憶部115には、テストケース生成部109でのテストケースの生成、及び、生成したテストケースのカバレッジを評価するためのカバレッジ評価方法を格納している。   The test case generation unit 115 also includes a specification indicating the flow of processing stored in the specification storage unit 111, a condition result item stored in the condition result item storage unit 112, and an execution path storage unit 113. The execution path stored therein is received, and a test case that satisfies the user-specified coverage criteria among the coverage criteria stored in the coverage criteria storage unit 115 is generated. The coverage reference storage unit 115 stores a test case generation by the test case generation unit 109 and a coverage evaluation method for evaluating the coverage of the generated test case.

また、テスト仕様生成部104は、生成されたテストケースを画面、または、紙等に出力する機能を果たし、テスト仕様登録部105は、生成済みのテストケースをテストケース記憶部114に格納する機能を果たす。   The test specification generation unit 104 performs a function of outputting the generated test case to a screen or paper, and the test specification registration unit 105 stores the generated test case in the test case storage unit 114. Fulfill.

以下、第一の実施例におけるテストケース生成方法の実際手順について図に基づき説明する。以下で説明するテストケース生成方法に対応する各種動作は、テストケース生成装置100がRAM202に読み出して実行するプログラム210によって実現される。そして、このプログラム210は、以下に説明される各種の動作を行うためのコードから構成されている。   The actual procedure of the test case generation method in the first embodiment will be described below with reference to the drawings. Various operations corresponding to the test case generation method described below are realized by a program 210 that the test case generation apparatus 100 reads into the RAM 202 and executes. And this program 210 is comprised from the code | cord | chord for performing the various operation | movement demonstrated below.

図3は、第一の実施例におけるテストケース生成方法の全体処理例を示すフロー図である。ここではまず、この図3に示した処理フローの概略を用いて、テストケース生成方法の処理の流れについて説明する。   FIG. 3 is a flowchart showing an example of the entire process of the test case generation method in the first embodiment. Here, first, the processing flow of the test case generation method will be described using the outline of the processing flow shown in FIG.

まずステップ300において、テストケース生成装置100の仕様入力部102は、入力装置206を介して、ユーザ入力310として、処理の流れに関わる仕様を受付け、これを仕様記憶部111に格納する。このユーザ入力310を受け付ける際、記述形式検証部101が、ユーザにより入力された仕様と、予め定めた記述形式または文法(特に図示しないがテストケース生成装置100の外部記憶装置203にテンプレートが予め保持されている)とを照合し、仕様が上述の記述形式または文法に準拠しているか検証し、指定の記述形式を満たす仕様のみ受け付けるようにしてもよい。   First, in step 300, the specification input unit 102 of the test case generation apparatus 100 receives a specification related to the flow of processing as a user input 310 via the input device 206 and stores it in the specification storage unit 111. When accepting the user input 310, the description format verification unit 101 stores a template in advance in the external storage device 203 of the test case generation device 100 (not shown) although the specification input by the user and a predetermined description format or grammar (not shown). May be accepted to verify that the specification conforms to the description format or grammar described above, and only specifications that satisfy the specified description format may be accepted.

また、上述で受け付ける仕様は、仕様作成用の専用ソフトウェアやオフィスソフトなどを、入力装置206及び出力装置205にてユーザ側に提供し、これらソフトウェアを介して作成動作を受け付け、その結果を受け付けるとしてもよいし、これらのソフトウェアを用いて作成されたデータをユーザ入力310として受け付けてもよい。   In addition, the specification accepted above is that dedicated software for creating a specification, office software, etc. are provided to the user by the input device 206 and the output device 205, the creation operation is accepted via these software, and the result is accepted. Alternatively, data created using these software may be accepted as the user input 310.

次にステップ302において、テストケース生成装置100の条件結果項目抽出部107は、上述のステップ301でユーザ入力された、処理の流れに関わる仕様から、条件項目及び結果項目を抽出する。   Next, in step 302, the condition result item extraction unit 107 of the test case generation device 100 extracts the condition item and the result item from the specifications related to the flow of processing input by the user in step 301 described above.

また、ステップ303において、上述のステップ302で抽出された条件項目及び結果項目に対し、テストケース生成装置100の入出力補正部103は、ユーザ入力311に応じて、上述の仕様から抽出された条件項目及び結果項目の修正、及び、結果項目への規定値の設定を行う。また入出力補正部103は、上述のステップ302において仕様内の記述からは抽出できなかったが、設計上存在することが明らかな条件結果項目の項目値や、設計上予め存在しないことが明らかである入力の組合せに関してユーザ入力を受け付ける。また入出力補正部103は、次のステップ304の「実行パス抽出」において、実行パス上、抽出された結果項目が不定になる場合に規定値を予めユーザが設定する際にこれを受け付ける。   In step 303, the input / output correction unit 103 of the test case generation apparatus 100 performs the condition extracted from the above-described specification in response to the user input 311 for the condition item and the result item extracted in the above-described step 302. Modify items and result items and set default values for result items. Further, the input / output correction unit 103 could not be extracted from the description in the specification in the above-described step 302, but it is clear that the item value of the condition result item that is clearly present in the design or does not exist in advance in the design. Accept user input for a certain combination of inputs. The input / output correction unit 103 accepts a predetermined value when the user sets in advance when the extracted result item is indefinite on the execution path in the “execution path extraction” in the next step 304.

こうしたステップ303の処理により、後述するステップ307におけるテストケース生成処理において、テストケース生成時に、取りうる条件項目の組合せを明確にする、期待結果が不定とならないように結果項目を明確にする、或いは、予め発生し得ない条件項目の組合せを明らかにすることで、不要なテストケースの生成を防ぐことが可能となる。但し、当該ステップ303は省略可能である。   By such processing in step 303, in the test case generation processing in step 307 described later, the combination of condition items that can be taken at the time of test case generation is clarified, the result items are clarified so that expected results are not indefinite, or By clarifying combinations of condition items that cannot be generated in advance, it is possible to prevent generation of unnecessary test cases. However, the step 303 can be omitted.

次にステップ304において、テストケース生成装置100の実行パス抽出部108は、仕様記憶部111内に格納されている、上述の処理の流れに関わる仕様、及び、条件結
果項目記憶部112内の条件結果項目を用いて、処理の流れに関わる仕様から取りうる全実行パスを抽出し、その抽出結果を実行パス記憶部113に格納する。
Next, in step 304, the execution path extraction unit 108 of the test case generation device 100 stores the specifications related to the above-described processing flow stored in the specification storage unit 111 and the conditions in the condition result item storage unit 112. Using the result items, all execution paths that can be taken from the specifications relating to the flow of processing are extracted, and the extraction results are stored in the execution path storage unit 113.

また、ステップ305において、テストケース生成装置100の条件結果対応表作成部110は、上述の仕様記憶部111内の処理の流れに関わる仕様、条件結果項目記憶部112内の条件結果項目、及び、実行パス記憶部113内の実行パスから、実行パスごとに条件項目の項目値の組み合わせと、対応する期待結果とからなる対応表を作成する。   In step 305, the condition result correspondence table creation unit 110 of the test case generation apparatus 100 includes specifications relating to the processing flow in the specification storage unit 111, condition result items in the condition result item storage unit 112, and From the execution path in the execution path storage unit 113, a correspondence table including combinations of item values of condition items and corresponding expected results is created for each execution path.

続いてステップ306において、テストケース生成装置100のテストケース生成部110は、ユーザ入力312を受付け、カバレッジ基準記憶部115内に格納されたカバレッジ基準からユーザ入力312が示すユーザ所望のカバレッジ基準を特定する。このカバレッジ基準は、ステップ307のテストケース生成処理において生成するテストケースが満たすべき基準となる。   Subsequently, in step 306, the test case generation unit 110 of the test case generation apparatus 100 accepts the user input 312 and specifies a user desired coverage criterion indicated by the user input 312 from the coverage criterion stored in the coverage criterion storage unit 115. To do. This coverage standard is a standard to be satisfied by the test case generated in the test case generation process in step 307.

ここでステップ307におけるテストケース生成処理について、図4に基づいて説明する。なお、当該ステップ307のテストケース生成処理では、図5に示すカバレッジ基準一覧表410(カバレッジ基準記憶部115にて保持)に記載されたカバレッジ基準を元に、下記の処理を行うことで、所望のカバレッジ基準を満たすテストケースを生成する。図5に例示するカバレッジ基準一覧表410は、カバレッジ基準を一意に識別するためのカバレッジ識別子(ID欄)411、カバレッジ基準を実行パスベースで評価するか、入出力ベースで評価するかを示すカバレッジ種別(種別欄)412、カバレッジ基準の名称を格納するカバレッジ名称(名称(略称)欄)413、カバレッジ基準を満たすテストケースを生成するための処理プログラムを記載するカバレッジ生成処理名称(生成欄) 414、カバレッジを評価するためのカバレッジ評価のためのプログラムを記載するカバレッジ評価処理名称(評価欄)415、及び、カバレッジの概要を説明するカバレッジ概要(概要欄)416から構成される。
この場合、テストケース生成装置100のテストケース生成部109は、ステップ401において処理を開始し、続くステップ402においてユーザ入力312から入力された生成パラメータ(カバレッジ基準)の種別を確認し、実行パスベースのカバレッジ基準か、否かを判断する。実行パスベースの場合であった場合(402:Yes)、テストケース生成部109は、処理をステップ403へ進め、そうでなかった場合(402:No)には処理をステップ404に進める。
Here, the test case generation processing in step 307 will be described with reference to FIG. In the test case generation process of step 307, the following process is performed based on the coverage standard described in the coverage standard list 410 (held in the coverage standard storage unit 115) shown in FIG. Generate test cases that meet the coverage criteria. A coverage criterion list 410 illustrated in FIG. 5 is a coverage identifier (ID column) 411 for uniquely identifying a coverage criterion, and coverage indicating whether the coverage criterion is evaluated on an execution path basis or an input / output basis. Type (type field) 412, coverage name (name (abbreviation) field) 413 for storing the name of the coverage standard, coverage generation process name (generation field) 414 for describing a processing program for generating a test case that satisfies the coverage standard , A coverage evaluation process name (evaluation column) 415 describing a program for coverage evaluation for evaluating the coverage, and a coverage summary (summary column) 416 explaining an overview of the coverage.
In this case, the test case generation unit 109 of the test case generation apparatus 100 starts processing in step 401, confirms the type of the generation parameter (coverage criterion) input from the user input 312 in step 402, and executes the execution path base. It is judged whether it is the coverage standard of. If it is an execution path based case (402: Yes), the test case generation unit 109 advances the process to Step 403, and if not (402: No), advances the process to Step 404.

次にステップ403において、テストケース生成部109は、上述のカバレッジ基準一覧表410のカバレッジ生成処理名称欄413を参照し、仕様記憶部111内に格納された仕様、及び、実行パス格納部113内に格納された実行パスを用いてテストケースの生成を行う。また、ステップ404において、テストケース生成部109は、上述のカバレッジ基準一覧表410のカバレッジ生成処理名称欄413を参照し、仕様記憶部11内に格納された仕様、及び、条件結果項目格納部112を参照し、テストケースの生成を行う。   Next, in step 403, the test case generation unit 109 refers to the coverage generation process name field 413 of the above-described coverage standard list 410, and stores the specifications stored in the specification storage unit 111 and the execution path storage unit 113. A test case is generated using the execution path stored in. In step 404, the test case generation unit 109 refers to the coverage generation process name field 413 of the above-described coverage standard list 410, and stores the specifications stored in the specification storage unit 11 and the condition result item storage unit 112. , And generate a test case.

続いてステップ405において、テストケース生成部109は、詳細は後述する条件結果対応表(条件結果対応表記憶部116にて保持)を参照し、上述のステップ403またはステップ404で生成されたテストケースの対応から、重複テストケースを削除する。   Subsequently, in step 405, the test case generation unit 109 refers to a condition result correspondence table (stored in the condition result correspondence table storage unit 116) described later for details, and the test case generated in step 403 or step 404 described above. Remove duplicate test cases from

次にステップ406において、テストケース生成部109は、上述までで生成されたテストケースのカバレッジを評価し、カバレッジ基準が満たされている場合には(406:Yes)、処理をステップ407へ進めてフローを終了する。他方、カバレッジ基準が満たされていない場合(406:No)、テストケース生成部109は、処理をステップ402に戻す。   Next, in step 406, the test case generation unit 109 evaluates the coverage of the test case generated up to the above, and if the coverage criterion is satisfied (406: Yes), the process proceeds to step 407. End the flow. On the other hand, when the coverage standard is not satisfied (406: No), the test case generation unit 109 returns the process to Step 402.

続いて、上述の図3、4にて述べた、条件結果項目抽出とテストケース生成のより具体的な内容について、図6に示す、処理の流れに関わる仕様、を例に挙げて説明する。図6は、第一の実施例における、処理の流れに関わる仕様160の一例を示す図である。ここでまず、図6に示すフローチャート160、すなわち処理の流れの仕様、について説明しておく。このフローチャート160は、ステップ301の仕様の入力受付(図3)において、ユーザ入力310によって入力され、仕様記憶部111に格納されているものとする。   Next, more specific contents of the condition result item extraction and test case generation described with reference to FIGS. 3 and 4 will be described with reference to the specification relating to the processing flow shown in FIG. FIG. 6 is a diagram illustrating an example of the specification 160 related to the flow of processing in the first embodiment. First, the flowchart 160 shown in FIG. 6, that is, the specification of the flow of processing will be described. This flowchart 160 is assumed to be input by the user input 310 and stored in the specification storage unit 111 in the specification input reception (FIG. 3) in step 301.

このフローチャート160において、例えばデータを正常に受信した場合の処理の流れ(ステップ501〜ステップ508)は、ステップ500において処理を開始し、ステップ502においてデータ受信処理を呼び出し、ステップ503において上述のステップ502のデータ受信処理がタイムアウト時間60秒を超えたか判定し、超えた場合にはステップ508へ、そうでなければ(60秒以下であれば)、ステップ504に進む。またステップ504において、受信データチェック処理を呼び出し、ステップ505に進む。次にステップ505において、上述のステップ504での受信データチェック処理の結果、受信データ状態が正常の場合にはステップ509へ、そうでない(異常)の場合には、ステップ510へ進む。まあ、ステップ506において、メッセージに正常終了を代入し、ステップ502においてリトライ回数を0にリセットしてステップ507でフローを終了する。   In this flowchart 160, for example, the flow of processing when data is normally received (step 501 to step 508) starts processing in step 500, calls the data reception processing in step 502, and the above-described step 502 in step 503. It is determined whether or not the data reception process has exceeded the timeout time of 60 seconds. If it has exceeded, the process proceeds to step 508; In step 504, the received data check process is called, and the process proceeds to step 505. Next, in step 505, if the reception data state is normal as a result of the reception data check processing in step 504 described above, the process proceeds to step 509, and if not (abnormal), the process proceeds to step 510. In step 506, normal termination is substituted for the message, the retry count is reset to 0 in step 502, and the flow is terminated in step 507.

他方、データ受信(ステップ502)において、データ受信に失敗した場合の処理の流れ(ステップ509からステップ510)は、ステップ509において、ログ情報として、エラーメッセージを代入し、ステップ510に進み、ステップ510において、メッセージに受信失敗を代入し、ステップ501に進む。   On the other hand, in the data reception (step 502), the processing flow (step 509 to step 510) when the data reception is unsuccessful substitutes an error message as log information in step 509, and proceeds to step 510. In step 501, the reception failure is substituted for the message, and the process proceeds to step 501.

また、受信データ状態が異常で、受信したデータに誤りがある場合(ステップ505:異常)の処理の流れ(ステップ511からステップ514)は、ステップ511において、リトライ回数が3を超える場合には、ステップ513へ、それ以外(3未満)の場合には、ステップ512に進む。また、ステップ512において、メッセージに受信データ異常を代入し、ステップ501に進む。また、ステップ513において、ログに警告メッセージを代入し、ステップ514に進み、ステップ514において、リトライ回数を1つ増加し、ステップ507でフローを終了する。   In addition, when the received data state is abnormal and the received data has an error (Step 505: Abnormal), the flow of processing (Step 511 to Step 514) is as follows. If it is not (less than 3), go to step 513. In step 512, the reception data abnormality is substituted for the message, and the process proceeds to step 501. In step 513, a warning message is substituted into the log, and the process proceeds to step 514. In step 514, the number of retries is incremented by 1, and the flow ends in step 507.

こうしたフローチャート160に対し、条件結果項目抽出部107が、図7に示す手順で条件結果項目の抽出処理を実行すると、図8に示す条件結果項目一覧表600を得て、テストケース生成部109はこれを利用可能となる。この場合条件結果項目抽出部107は、ステップ1300において処理を開始し、ステップ1301においてフローチャート160における各ステップの種別が「条件」である場合(ステップ1301:条件)、ステップ1302へ、そうでなければ(ステップ1301:結果)、ステップ1303に処理を進める。   When the condition result item extraction unit 107 executes the condition result item extraction process in the procedure shown in FIG. 7 for the flowchart 160, the condition result item list 600 shown in FIG. This can be used. In this case, the condition result item extraction unit 107 starts the processing in step 1300, and in step 1301, if the type of each step in the flowchart 160 is “condition” (step 1301: condition), the process proceeds to step 1302, otherwise. (Step 1301: Result), the process proceeds to Step 1303.

またステップ1302において、条件結果項目抽出部107は、フローチャート160の該当ステップの記述を条件項目とし、該当条件項目が示す分岐条件の値を項目値として抽出し、ステップ1304に進む。図6のフローチャート160の例であれば、条件分岐(ステップ503、ステップ505、ステップ511)の該当ステップの記述から、条件項目名称として「タイムアウト」、「受信データ状態」、および「リトライ回数」が抽出され、また、該当ステップから項目値として、「>60秒」、「≦60秒」、「正常」、「異常」、「≦3」、「>3」、が抽出される。   In step 1302, the condition result item extraction unit 107 extracts the value of the branch condition indicated by the corresponding condition item as the item value from the description of the corresponding step in the flowchart 160 and proceeds to step 1304. In the example of the flowchart 160 in FIG. 6, “timeout”, “reception data state”, and “retry count” are used as the condition item names from the description of the corresponding step of the conditional branch (step 503, step 505, step 511). Further, “> 60 seconds”, “≦ 60 seconds”, “normal”, “abnormal”, “≦ 3”, “> 3” are extracted as item values from the corresponding step.

次にステップ1303において、条件結果項目抽出部107は、上述のステップ1303と同様に、フローチャート160中の条件分岐ステップ以外のステップの記述を結果項目として、その記述が指定する値を結果項目の項目値として抽出し、ステップ1304に進む。図6のフローチャート160の例であれば、処理(ステップ501、ステップ502、ステップ504、ステップ506、ステップ509、ステップ510、ステップ512、ステップ513、ステップ514)から、結果項目として「リトライ回数」、「データ受信」、「受信データチェック」、「ログ」、「メッセージ」が抽出され、結果項目値として「0にリセット」、「呼び出し有り」、「呼び出し無し」、「エラーメッセージ」、「警告メッセージ」、「正常終了」、「受信失敗」、「受信データ異常」などが抽出される。   Next, in step 1303, the condition result item extraction unit 107 uses the description of the step other than the conditional branch step in the flowchart 160 as the result item, and uses the value specified by the description as the item of the result item, as in step 1303 described above. Extract as a value and go to step 1304. In the example of the flowchart 160 in FIG. 6, “retry count” as a result item from the processing (step 501, step 502, step 504, step 506, step 509, step 510, step 512, step 513, step 514), “Data reception”, “Reception data check”, “Log”, “Message” are extracted, and the result item values are “Reset to 0”, “With call”, “No call”, “Error message”, “Warning message” ”,“ Normal end ”,“ reception failure ”,“ reception data abnormal ”, and the like are extracted.

なお、上述のフローチャート160が含むステップ(処理)では、該当処理の記法を「A:=B」の形式で記述することとする。これにより、結果項目および結果項目値の抽出では、「A」を項目名称、「B」を項目値として抽出できる。また、フローチャート160における定義済み処理(ステップ502、504、509)は、「呼び出し有」、「呼び出し無」といった項目値が予め定められており、結果項目および結果項目値の抽出では、該当処理の記述から項目名称を抽出し、結果項目値として「呼び出し有」「呼び出し無」を抽出することとする。なお、これらの条件項目および結果項目らの抽出ルールは事前に定義可能である。この抽出ルールに基づく項目の抽出処理は、第二の実施例において説明する。   In the step (process) included in the flowchart 160 described above, the notation of the corresponding process is described in the format “A: = B”. Thereby, in extraction of a result item and a result item value, "A" can be extracted as an item name and "B" can be extracted as an item value. In addition, in the predefined processing (steps 502, 504, and 509) in the flowchart 160, item values such as “calling present” and “calling absent” are determined in advance, and in the extraction of the result item and the result item value, The item name is extracted from the description, and “calling present” and “calling absent” are extracted as the result item values. The extraction rules for these condition items and result items can be defined in advance. The item extraction process based on this extraction rule will be described in the second embodiment.

続いて図6のフローの説明に戻る。ステップ1304において、条件結果項目抽出部107は、フローチャート160内の全てのステップに対し、上述のステップ1301、1302、1303の各処理が完了している場合(ステップ1304:Yes)、ステップ1305へ進み処理を終了する。他方、そうでなければ(ステップ1304:No)、条件結果項目抽出部107はステップ1301に処理を戻す。   Then, it returns to description of the flow of FIG. In step 1304, the condition result item extraction unit 107 proceeds to step 1305 when each of the above-described steps 1301, 1302, and 1303 has been completed for all steps in the flowchart 160 (step 1304: Yes). The process ends. On the other hand, if not (step 1304: No), the condition result item extraction unit 107 returns the process to step 1301.

こうして得られた条件結果項目一覧表600は、図8に示すように、条件項目および結果項目を識別するための項目識別子(No欄)601、条件項目か結果項目かを示す項目種別(種別欄)602、条件項目ないし結果項目の名称を格納する項目名称(名称欄)603、各条件項目ないし結果項目が取りうる値の候補を記載する項目値(候補値欄)604、および、各条件結果項目の説明を記載する項目概要(概要欄)605から構成される。   As shown in FIG. 8, the condition result item list 600 thus obtained includes an item identifier (No column) 601 for identifying the condition item and the result item, and an item type (type column) indicating whether the item is a condition item or a result item. 602, an item name (name field) 603 for storing the name of the condition item or result item, an item value (candidate value field) 604 for describing a possible value of each condition item or result item, and each condition result It consists of an item summary (summary column) 605 that describes the item description.

なお、この条件結果項目一覧表600に対する項目修正・規定値設定(図3:ステップ303)は、例えば、フローチャート160に記述されていない項目値の追加やフローチャート160上で結果が確定しない結果項目に対して、ユーザが規定値を設定する処理となる。   The item correction / specified value setting (FIG. 3: step 303) for the condition result item list 600 is performed, for example, by adding an item value not described in the flowchart 160 or a result item whose result is not fixed on the flowchart 160. On the other hand, the user sets a specified value.

例えば、図6のフローチャート160では、ステップ511の処理において、リトライ回数が3回以下の場合、メッセージに代入される値は不定となる。このような場合に、結果項目として「出力無」を追加し、規定値として追加した「出力無」を追加することで、テストケースの生成の際、期待結果を不定となることを防ぐことができる。なお、図8の条件結果項目一覧600では、規定値は、項目値欄に下線を用いて表現している。   For example, in the flowchart 160 of FIG. 6, if the number of retries is 3 or less in the processing of step 511, the value assigned to the message is indefinite. In such a case, by adding “no output” as a result item and adding “no output” added as a default value, it is possible to prevent the expected result from becoming undefined when generating a test case. it can. In the condition result item list 600 of FIG. 8, the specified value is expressed using an underline in the item value column.

また、上記以外の項目値を修正する場合の例としては、分岐条件に「それ以外」など、Else文相当の文言が含まれている状況に対応するものとなる。この場合、該当する条件項目名の取りうる項目値として、抽出結果である「それ以外」をそのまま用いるのではなく、具体的な項目値を設定するようにしてもよい。   Moreover, as an example in the case of correcting item values other than the above, it corresponds to a situation in which a word equivalent to an Else sentence is included in the branch condition, such as “other than that”. In this case, a specific item value may be set as an item value that can be taken by the corresponding condition item name, instead of using “other” as an extraction result as it is.

次に、上述のステップ304における実行パス抽出とステップ305の条件結果対応表の作成の詳細について説明する。この場合、実行パス抽出部108は、例えばフローチャート160内の開始記号500から各ステップを条件分岐等に従って順次辿る探索を開始し、フローチャート160内の全実行パスを抽出する。その結果、得られた実行パスの例として、例えば図9に例示した実行パス(1)701では、フローチャート160における以下の実行パスを表している。   Next, details of the execution path extraction in step 304 and the creation of the condition result correspondence table in step 305 will be described. In this case, the execution path extraction unit 108 starts a search that sequentially follows each step in accordance with a conditional branch or the like from the start symbol 500 in the flowchart 160, and extracts all execution paths in the flowchart 160, for example. As a result, as an example of the obtained execution path, for example, the execution path (1) 701 illustrated in FIG. 9 represents the following execution path in the flowchart 160.

ステップ500:開始記号
ステップ501:リトライ回数:=0に設定
ステップ502:データ受信
ステップ503:タイムアウト?(分岐条件 >60秒)
ステップ509:ログ:=エラーメッセージ
ステップ510:メッセージ:=受信失敗
ステップ507:終了
また同様に、図9に例示した実行パス(2)702では、フローチャート160における下記の実行パスに対応する。
Step 500: Start symbol Step 501: Number of retries: set to 0 Step 502: Data reception Step 503: Timeout? (Branch condition> 60 seconds)
Step 509: Log: = Error message Step 510: Message: = Reception failure Step 507: End Similarly, the execution path (2) 702 illustrated in FIG. 9 corresponds to the following execution path in the flowchart 160.

ステップ500:開始記号
ステップ501:リトライ回数:=0に設定
ステップ502:データ受信
ステップ503:タイムアウト?(分岐条件 ≦60秒)
ステップ504:受信データチェック
ステップ505:受信データ状態? (分岐条件 正常)
ステップ506:メッセージ:=正常終了
ステップ507:終了
また同様に、図9に例示した実行パス(3)703では、フローチャート160における下記の実行パスに対応する。
Step 500: Start symbol Step 501: Number of retries: set to 0 Step 502: Data reception Step 503: Timeout? (Branch condition ≤ 60 seconds)
Step 504: Receive data check Step 505: Receive data status? (Branch condition is normal)
Step 506: Message: = Normal end Step 507: End Similarly, the execution path (3) 703 illustrated in FIG. 9 corresponds to the following execution path in the flowchart 160.

ステップ500:開始記号
ステップ501:リトライ回数:=0に設定
ステップ502:データ受信
ステップ503:タイムアウト?(分岐条件 ≦60秒)
ステップ504:受信データチェック
ステップ505:受信データ状態? (分岐条件 正常)
ステップ506:メッセージ:=正常終了
ステップ507:終了
なお、図6のフローチャート160では、「リトライ回数:=0に設定(ステップ501)」、「リトライ回数:=1つ増加(ステップ514)」等と記述しているが、「リトライ回数:=リトライ回数+1(ステップ514)」等、演算子を用いて記述することで、実際の計算結果を計算するようにしてもよい。また、上記の実行パス抽出において、例えば、実行パスがループ(以前、実行したパスに戻る場合)している場合には、ループまでをひとつの実行パスとして抽出してもよいし、ループ終了後の結果を算出し、実行パスとしてもよい。
Step 500: Start symbol Step 501: Number of retries: set to 0 Step 502: Data reception Step 503: Timeout? (Branch condition ≤ 60 seconds)
Step 504: Receive data check Step 505: Receive data status? (Branch condition is normal)
Step 506: Message: = Normal end Step 507: End In the flowchart 160 of FIG. 6, “retry count: set to 0 (step 501)”, “retry count: = increase by 1 (step 514)”, etc. Although described, the actual calculation result may be calculated by using an operator such as “retry count: = retry count + 1 (step 514)”. In the above execution path extraction, for example, when the execution path is a loop (when returning to the previously executed path), the loop may be extracted as one execution path, or after the loop ends The result may be calculated as an execution path.

一方、条件結果対応表生成部110は、上述のステップ305(条件結果表の作成)に伴って、上述のようにして得られた実行パスそれぞれをルールに変換して、図10に例示するルール一覧表710を生成する。このルール一覧表710において、例えば、ルール識別子711が「1」のルールは実行パス(1)に対応している。条件結果対応表生成部110は、このルール一覧表710の各レコードにおいて、該当実行パス上に存在する条件分岐の情報を左辺713に、結果項目の情報を右辺714側に対応させて設定する処理
を実行し、実行パスからルールへの変換を行っている。
On the other hand, the condition result correspondence table generation unit 110 converts each execution path obtained as described above into a rule in accordance with the above-described step 305 (creation of the condition result table), and the rule illustrated in FIG. A list 710 is generated. In the rule list 710, for example, a rule having a rule identifier 711 of “1” corresponds to the execution path (1). The condition / result correspondence table generation unit 110 sets, in each record of the rule list 710, the information on the conditional branch existing on the execution path corresponding to the left side 713 and the information of the result item corresponding to the right side 714 side. To convert the execution path to rules.

こうしたルール一覧表710は、ルールを識別するためのIDを記載したルール識別子(#欄)711をキーとして、該当ルールの種別を表すルール種別(種別欄)712、および、ルールの内容を記載するための左辺欄713と右辺欄714から構成される。このうち左辺欄713および右辺欄714は、それぞれ条件結果項目と対応する項目値を格納する名称と値欄とから構成される。こうしたルール一覧表710における各ルールは、そのデータ構造が、「条件項目C1の項目値c1、かつ、条件項目C2の項目値がc2、かつ、・・・ならば、結果項目B1の項目値はb1、かつ、・・・」といった論理式形式によ
る仕様記述に対応する。
Such a rule list 710 describes a rule type (type column) 712 indicating the type of the corresponding rule, and the contents of the rule, using a rule identifier (# column) 711 describing an ID for identifying the rule as a key. The left side column 713 and the right side column 714 for this purpose. Of these, the left side column 713 and the right side column 714 are each composed of a name and value column for storing item values corresponding to the condition result items. Each rule in the rule list 710 has a data structure “the item value c1 of the condition item C1, the item value of the condition item C2 is c2, and..., The item value of the result item B1 is It corresponds to the specification description in a logical expression format such as “b1, and.

条件結果対応表生成部110は、上述のごとく生成したルール一覧表710より条件結果対応表を作成することとなる(図3:ステップ305)。この場合、条件結果対応表生成部110は、ルール一覧表710における、各条件項目ないし結果項目とその項目値と、条件項目値の組み合わせと、その組み合わせに対応する結果項目の項目値とを対応付けることで、条件結果対応表を生成する。   The condition result correspondence table generation unit 110 creates a condition result correspondence table from the rule list table 710 generated as described above (FIG. 3: step 305). In this case, the condition result correspondence table generation unit 110 associates each condition item or result item with its item value, a combination of condition item values, and an item value of a result item corresponding to the combination in the rule list 710. Thus, the condition result correspondence table is generated.

図11は、図10のルール一覧表710から生成された条件結果対応表800の構成例を示す図である。ここに示すとおり条件結果対応表800は、条件項目および結果項目とその項目値を記載する条件結果項目欄803と、条件項目値の組み合わせと、その組み合わせに対応する結果項目の項目値を記載するルール欄804との二つの列から構成されている。   FIG. 11 is a diagram showing a configuration example of the condition result correspondence table 800 generated from the rule list 710 of FIG. As shown here, the condition result correspondence table 800 describes a condition result item column 803 in which condition items and result items and their item values are described, combinations of condition item values, and item values of result items corresponding to the combinations. The rule column 804 is composed of two columns.

また、条件結果対応表800は、条件項目を記載するための条件行801、結果項目を記載する結果行802、および、ルール列内の各ルールと実行パスとの対応を記載する実行パス対応行805、ルール列内の各ルールと生成テストケースとの対応を記載するテストケース列806から構成される。   The condition result correspondence table 800 includes a condition line 801 for describing condition items, a result line 802 for describing result items, and an execution path corresponding line for describing the correspondence between each rule in the rule column and the execution path. Reference numeral 805 denotes a test case column 806 that describes the correspondence between each rule in the rule column and the generated test case.

なお、図11に示した条件結果項目対応表800内の各ルール(1)〜(8)は、対応する項目値に全て"○"を用いている。すなわち、全て同じ記号を用いて記憶しているが、各ルールは、各実行パス内に含まれる条件項目、結果項目と、それ以外がわかるように記憶するようにしてもよい。   Each rule (1) to (8) in the condition result item correspondence table 800 shown in FIG. 11 uses “◯” as the corresponding item value. That is, all the rules are stored using the same symbols, but each rule may be stored so that the condition items and result items included in each execution path can be understood.

例えば、実行パス(2)702に対応するルールは、図11のルール列1,2列目に対応する。このとき、実行パス内に含まれる条件項目「タイムアウト≦60秒」や結果項目「データ受信:=有」に対応するルール列の該当欄を"○"で記載し、それ以外の条件項目「リトライ回数」「ログ:=出力無し」は、"―"で記載するようにしても良い。   For example, the rule corresponding to the execution path (2) 702 corresponds to the rule columns 1 and 2 in FIG. At this time, the corresponding column of the rule column corresponding to the condition item “timeout ≦ 60 seconds” and the result item “data reception: = present” included in the execution path is described with “○”, and the other condition item “retry” “Number of times” and “Log: = No output” may be described as “-”.

一方、テストケース生成部109は、上述の条件結果対応表800を利用してテストケース生成の処理を実行することとなる(図3:ステップ307)。この処理の概要については図4に基づき既述であるが、あらため具体的に説明する。テストケース生成部109は、カバレッジ基準一覧表410にてユーザ選択されたカバレッジ基準(種別欄412)内の種別に従い、実行パスベース、入出力ベース、いずれのカバレッジ基準であるかを判断し、それぞれのカバレッジ基準に準拠してテストケースの生成を行う。例えば、ユーザ選択が実行パスベースのカバレッジ基準であった場合には、図6に記載したフローチャート160(処理の流れに関する仕様)、及び、ステップ304で生成した実行パスを用い
て、カバレッジ基準一覧表410のテストケース生成処理414欄に記載のテストケース生成処理を用いてテストケースの生成を行う(ステップ403)。
On the other hand, the test case generation unit 109 executes test case generation processing using the above-described condition result correspondence table 800 (FIG. 3: step 307). Although the outline of this process has already been described with reference to FIG. 4, it will be specifically described. The test case generation unit 109 determines whether it is an execution path base, an input / output base, or a coverage standard according to the type in the coverage standard (type field 412) selected by the user in the coverage standard list 410, Test cases are generated in accordance with the coverage standards. For example, when the user selection is an execution path-based coverage criterion, the coverage criterion list using the flowchart 160 (specifications relating to the flow of processing) described in FIG. 6 and the execution path generated in step 304 is used. A test case is generated using the test case generation process described in the column 410 of test case generation process 414 (step 403).

また入出力ベースでのテストケースを生成する場合、テストケース生成部109は、同
様にカバレッジ基準一覧表410のテストケース生成処理414欄内に記載のテストケース生成処理を用いて、ステップ305で生成した条件結果項目一覧600、及び、生成した条件結果対応表800を用いてテストケースの生成を行う(ステップ404)。
When generating a test case on an input / output basis, the test case generation unit 109 generates the test case in step 305 by using the test case generation process described in the test case generation process 414 column of the coverage standard list 410 in the same manner. The test case is generated using the condition result item list 600 and the generated condition result correspondence table 800 (step 404).

なお、カバレッジ基準を満たすテストケースの生成、評価処理は、カバレッジ基準ごと、カバレッジ生成処理名称414、および、カバレッジ評価処理名称415で指定された各処理内で、各カバレッジを満たすようなテストケースの生成、評価が可能なように任意に実装すればよい。例えば、実行文網羅(SC、C0)であれば、抽出した全ての実行パスをランダムに選択し、処理の流れに関わる仕様の全てを処理が選択されるまで、実行パスの選択を繰り返せばよい。   The test case generation / evaluation processing that satisfies the coverage criteria is performed for each coverage criterion, and the test cases that satisfy each coverage within each processing specified by the coverage generation processing name 414 and the coverage evaluation processing name 415. It can be implemented arbitrarily so that it can be generated and evaluated. For example, for executable statement coverage (SC, C0), all extracted execution paths may be selected at random, and selection of execution paths may be repeated until processing is selected for all specifications related to the flow of processing. .

ステップ405においてテストケース生成部109は、条件結果対応表800内の実行パス対応欄805により、生成した実行パスベースのテストケースと、入出力対応ベースのテストケースとに重複があるか否かを確認し、重複するテストケースを削除する。   In step 405, the test case generation unit 109 uses the execution path correspondence column 805 in the condition result correspondence table 800 to determine whether or not the generated execution path base test case and the input / output correspondence base test case overlap. Confirm and delete duplicate test cases.

次にステップ406においてテストケース生成部109は、設定パラメータとして与えたカバレッジ基準に対するテストケース生成処理を全て行ったか否かを検査し、生成していないカバレッジ基準がある場合には、ステップ402に戻り、未生成のカバレッジ基準に対応するテストケースを生成するため、上記の処理を繰り返す。   Next, in step 406, the test case generation unit 109 checks whether or not all the test case generation processing for the coverage criterion given as the setting parameter has been performed. If there is a coverage criterion that has not been generated, the process returns to step 402. The above process is repeated to generate a test case corresponding to an ungenerated coverage criterion.

なお、このとき生成したテストケースが設定パラメータとして与えたカバレッジ基準に準拠しているかを、カバレッジ評価処理欄415内の処理を用いて判定するようにし、未生成のカバレッジ基準に対応するテストケースが生成済みか否かを判断するようにしても良い。   Whether the test case generated at this time complies with the coverage standard given as the setting parameter is determined using the processing in the coverage evaluation processing column 415, and the test case corresponding to the ungenerated coverage standard is determined. It may be determined whether or not it has been generated.

また、上記の重複テストケースの削除(ステップ405)は、ステップ403、及び、ステップ404内のテストケース生成の際、生成済みのテストケースを条件結果対応表800上で確認することで、ステップ403、及び、ステップ404内で行っても良い。   Further, the deletion of the duplicate test case (step 405) is performed by confirming the generated test case on the condition result correspondence table 800 at the time of test case generation in step 403 and step 404. And in step 404.

なお、図5に記載したカバレッジ基準一覧410は、カバレッジ基準の一例であり、これ以外のカバレッジ基準を含んでもよい。また、図5のカバレッジ基準一覧表410にて例示したカバレッジ基準は、処理の流れに関わる仕様と実行パス(実行パスベースの場合)、または、条件結果項目一覧(入出力ベースの場合)のみからカバレッジ評価が可能な基準のみを例示したが、これ以外のカバレッジ基準を含んでもよい。   The coverage standard list 410 illustrated in FIG. 5 is an example of the coverage standard, and may include other coverage standards. Further, the coverage standard illustrated in the coverage standard list 410 of FIG. 5 is based only on the specification and execution path related to the flow of processing (in the case of execution path base) or the condition result item list (in the case of input / output base). Although only the criteria that allow coverage evaluation are illustrated, other coverage criteria may be included.

例えば、特定の処理、あるいは、条件分岐を通る全ての実行パスをテストケースとする場合には、以下のようにすればよい。まず、カバレッジ基準一覧表410に、上記のカバレッジ基準として、カバレッジ種別412に「実行パス」、カバレッジ生成処理名称413に「特定ステートメント網羅」とし、カバレッジ生成処理名称414、カバレッジ評価処理名称415に、テストケース生成、評価のための処理を追加する。   For example, in the case where all execution paths passing through a specific process or conditional branch are used as test cases, the following may be performed. First, in the coverage standard list 410, as the above-mentioned coverage standards, the coverage type 412 is “execution path”, the coverage generation process name 413 is “specific statement coverage”, the coverage generation process name 414 and the coverage evaluation process name 415 are Add processing for test case generation and evaluation.

この場合、ステップ306の生成パラメータの設定処理において、ユーザ入力312より、生成するテストケース生成処理として「特定ステートメント網羅」を指定するとともに、処理の流れを表す仕様から、特定の処理、あるいは、条件を合わせて入力するようにすればよい。例えば、図6のフローチャートでは、ユーザ入力312によりステップ500からステップ514のいずれかを入力するようにすればよい。   In this case, in the generation parameter setting process in step 306, “specific statement coverage” is designated as the test case generation process to be generated from the user input 312, and the specific process or condition is specified from the specification representing the flow of the process. Should be input together. For example, in the flowchart of FIG. 6, any one of steps 500 to 514 may be input by user input 312.

なお、図11のテストケース欄806は、実行パスベースのカバレッジ基準の内、判断文網羅(DC)、及び、入出力ベースのカバレッジ基準のn条件組合せ網羅(n−wis
e)に基づき、テストケース生成を行った結果の一例を示している。図11のテストケー
ス欄806に示したとおり、図11に例示した生成テストケースでは、実行パスベース、入出力ベース、それぞれのテストケース生成結果から、ルール列1に記載のテストケースが重複しており、テスト実行時に本テストケースに関わるテスト実行の重複を防ぐことが可能となる。このように、実行パス及び条件/結果の各項目対応、及び、カバレッジに対応したテストケースの生成に際し、テストケース間の重複チェックを行うことが可能である。これにより、それぞれのカバレッジを満たすようにテストケースの生成した場合、重複したテストケースを生成することを防ぎ、効率的なテスト実行を実現することも可能である。
Note that the test case column 806 in FIG. 11 includes the coverage of judgment criteria (DC) and the coverage of n conditions of the input / output base coverage criteria (n-wis) among the execution path-based coverage criteria.
An example of the result of test case generation based on e) is shown. As shown in the test case column 806 in FIG. 11, in the generated test case illustrated in FIG. 11, the test cases described in the rule column 1 are duplicated from the execution case base, the input / output base, and the test case generation results. Therefore, it is possible to prevent duplication of test execution related to this test case at the time of test execution. In this way, it is possible to perform a duplicate check between test cases when generating test cases corresponding to execution path and condition / result items and coverage. As a result, when test cases are generated so as to satisfy the respective coverages, it is possible to prevent the generation of duplicate test cases and to realize efficient test execution.

なお、上記の例では、条件/結果の各項目は、実際のプログラム上の変数ではなく、仕様設計時に利用される設計情報である。実施にソフトウェアのテストを行う場合には、条件/結果の各項目、及び、その項目値に、具体的な実装上の変数名、変数値等を割当てるようにすることで、上記テストケースと実際のテスト実行時の入出力変数との対応を取るようにすれば良い。   In the above example, each item of condition / result is not actual program variables but design information used at the time of specification design. When conducting software tests for implementation, the actual test cases and actual values are assigned by assigning specific implementation variable names, variable values, etc. to each item of the condition / result and its item value. Corresponding to the input / output variables at the time of test execution.

次に、第二の実施例について説明する。この第二の実施例では、図14に記載した抽出ルール一覧1200に基づき、図7、及び、図16に示した条件結果項目抽出処理、及び、実行パス抽出処理に従い、条件結果項目の抽出(ステップ302)、及び、実行パスの抽出(ステップ304)を行う。   Next, a second embodiment will be described. In the second embodiment, based on the extraction rule list 1200 shown in FIG. 14, the extraction of condition result items (in accordance with the condition result item extraction process and the execution path extraction process shown in FIG. 7 and FIG. 16) Step 302) and execution path extraction (step 304).

ここで図12は、第二の実施例を説明するための処理の流れに関わる仕様の一例を示す図であり、UML図における状態遷移図(ステートチャート図)による仕様記述の一例である。図12の状態遷移図140は、データの受信処理に関わるプログラムの遷移状態を示す図であり、開始900、終了905、受信待ち901、データチェック902、メッセージ出力903、及び、それらの状態間の遷移を表す遷移条件から構成されている。   Here, FIG. 12 is a diagram showing an example of specifications related to the flow of processing for explaining the second embodiment, and is an example of specification description by a state transition diagram (state chart diagram) in the UML diagram. The state transition diagram 140 of FIG. 12 is a diagram showing a transition state of a program related to data reception processing. The start 900, the end 905, the reception wait 901, the data check 902, the message output 903, and the state between these states It consists of transition conditions that represent transitions.

以下に条件結果項目抽出部107が図12の状態遷移図140より条件結果項目抽出の処理を実行する手順について図7のフローにおける基づき説明する。なお、図7は、前述のとおり、テストケース生成装置100の条件結果項目抽出部107により、図3のステップ302、条件結果項目の抽出処理で実行する処理である。   A procedure for the condition result item extraction unit 107 to execute the condition result item extraction process from the state transition diagram 140 of FIG. 12 will be described below based on the flow of FIG. 7 is a process executed by the condition result item extraction unit 107 of the test case generation apparatus 100 in step 302 of FIG. 3 and the condition result item extraction process as described above.

ここで条件結果項目抽出部107は、ステップ1300にて処理を開始し、ステップ1301において、上述の状態遷移図140における記号要素に関し、図14に例示する抽出ルール一覧表1200のルール種別欄1204の値を確認し、抽出対象となる記号の種別が「条件」である場合には、ステップ1302へ、そうでなければ、ステップ1303に処理を進める。   Here, the condition result item extraction unit 107 starts processing in step 1300, and in step 1301, regarding the symbol elements in the state transition diagram 140 described above, the rule type item 1204 of the extraction rule list 1200 illustrated in FIG. The value is confirmed, and if the type of the symbol to be extracted is “condition”, the process proceeds to step 1302; otherwise, the process proceeds to step 1303.

なお、図14における抽出ルール一覧表1200は、抽出ルールを識別するための抽出ルール識別子(ID欄)1201、抽出ルールの名称を示す抽出ルール名称(名称欄)1202、抽出元となる表記を格納する表記欄1203、条件結果項目の抽出種別を表す抽出種別(種別欄)1204、条件結果項と項目値の抽出ルールを規定する抽出ルール1205、及び、ステップ305のルール作成時に用いる補足ルール1206から構成される。この補足ルール1206は、図15に示す補足ルール一覧1210で規定されており、その構成は、補足ルールを識別するための補足ルール識別子(ID欄)1211、及び、補足ルールの名称を表す補足ルール名称(名称欄)1212、補足ルールに対応する表記を示す補足ルール表記(表記欄)1213、及び、補足ルールの抽出種別を示す補足ルール種別(種別欄)1214、補足ルールの内容を示す補足ルール(補足ルール欄)1215から構成される。なお、補足ルール欄1215には、補足ルールを適用する条件を記述する条件欄と追加するルールの内容を記載する追加ルール欄から構成される。   14 stores an extraction rule identifier (ID column) 1201 for identifying an extraction rule, an extraction rule name (name column) 1202 indicating the name of the extraction rule, and a notation that is an extraction source. From the notation column 1203 to be extracted, the extraction type (type column) 1204 indicating the extraction type of the condition result item, the extraction rule 1205 that defines the extraction rule of the condition result item and the item value, and the supplementary rule 1206 used when creating the rule in step 305 Composed. This supplementary rule 1206 is defined in the supplementary rule list 1210 shown in FIG. 15, and the constitution thereof is a supplementary rule identifier (ID column) 1211 for identifying the supplementary rule and a supplementary rule representing the name of the supplementary rule. Name (name field) 1212, supplementary rule notation (notation field) 1213 indicating notation corresponding to the supplementary rule, supplementary rule type (type field) 1214 indicating the extraction type of the supplementary rule, supplementary rule indicating the content of the supplementary rule (Supplementary rule column) 1215. The supplementary rule column 1215 includes a condition column describing a condition for applying the supplementary rule and an additional rule column describing the content of the rule to be added.

続いてステップ1302において条件結果項目抽出部107は、抽出対象となる「条件」記号内の表記、及び、抽出ルール一覧1200の抽出ルール1205欄の値を参照し、抽出ルールの名称欄と一致する記述を条件項目として、値欄に一致する記述を抽出した条件項目の項目値として抽出する。この抽出後、条件結果項目抽出部107は処理をステップ1304に進める。   In step 1302, the condition result item extraction unit 107 refers to the notation in the “condition” symbol to be extracted and the value in the extraction rule 1205 column of the extraction rule list 1200, and matches the extraction rule name column. The description is extracted as the condition item, and the description matching the value column is extracted as the item value of the extracted condition item. After this extraction, the condition result item extraction unit 107 advances the process to step 1304.

また、ステップ1303において条件結果項目抽出部107は、上述のステップ1303と同様に、記号内の表記、及び、抽出ルール1205を参照し、抽出ルールの名称欄と一致する記述を結果項目として、値欄に一致する記述を抽出した結果項目の項目値として抽出する。この抽出後、条件結果項目抽出部107は処理をステップ1304に進める。   In step 1303, the condition result item extraction unit 107 refers to the notation in the symbol and the extraction rule 1205 as in step 1303 described above, and uses a description that matches the name field of the extraction rule as a result item. The description that matches the column is extracted as the item value of the extracted result item. After this extraction, the condition result item extraction unit 107 advances the process to step 1304.

次にステップ1304において条件結果項目抽出部107は、状態遷移図140すなわち仕様内の全ての記号に対し、処理が完了している場合(ステップ1304:YES)にはステップ1305へ進み処理を終了する。他方、そうでなければ(ステップ1304:NO)、条件結果項目抽出部107はステップ1301に処理を戻す。   Next, in step 1304, the condition result item extraction unit 107 proceeds to step 1305 and ends the processing when the processing is completed for all the symbols in the state transition diagram 140, that is, the specification (step 1304: YES). . On the other hand, if not (step 1304: NO), the condition result item extraction unit 107 returns the process to step 1301.

このように処理により得られた条件結果項目一覧表910のうち、例えば、条件結果項目一覧表910内の6行目「受信待ち」は、状態遷移図140内の状態、受信待ち901から生成される。また、その項目値は、受信待ち状態に達するか(活性)、達しない(非
活性) が、抽出ルール一覧1200の第一行目記載のルールに従い記載される。図13に示すとおり、条件結果項目一覧表910は、第一の実施例に例示した条件結果項目一覧表600と同様、条件項目、結果項目を識別するための項目識別子(ID欄)911、項目が、条件項目か結果項目かを示す項目種別(種別欄)912、条件、結果項目の名称を格納する項目名称(名称欄)913、各条件、結果項目が取りうる値の候補を記載する項目値(候補値欄)914、および、各条件結果項目の説明を記載する項目概要(概要欄)915から構成される。
Of the condition result item list 910 obtained by the processing in this manner, for example, the sixth line “waiting for reception” in the condition result item list 910 is generated from the state in the state transition diagram 140, the waiting for reception 901. The In addition, the item value is described according to the rule described in the first line of the extraction rule list 1200 as to whether the reception wait state is reached (active) or not (inactive). As shown in FIG. 13, the condition result item list 910 is similar to the condition result item list 600 illustrated in the first embodiment, as an item identifier (ID column) 911 for identifying condition items and result items. Is an item type (type field) 912 indicating whether the item is a condition item or a result item, an item name (name field) 913 for storing the name of the condition and result item, and an item that describes candidates for values that each condition and result item can take It consists of a value (candidate value column) 914 and an item summary (summary column) 915 describing the description of each condition result item.

なお、上述のように抽出された条件結果項目に、ユーザ指示に応じて修正及び規定値の設定を行うことも可能である。この処理は条件結果項目補正部103が実行する。上記の例では、例えば状態に対する項目値の規定値が非活性であることを、事前抽出ルールとして定めておき、条件結果項目抽出の際に、一部の規定値を自動で設定するようにしている。   It should be noted that the condition result item extracted as described above can be corrected and set with a specified value in accordance with a user instruction. This process is executed by the condition result item correction unit 103. In the above example, for example, it is determined as a pre-extraction rule that the specified value of the item value for the state is inactive, and some specified values are automatically set when extracting the condition result item. Yes.

続いて、実行パス抽出部108による実行パス抽出処理(図3:ステップ304)について図16に基づき説明する。この場合、実行パス抽出部108は、ステップ1401にて処理を開始し、ステップ1402において、状態遷移図170における全ての記号を探索し、抽出ルール一覧1200内の抽出ルール種別1204内の「開始」条件に合う、記号を抽出する。   Next, the execution path extraction process (FIG. 3: step 304) by the execution path extraction unit 108 will be described with reference to FIG. In this case, the execution path extraction unit 108 starts processing in step 1401, searches for all symbols in the state transition diagram 170 in step 1402, and “start” in the extraction rule type 1204 in the extraction rule list 1200. Extract symbols that meet the conditions.

続いて実行パス抽出部108は、ステップ1403において、状態遷移図170における全ての記号に対する探索が終了している場合(ステップ1403:YES)、処理をステップ1409へ、そうでなければ(ステップ1403:NO)、処理をステップ1404に進める。   Subsequently, in step 1403, the execution path extraction unit 108 proceeds to step 1409 if the search for all symbols in the state transition diagram 170 has been completed (step 1403: YES), otherwise (step 1403: NO), the process proceeds to Step 1404.

次にステップ1404において実行パス抽出部108は、上述のステップ1402で抽出した記号に接続された、全ての記号の探索が終了した場合(ステップ1403:YES)、ステップ1408へ、そうでなければ(ステップ1404:NO)、処理をステップ1405へ進める。   Next, in step 1404, the execution path extraction unit 108 proceeds to step 1408 if the search of all symbols connected to the symbol extracted in step 1402 is completed (step 1403: YES), otherwise ( Step 1404: NO), the process proceeds to Step 1405.

ステップ1405において実行パス抽出部108は、上述の接続先の構成要素を抽出し
、ステップ1406において、抽出ルール一覧1200内の抽出ルール種別1204内の「終了」の抽出ルールを抽出し、対象となる記号が終了条件に適合するかを検査する。ここで、終了条件に合う場合(ステップ1406:YES)、実行パス抽出部108は処理をステップ1408へ、合わない場合(ステップ1406:NO)、処理をステップ1407に進める。
In step 1405, the execution path extraction unit 108 extracts the above-mentioned connection destination components, and in step 1406, extracts the “end” extraction rule in the extraction rule type 1204 in the extraction rule list 1200 and becomes the target. Check that the symbol meets the termination condition. If the end condition is met (step 1406: YES), the execution path extraction unit 108 advances the process to step 1408, and if not (step 1406: NO), the process proceeds to step 1407.

またステップ1407において実行パス抽出部108は、抽出ルール一覧1200内の抽出ルール種別1204内の条件、結果の何れかに合うかを検査し、条件、結果の条件に合う場合には、実行パスに対象記号を追加し、ステップ1404に進む。また、ステップ1408において実行パス抽出部108は、ステップ1405までで抽出された記号列から実行パスを構成し、ステップ1403に進む。   In step 1407, the execution path extraction unit 108 checks whether the condition or result in the extraction rule type 1204 in the extraction rule list 1200 is met. The target symbol is added, and the process proceeds to Step 1404. In step 1408, the execution path extraction unit 108 configures an execution path from the symbol string extracted up to step 1405, and proceeds to step 1403.

上述のフローは、開始条件に合う記号から処理を開始し、終了条件に合う各実行パスを抽出するため、接続先の記号を逐次探索する処理の実現方法の一例を示している。   The above-described flow shows an example of a method for realizing a process of sequentially searching for a connection destination symbol in order to start processing from a symbol that meets the start condition and extract each execution path that meets the end condition.

なお、上述のステップ1407において、条件、結果のいずれの抽出ルールにも合わない記号の場合、実行パス抽出部108は、そこで処理を中止して、次の実行パスの探索に移るとしてもよい。これによって、実行パス内に、例えば、コメント記号などが記載されている場合でも、意図した実行パスのみを抽出することが可能となる。   Note that in the above-described step 1407, if the symbol does not match any of the extraction rules of the condition and the result, the execution path extraction unit 108 may stop the process and move on to search for the next execution path. As a result, even when, for example, a comment symbol is described in the execution path, only the intended execution path can be extracted.

図17に、状態遷移図170に関する実行パス抽出処理によって生成された実行パスの一部(実行パス(1)1001、実行パス(2)1002、実行パス(3)1003)を示す。   FIG. 17 shows a part of execution paths (execution path (1) 1001, execution path (2) 1002, execution path (3) 1003) generated by the execution path extraction process related to the state transition diagram 170.

条件結果対応表生成部110は、以上のように得た実行パスからルールを作成することとなる。その流れを図17における実行パス(1)1001を例にして説明する。なお、実行パス(1)1001は、図12の状態遷移図170から、図16の処理に従い、開始900、受信待ち901、データチェック902、メッセージ出力903、終了905の順で状態遷移が行われた場合を表している。また、図18のルール一覧表1010では、ルール識別子1011が1のルールに対応する。   The condition result correspondence table generation unit 110 creates a rule from the execution path obtained as described above. The flow will be described using the execution path (1) 1001 in FIG. 17 as an example. The execution path (1) 1001 undergoes state transition from the state transition diagram 170 of FIG. 12 in the order of start 900, reception wait 901, data check 902, message output 903, and end 905 in accordance with the processing of FIG. Represents the case. Further, in the rule list 1010 of FIG. 18, the rule identifier 1011 corresponds to the rule of 1.

まず条件結果対応表生成部110は、抽出ルール一覧1200を参照し、実行パス(1)1001内の記号それぞれに対し、抽出ルール一覧1200内の表記欄1203内の記号と一致する行の抽出種別1204が"条件"である記号と、"結果"である記号とに分ける。   First, the condition result correspondence table generation unit 110 refers to the extraction rule list 1200, and for each symbol in the execution path (1) 1001, the extraction type of the line that matches the symbol in the notation field 1203 in the extraction rule list 1200 1204 is divided into a symbol that is “condition” and a symbol that is “result”.

次に条件結果対応表生成部110は、抽出種別1204が"条件"である記号に対し、ルール(図18参照)の左辺1013を構成する。例えば、"データ受信"は、抽出ルール一覧表1200のルール識別子1201が2の表記と対応する。表記欄1203に従い、$A="データ受信"であり、$B,$b,$C,$cには、対応する表記がない。そこで条件結果対応表生成部110は、対応する抽出ルール1205に従い、"データ受信"="発
生"をルールとして、左辺値に記載する(抽出ルール1205には、"、(カンマ)"を用
いて二つの値(活性、不活性)が記載されているが、ここでは値が特定できない場合には、最初の値を抽出する)。
Next, the condition result correspondence table generation unit 110 configures the left side 1013 of the rule (see FIG. 18) for a symbol whose extraction type 1204 is “condition”. For example, “data reception” corresponds to a notation in which the rule identifier 1201 of the extraction rule list 1200 is 2. According to the notation field 1203, $ A = “data reception”, and $ B, $ b, $ C, and $ c have no corresponding notation. Therefore, the condition result correspondence table generation unit 110 describes “data reception” = “occurrence” as a rule according to the corresponding extraction rule 1205 (the extraction rule 1205 uses “, (comma)”). Two values (active and inactive) are listed. If the value cannot be specified here, the first value is extracted).

次に条件結果対応表生成部110は、補足ルール1206を参照し、補足ルール欄に記載がある場合には、補足ルール一覧1210から、対応する補足ルールを抽出する。"デ
ータ受信"に対しては、補足ルール1206に、1が割り当てられているため、条件結果
対応表生成部110は、補足ルール一覧1210から対応する補足ルールを取得する。
Next, the condition result correspondence table generation unit 110 refers to the supplementary rule 1206, and extracts a corresponding supplementary rule from the supplementary rule list 1210 when the supplementary rule column has a description. For “data reception”, since 1 is assigned to the supplementary rule 1206, the condition result correspondence table generation unit 110 acquires the supplementary rule from the supplementary rule list 1210.

また条件結果対応表生成部110は、補足ルール一覧1210より、補足ルール識別子1211が1の補足ルール内の表記欄1213と図12の状態遷移図より、補足ルールに関連する記号を抽出する。ここでは、"データ受信"の遷移元である状態"受信待ち"901を参照し、そのイベント"タイムアウト"を抽出する。   Further, the condition result correspondence table generation unit 110 extracts symbols related to the supplementary rule from the supplementary rule list 1210 from the notation column 1213 in the supplementary rule whose supplementary rule identifier 1211 is 1 and the state transition diagram of FIG. Here, the state “waiting for reception” 901 which is the transition source of “data reception” is referred to, and the event “timeout” is extracted.

次に条件結果対応表生成部110は、補足ルール欄1215内の条件より、"受信待ち"≠"タイムアウト"($A1≠$A2)より、追加ルールとして、"タイムアウト=発生⇒
タイムアウト=無"、"タイムアウト=無⇒タイムアウト=発生"を生成する。ここで"⇒"
は、"⇒"より左に書かれた式がルール一覧表1010の左辺欄1013に、右側に書かれた式が右辺欄1014に記述されることを表す。
Next, the condition result correspondence table generating unit 110 adds “timeout = occurrence” as an additional rule from “waiting for reception” ≠ “timeout” ($ A1 ≠ $ A2) according to the condition in the supplementary rule column 1215.
Timeout = None "," Timeout = None ⇒ Timeout = Occurrence "is generated. Here," ⇒ "
Indicates that an expression written on the left side of “⇒” is described in the left side column 1013 of the rule list 1010 and an expression written on the right side is described in the right side column 1014.

また条件結果対応表生成部110は、補足ルール一覧1210の種別欄1214より、追加される補足ルールは、ルール一覧表1210に記載する際、その種別欄1012に制約として追加する(制約条件としてルールを追加する。すなわち、ここで追加された条件に条件項目値の組み合わせが限定される)。なお、上記の処理によって追加されたルールは、ルール一覧表1010のルール識別子1011が5,6のルールに対応する。   In addition, the condition result correspondence table generation unit 110 adds a supplementary rule to be added from the type column 1214 of the supplementary rule list 1210 to the type column 1012 as a restriction when describing the rule in the rule list 1210 (rule as a constraint condition) That is, combinations of condition item values are limited to the conditions added here). Note that the rules added by the above processing correspond to the rules whose rule identifier 1011 of the rule list 1010 is 5 or 6.

同様に条件結果対応表生成部110は、イベント"チェック完了"についても上記と同様の処理を行うことで、右辺1013に名称欄"チェック完了"、値欄"発生"を追加すると同時に、補足ルール1215より、ルール識別子1011に7,8のルールを追加する。   Similarly, the condition result correspondence table generation unit 110 performs the same process as described above for the event “check completed”, thereby adding the name column “check completed” and the value column “occurrence” to the right side 1013 and at the same time supplementary rules. From 1215, rules 7 and 8 are added to the rule identifier 1011.

次に条件結果対応表生成部110は、抽出ルール一覧1200の抽出種別1204が"
結果"である記号に対し、上記と同様の処理を行い、右辺の構成を行う。ただし、右辺1
014については、条件結果項目一覧表910内を探索し、実行パスに含まれない結果項目がある場合には、規定値を割り当て、右辺を構成する。
Next, the condition result correspondence table generation unit 110 determines that the extraction type 1204 of the extraction rule list 1200 is “
The symbol “result” is processed in the same manner as described above to construct the right side.
For 014, the condition result item list 910 is searched, and if there is a result item that is not included in the execution path, a specified value is assigned to configure the right side.

例えば、"リトライ回数"は、実行パス(1)1001に含まれていない。この場合、条件結果対応表生成部110は、右辺1014に名称"リトライ回数"は、値 "0にリセット"を追加することで、全ての結果項目が右辺に含まれるようにする。   For example, “retry count” is not included in the execution path (1) 1001. In this case, the condition result correspondence table generation unit 110 adds the value “reset to 0” to the right side 1014 so that all result items are included in the right side.

なお、上記の処理は、条件結果対応表1100を構成した際、結果が未定となる列が構成されることを防ぐためであり、必ずしも、実行パスに含まれない結果項目を右辺1014に追加する必要はない。また、上記の手順によって追加されたルールがすでに抽出済みの場合には、改めてルール一覧表1010に追加する必要はない。   Note that the above processing is to prevent a column whose result is undetermined when the condition result correspondence table 1100 is configured, and a result item that is not necessarily included in the execution path is added to the right side 1014. There is no need. If the rule added by the above procedure has already been extracted, it is not necessary to add it to the rule list 1010 again.

図18に実行パスをルール変換したルール一覧表1010を示す。ルール一覧表1010は、抽出した実行パスをルールに変換した結果である。ルール一覧表1010は、第一の実施例と同様に、ルールを識別するためのIDを記載したルール識別子(#欄)1011と、ルールの種別を表すルール種別(種別欄)1012、および、ルールの内容を記載するための左辺欄1013と右辺欄1014から構成される。このうち左辺欄1013、右辺欄1014はそれぞれ、条件/結果の項目と対応する項目値とを格納する名称と値欄から構成される。   FIG. 18 shows a rule list 1010 obtained by converting the execution path into rules. The rule list 1010 is a result of converting the extracted execution path into a rule. As in the first embodiment, the rule list 1010 includes a rule identifier (# field) 1011 that describes an ID for identifying a rule, a rule type (type field) 1012 that represents the type of the rule, and a rule Is composed of a left side column 1013 and a right side column 1014. Of these, the left side column 1013 and the right side column 1014 are each composed of a name / value column for storing a condition / result item and a corresponding item value.

なお、図14の抽出ルール一覧表1200、及び、図15の補足ルール一覧1210の構成は図示した例の構成と同一でなくてもよい。例えば、上述の例では、抽出ルール1205に、複数の値候補が記載されており、値が判別できない場合には、最初の候補値を割り当てていることとしたが、抽出ルール内に候補値の内、値として割り当てる項目を明示的に指定して記載してもよい。また、表記欄1203、1213には、記号をそのまま用いるのではなく、記号、及び、条件、結果項目を抽出するための識別子や、記述された名称、候補値を抽出するための、他の表記方法を用いてもよい。   The configuration of the extraction rule list 1200 in FIG. 14 and the supplementary rule list 1210 in FIG. 15 may not be the same as the configuration in the illustrated example. For example, in the above example, when a plurality of value candidates are described in the extraction rule 1205 and the value cannot be determined, the first candidate value is assigned. Of these, items to be assigned as values may be explicitly specified and described. In addition, in the notation fields 1203 and 1213, symbols are not used as they are, but identifiers for extracting symbols, conditions, and result items, and other notations for extracting written names and candidate values. A method may be used.

続いて、条件結果対応表生成部110による、ルール一覧表1010を用いた条件結果対応表1100の生成処理について説明する。この場合、条件結果対応表生成部110は、ルール一覧表1010における全ての条件項目の組合せ中から、ルール種別1012がルールの右辺の条件を満たすものに対し、対応する結果項目値を特定することで生成する。この生成手法は第一の実施例の場合と同様である。また、このときルール種別1012が、「制約」となるルールが存在する場合には、その条件項目の組合せのみに制約される(とりうる値が、制約として与えられたルールに限定される)ことを示している。そのため、ルール一覧表1010内に、制約ルールが存在する場合には、該当する条件項目の組合せのみをルールとして残すようにすれば良い。図19に示す条件結果対応表1100において、実行パス行1105に番号の記載のないルールは、ルール一覧表1010の制約によって、条件組合せが存在しないことを示している。以上の処理によって、図12の状態遷移図170から条件結果項目対応表1100が生成される。   Next, the process of generating the condition result correspondence table 1100 using the rule list 1010 by the condition result correspondence table generation unit 110 will be described. In this case, the condition result correspondence table generation unit 110 specifies the corresponding result item value for the rule type 1012 that satisfies the condition on the right side of the rule from among all the combinations of the condition items in the rule list 1010. Generate with This generation method is the same as in the first embodiment. At this time, if there is a rule whose rule type 1012 is “restriction”, the rule type 1012 is restricted only to the combination of the condition items (possible values are limited to the rule given as the restriction). Is shown. For this reason, when there are constraint rules in the rule list 1010, only the combination of the corresponding condition items may be left as a rule. In the condition result correspondence table 1100 shown in FIG. 19, a rule whose number is not described in the execution path row 1105 indicates that there is no condition combination due to the restriction of the rule list table 1010. By the above processing, the condition result item correspondence table 1100 is generated from the state transition diagram 170 of FIG.

第一の実施例と同様に生成パラメータの設定(ステップ306)、及び、テストケース生成(ステップ307)を実行することで、テストケースを得ることができる。図19のテストケース行1106には、図4に示したカバレッジ基準一覧表410の内、判断文網羅(DC)とn−wise(n=2)の場合のテストケースを示している。なお、判断文網羅(DC)は、状態遷移図170上の全ての状態に対し、各遷移を少なくとも一回通るパスをテストケースとして選択する場合を示しており、n−wiseは、条件項目として抽出した項目値のn項目の組合せ全てをテストケースとしてもいる場合をカバレッジとしている。   A test case can be obtained by executing generation parameter setting (step 306) and test case generation (step 307) as in the first embodiment. A test case row 1106 in FIG. 19 shows test cases in the case of judgment statement coverage (DC) and n-wise (n = 2) in the coverage standard list 410 shown in FIG. Judgment statement coverage (DC) indicates a case where a path that passes through each transition at least once is selected as a test case for all states on the state transition diagram 170, and n-wise is a condition item. Coverage is a case where all combinations of extracted item values of n items are used as test cases.

以上、処理の流れに関わる仕様からのテストケース生成処理の流れについて示した。第二の実施例では、状態遷移図170を例として説明を行ったが、フローチャート用の抽出ルール一覧表を用意することで、第一の実施例に記載したフローチャートに関しても同様の手順で処理を行うことが可能である。   The flow of test case generation processing from the specifications related to the flow of processing has been described above. In the second embodiment, the state transition diagram 170 has been described as an example. However, by preparing an extraction rule list for the flowchart, the same procedure is applied to the flowchart described in the first embodiment. Is possible.

なお、上述の各実施例では、テストケース生成に伴って処理の流れに関わる仕様として状態遷移図やフローチャートを例としてあげたが、例えば、UMLにおけるシーケンス図や、業務フローを表すためのBPEL(Business Process Execution Language)等についても、個別に抽出ルール一覧表を定めておくことで、同様にテストケースを得ることができる。また、図形式の処理の流れを表す仕様だけでなく、C言語やJAVA言語などのプログラム言語などでも、同様に抽出ルール一覧を定めておくことでテストケース生成を行うことができる。   In each of the above-described embodiments, a state transition diagram and a flowchart are taken as an example of specifications related to a process flow along with test case generation. For example, a sequence diagram in UML and a BPEL ( With regard to (Business Process Execution Language) and the like, a test case can be obtained in the same manner by separately defining an extraction rule list. Further, not only the specification representing the processing flow in the diagram format but also the program language such as C language or JAVA language can be used to generate the test case by similarly defining the extraction rule list.

また、上述の各実施例は、例えば業務システムや金融システムの他、発電所や列車の運行管理等の制御・監視システム、或いは、組込みシステムなど、システム開発におけるシステム、ソフトウェアの動作、或いは、ユーザの操作手順を表すユースケースシナリオなど、特定のシステム開発や開発工程によらず利用可能である。   In addition to the business system and financial system, each of the above-described embodiments includes a system development system, a software operation, or a user such as a control / monitoring system such as a power plant or train operation management, or an embedded system. It can be used regardless of a specific system development or development process, such as a use case scenario that represents the operation procedure.

以上、本発明を実施するための最良の形態などについて具体的に説明したが、本発明はこれに限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能である。   Although the best mode for carrying out the present invention has been specifically described above, the present invention is not limited to this, and various modifications can be made without departing from the scope of the invention.

こうした本実施形態によれば、処理の流れに関わるソフトウェア仕様から、実行パスベース及び入出力ベース双方を考慮した適宜なカバレッジを満たすテストケースを効率的に生成可能となる。   According to the present embodiment, it is possible to efficiently generate a test case that satisfies appropriate coverage considering both the execution path base and the input / output base from the software specifications related to the processing flow.

本明細書の記載により、少なくとも次のことが明らかにされる。すなわち、本実施形態におけるテストケース生成装置において、前記記憶装置は、前記流れに関わる仕様情報の
うち、前記条件項目及び前記結果項目の各表記を特定し、前記各表記から前記条件項目及び前記結果項目とその項目値とを抽出する抽出ルールと、前記実行パスにおける開始条件及び終了条件と、を含む抽出ルール情報を格納し、前記演算装置は、前記条件結果項目抽出処理において、前記抽出ルール情報における前記抽出ルールにより、前記条件項目、前記結果項目、及び、前記条件項目及び前記結果項目の各項目値を抽出し、前記条件結果項目として記憶装置に格納し、前記実行パス抽出処理において、前記流れの仕様情報と前記抽出ルール情報が示す前記開始条件とに基づき、前記流れの中での開始点特定に応じて実行パス抽出を開始し、前記流れの中での前記終了条件に応じて特定した終了点までをひとつの実行パスとして抽出する、ものであるとしてもよい。
At least the following will be clarified by the description of the present specification. That is, in the test case generation device according to the present embodiment, the storage device specifies each notation of the condition item and the result item in the specification information related to the flow, and the condition item and the result are determined from each notation. Extraction rule information including an extraction rule for extracting an item and its item value, and a start condition and an end condition in the execution path are stored, and the arithmetic device is configured to extract the extraction rule information in the condition result item extraction process. In the extraction rule, the condition item, the result item, and each item value of the condition item and the result item are extracted and stored in the storage device as the condition result item. In the execution path extraction process, Based on the flow specification information and the start condition indicated by the extraction rule information, an execution path according to the start point specification in the flow Starts out, to extract the end point identified as one of the execution paths depending on the termination conditions in the flow may be those.

これによれば、例えばUML図において状態遷移図で記述された仕様に柔軟に対応し、本実施形態のテストケース生成を効率良く行うことが可能となる。   According to this, for example, it is possible to flexibly correspond to the specification described in the state transition diagram in the UML diagram, and to efficiently generate the test case of the present embodiment.

また、上述のテストケース生成装置において、前記記憶装置は、前記抽出ルール情報として、前記流れの中で関係する前記条件項目及び前記結果項目の間の組み合わせの制約条件を規定した補足ルールを更に格納し、前記演算装置は、前記条件結果項目抽出処理において、前記抽出ルール情報における前記抽出ルールおよび前記補足ルールにより、前記条件項目、前記結果項目、及び、前記条件項目及び前記結果項目の各項目値を、前記補足ルールの規定を満たす制限下で抽出し、前記条件結果項目として記憶装置に格納する、ものであるとしてもよい。   Further, in the test case generation device described above, the storage device further stores, as the extraction rule information, a supplementary rule that defines a constraint condition of a combination between the condition item and the result item related in the flow. In the condition result item extraction process, the arithmetic device uses the extraction rule and the supplementary rule in the extraction rule information to determine the condition item, the result item, and each item value of the condition item and the result item. May be extracted under the restriction satisfying the provisions of the supplementary rule and stored in the storage device as the condition result item.

これによれば、所定の処理に伴うイベントのうち排他的に発生するものの関係を踏まえた上で条件結果項目の抽出を行えることとなり、ひいては、生成するテストケースの精度を良好なものとできる。   According to this, it is possible to extract condition result items in consideration of the relationship between events that occur exclusively among predetermined events, and as a result, the accuracy of the test case to be generated can be improved.

また、上述のテストケース生成装置において、前記記憶装置は、前記カバレッジ基準の情報として、生成するテストケースが実行パスベースのカバレッジを評価するものか、入出力ベースのカバレッジを評価するものかを示すカバレッジ種別を更に格納しており、前記演算装置は、前記テストケース生成処理において、前記カバレッジ基準の情報が示すカバレッジ種別に応じて前記テストケースの生成を実行するものである、としてもよい。   In the above test case generation device, the storage device indicates whether the test case to be generated evaluates an execution path base coverage or an input / output base coverage as the information of the coverage criterion A coverage type may be further stored, and the arithmetic unit may execute the generation of the test case in accordance with the coverage type indicated by the coverage reference information in the test case generation process.

これによれば、例えばユーザが指定するカバレッジ種別に応じて、該当カバレッジを満たすテストケースの効率的な生成が可能となる。   According to this, for example, according to the coverage type specified by the user, it is possible to efficiently generate a test case that satisfies the corresponding coverage.

また、上述のテストケース生成装置において、前記演算装置は、前記条件結果項目抽出処理において、前記抽出した条件結果項目を表示装置に表示し、前記条件結果項目に関する修正指示を入力装置から受け付けて、前記条件結果項目の修正処理を行う条件結果項目処理を更に実行するものである、としてもよい。   Further, in the test case generation device described above, in the condition result item extraction process, the arithmetic device displays the extracted condition result item on a display device, receives a correction instruction related to the condition result item from the input device, The condition result item process for correcting the condition result item may be further executed.

これによれば、ユーザの知見や顧客要求等に応じた内容に条件結果項目を修正可能となり、より柔軟でニーズにマッチした上で、効率的なテストケース生成が可能となる。   According to this, it becomes possible to correct the condition result item to the contents according to the user's knowledge or customer request, etc., and it is possible to generate test cases more efficiently and more flexibly to meet the needs.

また、上述のテストケース生成装置において、前記演算装置は、前記条件結果項目補正処理において、入力装置で受け付ける修正指示として、前記流れの中で関係する前記条件項目及び前記結果項目の間の組み合わせの制約条件を規定した補足ルールを受け付けるものである、としてもよい。   Further, in the test case generation device described above, the arithmetic device may include a combination of the condition item and the result item related in the flow as correction instructions received by the input device in the condition result item correction process. The supplementary rule that defines the constraint condition may be accepted.

これによれば、ユーザの知見に応じ、所定の処理に伴うイベントのうち排他的に発生するものの関係を踏まえた上で条件結果項目の抽出を行えることとなり、ひいては、生成するテストケースの精度を良好なものとできる。   According to this, according to the knowledge of the user, it is possible to extract the condition result items based on the relationship of the events that occur exclusively among the predetermined processing, and as a result, the accuracy of the test case to be generated is improved. Can be good.

100 テストケース生成装置
101 記述形式検証部
102 仕様入力部
103 条件結果項目補正部
104 テスト仕様生成部
105 テスト仕様登録部
107 条件結果項目抽出部
108 実行パス抽出部
109 テストケース生成部
110 条件結果項目生成部
111 仕様記憶部
112 条件結果項目記憶部
113 実行パス記憶部
114 テストケース記憶部
115 カバレッジ基準記憶部
116 条件結果対応表記億部
117 抽出ルール一覧記憶部
201 CPU(演算装置)
202 RAM
203 外部記憶装置(記憶装置)
204 インターフェイス
205 表示装置
206 入力装置
210 プログラム
DESCRIPTION OF SYMBOLS 100 Test case production | generation apparatus 101 Description format verification part 102 Specification input part 103 Condition result item correction | amendment part 104 Test specification production | generation part 105 Test specification registration part 107 Condition result item extraction part 108 Execution path extraction part 109 Test case generation part 110 Condition result item Generation unit 111 Specification storage unit 112 Condition result item storage unit 113 Execution path storage unit 114 Test case storage unit 115 Coverage reference storage unit 116 Condition result correspondence notation unit 117 Extraction rule list storage unit 201 CPU (arithmetic unit)
202 RAM
203 External storage device (storage device)
204 Interface 205 Display device 206 Input device 210 Program

Claims (6)

ソフトウェアにおける処理の流れに関わる仕様情報と、テストケースのカバレッジ基準の情報と、前記仕様情報のうち、前記流れでの分岐条件を示す条件項目及び前記条件項目以外の実行内容を示す結果項目の各表記を特定し、前記各表記から前記条件項目及び前記結果項目とその項目値とを抽出する抽出ルールと、前記仕様情報に対応する仕様内の実行パスにおける開始条件及び終了条件と、を含む抽出ルール情報と、を格納した記憶装置と、
前記抽出ルール情報における前記抽出ルールにより、前記仕様情報より、前記条件項目と、前記結果項目と、前記条件項目および前記結果項目のそれぞれ取りうる項目値と、を条件結果項目として抽出し記憶装置に格納する条件結果項目抽出処理と、
前記仕様情報より、該当仕様内の各実行パスを抽出するに際し、前記仕様情報と前記抽出ルール情報が示す前記開始条件とに基づき、前記流れの中での開始点特定に応じて実行パス抽出を開始し、前記流れの中での前記終了条件に応じて特定した終了点までをひとつの実行パスとして抽出する実行パス抽出処理と、
前記条件結果項目および前記項目値に基づき、各条件項目の項目値の組み合わせとこれに対応する結果項目の項目値のパターンたるルールを生成し、当該各ルールが示す処理内容と前記実行パスとの対応関係を特定して、前記ルールと前記実行パスとの対応関係を示す条件結果対応表を生成し記憶装置に格納する条件結果対応表生成処理と、
前記カバレッジ基準の情報が示す条件に対応したルールないし実行パスを、前記条件結果対応表で検索し、当該検索したルールないし実行パスと前記仕様情報とに基づき、所定の生成アルゴリズムによりテストケースを生成するテストケース生成処理と、を実行する演算装置と、
を備えることを特徴とするテストケース生成装置。
Specification information related to the processing flow in software, coverage information of test cases, and condition items indicating branch conditions in the flow and result items indicating execution contents other than the condition items in the specification information An extraction rule that specifies a notation and extracts the condition item, the result item, and the item value from each notation, and an extraction condition that includes a start condition and an end condition in an execution path within the specification corresponding to the specification information A storage device storing rule information ;
By the extraction rules in the extraction rule information, from the specification information, and the condition item, the result item, the item value can take each of the condition item and the result item, the extracted storage device as a condition result item Condition result item extraction process to store,
When extracting each execution path in the corresponding specification from the specification information, execution path extraction is performed in accordance with the start point specification in the flow based on the specification information and the start condition indicated by the extraction rule information. An execution path extraction process that starts and extracts as one execution path up to the end point specified according to the end condition in the flow ;
Based on the condition result item and the item value, a rule that is a combination of the item value of each condition item and the item value pattern of the corresponding result item is generated, and the processing content indicated by each rule and the execution path A condition result correspondence table generation process for identifying a correspondence relationship, generating a condition result correspondence table indicating the correspondence relationship between the rule and the execution path, and storing the correspondence result correspondence table in a storage device;
A rule or execution path corresponding to the condition indicated by the coverage standard information is searched in the condition result correspondence table, and a test case is generated by a predetermined generation algorithm based on the searched rule or execution path and the specification information. A test case generation process to perform, an arithmetic device to execute,
A test case generation apparatus comprising:
前記記憶装置は、
前記抽出ルール情報として、前記流れの中で関係する前記条件項目及び前記結果項目の間の組み合わせの制約条件を規定した補足ルールを更に格納し、
前記演算装置は、
前記条件結果項目抽出処理において、前記抽出ルール情報における前記抽出ルールおよび前記補足ルールにより、前記条件項目、前記結果項目、及び、前記条件項目及び前記結果項目の各項目値を、前記補足ルールの規定を満たす制限下で抽出し、前記条件結果項目として記憶装置に格納する、
ものであることを特徴とする請求項1に記載のテストケース生成装置。
The storage device
As the extraction rule information, a supplementary rule that defines a constraint condition of a combination between the condition item and the result item related in the flow is further stored,
The arithmetic unit is
In the condition result item extraction process, the condition item, the result item, and each item value of the condition item and the result item are defined in the supplementary rule by the extraction rule and the supplementary rule in the extraction rule information. Is extracted under the restriction that satisfies the above, and is stored in the storage device as the condition result item.
The test case generation device according to claim 1, wherein the test case generation device is a device.
前記記憶装置は、
前記カバレッジ基準の情報として、生成するテストケースが実行パスベースのカバレッジを評価するものか、入出力ベースのカバレッジを評価するものかを示すカバレッジ種別を更に格納しており、
前記演算装置は、
前記テストケース生成処理において、前記カバレッジ基準の情報が示すカバレッジ種別に応じて前記テストケースの生成を実行するものである、
ものであることを特徴とする請求項1に記載のテストケース生成装置。
The storage device
As the coverage standard information, a coverage type indicating whether a test case to be generated evaluates an execution path based coverage or an input / output based coverage is further stored,
The arithmetic unit is
In the test case generation process, the test case is generated according to the coverage type indicated by the information on the coverage criterion.
The test case generation device according to claim 1, wherein the test case generation device is a device.
前記演算装置は、
前記条件結果項目抽出処理において、前記抽出した条件結果項目を表示装置に表示し、前記条件結果項目に関する修正指示を入力装置から受け付けて、前記条件結果項目の修正処理を行う条件結果項目処理を更に実行するものである、
ことを特徴とする請求項1に記載のテストケース生成装置。
The arithmetic unit is
In the condition result item extraction process, a condition result item process is further performed in which the extracted condition result item is displayed on a display device, a correction instruction related to the condition result item is received from the input device, and the condition result item is corrected. What to do,
The test case generation device according to claim 1.
前記演算装置は、
前記条件結果項目処理において、入力装置で受け付ける修正指示として、前記流れの中で関係する前記条件項目及び前記結果項目の間の組み合わせの制約条件を規定した補足ルールを受け付けるものである、
ことを特徴とする請求項4に記載のテストケース生成装置。
The arithmetic unit is
In the condition result item process , as a correction instruction received by the input device, a supplementary rule that defines a constraint condition of a combination between the condition item and the result item related in the flow is received.
The test case generation apparatus according to claim 4.
ソフトウェアにおける処理の流れに関わる仕様情報と、テストケースのカバレッジ基準の情報と、前記仕様情報のうち、前記流れでの分岐条件を示す条件項目及び前記条件項目以外の実行内容を示す結果項目の各表記を特定し、前記各表記から前記条件項目及び前記結果項目とその項目値とを抽出する抽出ルールと、前記仕様情報に対応する仕様内の実行パスにおける開始条件及び終了条件と、を含む抽出ルール情報と、を格納した記憶装置を備えるコンピュータが、
前記抽出ルール情報における前記抽出ルールにより、前記仕様情報より、前記条件項目と、前記結果項目と、前記条件項目および前記結果項目のそれぞれ取りうる項目値と、を条件結果項目として抽出し記憶装置に格納する条件結果項目抽出処理と、
前記仕様情報より、該当仕様内の各実行パスを抽出するに際し、前記仕様情報と前記抽出ルール情報が示す前記開始条件とに基づき、前記流れの中での開始点特定に応じて実行パス抽出を開始し、前記流れの中での前記終了条件に応じて特定した終了点までをひとつの実行パスとして抽出する実行パス抽出処理と、
前記条件結果項目および前記項目値に基づき、各条件項目の項目値の組み合わせとこれに対応する結果項目の項目値のパターンたるルールを生成し、当該各ルールが示す処理内容と前記実行パスとの対応関係を特定して、前記ルールと前記実行パスとの対応関係を示す条件結果対応表を生成し記憶装置に格納する条件結果対応表生成処理と、
前記カバレッジ基準の情報が示す条件に対応したルールないし実行パスを、前記条件結果対応表で検索し、当該検索したルールないし実行パスと前記仕様情報とに基づき、所定の生成アルゴリズムによりテストケースを生成するテストケース生成処理と、
を実行することを特徴とするテストケース生成方法。
Specification information related to the processing flow in software, coverage information of test cases, and condition items indicating branch conditions in the flow and result items indicating execution contents other than the condition items in the specification information An extraction rule that specifies a notation and extracts the condition item, the result item, and the item value from each notation, and an extraction condition that includes a start condition and an end condition in an execution path within the specification corresponding to the specification information A computer comprising a storage device storing rule information ;
By the extraction rules in the extraction rule information, from the specification information, and the condition item, the result item, the item value can take each of the condition item and the result item, the extracted storage device as a condition result item Condition result item extraction process to store,
When extracting each execution path in the corresponding specification from the specification information, execution path extraction is performed in accordance with the start point specification in the flow based on the specification information and the start condition indicated by the extraction rule information. An execution path extraction process that starts and extracts as one execution path up to the end point specified according to the end condition in the flow ;
Based on the condition result item and the item value, a rule that is a combination of the item value of each condition item and the item value pattern of the corresponding result item is generated, and the processing content indicated by each rule and the execution path A condition result correspondence table generation process for identifying a correspondence relationship, generating a condition result correspondence table indicating the correspondence relationship between the rule and the execution path, and storing the correspondence result correspondence table in a storage device;
A rule or execution path corresponding to the condition indicated by the coverage standard information is searched in the condition result correspondence table, and a test case is generated by a predetermined generation algorithm based on the searched rule or execution path and the specification information. Test case generation process to
A test case generation method characterized by executing
JP2014084670A 2014-04-16 2014-04-16 Test case generation apparatus and test case generation method Active JP6268029B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014084670A JP6268029B2 (en) 2014-04-16 2014-04-16 Test case generation apparatus and test case generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014084670A JP6268029B2 (en) 2014-04-16 2014-04-16 Test case generation apparatus and test case generation method

Publications (2)

Publication Number Publication Date
JP2015204065A JP2015204065A (en) 2015-11-16
JP6268029B2 true JP6268029B2 (en) 2018-01-24

Family

ID=54597474

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014084670A Active JP6268029B2 (en) 2014-04-16 2014-04-16 Test case generation apparatus and test case generation method

Country Status (1)

Country Link
JP (1) JP6268029B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112016006297T5 (en) * 2016-02-24 2018-10-31 Mitsubishi Electric Corporation Test case generator and test case generator
CN105955890B (en) * 2016-05-13 2018-10-19 中国建设银行股份有限公司 A kind of generation method and device of functional test case
JP6692281B2 (en) * 2016-12-02 2020-05-13 株式会社日立製作所 Test case generation device and test case generation method
CN108388504A (en) * 2017-02-03 2018-08-10 北京嘀嘀无限科技发展有限公司 A kind of test method and device
JP7219389B2 (en) * 2018-05-07 2023-02-08 キヤノンマーケティングジャパン株式会社 Information processing device, its control method and program
CN110990295B (en) * 2019-12-19 2023-10-31 卡斯柯信号(北京)有限公司 Verification method and device for test cases and electronic equipment
JP7072697B1 (en) 2021-03-12 2022-05-20 三菱電機株式会社 Electronic control device, test device for electronic control device, and test method for electronic control device
CN113448869B (en) * 2021-07-16 2022-12-13 中国建设银行股份有限公司 Method and device for generating test case, electronic equipment and computer readable medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050144529A1 (en) * 2003-10-01 2005-06-30 Helmut Gotz Method for defined derivation of software tests from use cases
JP2008293382A (en) * 2007-05-25 2008-12-04 Fuji Electric Holdings Co Ltd Automatic test specification generation system
JP5164919B2 (en) * 2009-05-13 2013-03-21 日本電信電話株式会社 Test data generation method, apparatus and program
JP5743663B2 (en) * 2011-04-13 2015-07-01 日本電気通信システム株式会社 Test support system, test support method, and program
JP2013161182A (en) * 2012-02-02 2013-08-19 Ntt Data Corp Test item generation device and test item generation method

Also Published As

Publication number Publication date
JP2015204065A (en) 2015-11-16

Similar Documents

Publication Publication Date Title
JP6268029B2 (en) Test case generation apparatus and test case generation method
US8589884B2 (en) Method and system for identifying regression test cases for a software
CN103092742B (en) Program log recording optimization method and system
US7774404B2 (en) Managing software component versions within a service oriented architecture
US20110321007A1 (en) Targeting code sections for correcting computer program product defects using records of a defect tracking system
US20140280833A1 (en) System and method for efficiently managing network changes
US9639454B2 (en) Computer-readable recording medium storing therein test data generating program, test data generating method, test data generating apparatus and information processing system
JP2015011372A (en) Debug support system, method, program, and recording medium
US9582270B2 (en) Effective feature location in large legacy systems
US20100077382A1 (en) Computer-readable recording medium string a bug detection support program, similar structure identification information list output program, bug detection support apparatus, and bug detection support method
JP6451417B2 (en) Debug support device, debug support system, debug support method, and debug support program
CN109410077B (en) Method and device for defining rule flow, computer storage medium and electronic equipment
JP2016128941A (en) Output determination device, output determination method, output determination program, and static analysis device
US8479152B2 (en) Representing non-functional requirements (NFRS) in unified modeling language (UML)
WO2017204139A1 (en) Data processing apparatus, data processing method, and program recording medium
JP6097231B2 (en) Program generating apparatus and method
JP5755861B2 (en) Test case generation apparatus, test case generation method, and test case generation program
US10180882B2 (en) Information-processing device, processing method, and recording medium in which program is recorded
JP5516277B2 (en) Test case relation extraction method, test case relation extraction device, and test case relation extraction program
US11726792B1 (en) Methods and apparatus for automatically transforming software process recordings into dynamic automation scripts
WO2022118627A1 (en) Calculator and method for selecting correction location of software
JP5556480B2 (en) Context Violation Detection Support Method, Context Violation Detection Support Device, and Context Violation Detection Support Program
Vasilache Specification-based test case generation using dependency diagrams
JP2018121245A (en) Communication apparatus, communication specification difference extraction method, and communication specification difference extraction program
JP2009048403A (en) System failure recovery device, command generation method therefor, and program thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161209

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171004

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171017

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171115

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

R150 Certificate of patent or registration of utility model

Ref document number: 6268029

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150