JP4580670B2 - Test case generation method and test case generation apparatus - Google Patents
Test case generation method and test case generation apparatus Download PDFInfo
- Publication number
- JP4580670B2 JP4580670B2 JP2004094771A JP2004094771A JP4580670B2 JP 4580670 B2 JP4580670 B2 JP 4580670B2 JP 2004094771 A JP2004094771 A JP 2004094771A JP 2004094771 A JP2004094771 A JP 2004094771A JP 4580670 B2 JP4580670 B2 JP 4580670B2
- Authority
- JP
- Japan
- Prior art keywords
- factor
- equivalence
- values
- factors
- independent
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Description
本発明は、コンピュータプログラムが所望の処理を実行するか否かを判定するためのテストに用いられるテストケースを効率良く生成することができるテストケース生成方法、その方法を実施するためのテストケース生成装置、及びその方法をコンピュータに実施させるためのコンピュータプログラムに関する。 The present invention relates to a test case generation method capable of efficiently generating a test case used for a test for determining whether or not a computer program executes a desired process, and a test case generation for implementing the method. The present invention relates to an apparatus and a computer program for causing a computer to execute the method.
コンピュータプログラムの品質を検証するために、当該コンピュータプログラムが所望の処理を実行することができるか否かを判定するためのテストが行われる。信頼性の高いテストを行うためには、検証対象項目を漏れなくカバーした適切なテストケースを作成しなければならない。しかし、時間及び費用の都合上、実施することができるテストケースの数は限られてくる。そこで、いかにして少ないテストケースで検証対象項目を漏れなくカバーできるのかが問題となる。 In order to verify the quality of the computer program, a test is performed to determine whether or not the computer program can execute a desired process. In order to perform a highly reliable test, it is necessary to create an appropriate test case that covers the items to be verified without omission. However, due to time and cost constraints, the number of test cases that can be performed is limited. Therefore, how to cover the verification target items without omission with a small number of test cases becomes a problem.
非特許文献1では、テストケースの数を合理的に減少させる方法として、以下の3つのものが提案されている。
Non-Patent
第一の手法は「同値分割法」である。同値分割法とは、「入力データを1つ1つ識別する代わりに同じ特性を持った部分集合としてとらえ、その部分集合に対して一つのテストを行う方法」をいう。ここで、上述したような部分集合を「同値」と呼び、コンピュータプログラムへの入力データ項目(以下、ファクターと言う)を同値に分けることを「同値分割」と呼ぶ。 The first method is the “equivalence division method”. The equivalence division method means “a method of treating input data as a subset having the same characteristics instead of identifying each piece of input data and performing one test on the subset”. Here, a subset as described above is referred to as “equivalence”, and dividing an input data item (hereinafter referred to as a factor) into a computer program into equivalent values is referred to as “equivalence division”.
この同値分割法では、コンピュータプログラムの仕様に基づいて、ファクターの値の無限の組合せが、有効な同値(コンピュータプログラムの仕様により正しい入力範囲として定義された部分集合)と無効な同値(有効な同値以外の部分集合であって、コンピュータプログラムの仕様により正しくない入力範囲として定義されたもの)とに集約される。そして、この同値のうちの特定の一つの入力に対してコンピュータプログラムが正しく動作した場合、その同値内の他の入力に対しても同様に正しく動作することが確認されたものとする。これにより、すべての入力データそれぞれについてコンピュータプログラムが正しく動作するか否かを確認する場合と比べて、少ないテストケースとすることができる。 In this equivalence partitioning method, an infinite combination of factor values is based on the computer program specification, and the equivalent equivalence (subset defined as the correct input range by the computer program specification) and invalid equivalence (valid equivalence). And a subset that is defined as an incorrect input range according to computer program specifications). Then, it is assumed that when the computer program correctly operates with respect to one specific input among the same values, it is confirmed that the computer program operates correctly with respect to other inputs within the same value. As a result, the number of test cases can be reduced as compared with the case of confirming whether the computer program operates correctly for all input data.
また、第二の手法は「原因結果グラフ技法」である。原因結果グラフ技法とは、「テスト項目の設計において入力間の組合せを合理的に減少させ、かつテストの網羅性を維持する技法」をいう。より具体的には、同値分割を行った後に、コンピュータプログラムの各出力と論理的な関係を共有する入力同値のセットを求め、その入力同値(原因)と出力(結果)との関係をブール代数により表現して原因結果グラフを求める。そして、その原因結果グラフを表形式に表したデシジョンテーブルを作成し、そのデシジョンテーブルに基づいてテストケースを得る。このようにデシジョンテーブルにテスト項目をまとめることによりテスト項目間の重複を容易に確認することができるため、テストケースの数を抑制することができる。 The second method is a “causal result graph technique”. The causal result graph technique refers to “a technique for rationally reducing combinations between inputs and maintaining test completeness in test item design”. More specifically, after equivalence partitioning, a set of input equivalence that shares a logical relationship with each output of the computer program is obtained, and the relationship between the input equivalence (cause) and output (result) is expressed as a Boolean algebra. To obtain a cause-and-effect graph. Then, a decision table in which the cause / result graph is represented in a table format is created, and a test case is obtained based on the decision table. Since the test items are grouped in the decision table in this way, it is possible to easily confirm the overlap between the test items, and thus it is possible to suppress the number of test cases.
さらに、第三の手法は「CFD(Case Flow Diagram:原因流れ図)技法」である。このCFD技法は、前述した原因結果グラフ技法を改良したものであり、同値分割についても図式で表現することにより、同値間の関係をより正確に表現することができる方法である。このようにして表現された同値間の関係に基づいて必要なテストケースを抽出する。ここで、CFD技法の場合、原因結果グラフ技法の場合と異なり、同値間の相互依存のテストをテストケースに含めない。これにより、原因結果グラフ技法と比べて、テストケースの数をより少なくすることができる。
ところで、ファクターは次の2種類のものに分けることがある。一つは単独で処理フローに影響を与える、すなわち処理フローの分岐点となるファクター(以下、独立系ファクターという)で、もう一つは複数で処理フローの分岐点となるファクター(依存系ファクターという)である。以下、独立系ファクターとその他のファクターとの間の関係を独立関係と呼び、依存系ファクター間の関係を依存関係と呼ぶことにする。 By the way, factors may be divided into the following two types. One is a factor that affects the processing flow by itself, that is, a factor that becomes a branch point of the processing flow (hereinafter referred to as an independent factor), and the other is a factor that is a branch point of the processing flow (referred to as a dependent factor). ). Hereinafter, the relationship between independent factors and other factors is referred to as an independent relationship, and the relationship between dependent factors is referred to as a dependency relationship.
前述したとおり、CFD技法の場合、同値間の相互依存のテストをテストケースに含めていない。これは、すべてのファクター間には独立関係が成立していることを前提としているためである。したがって、CFD技法の場合、ファクター間に依存関係が成立している場合については考慮していない。しかしながら、通常の場合では依存関係が成立している依存系ファクターが存在していることがほとんどであり、その依存系ファクターを独立系ファクターとして処理した場合、検証すべき同値の組合せを見落とすおそれがある。そのため、CFD技法を用いてテストケースを生成すると、テストケースの数を抑制することができる一方で、必要なテストケースが欠落するという問題があった。 As described above, in the case of the CFD technique, a test for interdependence between equivalences is not included in the test case. This is because it is assumed that all factors are independent. Therefore, in the case of the CFD technique, no consideration is given to a case where a dependency relationship is established between factors. However, in the normal case, there are mostly dependent factors that have a dependency relationship, and when the dependent factors are processed as independent factors, there is a risk of overlooking combinations of equivalent values to be verified. is there. Therefore, when the test cases are generated using the CFD technique, the number of test cases can be suppressed, but there is a problem that necessary test cases are lost.
また、すべてのファクターが独立系ファクターである、またはすべてのファクターが依存系ファクターであるということは極めて稀であり、通常では、独立系ファクターと依存系ファクターとが混在している。しかしながら、この点を考慮したテストケース生成方法はこれまで提案されておらず、その結果必要なテストケースを効率良く生成することができないという問題があった。 Also, it is extremely rare that all factors are independent factors, or all factors are dependent factors, and usually, independent factors and dependent factors are mixed. However, a test case generation method considering this point has not been proposed so far, and as a result, a necessary test case cannot be generated efficiently.
本発明は斯かる事情に鑑みてなされたものであり、その目的は、ファクター間の独立関係及び依存関係の双方に対応したテストケースを生成することにより、必要なテストケースを効率良く生成することができるテストケース生成方法、その方法を実施するためのテストケース生成装置、及びその方法をコンピュータに実施させるためのコンピュータプログラムを提供することにある。 The present invention has been made in view of such circumstances, and an object of the present invention is to efficiently generate necessary test cases by generating test cases corresponding to both independent relationships and dependency relationships between factors. The present invention provides a test case generation method capable of performing the method, a test case generation device for executing the method, and a computer program for causing a computer to execute the method.
上記課題を解決するために、本発明のテストケース生成方法は、コンピュータプログラムの入力データ項目であるファクターがとり得る入力データのうち、一の特性を有している入力データである同値集合内の値と、他の特性を有している同値集合内の値との組合せに基づいて、前記ファクターを複数有するコンピュータプログラムをテストするためのテストケースを、入力手段、演算手段及び記憶手段を備えるコンピュータが生成するテストケース生成方法において、前記入力手段によって入力された、処理フローの分岐点において他のファクターと組み合わされることなく単独で分岐条件を構成するファクターである独立系ファクターの同値集合内のすべての値を含む独立系ファクター情報と、処理フローの分岐点において他のファクターと組み合わされることによって分岐条件を構成するファクターである依存系ファクターの同値集合内のすべての値及び同一の分岐点において互いに組み合わされて分岐条件を構成する依存系ファクターのグループを示すグループ情報を含む依存系ファクター情報とを前記記憶手段に記憶するステップと、前記演算手段が、前記記憶手段に記憶された依存系ファクター情報に含まれる前記依存系ファクターの同値集合内のすべての値及びグループ情報を参照し、グループ毎に依存系ファクターの同値集合内の値の網羅的な組合せを生成するステップと、前記演算手段が、グループ毎に生成された依存系ファクターの同値集合内の値の組合せから、CFD技法を用いて、依存系ファクターの同値集合内の値の組合せを生成するステップと、前記演算手段が、前記記憶手段に記憶された独立系ファクター情報を参照し、独立系ファクターの同値集合内の値の組合せを生成するステップと、前記演算手段が、生成された依存系ファクターの同値集合内の値の組合せを含むテストケースと、生成された独立系ファクターの同値集合内の値の組合せを含むテストケースとを生成するステップとを有する。 In order to solve the above-described problem, the test case generation method of the present invention includes an equivalence set that is input data having one characteristic among input data that can be taken by a factor that is an input data item of a computer program . A computer having a test case for testing a computer program having a plurality of the factors based on a combination of a value and a value in an equivalence set having other characteristics , an input unit, a calculation unit, and a storage unit In the test case generation method generated by, all of the equivalence sets of independent factors that are input by the input means and that constitute a branch condition independently without being combined with other factors at the branch point of the processing flow Independent factor information including the value of and other factors at the branch point of the processing flow Includes group information indicating all values in the equivalence set of dependent factors that are the factors constituting a branch condition by being combined with each other and a group of dependent factors that are combined with each other at the same branch point to constitute a branch condition Storing dependent system factor information in the storage means; and the computing means includes all values and group information in an equivalence set of the dependent system factors included in the dependent system factor information stored in the storage means. The step of generating an exhaustive combination of values in the equivalence set of dependent factors for each group, and the computing means from the combination of values in the equivalence set of dependent factors generated for each group, Generating a combination of values in an equivalence set of dependent factors using CFD techniques; A calculating unit that refers to the independent factor information stored in the storage unit to generate a combination of values in the equivalence set of the independent factor; and the arithmetic unit includes an equivalence set of the generated dependent factor Generating a test case including a combination of values in the test and a test case including a combination of values in the generated equivalence set of independent factors.
前記発明に係るテストケース生成方法の前記独立系ファクターの同値集合内の値の組合せを生成するステップにおいて、前記演算手段が、CFD技法を用いて、独立系ファクターの同値集合内の値の組合せを生成するようにしてもよい。 In the step of generating a combination of values in the equivalence set of independent factors in the test case generation method according to the invention, the arithmetic means uses the CFD technique to calculate a combination of values in the equivalence set of independent factors. You may make it produce | generate.
また、前記発明に係るテストケース生成方法において、前記演算手段が、ファクターの同値集合内の値を少なくとも含むファクター情報を格納するファクター情報データベースから所定のファクター情報を検索するステップと、 前記演算手段が、検索されたファクター情報と、前記記憶された独立系ファクター情報及び/又は依存系ファクター情報とを比較するステップと、前記演算手段が、比較した結果に基づいて、前記検索されたファクター情報の同値集合内の値と前記取得された独立系ファクター情報及び/又は依存系ファクター情報の同値集合内の値とが異なるか否かを判定するステップと、異なると判定された場合、前記コンピュータが備える出力手段が、異なる同値集合内の値に関する同値アンマッチ情報を出力するステップとをさらに有していてもよい。 Further, in the test case generation method according to the invention, the calculation means retrieves predetermined factor information from a factor information database storing factor information including at least a value in the equivalence set of factors, and the calculation means A step of comparing the retrieved factor information with the stored independent factor information and / or dependent factor information; and the computing means is based on the result of the comparison and is equivalent to the retrieved factor information. A step of determining whether a value in the set is different from a value in the equivalence set of the acquired independent factor information and / or dependency factor information, and an output of the computer if it is determined to be different Means for outputting equivalence unmatch information for values in different equivalence sets It may further have.
また、前記発明に係るテストケース生成方法において、ファクターが特定の値をとった場合にその時点で処理フローが終了するように前記コンピュータプログラムが記述されており、前記記憶された依存系ファクター情報及び前記記憶された独立系ファクター情報には、ファクターの同値集合内の値が前記特定の値であるか否かを示す情報が含まれており、前記依存系ファクターの同値集合内の値の組合せを生成するステップ及び前記独立系ファクターの同値集合内の値の組合せを生成するステップにおいて、前記演算手段が、前記特定の値を含む同値集合内の値の組合せを生成し、前記テストケースを生成するステップにおいて、前記演算手段が、前記特定の値を含む同値集合内の値の組合せを用いて生成されたテストケースであるか否かを示す情報を付加したテストケースを生成するようにしてもよい。 Further, in the test case generation method according to the invention, when the factor takes a specific value, the computer program is described so that the processing flow ends at that time, and the stored dependent factor information and The stored independent factor information includes information indicating whether or not a value in the equivalence set of the factor is the specific value, and a combination of the values in the equivalence set of the dependent factor. In the step of generating and the step of generating a combination of values in the equivalence set of independent factors, the computing means generates a combination of values in the equivalence set including the specific value, and generates the test case. Whether the calculation means is a test case generated using a combination of values in the equivalence set including the specific value in the step It may generate test cases that adds information indicating.
本発明のテストケース生成装置は、コンピュータプログラムの入力データ項目であるファクターがとり得る入力データのうち、一の特性を有している入力データである同値集合内の値と、他の特性を有している同値集合内の値との値の組合せに基づいて、前記ファクターを複数有するコンピュータプログラムをテストするためのテストケースを生成するように構成されているテストケース生成装置において、処理フローの分岐点において他のファクターと組み合わされることなく単独で分岐条件を構成するファクターである独立系ファクターの同値集合内のすべての値を含む独立系ファクター情報と、処理フローの分岐点において他のファクターと組み合わされることによって分岐条件を構成するファクターである依存系ファクターの同値集合内のすべての値及び同一の分岐点において互いに組み合わされて分岐条件を構成する依存系ファクターのグループを示すグループ情報を含む依存系ファクター情報とを入力する入力手段と、前記入力手段によって入力された前記独立系ファクター情報及び前記依存系ファクター情報を記憶する記憶手段と、前記記憶手段によって記憶された依存系ファクター情報に含まれる前記依存系ファクターのすべての同値集合内の値及びグループ情報を参照し、グループ毎に依存系ファクターの同値集合内の値の網羅的な組合せを生成し、さらにグループ毎に生成された依存系ファクターの同値集合内の値の組合せから、CFD技法を用いて、依存系ファクターの同値集合内の値の組合せを生成する依存系ファクター同値組合せ生成手段と、前記記憶手段によって記憶された独立系ファクター情報を参照し、独立系ファクターの同値集合内の値の組合せを生成する独立系ファクター同値組合せ生成手段と、前記依存系ファクター同値組合せ生成手段によって生成された依存系ファクターの同値集合内の値の組合せを含むテストケースと、前記独立系ファクター同値組合せ生成手段によって生成された独立系ファクターの同値集合内の値の組合せを含むテストケースとを生成するテストケース生成手段とを備える。 The test case generation device of the present invention has values in an equivalence set that is input data having one characteristic among input data that can be taken by a factor that is an input data item of a computer program, and other characteristics. In a test case generation device configured to generate a test case for testing a computer program having a plurality of the factors based on a combination of values with values in the equivalence set being processed, a branch of the processing flow Independent factor information including all values in the equivalence set of independent factors, which are the factors that independently constitute a branch condition without being combined with other factors at the point, and combined with other factors at the branch point of the processing flow Collection of equivalences of dependent factors, which are factors that constitute branching conditions Input means for inputting dependency factor information including group information indicating a group of dependency factors that are combined with each other at the same branch point and constituting a branch condition, and input by the input means Reference is made to storage means for storing the independent system factor information and the dependent system factor information, and values and group information in all equivalence sets of the dependent system factors included in the dependent system factor information stored by the storage means. Generating an exhaustive combination of values in the equivalence set of dependent factors for each group, and further using the CFD technique from the combination of values in the equivalence set of dependent factors generated for each group Dependency factor equivalence combination generating means for generating a combination of values in an equivalence set of factors, and the storage An independent factor equivalence combination generating means for generating a combination of values in an equivalence set of independent factors with reference to the independent factor information stored by the stage, and a dependent system generated by the dependent factor equivalent equivalence combination generating means Test case generation means for generating a test case including a combination of values in an equivalence set of factors and a test case including a combination of values in an equivalence set of independent factors generated by the independent factor equivalence combination generation means With.
前記発明のテストケース生成装置において、前記独立系ファクター同値組合せ生成手段は、CFD技法を用いて、独立系ファクターの同値集合内の値の組合せを生成するように構成されていてもよい。 In the test case generation apparatus according to the invention, the independent factor equivalence combination generating unit may be configured to generate a combination of values in an equivalence set of independent factors using a CFD technique.
また、前記発明に係るテストケース生成装置が、ファクターの同値集合内の値を少なくとも含むファクター情報を格納するファクター情報データベースと、前記ファクター情報データベースから所定のファクター情報を検索するファクター情報検索手段と、当該ファクター情報検索手段によって検索されたファクター情報と、前記記憶手段によって記憶された独立系ファクター情報及び/又は依存系ファクター情報とを比較するファクター情報比較手段と、当該ファクター情報比較手段による比較の結果に基づいて、前記検索されたファクター情報の同値集合内の値と前記記憶された独立系ファクター情報及び/又は依存系ファクター情報の同値集合内の値とが異なるか否かを判定する判定手段と、当該判定手段によって異なると判定された場合、異なる同値集合内の値に関する同値アンマッチ情報を出力する出力手段とをさらに備えてもよい。 In addition, the test case generation device according to the invention includes a factor information database that stores factor information including at least values in an equivalence set of factors, and factor information search means that searches for predetermined factor information from the factor information database, Factor information comparing means for comparing the factor information searched by the factor information searching means with the independent factor information and / or dependent factor information stored by the storage means, and the result of comparison by the factor information comparing means Determining means for determining whether a value in the equivalence set of the retrieved factor information is different from a value in the equivalence set of the stored independent factor information and / or dependency factor information based on , Determined to be different depending on the determination means If it may further comprise an output means for outputting the equivalence unmatch information about different values of equivalence in the set.
また、前記発明に係るテストケース生成装置において、ファクターが特定の値をとった場合にその時点で処理フローが終了するように前記コンピュータプログラムが記述されており、前記記憶された依存系ファクター情報及び前記記憶された独立系ファクター情報には、ファクターの同値集合内の値が前記特定の値であるか否かを示す情報が含まれており、前記依存系ファクター同値組合せ生成手段及び前記独立系ファクター同値組合せ生成手段は、前記特定の値を含む同値集合内の値の組合せを生成するように構成され、前記テストケース生成手段は、前記特定の値を含む同値集合内の値の組合せを用いて生成されたテストケースであるか否かを示す情報を付加したテストケースを生成するように構成されていてもよい。 Further, in the test case generation device according to the invention, when the factor takes a specific value, the computer program is described so that the processing flow ends at that time, and the stored dependent factor information and The stored independent factor information includes information indicating whether or not a value in the equivalence set of factors is the specific value, and the dependent factor equivalence combination generating unit and the independent factor The equivalence combination generation means is configured to generate a combination of values in the equivalence set including the specific value, and the test case generation means uses the combination of values in the equivalence set including the specific value. It may be configured to generate a test case to which information indicating whether the test case is generated is added.
また、本発明に係るコンピュータプログラムは、入力手段、演算手段及び記憶手段を備えるコンピュータに、テスト対象コンピュータプログラムの入力データ項目であるファクターがとり得る入力データのうち、一の特性を有している入力データである同値集合内の値と、他の特性を有している同値集合内の値との組合せに基づいて、前記ファクターを複数有するテスト対象コンピュータプログラムをテストするためのテストケースを生成させるためのコンピュータプログラムにおいて、前記記憶手段に、前記入力手段によって入力された、処理フローの分岐点において他のファクターと組み合わされることなく単独で分岐条件を構成するファクターである独立系ファクターの同値集合内のすべての値を含む独立系ファクター情報と、処理フローの分岐点において他のファクターと組み合わされることによって分岐条件を構成するファクターである依存系ファクターの同値集合内のすべての値及び同一の分岐点において互いに組み合わされて分岐条件を構成する依存系ファクターのグループを示すグループ情報を含む依存系ファクター情報とを記憶させる手順と、前記演算手段に、前記記憶手段に記憶された依存系ファクター情報に含まれる前記依存系ファクターの同値集合内のすべての値及びグループ情報を参照させ、グループ毎に依存系ファクターの同値集合内の値の網羅的な組合せを生成させる手順と、前記演算手段に、グループ毎に生成された依存系ファクターの同値集合内の値の組合せから、CFD技法を用いて、依存系ファクターの同値集合内の値の組合せを生成させる手順と、前記演算手段に、前記記憶手段に記憶された独立系ファクター情報を参照させ、独立系ファクターの同値集合内の値の組合せを生成させる手順と、前記演算手段に、生成された依存系ファクターの同値集合内の値の組合せを含むテストケースと、生成された独立系ファクターの同値集合内の値の組合せを含むテストケースとを生成させる手順とを実行させるためのものである。 The computer program according to the present invention has one characteristic among the input data that can be taken by the factor that is the input data item of the test target computer program in the computer including the input unit, the calculation unit, and the storage unit . Based on a combination of values in the equivalence set as input data and values in the equivalence set having other characteristics, a test case for testing the test target computer program having a plurality of the factors is generated. In an equivalence set of independent factors that are input to the storage means by the input means and that constitute a branch condition independently without being combined with other factors at the branch point of the processing flow. Independent factor information including all values of All the values in the equivalence set of the dependent system factors that constitute the branch condition by being combined with other factors at the bifurcation point, and the dependent system factors that are combined with each other at the same branch point to construct the branch condition And storing all the values in the equivalence set of the dependent factors included in the dependent factor information stored in the storage means in the calculating means. And a procedure for referring to group information and generating an exhaustive combination of values in the equivalence set of dependent factors for each group, and a value in the equivalence set of dependent factors generated for each group in the computing means. A combination of values in an equivalence set of dependent factors using CFD techniques A procedure, a procedure for causing the calculation means to refer to the independent factor information stored in the storage means, and generating a combination of values in an equivalence set of independent factors, and a dependency system generated by the calculation means This is for causing a test case including a combination of values in the equivalence set of factors and a procedure for generating a test case including a combination of values in the generated equivalence set of independent factors.
前記発明に係るコンピュータプログラムの前記独立系ファクターの同値集合内の値の組合せを生成させる手順において、前記演算手段に、CFD技法を用いて、独立系ファクターの同値集合内の値の組合せを生成させるようにしてもよい。 In the procedure for generating a combination of values in the equivalence set of independent factors of the computer program according to the invention, the computing means is caused to generate a combination of values in the equivalence set of independent factors using the CFD technique. You may do it.
また、前記発明に係るコンピュータプログラムにおいて、前記演算手段に、ファクターの同値集合内の値を少なくとも含むファクター情報を格納するファクター情報データベースから所定のファクター情報を検索させる手順と、検索されたファクター情報と、前記取得された独立系ファクター情報及び/又は依存系ファクター情報とを比較させる手順と、比較の結果に基づいて、前記検索されたファクター情報の同値集合内の値と前記取得された独立系ファクター情報及び/又は依存系ファクター情報の同値集合内の値とが異なるか否かを判定させる手順とをさらに実行させ、異なると判定された場合、前記コンピュータが備える出力手段に、異なる同値集合内の値に関する同値アンマッチ情報を出力させる手順を実行させるようにしてもよい。 Further, in the computer program according to the invention, a procedure for causing the computing means to search for predetermined factor information from a factor information database storing factor information including at least values in the equivalence set of factors, and the searched factor information A procedure for comparing the acquired independent factor information and / or dependent factor information, and a value in an equivalence set of the retrieved factor information based on the comparison result and the acquired independent factor And a procedure for determining whether or not the values in the equivalence set of the information and / or the dependency system factor information are different from each other, and when it is determined that the values are different, the output means included in the computer includes You may be allowed to execute a procedure to output equivalence unmatch information about values .
また、前記発明に係るコンピュータプログラムにおいて、ファクターが特定の値をとった場合にその時点で処理フローが終了するように前記コンピュータプログラムが記述されており、前記記憶された依存系ファクター情報及び前記記憶された独立系ファクター情報には、ファクターの同値集合内の値が前記特定の値であるか否かを示す情報が含まれており、 前記依存系ファクターの同値集合内の値の組合せを生成する手順及び前記独立系ファクターの同値集合内の値の組合せを生成する手順において、前記演算手段に、前記特定の値を含む同値集合内の値の組合せを生成させ、前記テストケースを生成する手順において、前記演算手段に、前記特定の値を含む同値集合内の値の組合せを用いて生成されたテストケースであるか否かを示す情報を付加したテストケースを生成させるようにしてもよい。 In the computer program according to the invention, when the factor takes a specific value, the computer program is described so that the processing flow ends at that time, and the stored dependent factor information and the storage The independent factor information includes information indicating whether or not the value in the equivalence set of the factor is the specific value, and generates a combination of values in the equivalence set of the dependent factor In a procedure and a procedure for generating a combination of values in an equivalence set of independent factors, the operation means generates a combination of values in an equivalence set including the specific value, and a procedure for generating the test case , Indicating to the arithmetic means whether or not the test case is generated using a combination of values in the equivalence set including the specific value It may be caused to generate test cases by adding a multi-address.
本発明のテストケース生成方法、その方法を実施するためのテストケース生成装置、及びその方法をコンピュータに実施させるためのコンピュータプログラムは、信頼性の高いコンピュータプログラムのテストを行うために必要なテストケースを生成することができ、しかもそのテストケースの数を抑制することができる。 A test case generation method of the present invention, a test case generation apparatus for executing the method, and a computer program for causing a computer to execute the method are test cases necessary for testing a highly reliable computer program And the number of test cases can be suppressed.
以下、本発明の実施の形態について図面を参照しながら詳述する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
(実施の形態1)
図1は、本発明の実施の形態1に係るテストケース生成装置の構成を示すブロック図である。図1に示すように、テストケース生成装置はCPU10を備えており、CPU10はバスを介して後述する各ハードウェアと接続されている。そして、CPU10は、それらのハードウェアの動作を制御するとともに、メモリ12にロードされるコンピュータプログラムを実行する。これにより、テストケース生成装置は、後述するような処理を実行することができる。
(Embodiment 1)
FIG. 1 is a block diagram showing a configuration of a test case generation apparatus according to
メモリ12は、例えばDRAM又はSRAM等で構成され、コンピュータプログラムの実行時において発生する一時的なデータ等を記憶する。
The
表示部14は、CRT又は液晶ディスプレイ等で構成され、後述するようにして生成されるテストケースを示したファイル等を出力する。また、入力部16は、キーボード及びマウス等で構成され、テストケース生成装置に対してユーザが各種の指示等をする場合に用いられる。
The
外部記憶装置20は、例えばCD−ROMドライブ又はフレキシブルディスクドライブ等で構成され、本発明のコンピュータプログラム(テストケース生成プログラム30)が記録されているCD−ROM又はフレキシブルディスク等の可搬型記録媒体22からテストケース生成プログラム30を読み取る。
The
なお、テストケース生成装置は、前述したようにして外部記憶装置20が可搬型記録媒体22から読み取る以外の方法によって本発明のテストケース生成プログラム30を取得することができる。例えば、インターネット等の通信ネットワークに接続されているデータベース(図示せず)がテストケース生成プログラム30を記憶しているような場合であれば、このデータベースからダウンロードすることによってテストケース生成装置がテストケース生成プログラム30を取得することができる。
Note that the test case generation apparatus can acquire the test
ハードディスク18は、読み書き可能な磁気ディスク等で構成され、テストケース生成装置の動作に必要なコンピュータプログラムであるテストケース生成プログラム30及びOS(オペレーティングシステム)32、並びに各種のデータ等を記憶している。
The
なお、このハードディスク18には、ファクターDB34及びコードDB36が格納されている。ファクターDB34には、テスト対象となるコンピュータプログラムの入力データ項目であるファクターに関するファクター情報が格納されている。このファクター情報には、例えばファクターの名称、ファクターの同値、ファクターがコード型であるか(ファクターの同値がコード値であるか)又は論理型であるか(ファクターの同値が真偽の何れかの論理値であるか)を示すデータ等が含まれている。一方、コードDB36には、コード型のファクターがとりうるコード値を示すコード値情報が格納されている。
The
次に、以上のように構成されたテストケース生成装置の動作について説明する。 Next, the operation of the test case generation device configured as described above will be described.
図2は、テスト対象となるコンピュータプログラム(以下、テスト対象プログラムという)の仕様書の例を示す図である。図2には、クレジットカードの使用により生じた売上に関するカード売上データをコンピュータシステムに登録する機能を有するコンピュータプログラムの仕様書の一部が例示されている。このテスト対象プログラムの処理概要は、図2に示されているように以下のとおりである。 FIG. 2 is a diagram illustrating an example of a specification of a computer program to be tested (hereinafter referred to as a test target program). FIG. 2 illustrates a part of the specification of a computer program having a function of registering card sales data related to sales generated by using a credit card in a computer system. The processing outline of the test target program is as follows as shown in FIG.
まず、テスト対象プログラムは、使用されたクレジットカードが解約されているか否かを判別するためのカード解約チェック、及び使用されたクレジットカードが不正なものであるか否かを判別するための不正カードチェックを行う。 First, the program to be tested is a card cancellation check for determining whether or not the used credit card has been canceled, and an unauthorized card for determining whether or not the used credit card is illegal. Check.
カード解約チェックにおいて、テスト対象プログラムは、ファクター「カード解約チェック」の同値に基づいて、使用されたクレジットカードが既に解約されていると判別された場合は処理を終了する。一方、解約されていないと判別された場合は処理を継続する。また、不正カードチェックにおいて、テスト対象プログラムは、ファクター「不正カードチェック」の同値に基づいて、使用されたクレジットカードが不正なものであると判別した場合は売上データ中のカード種別に「不正カード」を示す情報をセットする。一方、不正なものではないと判別した場合は処理を継続する。 In the card cancellation check, the test target program ends the process when it is determined that the used credit card has already been canceled based on the same value of the factor “card cancellation check”. On the other hand, if it is determined that the contract has not been canceled, the processing is continued. In the fraudulent card check, if the program to be tested determines that the credit card used is fraudulent based on the same value of the factor “illegal card check”, the card type in the sales data is set to “illegal card”. "Is set. On the other hand, if it is determined that it is not illegal, the processing is continued.
次に、テスト対象プログラムは、ショッピングリボルビング払いの申請が事前になされているか否かを判別するためのショッピングリボ事前申請チェックを行う。 Next, the test target program performs a shopping rebo prior application check for determining whether or not an application for shopping revolving payment has been made in advance.
このショッピングリボ事前申請チェックにおいて、テスト対象プログラムは、ファクター「売上受入区分」の同値が「1回払い」である場合であって、ショッピングリボの事前申請があるときには売上データ中の顧客決済区分に「ショッピングリボ」をセットし、ショッピングリボの事前申請がないときには同じく顧客決済区分に「1回払い」をセットする。なお、ここでショッピングリボの事前申請があるか否かの判別はファクター「Sリボ事前申請チェック」の同値に基づいてなされる。一方、ファクター「売上受入区分」の同値が「1回払い以外」である場合は売上データ中の顧客決済区分にファクター「売上受入区分」の同値をセットする。 In this shopping revo pre-application check, the test target program is the case where the same value of the factor “sales acceptance category” is “pay once”, and when there is a pre-application for shopping revo, it is set to the customer settlement category in the sales data. “Shopping revo” is set, and when there is no prior application for shopping revo, “single payment” is also set in the customer settlement category. Here, the determination as to whether or not there is a prior application for shopping rebo is made based on the same value of the factor “S re-prior application check”. On the other hand, when the same value of the factor “sales receipt category” is “other than one-time payment”, the same value of the factor “sales receipt category” is set in the customer settlement category in the sales data.
次に、テスト対象プログラムは、ショッピングリボルビング払いが停止となっているか否かを判別するためのショッピングリボ停止チェックを行う。 Next, the test target program performs a shopping revolving stop check for determining whether or not the shopping revolving payment is stopped.
このショッピングリボ停止チェックにおいて、テスト対象プログラムは、ファクター「顧客決済区分」が「ショッピングリボ」である場合であって、ショッピングリボが停止となっているときには売上データ中の顧客決済区分に「1回払い」をセットし、ショッピングリボが停止となっていないときには同じく顧客決済区分に「ショッピングリボ」をセットする。なお、ここでショッピングリボが停止となっているか否かの判別はファクター「Sリボ停止チェック」の同値に基づいてなされる。一方、ファクター「顧客決済区分」の同値がショッピングリボ以外の場合は何の処理もしない。 In this shopping revocation stop check, the program to be tested is a case where the factor “customer settlement category” is “shopping revo”, and when the shopping revo is stopped, the customer settlement category in the sales data is “one time”. “Payment” is set, and when the shopping revo is not stopped, “shopping revo” is also set in the customer settlement category. Here, it is determined whether or not the shopping ribo is stopped based on the same value of the factor “S ribo stop check”. On the other hand, if the value of the factor “customer settlement category” is other than shopping revo, no processing is performed.
さらに、テスト対象プログラムは、キャッシングリボルビング払いが停止となっているか否かを判別するためのキャッシングリボ停止チェックを行う。 Further, the test target program performs a caching revo stop check to determine whether or not the cashing revolving payment is stopped.
このキャッシングリボ停止チェックにおいて、テスト対象プログラムは、ファクター「顧客決済区分」が「キャッシングリボ」である場合であって、キャッシングリボが停止となっているときには売上データ中の顧客決済区分に「1回払い」をセットし、キャッシングリボが停止となっていないときには同じく顧客決済区分に「キャッシングリボ」をセットする。なお、ここでキャッシングリボが停止となっているか否かの判別はファクター「Cリボ停止チェック」の同値に基づいてなされる。一方、ファクター「顧客決済区分」の値がキャッシングリボ以外の場合は何の処理もしない。 In this cashing revo stop check, the program to be tested is the case where the factor “customer settlement category” is “cashing revo”, and when the cashing revo is stopped, the customer settlement category in the sales data is “one time”. “Payment” is set, and when the cashing rebo is not stopped, “cashing revo” is also set in the customer settlement category. Here, whether or not the caching ribo is stopped is determined based on the same value of the factor “C ribo stop check”. On the other hand, no processing is performed when the value of the factor “customer settlement category” is other than caching rebo.
以上のような処理の概要が記載されているテスト対象プログラムの仕様書に基づいて、ユーザは、ファクターの内容を示すファクター表を作成し、入力部16を用いて、そのファクター表をテストケース生成装置に対して入力する。
The user creates a factor table indicating the contents of the factor based on the specifications of the test target program in which the outline of the processing described above is described, and generates the test case using the
図3は、本発明の実施の形態1に係るテストケース生成装置に入力されるファクター表の例を示す図である。図3に示すとおり、ファクター表には、ファクターの名称を格納するためのファクター名フィールド51,独立系ファクター又は依存系ファクターの何れであるのかを示す情報を格納するための独立/依存フィールド52,ファクターの値がコード値であるか否かを示す情報を格納するためのコード値フィールド53,同じく真偽の何れかの論理値であるか否かを示す情報を格納するための論理値フィールド54,同値の内容を示す同値情報を格納するための同値フィールド55,及び依存系ファクターである場合に依存関係にあるファクターの名称を格納するための依存先ファクター名フィールド56が設けられている。
FIG. 3 is a diagram showing an example of a factor table input to the test case generation device according to
ここで、独立系ファクターとは他のファクターとの間で依存関係が成立していないファクターを意味し、依存系ファクターとは他のファクターとの間で依存関係が成立しているファクターを意味する。また、独立/依存フィールド52に「1」が格納されていれば独立系ファクターであることを意味し、「2」が格納されていれば依存系ファクターであることを意味する。さらに、コード値フィールド53及び論理値フィールド54に「1」が格納されていれば、ファクターの値がコード値であること及び論理値であることをそれぞれ意味し、同じく「0」が格納されていれば、ファクターの値がコード値ではないこと及び論理値ではないことをそれぞれ意味する。
Here, an independent factor means a factor that does not have a dependency relationship with another factor, and a dependent factor means a factor that has a dependency relationship with another factor. . If “1” is stored in the independent /
なお、本実施の形態では、図3に示すようなファクター表をユーザが作成することとしているが、このファクター表を生成するために必要な情報をテスト対象プログラムの仕様書に明記しておき、その仕様書をテストケース生成装置に対して入力することにより、テストケース生成装置が自動的にファクター表を生成するようにしてもよい。 In the present embodiment, the user creates a factor table as shown in FIG. 3, but information necessary for generating this factor table is clearly described in the specification of the test target program. By inputting the specifications to the test case generation device, the test case generation device may automatically generate a factor table.
テストケース生成装置に対してユーザにより入力されたファクター表は、テストケース生成装置のハードディスク18に記憶される。その後、テストケース生成装置は、ユーザの指示にしたがって次の4つの処理、(1)ファクターリストの生成、(2)独立系ファクターに関する同値パターン(同値の組合せ)の生成、(3)依存系ファクターに関する同値パターンの生成、(4)テストケースの生成を実行する。
The factor table input by the user to the test case generation device is stored in the
[ファクターリストの生成]
図4は、ファクターリストを生成する場合における本発明の実施の形態1に係るテストケース生成装置の動作の流れを示すフローチャートである。
[Generate factor list]
FIG. 4 is a flowchart showing a flow of operations of the test case generation apparatus according to
まず、テストケース生成装置は、ハードディスク18に記憶されているファクター表を読み込む(S101)。そして、テストケース生成装置は、そのファクター表の独立/依存フィールド52に格納されている情報を参照して独立系ファクター及び依存系ファクターの別を確認し、その結果に基づいて、独立系ファクターに関する情報を納めるための独立系ファクターリストファイル及び依存系ファクターに関する情報を納めるための依存系ファクターリストファイルを生成する(S102)。
First, the test case generation device reads a factor table stored in the hard disk 18 (S101). Then, the test case generation device refers to the information stored in the independent /
次に、テストケース生成装置は、ハードディスク18に格納されているファクターDB34を参照し、ファクター表に格納されているファクターに関するファクター情報を取得する(S103)。また、同様にしてコードDB36を参照し、ファクター表に格納されているファクターに関するコード値情報を取得する(S104)。
Next, the test case generation device refers to the
次に、テストケース生成装置は、ステップS103にて取得したファクター情報及びS104にて取得したコード値情報から、ファクター表に格納されているファクターの同値を示す同値情報を抽出し、その同値情報とファクター表の同値フィールド55に格納されている同値情報とが同じであるか否かを判定する(S105)。ここで同じであると判定した場合(S105でYES)は後述するステップS108へ進む。一方、同じではないと判定した場合(S105でNO)、テストケース生成装置は、異なっている同値を示す同値アンマッチリストファイルを生成し(S106)、その生成した同値アンマッチリストファイルを表示部14上に表示する(S107)。
Next, the test case generation device extracts equivalence information indicating the equivalency of the factors stored in the factor table from the factor information obtained in step S103 and the code value information obtained in S104, and the equivalence information and It is determined whether or not the equivalence information stored in the
図25は、前述したようにして生成された同値アンマッチリストファイルの例を示す図である。ここでは、ファクター「売上受入区分」の同値として、ファクター表にはない「回数指定払い(均等)」、「回数指定払い(ボーナス併用)」がファクターDB34に格納されているものとする。そのため、図25に示す同値アンマッチリストファイルでは、ファクター「売上受入区分」の同値が、ファクター表とファクターDBとに分けられて対応して表示されている。
FIG. 25 is a diagram showing an example of an equivalence unmatch list file generated as described above. Here, it is assumed that “same number of payments (equal)” and “same number of times payment (bonus combined use)” not stored in the factor table are stored in the
このようにして表示部14上に表示された同値アンマッチリストファイルを参照することにより、ユーザは、自己が行った設計に誤りがなかったかどうか等を確認することが可能となる。
By referring to the equivalence unmatch list file displayed on the
ところで、ファクター表には必要な情報が欠落している場合があり得る。図3を参照すると、ファクター「不正カードチェック」についてのコード値フィールド53の値、論理値フィールド54の値、及び同値フィールド55の値が欠落している。そこで、テストケース生成装置は、ステップS103においてファクター「不正カードチェック」に関するファクター情報をファクターDB34から取得し、これらの不足している値を得る。なお、ファクター情報を取得した結果、例えばファクター「不正カードチェック」が論理型であることが判明した場合、このファクターの同値を自動的に「あり、なし」に設定するようにしてもよい。
By the way, necessary information may be missing from the factor table. Referring to FIG. 3, the value of the
また、図3を参照すると、ファクター「売上受入区分」の同値フィールド55の値が欠落している。そこで、テストケース生成装置は、ステップS104においてファクター「売上受入区分」に関するコード値情報をコードDB36から取得し、このファクターの同値(例えば「1回払い、1回払い以外」)を取得する。
Further, referring to FIG. 3, the value of the
このようにファクターDB34及びコードDB36それぞれからファクター情報及びコード値情報を得ることにより、ファクター表で不足している情報を補うことができるため、ファクター表を完全に作成しなくても済む場合があり、ユーザの負担を軽減すること等が可能となる。
Thus, by obtaining the factor information and code value information from the
次に、テストケース生成装置は、ファクター表に格納されている各種の情報、ステップS103にて取得したファクター情報、及びステップS104にて取得したコード値情報を独立系ファクターリストファイル及び依存系ファクターリストファイルに出力することにより、これらの独立系ファクターリストファイル及び依存系ファクターリストファイルを更新し(S108)、ハードディスク18に記憶する(S109)。 Next, the test case generation apparatus converts the various information stored in the factor table, the factor information acquired in step S103, and the code value information acquired in step S104 into an independent factor list file and a dependent factor list. By outputting to a file, the independent factor list file and the dependent factor list file are updated (S108) and stored in the hard disk 18 (S109).
図5は、前述したようにして生成された独立系ファクターリストファイルの例を示す図である。図5に示すように、独立系ファクターリストファイルには、図3に示すファクター表の独立系/依存系フィールド52,ファクター名フィールド51及び同値フィールド55と同様の独立/依存フィールド101,ファクター名フィールド102及び同値フィールド103が設けられている。また、一つのファクターに対して、そのファクターの同値の数と同じ行数のレコードが設けられており、同値フィールド103には各レコードにつき一つの同値のみが格納されている。
FIG. 5 is a diagram showing an example of the independent factor list file generated as described above. As shown in FIG. 5, the independent factor list file includes an independent /
また、図6は、前述したようにして生成された依存系ファクターリストファイルの例を示す図である。図6に示すように、依存系ファクターリストファイルには、図3に示すファクター表の独立系/依存系フィールド52,依存先ファクター名フィールド56,ファクター名フィールド51及び同値フィールド55と同様の独立/依存フィールド111,依存先ファクター名フィールド112,ファクター名フィールド113及び同値フィールド114が設けられている。また、独立系ファクターリストファイルの場合と同様に、一つのファクターに対して、そのファクターの同値の数と同じ行数のレコードが設けられており、同値フィールド114には各レコードにつき一つの同値のみが格納されている。
FIG. 6 is a diagram showing an example of the dependency factor list file generated as described above. As shown in FIG. 6, the dependent factor list file includes an independent /
なお、このようにして生成された独立系ファクターリストファイル及び依存系ファクターリストファイルに基づいてファクターDB34を更新することにより、ファクターDB34に新たなファクター情報を格納させて次回のテストケース生成に備えるようにしてもよい。
It should be noted that by updating the
[独立系ファクターに関する同値パターンの生成]
図7は、独立系ファクターに関する同値パターンを生成する場合における本発明の実施の形態1に係るテストケース生成装置の動作の流れを示すフローチャートである。
[Generation of equivalence patterns for independent factors]
FIG. 7 is a flowchart showing an operation flow of the test case generation apparatus according to
まず、テストケース生成装置は、ハードディスク18に記憶されている独立系ファクターリストファイルを読み込む(S201)。そして、テストケース生成装置は、その独立系ファクターリストファイルに後述する同値パターンを格納するための同値パターンフィールドを追加した独立系同値パターンファイルを生成する(S202)。なお、同値パターンフィールドには、生成する同値パターンの数と同じ数の列が設けられる。 First, the test case generation device reads an independent factor list file stored in the hard disk 18 (S201). Then, the test case generation apparatus generates an independent equivalence pattern file in which an equivalence pattern field for storing an equivalence pattern to be described later is added to the independent factor list file (S202). In the equivalence pattern field, as many columns as the number of equivalence patterns to be generated are provided.
次に、テストケース生成装置は、生成した独立系同値パターンファイルに基づいて、独立系ファクターの同値の数の最大値nを取得する(S203)。その後、テストケース生成装置は、変数mに1をセット(S204)した後、各独立系ファクターについて、同値のm番目の行であって同値パターンフィールドのm番目の列に‘○’をセットする(S205)。そして、テストケース生成装置は、nとmとの値を比較し、nとmとが同一の値であるか否かを判定する(S206)。ここで、同一ではないと判定した場合(S206でNO)、テストケース生成装置は、mにm+1をセット(S207)した後、再度ステップS205及びS206を実行する。そして、ステップS206においてnとmとの値が同一であると判定した場合(S206でYES)、テストケース生成装置は、独立系同値パターンを記憶する(S208)。 Next, the test case generation device acquires the maximum value n of the number of independent factors of equivalence based on the generated independent equivalence pattern file (S203). Thereafter, the test case generation device sets 1 to the variable m (S204), and then sets “o” in the m-th row of the equivalence pattern field and the m-th row of the equivalence pattern field for each independent factor. (S205). Then, the test case generation device compares the values of n and m, and determines whether n and m are the same value (S206). If it is determined that they are not identical (NO in S206), the test case generation device sets m + 1 to m (S207), and then executes steps S205 and S206 again. If it is determined in step S206 that the values of n and m are the same (YES in S206), the test case generation device stores an independent equivalence pattern (S208).
なお、独立系ファクターが複数ある場合であって、ある独立系ファクターの同値の数が他の独立系ファクターの同値の数よりも少ないとき、ステップS205において、その独立系ファクターについて同値のm番目の行が存在しない事態が生じ得る。そのような場合は、任意の行の同値パターンフィールドのm番目の列に‘○’をセットすればよい。したがって、ステップS205において、例えば当該独立系ファクターの最新に‘○’がセットされた行の同値パターンフィールドのm番目の列に‘○’をセットすればよい。このように処理しても問題ないのは、既にすべての同値について‘○’がセットされているファクターの場合、それ以降のテストケースではどの同値でテストしても問題がないためである。 When there are a plurality of independent factors and the number of equivalences of a certain independent factor is smaller than the number of equivalences of other independent factors, in step S205, the m-th equivalent of the independent factor is obtained. There can be a situation where there are no rows. In such a case, “◯” may be set in the m-th column of the equivalence pattern field of an arbitrary row. Accordingly, in step S205, for example, “◯” may be set in the m-th column of the equivalence pattern field of the row in which “O” is set to the latest of the independent factor. The reason why there is no problem even if processing is performed in this way is that there is no problem in testing with any equivalence in subsequent test cases in the case of a factor for which "O" has already been set for all equivalences.
図8は、前述したようにして生成された独立系同値パターンファイルの例を示す図である。図8に示すように、独立系同値パターンファイルには、図5に示す独立系ファクターリストファイルと同様の独立/依存フィールド121,ファクター名フィールド122,及び同値フィールド123、並びに前述した同値パターンフィールド124が設けられている。
FIG. 8 is a diagram showing an example of an independent equivalence pattern file generated as described above. As shown in FIG. 8, the independent equivalence pattern file includes an independent /
前述したように処理が実行された結果、図8に示すとおりに同値パターンフィールド124には‘○’がセットされている。図8に示す例の場合、2つの同値パターンが生成されたことになる。
As a result of execution of the processing as described above, “o” is set in the
なお、図7のフローチャートを参照して説明した処理は、各ファクターが独立関係であることを前提にしたCFD技法に則したものである。したがって、以下では、このような処理を行うことを「CFD技法を用いて処理を行う」と表現する。 Note that the processing described with reference to the flowchart of FIG. 7 conforms to the CFD technique on the assumption that the factors are independent. Therefore, in the following, performing such processing is expressed as “processing using the CFD technique”.
[依存系ファクターに関する同値パターンの生成]
図9は、依存系ファクターに関する同値パターンを生成する場合における本発明の実施の形態1に係るテストケース生成装置の動作の流れを示すフローチャートである。
[Generation of equivalence patterns for dependent factors]
FIG. 9 is a flowchart showing an operation flow of the test case generation apparatus according to the first embodiment of the present invention when generating an equivalence pattern related to the dependency system factor.
まず、テストケース生成装置は、ハードディスク18に記憶されている依存系ファクターリストファイルを読み込む(S301)。そして、テストケース生成装置は、その依存系ファクターリストファイルを参照して依存関係にあるファクターをグルーピングする(S302)。図6に示す依存系ファクターリストファイルの例の場合、ファクター「Sリボ事前申請チェック」及び「売上受入区分」が一つのグループとなり、ファクター「Sリボ停止チェック」、「Cリボ停止チェック」及び「顧客決済区分」が一つのグループとなる。以下、このようにして生成されたグループを依存系ファクターグループと呼ぶ。 First, the test case generation apparatus reads a dependency factor list file stored in the hard disk 18 (S301). Then, the test case generation device groups the factors having the dependency relationship with reference to the dependency factor list file (S302). In the example of the dependent factor list file shown in FIG. 6, the factors “S-ribo advance application check” and “sales receipt classification” form one group, and the factors “S-ribo stop check”, “C-ribo stop check”, and “ "Customer settlement category" is one group. Hereinafter, the group generated in this way is called a dependency factor group.
次に、テストケース生成装置は、依存系ファクターグループ毎に、依存系ファクターリストファイルに同値パターンを格納するための同値パターンフィールドを追加した依存系同値パターンファイルを生成する(S303)。なお、独立系同値パターンファイルの生成の場合と同様に、この同値パターンフィールドには生成する同値パターンの数と同じ数の列が設けられる。 Next, the test case generation device generates a dependency equivalence pattern file in which an equivalence pattern field for storing an equivalence pattern is added to the dependency factor list file for each dependency factor group (S303). As in the case of generating an independent equivalence pattern file, this equivalence pattern field has as many columns as the number of equivalence patterns to be created.
次に、テストケース生成装置は、複数の依存系ファクターグループのうち特定の一つの依存系ファクターグループを選択し(S304)、その依存系ファクターグループ内のファクターの同値の組合せが網羅的になるように、当該依存系ファクターグループに係る依存系同値パターンファイルの同値パターンフィールドの列に‘○’をセットする(S305)。そして、テストケース生成装置は、このようにして‘○’がセットされた依存系同値パターンファイルをハードディスク18に記憶する(S306)。 Next, the test case generation device selects one specific dependent factor group from among the plurality of dependent factor groups (S304), so that combinations of the same values of the factors in the dependent factor group become exhaustive. Then, “◯” is set in the column of the equivalence pattern field of the dependence equivalence pattern file related to the dependence factor group (S305). Then, the test case generation apparatus stores the dependency system equivalence pattern file in which “◯” is set in this way in the hard disk 18 (S306).
その後、テストケース生成装置は、すべての依存系ファクターグループを選択したか否かを判定する(S307)。ここで、まだ選択されていない依存系ファクターグループがあると判定した場合(S307でNO)、テストケース生成装置はステップS304に戻る。一方、すべての依存系ファクターグループを選択したと判定した場合(S307でYES)、テストケース生成装置は後述するステップS308へ進む。 Thereafter, the test case generation device determines whether or not all dependent factor groups have been selected (S307). If it is determined that there is a dependency factor group that has not yet been selected (NO in S307), the test case generation apparatus returns to Step S304. On the other hand, if it is determined that all the dependent factor groups have been selected (YES in S307), the test case generation apparatus proceeds to step S308 described later.
図10及び図11は、前述したようにして生成された依存系同値パターンファイルの例を示す図である。図10及び図11に示すように、依存系同値パターンファイルには、図6に示す依存系ファクターリストファイルの独立/依存フィールド111,依存先ファクター名フィールド112,ファクター名フィールド113及び同値フィールド114と同様の独立/依存フィールド131,依存先ファクター名フィールド132,ファクター名フィールド133及び同値フィールド134、並びに前述した同値パターンフィールド134が設けられている。
10 and 11 are diagrams showing examples of the dependency system equivalence pattern file generated as described above. As shown in FIGS. 10 and 11, the dependency system equivalence pattern file includes an independent /
図10には、ファクター「Sリボ事前申請チェック」及び「売上受入区分」から構成される依存系ファクターグループに係る依存系同値パターンファイルが示されている。この依存系ファクターグループの場合、2つのファクターの同値が2個あるため、前述したような処理が実行された結果、図10に示すとおりに同値パターンフィールド135に‘○’がセットされ、4(=2×2)個の同値パターンが生成される。
FIG. 10 shows a dependent equivalence pattern file relating to a dependent factor group composed of the factors “S-ribo advance application check” and “sales acceptance classification”. In the case of this dependent factor group, since there are two equivalences of the two factors, as a result of executing the processing as described above, 'o' is set in the
また、図11には、ファクター「Sリボ停止チェック」、「Cリボ停止チェック」及び「顧客決済区分」から構成される依存系ファクターグループに係る依存系同値パターンファイルが示されている。この依存系ファクターグループの場合、ファクター「顧客決済区分」の同値が7個あり、その他の2つのファクターの同値が2個ずつあるため、前述したようにして処理が実行された結果、図11に示すとおりに同値パターンフィールド135に‘○’がセットされ、28(=7×2×2)個の同値パターンが生成される。
FIG. 11 shows a dependent equivalence pattern file related to a dependent factor group composed of factors “S-ribo stop check”, “C-ribo stop check”, and “customer settlement category”. In the case of this dependent factor group, there are seven equivalences of the factor “customer settlement category” and two equivalences of the other two factors. As a result of executing the processing as described above, FIG. As shown, 'o' is set in the
なお、ファクター間の依存関係を考慮した場合、不要となる同値パターンが存在することがある。例えば、図10に示す同値パターンの場合、ファクター「売上受入区分」の同値が「1回払い以外」のときはファクター「Sリボ事前申請チェック」の同値が「あり」又は「ない」の何れかでも良い。したがって、図10に示す3番目の同値パターンは不要となる。その結果、この依存系グループの場合、図10に示す1番目、2番目、及び4番目の3個の同値パターンで足りる。 Note that there are cases where unnecessary equivalence patterns exist when considering the dependency between factors. For example, in the case of the equivalence pattern shown in FIG. 10, when the equivalence of the factor “sales receipt category” is “other than one-time payment”, the equivalence of the factor “S rebo prior application check” is “Yes” or “No”. But it ’s okay. Therefore, the third equivalence pattern shown in FIG. 10 is not necessary. As a result, in the case of this dependency group, the first, second, and fourth three equivalent patterns shown in FIG. 10 are sufficient.
また、図11に示す同値パターンの場合、ファクター「Sリボ停止チェック」の同値が「あり」の同値パターンはファクター「顧客決済区分」の同値が「ショッピングリボ」のときだけでよい。同様に、ファクター「Cリボ停止チェック」の同値が「あり」の同値パターンはファクター「顧客決済区分」の同値が「キャッシングリボ」のときだけでよい。その結果、28個の同値パターンのうち21個は不要となり、同値パターンは7個あれば足りることになる。 In the case of the equivalence pattern shown in FIG. 11, the equivalence pattern in which the equivalence of the factor “S revocation stop check” is “Yes” may be only when the equivalency of the factor “customer settlement category” is “shopping revo”. Similarly, the equivalence pattern in which the equivalence of the factor “C revo stop check” is “Yes” may be only when the equivalency of the factor “customer settlement category” is “cashing ribo”. As a result, 21 of the 28 equivalence patterns are unnecessary, and 7 equivalence patterns are sufficient.
このように不要な同値パターンが存在していることを確認したユーザは、それらの不要な同値パターンを削除するようにテストケース生成装置に指示することができる。以下ではこの削除指示がなされ、テストケース生成装置において不要な同値パターンを削除するように依存系同値パターンファイルを更新したものとして説明する。なお、このように不要な同値パターンを削除する処理は任意のものであり、必要に応じて実行すればよい。 Thus, the user who has confirmed that unnecessary equivalence patterns exist can instruct the test case generation apparatus to delete those unnecessary equivalence patterns. In the following description, it is assumed that this deletion instruction is issued and the dependent equivalence pattern file is updated so that unnecessary equivalence patterns are deleted in the test case generation apparatus. Note that the process of deleting unnecessary equivalency patterns is arbitrary, and may be executed as necessary.
テストケース生成装置は、以上のようにしてハードディスク18に記憶された各依存系ファクターグループに係る依存系同値パターンファイルを読み込み、読み込んだ複数の依存系同値パターンファイルを結合する(S308)。ここで、各依存系ファクターグループ間には独立関係が成立している。したがって、ステップS308における結合処理は、CFD技法を用いて行われる。その結果、図12に示す結合処理後の依存系同値パターンファイルのとおりに同値パターンフィールド135に‘○’がセットされた7個の同値パターンが生成される。
The test case generation device reads the dependency system equivalence pattern files related to each dependency system factor group stored in the
最後に、テストケース生成装置は、結合処理の結果得られた依存系同値パターンファイルをハードディスク18に記憶する(S309)。 Finally, the test case generation apparatus stores the dependent system equivalence pattern file obtained as a result of the combination process in the hard disk 18 (S309).
[テストケースの生成]
図13は、テストケースを生成する場合における本発明の実施の形態1に係るテストケース生成装置の動作の流れを示すフローチャートである。
[Generate test case]
FIG. 13 is a flowchart showing a flow of operations of the test case generation apparatus according to
まず、テストケース生成装置は、ハードディスク18に記憶されている独立系同値パターンファイル及び依存系同値パターンファイルを読み込む(S401)。また、テストケース生成装置は、独立系同値パターンファイル及び依存系同値パターンファイルの同値パターンフィールドの代わりに後述するテストケースを格納するためのテストケースフィールドを設けたテストケースファイルを生成する(S402)。なお、テストケースフィールドには、生成するテストケースの数と同じ数の列が設けられる。 First, the test case generation apparatus reads the independent system equivalence pattern file and the dependent system equivalence pattern file stored in the hard disk 18 (S401). Further, the test case generation apparatus generates a test case file provided with a test case field for storing a test case to be described later instead of the equivalence pattern field of the independent equivalence pattern file and the dependent equivalence pattern file (S402). . In the test case field, as many columns as the number of test cases to be generated are provided.
次に、テストケース生成装置は、ステップS401にて読み込んだ独立系同値パターンファイル及び依存系同値パターンファイルを結合し(S403)、その結果をテストケースファイルに出力する(S404)。ここで、独立系同値パターンと依存系同値パターンとの間には独立関係が成立している。したがって、ステップS402における結合処理は、CFD技法を用いて行われる。 Next, the test case generation apparatus combines the independent equivalence pattern file and the dependent equivalence pattern file read in step S401 (S403), and outputs the result to the test case file (S404). Here, an independent relationship is established between the independent equivalence pattern and the dependent equivalence pattern. Therefore, the combining process in step S402 is performed using the CFD technique.
図14は、前述したようにして得られたテストケースファイルの例を示す図である。図14に示すように、テストケースファイルには、図11及び図12に示す依存系同値パターンファイルと同様の独立/依存フィールド141,依存先ファクター名フィールド142,ファクター名フィールド143,及び同値フィールド143、並びに前述したテストケースフィールド145が設けられている。
FIG. 14 is a diagram showing an example of a test case file obtained as described above. As shown in FIG. 14, the test case file includes an independent /
前述したように処理が実行された結果、図14に示すとおりにテストケースフィールド145には‘○’がセットされている。ここで、図14に示す例では、1番目から7番目までのテストケースが主に依存系ファクターのテストを考慮したものとなり、8,9番目のテストケースが主に独立系ファクターのテストを考慮したものとなっている。
As a result of executing the processing as described above, “◯” is set in the
最後に、テストケース生成装置は、ステップS404にて結合処理の結果が出力されたテストケースファイルをハードディスク18に記憶する(S404)。 Finally, the test case generation apparatus stores the test case file to which the result of the combining process is output in step S404 in the hard disk 18 (S404).
このようにして生成されたテストケースは、ファクター間の依存関係が考慮された上で生成されたものであるから、単にCFD技法のみを用いて生成する従来の場合と異なり、必要なテストケースが欠落する事態を回避することができる。 Since the test cases generated in this way are generated in consideration of the dependency between factors, unlike the conventional case where only the CFD technique is used, the necessary test cases are different. The situation of missing can be avoided.
また、独立関係にあるファクターの同値パターンについては、CFD技法を用いることにより、その数を抑制することができる。 Further, the number of equivalence patterns of independent factors can be suppressed by using the CFD technique.
なお、テスト対象プログラムのテストを行う際、ユーザは、テストケース生成装置に対して、ハードディスク18に記憶されているテストケースファイルを表示部14に表示させるように指示する。その結果、表示部14にテストケースファイルの内容が表示され、ユーザはその内容を確認しながらテストシナリオを作成することにより、信頼性の高いテストを効率良く実行することができる。
Note that when testing a test target program, the user instructs the test case generation device to display the test case file stored in the
(実施の形態2)
本発明の実施の形態2に係るテストケース生成装置は、あるファクターが特定の値をとった場合にその時点で処理が終了するテストケースである無効系テストケースと、無効系テストケース以外の有効系テストケースとを分けて生成することができるものである。なお、実施の形態2のテストケース生成装置の構成は、実施の形態1の場合と同様であるので説明を省略する。以下、実施の形態2のテストケース生成装置の動作について説明する。
(Embodiment 2)
The test case generation device according to the second embodiment of the present invention includes an invalid test case that is a test case in which a process ends when a certain factor takes a specific value, and valid tests other than the invalid test case. It can be generated separately from system test cases. Note that the configuration of the test case generation apparatus according to the second embodiment is the same as that of the first embodiment, and a description thereof will be omitted. Hereinafter, the operation of the test case generation apparatus according to the second embodiment will be described.
図2に示すような処理の概要が記載されている対象プログラムの仕様書に基づいて、ユーザは、ファクターの内容を示すファクター表を作成し、入力部16を用いて、そのファクター表をテストケース生成装置に対して入力する。
The user creates a factor table indicating the contents of the factor based on the specification of the target program in which the outline of the processing as shown in FIG. 2 is described, and uses the
図15は、実施の形態2におけるファクター表の例を示す図である。図15に示すように、このファクター表のファクター「カード解約チェック」の同値フィールド55には「あり*」、「なし」がセットされている。ここで「あり*」は、ファクター「カード解約チェック」の同値が「あり」である場合のテストケースは無効系テストケースになることを表している。
FIG. 15 is a diagram illustrating an example of a factor table in the second embodiment. As shown in FIG. 15, “Yes *” and “No” are set in the
なお、テストケース生成装置が自動的にファクター表を生成するようにしてもよいことは実施の形態1の場合と同様である。 As in the case of the first embodiment, the test case generation device may automatically generate a factor table.
テストケース生成装置に対してユーザにより入力されたファクター表は、テストケース生成装置のハードディスク18に記憶される。その後、実施の形態1の場合と同様に、ユーザの指示にしたがって、テストケース生成装置は次の4つの処理、(1)ファクターリストの生成、(2)独立系ファクターに関する同値パターンの生成、(3)依存系ファクターに関する同値パターンの生成、(4)テストケースの生成を実行する。
The factor table input by the user to the test case generation device is stored in the
[ファクターリストの生成]
実施の形態2のテストケース生成装置は、実施の形態1の場合と同様にして独立系ファクターリストファイル及び依存系ファクターリストファイルを生成する。ただし、前述したとおり実施の形態2の場合では、実施の形態1の場合と異なり、テストケース生成装置が読み込むファクター表に「*」が付されているファクターの同値が存在することがある。このように「*」が付されていることを示す情報を格納するために、実施の形態2のテストケース生成装置が生成する独立系ファクターリストファイル及び依存系ファクターリストファイルには、無効系フィールドが設けられている。
[Generate factor list]
The test case generation apparatus according to the second embodiment generates an independent factor list file and a dependent factor list file in the same manner as in the first embodiment. However, as described above, in the case of the second embodiment, unlike the case of the first embodiment, there may be an equivalence of factors with “*” added to the factor table read by the test case generation device. In order to store the information indicating that “*” is added in this way, the independent factor list file and the dependent factor list file generated by the test case generating device of the second embodiment include an invalid field. Is provided.
図16は、実施の形態2に係るテストケース生成装置が生成する独立系ファクターリストファイルの例を示す図である。図16に示すように、この独立系ファクターリストファイルには、実施の形態1の場合の独立/依存フィールド101,ファクター名フィールド102及び同値フィールド103と、前述した無効系フィールド201とが設けられている。そして、この例では、ファクター「カード解約チェック」の同値「あり」の場合について、無効系フィールド201の列に‘○’がセットされている。
FIG. 16 is a diagram illustrating an example of an independent factor list file generated by the test case generation device according to the second embodiment. As shown in FIG. 16, the independent factor list file includes the independent /
また、図17は、実施の形態2に係るテストケース生成装置が生成する依存系ファクターリストファイルの例を示す図である。図17に示すように、この依存系ファクターリストファイルには、実施の形態1の場合の独立/依存フィールド111,依存先ファクター名フィールド112,ファクター名フィールド113及び同値フィールド114と、前述した無効系フィールド211とが設けられている。そして、この例では、ファクター表の依存系ファクターの同値には「*」がないため、何れの行の無効系フィールド201の列にも‘○’がセットされていない。
FIG. 17 is a diagram illustrating an example of a dependent factor list file generated by the test case generation apparatus according to the second embodiment. As shown in FIG. 17, the dependency system factor list file includes the independent /
以上のように無効系フィールドが設けられた独立系ファクターリストファイル及び依存系ファクターリストファイルが生成され、ハードディスク18に記憶される。
As described above, the independent factor list file and the dependent factor list file provided with the invalid system field are generated and stored in the
[独立系ファクターに関する同値パターンの生成]
図18は、独立系ファクターに関する同値パターンを生成する場合における本発明の実施の形態2に係るテストケース生成装置の動作の流れを示すフローチャートである。なお、ステップS201乃至S208については実施の形態1の場合と同様なので同一符号を付して説明を省略する。ただし、ステップS202で生成される独立系同値パターンファイルの最下行には、後述するように、生成された同値パターンが有効系であるのか又は無効系であるのかを示すための行である有効系レコード及び無効系レコードが設けられている。
[Generation of equivalence patterns for independent factors]
FIG. 18 is a flowchart showing an operation flow of the test case generation apparatus according to
テストケース生成装置は、ステップS206においてnとmとの値が同一であると判定した場合(S206でYES)、無効系フィールドに‘○’がセットされている列があるか否かを判定する(S501)。ここで、当該列があると判定した場合(S501でYES)、テストケース生成装置は、独立系同値パターンファイルの無効系レコードの当該列に‘○’をセットし(S502)、有効系レコードのその他の列に‘○’をセットする(S503)。一方、無効系フィールドに‘○’がセットされている列はないと判定した場合(S501でNO)、テストケース生成装置は、有効系レコードのすべての列に‘○’をセットする(S503)。 If the test case generation device determines that the values of n and m are the same in step S206 (YES in S206), the test case generation device determines whether there is a column in which “O” is set in the invalid field. (S501). Here, if it is determined that the column exists (YES in S501), the test case generation device sets “O” in the column of the invalid record in the independent equivalence pattern file (S502), and sets the valid record. “◯” is set in the other columns (S503). On the other hand, when it is determined that there is no column in which “O” is set in the invalid field (NO in S501), the test case generation apparatus sets “O” in all columns of the valid record (S503). .
図19は、実施の形態2に係るテストケース生成装置が生成する独立系同値パターンファイルの例を示す図である。図19に示すように、最下行には前述した有効系レコード125及び無効系レコード126が設けられている。そして、前述した処理の結果、1番目の同値パターン(ファクター「カード解約チェック」の同値が「あり」の場合の同値パターン)の列の無効系レコードに‘○’がセットされている。また、この1番目の同値パターンのようにファクター「カード解約チェック」の同値が「あり」の場合は処理が終了することになるため、ファクター「不正カードチェック」の行には‘○’がセットされていない。
FIG. 19 is a diagram illustrating an example of an independent equivalence pattern file generated by the test case generation device according to the second embodiment. As shown in FIG. 19, the above-mentioned
[依存系ファクターに関する同値パターンの生成]
図20は、依存系ファクターに関する同値パターンを生成する場合における本発明の実施の形態2に係るテストケース生成装置の動作の流れを示すフローチャートである。なお、ステップS301乃至S309については実施の形態1の場合と同様なので同一符号を付して説明を省略する。ただし、ステップS302で生成される依存系同値パターンファイルの最下行には、独立系同値パターンファイルと同様に有効系レコード及び無効系レコードが設けられている。
[Generation of equivalence patterns for dependent factors]
FIG. 20 is a flowchart showing an operation flow of the test case generation apparatus according to the second embodiment of the present invention when generating an equivalence pattern related to the dependency system factor. Since steps S301 to S309 are the same as those in the first embodiment, the same reference numerals are given and description thereof is omitted. However, the effective system record and the invalid system record are provided in the bottom line of the dependent system equivalence pattern file generated in step S302, as in the independent system equivalence pattern file.
テストケース生成装置は、すべての依存系ファクターグループを選択したと判定した場合(S307でYES)、無効系フィールドに‘○’がセットされている列があるか否かを判定する(S601)。ここで、当該列があると判定した場合(S601でYES)、テストケース生成装置は、依存系同値パターンファイルの無効系レコードの当該列に‘○’をセットし(S602)、有効系レコードのその他の列に‘○’をセットする(S603)。一方、無効系フィールドに‘○’がセットされている列はないと判定した場合(S601でNO)、テストケース生成装置は、有効系レコードのすべての列に‘○’をセットする(S603)。 When it is determined that all the dependent factor groups have been selected (YES in S307), the test case generation apparatus determines whether there is a column in which “O” is set in the invalid field (S601). Here, if it is determined that the column exists (YES in S601), the test case generation device sets “O” to the column of the invalid record in the dependent equivalence pattern file (S602), and the valid record “◯” is set in the other columns (S603). On the other hand, when it is determined that there is no column in which “O” is set in the invalid field (NO in S601), the test case generation apparatus sets “O” in all the columns of the effective record (S603). .
図21及び図22は、実施の形態2に係るテストケース生成装置が生成する依存系同値パターンファイルの例を示す図である。また、図23は、実施の形態2に係るテストケース生成装置が生成する結合処理後の依存系同値パターンファイルの例を示す図である。 FIG. 21 and FIG. 22 are diagrams illustrating an example of a dependent equivalence pattern file generated by the test case generation apparatus according to the second embodiment. FIG. 23 is a diagram illustrating an example of the dependent equivalence pattern file after the joining process generated by the test case generation device according to the second embodiment.
図21から図23に示すように、最下行には前述した有効系レコード136及び無効系レコード137が設けられている。そして、図17に示すとおり依存系ファクターリストファイルの無効系フィールド211には1つも‘○’がセットされていないため、依存系同値パターンファイルの同値パターンフィールド135のすべての列において有効系レコードに‘○’がセットされている。
As shown in FIGS. 21 to 23, the above-mentioned
[テストケースの生成]
実施の形態2のテストケース生成装置は、実施の形態1の場合と同様にしてテストケースファイルを生成する。ただし、実施の形態2の場合、テストケースファイルの最下行には有効系レコード及び無効系レコードが設けられている。また、無効系レコードに‘○’がセットされているテストケースフィールドの列には、無効系のファクターの同値の行以外のすべての行について‘○’が削除される。
[Generate test case]
The test case generation apparatus according to the second embodiment generates a test case file in the same manner as in the first embodiment. However, in the case of the second embodiment, a valid record and an invalid record are provided at the bottom line of the test case file. Also, in the column of the test case field in which “O” is set in the invalid record, “O” is deleted for all rows other than the row having the same value of the invalid factor.
図24は、実施の形態2のテストケース生成装置が生成するテストケースファイルの例を示す図である。図24に示すように、テストケースファイルの最下行には有効系レコード146及び無効系レコード147が設けられている。ここで、図24に示す例では、2番目から9番目までのテストケースが主に依存系ファクターのテストを考慮したものとなり、1,9番目のテストケースが主に独立系ファクターのテストを考慮したものとなっている。そして、1番目のテストケースは無効系のテストケースであり、無効系のファクター「カード解約チェック」の同値「あり」の行には‘○’がセットされ、それ以外のすべての行には‘○’がセットされていない。
FIG. 24 is a diagram illustrating an example of a test case file generated by the test case generation apparatus according to the second embodiment. As shown in FIG. 24, a
このようにして無効系であるか否かが考慮されたテストケースを生成することにより、より効率的にテスト対象プログラムのテストを行うことが可能になる。 In this way, by generating a test case that takes into consideration whether or not the system is invalid, it becomes possible to test the test target program more efficiently.
本発明に係るテストケース生成方法、テストケース生成装置及びコンピュータプログラムは、信頼性の高いテストを行うために必要となるテストケースを生成するテストケース生成装置等に有用である。 The test case generation method, the test case generation apparatus, and the computer program according to the present invention are useful for a test case generation apparatus that generates a test case necessary for performing a highly reliable test.
10 CPU
12 メモリ
14 表示部
16 入力部
18 ハードディスク
20 外部記憶装置
22 可搬型記録媒体
30 テストケース生成プログラム
32 オペレーティングシステム
34 ファクターDB
36 コードDB
10 CPU
DESCRIPTION OF
36 Code DB
Claims (12)
前記入力手段によって入力された、処理フローの分岐点において他のファクターと組み合わされることなく単独で分岐条件を構成するファクターである独立系ファクターの同値集合内のすべての値を含む独立系ファクター情報と、処理フローの分岐点において他のファクターと組み合わされることによって分岐条件を構成するファクターである依存系ファクターの同値集合内のすべての値及び同一の分岐点において互いに組み合わされて分岐条件を構成する依存系ファクターのグループを示すグループ情報を含む依存系ファクター情報とを前記記憶手段に記憶するステップと、
前記演算手段が、前記記憶手段に記憶された依存系ファクター情報に含まれる前記依存系ファクターの同値集合内のすべての値及びグループ情報を参照し、グループ毎に依存系ファクターの同値集合内の値の網羅的な組合せを生成するステップと、
前記演算手段が、グループ毎に生成された依存系ファクターの同値集合内の値の組合せから、CFD技法を用いて、依存系ファクターの同値集合内の値の組合せを生成するステップと、
前記演算手段が、前記記憶手段に記憶された独立系ファクター情報を参照し、独立系ファクターの同値集合内の値の組合せを生成するステップと、
前記演算手段が、生成された依存系ファクターの同値集合内の値の組合せを含むテストケースと、生成された独立系ファクターの同値集合内の値の組合せを含むテストケースとを生成するステップと
を有することを特徴とするテストケース生成方法。 Of the input data that can be taken by factors that are input data items of a computer program, values in an equivalence set that are input data having one characteristic and values in an equivalence set that have other characteristics In a test case generating method for generating a test case for testing a computer program having a plurality of the factors based on the combination of the input means, the computing means, and the storage means,
Independent factor information including all values in the equivalence set of independent factors, which is a factor that constitutes a branch condition independently without being combined with other factors at the branch point of the processing flow, which is input by the input means; Dependencies that are combined with other factors at the branch point of the processing flow and that are combined with each other at the same branch point at all the values in the equivalence set of dependent factors that are the factors that constitute the branch condition. Storing dependent factor information including group information indicating a group of system factors in the storage means;
The computing means refers to all values and group information in the equivalence set of the dependent factor included in the dependent factor information stored in the storage means, and values in the equivalence set of the dependent factor for each group Generating an exhaustive combination of
The computing means generates a combination of values in the equivalence set of dependent factors using a CFD technique from a combination of values in the equivalence set of dependent factors generated for each group;
The computing means refers to the independent factor information stored in the storage means, and generates a combination of values in the equivalence set of independent factors;
The computing means generates a test case including a combination of values in the generated equivalence set of dependent factors and a test case including a combination of values in the generated independent set of independent factors. A test case generation method characterized by comprising:
前記演算手段が、検索されたファクター情報と、前記記憶された独立系ファクター情報及び/又は依存系ファクター情報とを比較するステップと、
前記演算手段が、比較した結果に基づいて、前記検索されたファクター情報の同値集合内の値と前記取得された独立系ファクター情報及び/又は依存系ファクター情報の同値集合内の値とが異なるか否かを判定するステップと、
異なると判定された場合、前記コンピュータが備える出力手段が、異なる同値集合内の値に関する同値アンマッチ情報を出力するステップと
をさらに有する、請求項1又は2に記載のテストケース生成方法。 The computing means retrieves predetermined factor information from a factor information database storing factor information including at least values in an equivalence set of factors;
The computing means comparing the retrieved factor information with the stored independent factor information and / or dependent factor information;
Whether the value in the equivalence set of the retrieved factor information is different from the value in the equivalence set of the acquired independent factor information and / or dependent factor information based on the comparison result of the computing means Determining whether or not,
3. The test case generation method according to claim 1, further comprising a step of outputting equivalence unmatch information regarding values in different equivalence sets, when the output means included in the computer is judged to be different.
前記記憶された依存系ファクター情報及び前記記憶された独立系ファクター情報には、ファクターの同値集合内の値が前記特定の値であるか否かを示す情報が含まれており、
前記依存系ファクターの同値集合内の値の組合せを生成するステップ及び前記独立系ファクターの同値集合内の値の組合せを生成するステップにおいて、前記演算手段が、前記特定の値を含む同値集合内の値の組合せを生成し、
前記テストケースを生成するステップにおいて、前記演算手段が、前記特定の値を含む同値集合内の値の組合せを用いて生成されたテストケースであるか否かを示す情報を付加したテストケースを生成する、請求項1乃至請求項3の何れかに記載のテストケース生成方法。 When the factor takes a specific value, the computer program is described so that the processing flow ends at that point,
The stored dependency factor information and the stored independent factor information include information indicating whether or not a value in an equivalence set of factors is the specific value,
In the step of generating a combination of values in the equivalence set of the dependent system factor and the step of generating a combination of values in the equivalence set of the independent system factor, the computing means includes Generate a combination of values,
In the step of generating the test case, the calculation means generates a test case to which information indicating whether or not the test case is generated using a combination of values in the equivalence set including the specific value is added. The test case generation method according to any one of claims 1 to 3.
処理フローの分岐点において他のファクターと組み合わされることなく単独で分岐条件を構成するファクターである独立系ファクターの同値集合内のすべての値を含む独立系ファクター情報と、処理フローの分岐点において他のファクターと組み合わされることによって分岐条件を構成するファクターである依存系ファクターの同値集合内のすべての値及び同一の分岐点において互いに組み合わされて分岐条件を構成する依存系ファクターのグループを示すグループ情報を含む依存系ファクター情報とを入力する入力手段と、
前記入力手段によって入力された前記独立系ファクター情報及び前記依存系ファクター情報を記憶する記憶手段と、
前記記憶手段によって記憶された依存系ファクター情報に含まれる前記依存系ファクターのすべての同値集合内の値及びグループ情報を参照し、グループ毎に依存系ファクターの同値集合内の値の網羅的な組合せを生成し、さらにグループ毎に生成された依存系ファクターの同値集合内の値の組合せから、CFD技法を用いて、依存系ファクターの同値集合内の値の組合せを生成する依存系ファクター同値組合せ生成手段と、
前記記憶手段によって記憶された独立系ファクター情報を参照し、独立系ファクターの同値集合内の値の組合せを生成する独立系ファクター同値組合せ生成手段と、
前記依存系ファクター同値組合せ生成手段によって生成された依存系ファクターの同値集合内の値の組合せを含むテストケースと、前記独立系ファクター同値組合せ生成手段によって生成された独立系ファクターの同値集合内の値の組合せを含むテストケースとを生成するテストケース生成手段と
を備えることを特徴とするテストケース生成装置。 Of the input data that can be taken by factors that are input data items of a computer program, values in an equivalence set that are input data having one characteristic and values in an equivalence set that have other characteristics In a test case generation device configured to generate a test case for testing a computer program having a plurality of factors based on a combination of values of
Independent factor information including all values in the equivalence set of independent factors, which are the factors that constitute the branch condition independently without being combined with other factors at the branch point of the processing flow, and other at the branch point of the processing flow Group information indicating a group of dependent factors that form a branching condition by combining all values in the equivalence set of dependent factor that is a factor that constitutes a branching condition by being combined with each other factor and each other at the same branching point Input means for inputting dependency factor information including
Storage means for storing the independent factor information and the dependent factor information input by the input means;
An exhaustive combination of values in the equivalence set of dependent system factors for each group with reference to values and group information in all equivalence sets of the dependent system factors included in the dependent system factor information stored by the storage means Dependent factor equivalence combination generation that generates a combination of values in the equivalence set of dependent factors from the combination of values in the equivalence set of dependent factors generated for each group using the CFD technique Means,
Independent factor equivalence combination generating means for referring to the independent factor information stored by the storage means and generating a combination of values in the equivalence set of independent factors;
A test case including a combination of values in an equivalence set of dependent factors generated by the dependent factor equivalence combination generating means, and a value in an equivalence set of independent factors generated by the independent factor equivalence combination generating means A test case generation device comprising: test case generation means for generating a test case including a combination of
前記ファクター情報データベースから所定のファクター情報を検索するファクター情報検索手段と、
当該ファクター情報検索手段によって検索されたファクター情報と、前記記憶手段によって記憶された独立系ファクター情報及び/又は依存系ファクター情報とを比較するファクター情報比較手段と、
当該ファクター情報比較手段による比較の結果に基づいて、前記検索されたファクター情報の同値集合内の値と前記記憶された独立系ファクター情報及び/又は依存系ファクター情報の同値集合内の値とが異なるか否かを判定する判定手段と、
当該判定手段によって異なると判定された場合、異なる同値集合内の値に関する同値アンマッチ情報を出力する出力手段と
をさらに備える、請求項5又は6に記載のテストケース生成装置。 A factor information database for storing factor information including at least values in an equivalence set of factors;
Factor information search means for searching predetermined factor information from the factor information database;
Factor information comparing means for comparing the factor information searched by the factor information searching means with the independent factor information and / or the dependent factor information stored by the storage means;
Based on the result of comparison by the factor information comparison means, the value in the equivalence set of the retrieved factor information is different from the value in the equivalence set of the stored independent factor information and / or dependency factor information. Determination means for determining whether or not,
The test case generation device according to claim 5, further comprising: an output unit that outputs equivalence unmatch information regarding values in different equivalence sets when it is judged that the judgment unit differs.
前記記憶された依存系ファクター情報及び前記記憶された独立系ファクター情報には、ファクターの同値集合内の値が前記特定の値であるか否かを示す情報が含まれており、
前記依存系ファクター同値組合せ生成手段及び前記独立系ファクター同値組合せ生成手段は、前記特定の値を含む同値集合内の値の組合せを生成するように構成され、
前記テストケース生成手段は、前記特定の値を含む同値集合内の値の組合せを用いて生成されたテストケースであるか否かを示す情報を付加したテストケースを生成するように構成されている、請求項5乃至7の何れかに記載のテストケース生成装置。 When the factor takes a specific value, the computer program is described so that the processing flow ends at that point,
The stored dependent factor information and the stored independent factor information include information indicating whether or not a value in the equivalence set of factors is the specific value,
The dependent factor equivalence combination generating means and the independent factor equivalence combination generating means are configured to generate a combination of values in an equivalence set including the specific value;
The test case generation unit is configured to generate a test case to which information indicating whether the test case is generated using a combination of values in the equivalence set including the specific value is added. The test case generation device according to claim 5.
前記記憶手段に、前記入力手段によって入力された、処理フローの分岐点において他のファクターと組み合わされることなく単独で分岐条件を構成するファクターである独立系ファクターの同値集合内のすべての値を含む独立系ファクター情報と、処理フローの分岐点において他のファクターと組み合わされることによって分岐条件を構成するファクターである依存系ファクターの同値集合内のすべての値及び同一の分岐点において互いに組み合わされて分岐条件を構成する依存系ファクターのグループを示すグループ情報を含む依存系ファクター情報とを記憶させる手順と、
前記演算手段に、前記記憶手段に記憶された依存系ファクター情報に含まれる前記依存系ファクターの同値集合内のすべての値及びグループ情報を参照させ、グループ毎に依存系ファクターの同値集合内の値の網羅的な組合せを生成させる手順と、
前記演算手段に、グループ毎に生成された依存系ファクターの同値集合内の値の組合せから、CFD技法を用いて、依存系ファクターの同値集合内の値の組合せを生成させる手順と、
前記演算手段に、前記記憶手段に記憶された独立系ファクター情報を参照させ、独立系ファクターの同値集合内の値の組合せを生成させる手順と、
前記演算手段に、生成された依存系ファクターの同値集合内の値の組合せを含むテストケースと、生成された独立系ファクターの同値集合内の値の組合せを含むテストケースとを生成させる手順と
を実行させるためのコンピュータプログラム。 Among the input data that can be taken by the factor that is the input data item of the test target computer program in the computer having the input means, the arithmetic means, and the storage means , the values in the equivalence set that are input data having one characteristic In a computer program for generating a test case for testing a test target computer program having a plurality of the factors based on a combination with values in an equivalence set having other characteristics ,
The storage means includes all values in the equivalence set of independent factors that are input by the input means and are not combined with other factors at the branch point of the processing flow, and are independent factors constituting the branch condition. Branching by combining independent factor information and all values in the equivalence set of dependent factors, which are factors that constitute a branching condition by being combined with other factors at the branching point of the processing flow, and at the same branching point Storing dependent factor information including group information indicating a group of dependent factors constituting the condition;
The arithmetic means is made to refer to all values and group information in the equivalence set of the dependent factor included in the dependent factor information stored in the storage means, and values in the equivalence set of the dependent factor for each group. To generate an exhaustive combination of
A step of causing the computing means to generate a combination of values in an equivalence set of dependent factors using a CFD technique from a combination of values in an equivalence set of dependent factors generated for each group;
A procedure for causing the arithmetic means to refer to the independent factor information stored in the storage means and to generate a combination of values in an equivalence set of independent factors;
A procedure for causing the computing means to generate a test case including a combination of values in the generated equivalence set of dependent factors and a test case including a combination of values in the generated independent set of independent factors. A computer program to be executed.
前記演算手段に、CFD技法を用いて、独立系ファクターの同値集合内の値の組合せを生成させる、請求項9に記載のコンピュータプログラム。 In the procedure for generating a combination of values in the equivalence set of independent factors,
The computer program according to claim 9, wherein the computing unit is configured to generate a combination of values in an equivalence set of independent factors using a CFD technique.
ファクターの同値集合内の値を少なくとも含むファクター情報を格納するファクター情報データベースから所定のファクター情報を検索させる手順と、
検索されたファクター情報と、前記取得された独立系ファクター情報及び/又は依存系ファクター情報とを比較させる手順と、
比較の結果に基づいて、前記検索されたファクター情報の同値集合内の値と前記取得された独立系ファクター情報及び/又は依存系ファクター情報の同値集合内の値とが異なるか否かを判定させる手順とをさらに実行させ、
異なると判定された場合、前記コンピュータが備える出力手段に、異なる同値集合内の値に関する同値アンマッチ情報を出力させる手順
を実行させるための請求項9又は10に記載のコンピュータプログラム。 In the calculation means,
A procedure for retrieving predetermined factor information from a factor information database storing factor information including at least values in an equivalence set of factors;
A procedure for comparing the retrieved factor information with the acquired independent factor information and / or dependent factor information;
Based on the result of the comparison, it is determined whether the value in the equivalence set of the retrieved factor information is different from the value in the equivalence set of the acquired independent factor information and / or dependency factor information. Further steps,
The computer program according to claim 9 or 10, for causing the output means included in the computer to output equivalence unmatch information relating to values in different equivalence sets when it is determined that they are different.
前記記憶された依存系ファクター情報及び前記記憶された独立系ファクター情報には、ファクターの同値集合内の値が前記特定の値であるか否かを示す情報が含まれており、
前記依存系ファクターの同値集合内の値の組合せを生成する手順及び前記独立系ファクターの同値集合内の値の組合せを生成する手順において、前記演算手段に、前記特定の値を含む同値集合内の値の組合せを生成させ、
前記テストケースを生成する手順において、前記演算手段に、前記特定の値を含む同値集合内の値の組合せを用いて生成されたテストケースであるか否かを示す情報を付加したテストケースを生成させる、請求項9乃至11の何れかに記載のコンピュータプログラム。 When the factor takes a specific value, the computer program is described so that the processing flow ends at that point,
The stored dependent factor information and the stored independent factor information include information indicating whether or not a value in the equivalence set of factors is the specific value,
In the procedure of generating a combination of values in the equivalence set of the dependent system factor and the procedure of generating a combination of values in the equivalence set of the independent system factor, the computing means includes a value in the equivalence set including the specific value. Generate a combination of values,
In the procedure for generating the test case, a test case is generated in which information indicating whether the test means is generated using a combination of values in the equivalence set including the specific value is added to the arithmetic means. The computer program according to any one of claims 9 to 11.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004094771A JP4580670B2 (en) | 2004-03-29 | 2004-03-29 | Test case generation method and test case generation apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004094771A JP4580670B2 (en) | 2004-03-29 | 2004-03-29 | Test case generation method and test case generation apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2005284484A JP2005284484A (en) | 2005-10-13 |
| JP4580670B2 true JP4580670B2 (en) | 2010-11-17 |
Family
ID=35182822
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2004094771A Expired - Fee Related JP4580670B2 (en) | 2004-03-29 | 2004-03-29 | Test case generation method and test case generation apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4580670B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7016583B2 (en) * | 2018-04-19 | 2022-02-07 | 東芝情報システム株式会社 | Software testing methods, systems and programs |
| CN114328201B (en) * | 2021-12-21 | 2025-06-17 | 京东科技信息技术有限公司 | A test case generation method and device, electronic device and storage medium |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3105279B2 (en) * | 1991-03-04 | 2000-10-30 | 日本電信電話株式会社 | Program unit test data generation method |
| JPH07200356A (en) * | 1993-12-28 | 1995-08-04 | Hitachi Ltd | Checklist automatic clearing system |
| JP3060951B2 (en) * | 1996-06-19 | 2000-07-10 | 日本電気株式会社 | Communication software design verification method |
| JPH1115695A (en) * | 1997-06-26 | 1999-01-22 | Hitachi Ltd | Program test pattern automatic generation system |
| JP2001243090A (en) * | 2000-02-29 | 2001-09-07 | Nec Corp | System and method for automatically generating test item and machine readable recording medium with program recorded |
-
2004
- 2004-03-29 JP JP2004094771A patent/JP4580670B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2005284484A (en) | 2005-10-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9201646B2 (en) | Automatic code review and code reviewer recommendation | |
| US20040216084A1 (en) | System and method of managing web content | |
| US20230161746A1 (en) | Data pipeline branching | |
| US20080065454A1 (en) | Database system and information processing system with process code information | |
| US7630936B2 (en) | Order system payment routing | |
| JP3502543B2 (en) | Test case generation system and test case generation method | |
| CN110990055B (en) | Pull Request function classification method based on program analysis | |
| JP2005122560A (en) | Deadlock advance detection program | |
| US7814334B2 (en) | Method and apparatus for changing and adding activation keys for functions of digital content without having to change and recompile the digital content | |
| CN114817004B (en) | Test case generation method, device, equipment and readable storage medium | |
| JP4580670B2 (en) | Test case generation method and test case generation apparatus | |
| CN113918473B (en) | A combined testing method for RESTful APIs based on Swagger documentation | |
| Solomon | Optimizing full-stack development for fintech applications: Balancing user experience and backend performance in high-stakes financial environments | |
| JP7760482B2 (en) | Software configuration management data creation support device and software configuration management data creation support method | |
| JP6737063B2 (en) | Software asset management device, software asset management method, and software asset management program | |
| JP5048537B2 (en) | Workflow processing device | |
| JP4484148B2 (en) | SI target file and SI related file management system | |
| JP2008123432A (en) | Software asset management system | |
| JP7367410B2 (en) | Generation program, generation method, and information processing device | |
| JP2023157310A (en) | Model checking device and model checking method | |
| JP2004310186A (en) | Automatic journalization process, device for implementing it, its process program, and recording medium | |
| JP2010134561A (en) | Task document processing apparatus | |
| JP3540241B2 (en) | Application startup menu definition file generation device and application startup menu generation device | |
| KR20170038972A (en) | Method and apparatus for developing work system | |
| JP7799643B2 (en) | Specification verification support device, method, and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070322 |
|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20080122 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090702 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090708 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090904 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20100202 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100506 |
|
| A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20100511 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100513 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100727 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100730 |
|
| 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: 20100824 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100830 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130903 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |