JP5755861B2 - Test case generation apparatus, test case generation method, and test case generation program - Google Patents
Test case generation apparatus, test case generation method, and test case generation program Download PDFInfo
- Publication number
- JP5755861B2 JP5755861B2 JP2010204439A JP2010204439A JP5755861B2 JP 5755861 B2 JP5755861 B2 JP 5755861B2 JP 2010204439 A JP2010204439 A JP 2010204439A JP 2010204439 A JP2010204439 A JP 2010204439A JP 5755861 B2 JP5755861 B2 JP 5755861B2
- Authority
- JP
- Japan
- Prior art keywords
- path
- test case
- predicate
- unit
- determination
- 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
Links
Images
Description
本発明は、テストケース生成装置、テストケース生成方法およびテストケース生成プログラムに関する。 The present invention relates to a test case generation device, a test case generation method, and a test case generation program.
ソフトウェアの開発において、そのソフトウェアを搭載した製品が仕様を満たしているかどうかを確認したり、製品の品質を確認したりするために、ソフトウェアのテストが実施される。このテストは、重要な工程である。 In software development, software testing is performed to check whether a product on which the software is installed satisfies the specifications or to check the quality of the product. This test is an important step.
ソフトウェアの内部構造の分析を基にしたテストとして、ホワイトボックステストがある。ホワイトボックステストとは、テスト対象のソフトウェアの内部構造に関する知識を拠り所にして、テスト対象のソフトウェアが正常に機能するかどうかを確認するテストである。 There is a white box test as a test based on the analysis of the internal structure of the software. The white box test is a test for confirming whether or not the software to be tested functions normally based on knowledge about the internal structure of the software to be tested.
ホワイトボックステストの1つとして、パステストがある。パステストとは、プログラム中のコードがすべて実行されるようなテストデータに基づいてテストする技法である。パステストでは、テスト対象のソフトウェアからパス、すなわち制御フローパスを選択し、そのパスをテストする。具体的には、パステストでは、テスト対象のソフトウェアへの入力値および事前条件が予め決定された上でテストの対象ソフトウェアが実行される。そして、テストの結果が期待結果および事後条件を満たすかどうかを判定することにより、テスト対象のソフトウェアが正常に機能するかどうかを確認する。パステストは、制御フローテストとも呼ばれる。 One of the white box tests is a pass test. The path test is a technique for testing based on test data such that all code in a program is executed. In the path test, a path, that is, a control flow path is selected from the test target software, and the path is tested. Specifically, in the pass test, the test target software is executed after the input value and preconditions for the test target software are determined in advance. Then, it is determined whether or not the software to be tested functions normally by determining whether or not the test result satisfies the expected result and the post-condition. The path test is also called a control flow test.
パステスト法は、ソフトウェアのテストの基本的手法である。例えば、非特許文献1および非特許文献2に、パステスト法が記載されている。 The path test method is a basic method for testing software. For example, Non-Patent Document 1 and Non-Patent Document 2 describe a path test method.
パステストを行う場合、予め、選択されたパスと、そのパスを実行するための入力値や事前条件、および期待結果と事後条件を含むテストケースが定められる。 When performing a path test, a test case including a selected path, an input value and a precondition for executing the path, and an expected result and a postcondition are determined in advance.
非特許文献1および非特許文献2は、パステストの設計を人が行う方法を開示する。また、特許文献1および特許文献2は、上記パステストの設計を自動化したシステムの例を開示する。 Non-Patent Document 1 and Non-Patent Document 2 disclose a method in which a person performs path test design. Patent Documents 1 and 2 disclose examples of systems that automate the design of the path test.
上述したようなパステストの設計においては、選択されたパスが、いかなる入力値を組み合わせ、また設定しても、実行できない実行不可能パスが存在する。情報システム等のソフトウェアでは、フラグの意味を表わす変数を利用することによりパスを選択しており、通例、プログラム中にはフラグ条件による分岐箇所が多数存在する。 In the path test design as described above, there is an infeasible path that cannot be executed even if the selected path is combined and set with any input value. In software such as an information system, a path is selected by using a variable representing the meaning of a flag, and there are usually many branch points due to flag conditions in a program.
あるフラグがある処理中に不変である場合、ある分岐条件ではフラグが真の側に分岐し、別のある分岐ではそのフラグが偽の側に分岐することはあり得ない。このようなパスを実行不可能パスと称する。実行不可能パスがテストケースに含まれると、テストの効率が低下するという課題がある。 When a certain flag is unchanged during a certain process, the flag cannot branch to the true side under a certain branch condition, and the flag cannot branch to the false side under another branch. Such a path is called an infeasible path. When an infeasible path is included in a test case, there is a problem that test efficiency decreases.
上記いずれの先行技術文献においても、実行不可能パスがテストケースに含まれるという課題がある。 In any of the above prior art documents, there is a problem that an infeasible path is included in the test case.
本願発明は、上記課題を鑑みてなされたものであり、ソースコードが表すコンピュータプログラムのテスト効率を向上するテストケース生成装置、テストケース生成方法およびテストケース生成プログラムを提供することを主要な目的とする。 The present invention has been made in view of the above problems, and has as its main object to provide a test case generation device, a test case generation method, and a test case generation program that improve the test efficiency of a computer program represented by source code. To do.
本発明に係るテストケース生成装置は、入力されたソースコードから、そのソースコードが表すコンピュータプログラムが実行されたときの流れを示すパスをテストケースとして抽出すると共に、該抽出したパスに含まれる判断条件を抽出する抽出手段と、前記抽出された判断条件に基づいて、前記パスが実行可能であるか否かを判定し、実行可能でないと判定された場合、該パスを前記テストケースから除外する判定手段とを備える。 The test case generation device according to the present invention extracts, from the input source code, a path indicating a flow when the computer program represented by the source code is executed as a test case, and a determination included in the extracted path Based on extraction means for extracting a condition and the extracted determination condition, it is determined whether or not the path is executable. If it is determined that the path is not executable, the path is excluded from the test case. Determination means.
本発明に係るテストケース生成方法は、入力されたソースコードから、そのソースコードが表すコンピュータプログラムが実行されたときの流れを示すパスをテストケースとして抽出すると共に、該抽出したパスに含まれる判断条件を抽出し、前記抽出された判断条件に基づいて、前記パスが実行可能であるか否かを判定し、実行可能でないと判定された場合、該パスを前記テストケースから除外することを備える。 The test case generation method according to the present invention extracts, as a test case, a path indicating a flow when a computer program represented by the source code is executed from the input source code, and a determination included in the extracted path Extracting a condition, determining whether or not the path is executable based on the extracted determination condition, and removing the path from the test case when it is determined that the path is not executable .
なお同目的は、上記の各構成を有するテストケース生成装置、並びに対応する方法を、コンピュータによって実現するコンピュータ・プログラム、およびそのコンピュータ・プログラムが格納されている、コンピュータ読み取り可能な記憶媒体によっても達成される。 This object is also achieved by a computer program for realizing the test case generation apparatus having the above-described configurations and the corresponding method by a computer, and a computer-readable storage medium storing the computer program. Is done.
本願発明によれば、ソースコードが表すコンピュータプログラムのテスト効率を向上することができる効果が得られる。 According to the present invention, it is possible to improve the test efficiency of the computer program represented by the source code.
第1の実施形態
次に、本発明の実施形態について図面を参照して詳細に説明する。
First Embodiment Next, an embodiment of the present invention will be described in detail with reference to the drawings.
図1は、本発明の第1の実施形態に係るテストケース生成装置10の構成を示すブロック図である。図1に示すように、テストケース生成装置10は、入力部11、パス解析部12、述語正規化部13、実行可能性判定部14、パス解析結果記憶部15および出力部16を備える。
FIG. 1 is a block diagram showing a configuration of a test
図1のテストケース生成装置10は、コンピュータにより実現した場合、それぞれ図2に示すハードウエア構成を有する。図2に示す構成は、CPU(Central Processing Unit)40、メモリ等の記憶媒体41および記憶媒体41に含まれるプログラム42を備える。テストケース生成装置10のCPU40は、各種ソフトウエア・プログラム(コンピュータ・プログラム)を実行することにより、テストケース生成装置10の全体的な動作を司る。本実施形態および以下に示す他の実施形態において、CPU40が、メモリ等の記憶媒体41を適宜参照しながら、以下に示すテストケース生成装置10が備える各機能(各部)のソフトウエア・プログラムを実行する。
The test
より具体的には、CPU40は、メモリ等の記憶媒体41を適宜参照しながら、テストケース生成装置10が備える入力部11、パス解析部12等のソフトウエア・プログラムを実行する。
More specifically, the
テストケース生成装置10の概要について説明する。
An outline of the test
入力部11は、ソースコードを読み出すと共に、読み出したソースコードをパス解析部12に通知するする。入力部11は、例えば、ソースコード記憶部20等のハードディスクの記憶媒体に蓄積されているソースコードを読み出す機能を有する。また、入力部11は、ネットワークを介してソースコードを読み出す機能等を有してもよい。
The input unit 11 reads the source code and notifies the
パス解析部12は、入力部11からソースコードを受け取ると共に、受け取ったソースコードから、処理の流れとしてあり得る全てのパスを抽出する。パスとは、ソースコードが表すコンピュータプログラムが実行されたときの流れを表し、コンピュータプログラムの実行に際してソースコードにおけるどの箇所を通るかを示す情報である。
The
また、パス解析部12は、抽出したパスから、そのパスを制御する条件分岐における述語を抽出する。パスを制御する条件分岐における述語とは、ソースコード中の条件により分岐する箇所における判断条件を表す情報である(詳細は、図4を参照して後述する)。パス解析部12は、抽出したパスと述語とを、パス解析結果記憶部15に保存する。
The
述語正規化部13は、パス解析結果記憶部15から述語を読み出すと共に、読み出した述語を正規化して、再びパス解析結果記憶部15に保存する。ここで、述語の正規化とは、述語同士を比較可能にするために、述語の意味を変えずに表式のみを変更することである(詳細は、図4を参照して後述する)。
The
実行可能性判定部14は、パス解析結果記憶部15からパスおよびそのパスに含まれる正規化された述語を読み出すと共に、そのパスが実行可能かどうかを判定する。具体的には、実行可能性判定部14は、パスに含まれる正規化された2つの述語を読み出すと共にそれらを比較する。そして、実行可能性判定部14は、2つの述語の意味が同一か否か、あるいは一方が成立するとき他方が成立し得ない排反であるかどうか等を判定し、その判定結果に基づいて、そのパスが実行可能かどうかを判定する。
The
実行可能性判定部14は、2つの述語が実行の流れにおいて同時に成立し得ない場合、それらの述語を含むパスを実行不可能であると判定する。実行可能性判定部14は、実行不可能であると判定したパスを除いたパスの集合を、テストケースとして出力部16に通知する。
If the two predicates cannot be satisfied at the same time in the execution flow, the
出力部16は、実行可能性判定部14により得られた実行不可能なパスを含まないテストケースを出力する。出力部16は、例えば、テストケース記憶部30等のハードディスク等の記憶媒体に、結果を蓄積する機能を有する。また、出力部16は、テストケースを画面出力したりネットワークを介して出力したりするなど、様々な出力形態を有してもよい。
The
図3は、テストケース生成装置10の動作を示すフローチャートである。また、図4は、テストケース生成装置10により生成されたテストケースの具体例を示す図である。図3、図4を参照して、テストケース生成装置10の動作について説明する。
FIG. 3 is a flowchart showing the operation of the test
テストケース生成装置10の入力部11は、テストケースの生成にあたり、ソースコード記憶部20からソースコードを読み出すと共に、読み出したソースコードをパス解析部12に通知する。パス解析部12は、入力部11からソースコードを取得すると、そのソースコードから全てのパス、あるいはある指定された特定の条件下におけるパスの集合を抽出すると共に、抽出したパスをパス解析結果記憶部15に保存する(ステップS101)。
When generating the test case, the input unit 11 of the test
例えば、ソースコードが図4に示すものである場合について説明する。ソースコード51は、以下の内容を示す。すなわち、まず、処理1が実行される。次に、述語Aとして「x>0」を持った条件分岐「if」文があり、述語Aが真のときに処理2が実行され、述語Aが偽のときに処理3が実行される。次に、処理4が実行される。次に、述語Bとして述語Aと同一の「x>0」を持った条件分岐「if」文があり、述語Bが真のときに処理5が実行され、述語Bが偽のときに処理6が実行される。次に処理7が実行される。
For example, a case where the source code is as shown in FIG. 4 will be described. The
パス解析部12は、上記ソースコード51から、実行の流れとしてあり得る全てのパスを抽出する。すなわち、
パス1として、1(A真)24(B真)57
パス2として、1(A偽)34(B真)57
パス3として、1(A真)24(B偽)67
パス4として、1(A偽)34(B偽)67
というパスを抽出する。ここで、上記パスの表記において、「1」〜「7」の表記は処理名を表し、「A」、「B」の表記は述語名を表す。また、述語の後ろの「真偽」の表記は、述語が真または偽であることを表す。上記表記の順番に処理が実行される。パス解析部12は、上記抽出したパスをパス解析結果記憶部15に保存する。
The
As pass 1, 1 (A true) 24 (B true) 57
As pass 2, 1 (A false) 34 (B true) 57
As pass 3, 1 (A true) 24 (B false) 67
As pass 4, 1 (A false) 34 (B false) 67
Extract the path. In the path notation, “1” to “7” represent process names, and “A” and “B” represent predicate names. The notation “true / false” after the predicate indicates that the predicate is true or false. Processing is performed in the order of the above description. The
パス解析部12は、続いて、抽出したパスから述語を抽出する(ステップS102)。すなわち、パス解析部12はまず、パス1から述語を抽出する。述語Aとして「x>0」、述語Bとして「x>0」が、それぞれ抽出される。パス解析部12は、抽出した述語A、Bを、パス解析結果記憶部15に保存する。
Next, the
続いて、述語正規化部13は、パス解析部12により保存された述語を正規化し、その結果をパス解析結果記憶部15に保存する(ステップS103)。すなわち、述語正規化部13は、述語Aを「x>0」、述語Bを「x>0」のように、それぞれ正規化すると共に、述語Aと述語Bとが等価であることを判断(認識)する。そして、述語正規化部13は正規化した結果と、述語Aと述語Bとが等価であることとを、パス解析結果記憶部15に保存する。
Subsequently, the
続いて、実行可能性判定部14は、パス解析結果記憶部15に格納される正規化された述語に基づいて、パスが実行可能かどうかを判定し、判定結果を出力部16に出力する(ステップS104)。
Subsequently, the
ここでは、図4に示すように、述語Aと述語Bは等価である。よって、「述語Aが真」かつ「述語Bが偽」、および「述語Aが偽」かつ「述語Bが真」というケースは、成り立たない。したがって、実行可能性判定部14は、そのような条件を含むパスを実行不可能パスであると判断すると共に、該パスを、パス解析結果記憶部15に保存したパスの集合から除外したものを、テストケースとして出力部16に出力する。この場合、実行不可能なパスは、パス2、パス3である。したがって、実行可能性判定部14は、パス1とパス4とを含むパスの集合を、テストケースとして出力部16に出力する。
Here, as shown in FIG. 4, predicate A and predicate B are equivalent. Therefore, the cases where “predicate A is true” and “predicate B is false” and “predicate A is false” and “predicate B is true” are not satisfied. Therefore, the
以上のように、この第1の実施形態によれば、テストケース生成装置10のパス解析部12が、ソースコードからパスを抽出すると共に、抽出したパスから述語を抽出し、述語正規化部13が、抽出した述語を正規化する。そして、実行可能性判定部14が、正規化された述語に基づいて、パスが実行可能か否かを判定する。実行可能性判定部14は、実行不可能なパスを除外したパスの集合を、テストケースとして出力する。本実施形態は上記構成を有するので、テスト実施者がテストを実施する前にテストケースが実行可能であるかどうかを判断することが不要になるという効果が得られる。また、テストケースから実行不可能なパスを除外できるため、テストケース数が少なくなり、ソースコードが表すコンピュータプログラムのテスト効率を向上することができるという効果が得られる。
As described above, according to the first embodiment, the
なお、本第1の実施形態および以下の各実施形態において、述語同士の関係を判断することは、述語正規化部13により実施されることに限らず、実行可能性判定部14により実施されてもよい。
In the first embodiment and each of the following embodiments, determining the relationship between predicates is not limited to being performed by the
第2の実施形態
第2の実施形態では、上記第1の実施形態において説明したテストケース生成装置10によりテストケースを生成する別の例について説明する。
Second Embodiment In the second embodiment, another example in which a test case is generated by the test
図5は、テストケース生成装置10により生成されるテストケースの具体例を示す図である。図5に示すソースコード52は、図4に示したソースコード51と、述語Aおよび述語Bの内容が異なることを除いてソースコード51と同一である。すなわち、ここでは、述語Aが「x>1」であり、述語Bが「0<x−1」である。
FIG. 5 is a diagram illustrating a specific example of a test case generated by the test
テストケース生成装置10は、図3に示した動作と同様の動作を行う。すなわち、パス解析部12は、入力部11からソースコード52を取得し、そのソースコード52からパスを抽出すると共に、抽出したパスをパス解析結果記憶部15に保存する。ここでは、パス解析部12は第1の実施形態と同一のパス1−4を抽出する。
The test
続いて、パス解析部12は、抽出したパスから述語を抽出すると共に、抽出した述語をパス解析結果記憶部15に保存する。ここでは、パス解析部12は、述語Aとして「x>1」、述語Bとして「0<x−1」を抽出し、これらをパス解析結果記憶部15に保存する。
Subsequently, the
続いて、述語正規化部13は、パス解析部12により保存された述語を正規化すると共に、その結果をパス解析結果記憶部15に保存する。すなわち、述語正規化部13は、述語Aを「x>1」、述語Bを「x>1」のように、それぞれ正規化すると共に、述語Aと述語Bとが等価であることを認識する。そして、述語正規化部13は正規化した結果と、述語Aと述語Bとが等価であることとを、パス解析結果記憶部15に保存する。
Subsequently, the
続いて、実行可能性判定部14は、パス解析結果記憶部15に格納される正規化された述語に基づいて、パスが実行可能かどうかを判定し、判定結果を出力部16に出力する。
Subsequently, the
ここでは、第1の実施形態と同様に、述語Aと述語Bは等価である。よって、「述語Aが真」かつ「述語Bが偽」、および「述語Aが偽」かつ「述語Bが真」というケースは、成り立たない。したがって、実行可能性判定部14は、第1の実施形態と同様に、そのような条件を含むパスを実行不可能パスであると判断すると共に、該パスを、パス解析結果記憶部15に保存したパスの集合から除外したものを、テストケースとして出力部16に出力する。すなわち、実行可能性判定部14は、パス2およびパス3をパスの集合から除外したパス1およびパス4を、テストケースとして出力部16に出力する。
Here, as in the first embodiment, predicate A and predicate B are equivalent. Therefore, the cases where “predicate A is true” and “predicate B is false” and “predicate A is false” and “predicate B is true” are not satisfied. Therefore, the
以上のように、この第2の実施形態によれば、上記第1の実施形態と同様に、テストケース生成装置10のパス解析部12が、ソースコードからパスを抽出すると共に、抽出したパスから述語を抽出し、述語正規化部13が、抽出した述語を正規化する。そして、実行可能性判定部14が、正規化された述語に基づいて、パスが実行可能か否かを判定する。実行可能性判定部14は、実行不可能なパスを除外したパスの集合を、テストケースとして出力する。本実施形態は上記構成を有するので、テスト実施者がテストを実施する前にテストケースが実行可能であるかどうかを判断することが不要になるという効果が得られる。また、テストケースから実行不可能なパスを除外できるため、テストケース数が少なくなり、ソースコードが表すコンピュータプログラムのテスト効率を向上することができるという効果が得られる。
As described above, according to the second embodiment, as in the first embodiment, the
第3の実施形態
第3の実施形態では、上記第1の実施形態において説明したテストケース生成装置10によりテストケースを生成する別の例について説明する。
Third Embodiment In the third embodiment, another example in which a test case is generated by the test
図6は、テストケース生成装置10により生成されるテストケースの具体例を示す図である。図6に示すソースコード53は、図4に示したソースコード51と、述語Aおよび述語Bの内容が異なることを除いてソースコード51と同一である。すなわち、ここでは、述語Aがx>0であり、述語Bがx<=0である。
FIG. 6 is a diagram illustrating a specific example of a test case generated by the test
テストケース生成装置10は、図3に示した動作と同様の動作を行う。すなわち、パス解析部12は、入力部11からソースコード52を取得し、そのソースコード52からパスを抽出すると共に、抽出したパスをパス解析結果記憶部15に保存する。ここでは、パス解析部12は第1の実施形態と同一のパス1−4を抽出する。
The test
続いて、パス解析部12は、抽出したパスから述語を抽出すると共に、抽出した述語をパス解析結果記憶部15に保存する。ここでは、パス解析部12は、述語Aとしてx>0、述語Bとしてx<=0を抽出し、これらをパス解析結果記憶部15に保存する。
Subsequently, the
続いて、述語正規化部13は、パス解析部12により保存された述語を正規化すると共に、その結果をパス解析結果記憶部15に保存する。すなわち、述語正規化部13は、述語Aを「x>0」、述語Bを「x<=0」のように、それぞれ正規化すると共に、述語Aの否定と述語Bとが等価であることを認識する。そして、述語正規化部13は正規化した結果と、述語Aの否定と述語Bとが等価であることとを、パス解析結果記憶部15に保存する。
Subsequently, the
続いて、実行可能性判定部14は、パス解析結果記憶部15に格納される正規化された述語に基づいて、パスが実行可能かどうかを判定し、判定結果を出力部16に出力する。
Subsequently, the
ここでは、述語Aの否定と述語Bとが等価である。よって、述語Aと述語Bとは互いに排反であるので、「述語Aが真」かつ「述語Bが真」、および「述語Aが偽」かつ「述語Bが偽」というケースは、成り立たない。したがって、実行可能性判定部14は、そのような条件を含むパスを実行不可能パスであると判断すると共に、該パスを、パス解析結果記憶部15に保存したパスの集合から除外したものを、テストケースとして出力部16に出力する。すなわち、実行可能性判定部14は、パス1およびパス4をパスの集合から除外したパス2およびパス3を、テストケースとして出力部16に出力する。
Here, the negation of predicate A and predicate B are equivalent. Thus, since predicate A and predicate B are mutually exclusive, the cases where “predicate A is true” and “predicate B is true” and “predicate A is false” and “predicate B is false” do not hold. . Therefore, the
以上のように、この第3の実施形態によれば、上記第1の実施形態と同様に、テストケース生成装置10のパス解析部12が、ソースコードからパスを抽出すると共に、抽出したパスから述語を抽出し、述語正規化部13が、抽出した述語を正規化する。そして、実行可能性判定部14が、正規化された述語に基づいて、パスが実行可能か否かを判定する。実行可能性判定部14は、実行不可能なパスを除外したパスの集合を、テストケースとして出力する。本実施形態は上記構成を有するので、テスト実施者がテストを実施する前にテストケースが実行可能であるかどうかを判断することが不要になるという効果が得られる。また、テストケースから実行不可能なパスを除外できるため、テストケース数が少なくなり、ソースコードが表すコンピュータプログラムのテスト効率を向上することができるという効果が得られる。
As described above, according to the third embodiment, as in the first embodiment, the
第4の実施形態
図7は、本発明の第4の実施形態に係るテストケース生成装置60の構成を示すブロック図である。図7に示すように、テストケース生成装置60は、抽出部61および判定部62を備える。
Fourth Embodiment FIG. 7 is a block diagram showing a configuration of a test
抽出部61は、入力されたソースコードから、そのソースコードが表すコンピュータプログラムが実行されたときの流れを示すパスをテストケースとして抽出すると共に、該抽出したパスに含まれる判断条件を抽出する。判定部62は、抽出された判断条件に基づいて、パスが実行可能であるか否かを判定し、実行可能でないと判定された場合、該パスをテストケースから除外する。
The
抽出部61は、第1の実施形態のパス解析部12に相当し、判定部62は、第1の実施形態の述語正規化部13および実行可能性判定部14に相当する。
The
以上のように、第4の実施形態によれば、テストケース生成装置60は上記構成を有するので、ソースコードが表すコンピュータプログラムのテスト効率を向上することができるという効果が得られる。
As described above, according to the fourth embodiment, since the test
本発明は、例えばソフトウェア開発におけるテストにおいてテストケースを生成するテストケース生成装置、テストケース生成装置をコンピュータに実現するためのプログラムといった用途に適用できる。また、テストケースを生成する機能を、ハードウエア開発におけるハードウエアに対するテストケース生成機能や、モデルベース開発におけるモデルに対するテストケース生成機能や、ビジネスロジックやビジネスプロセス等の論理記述言語に対するテストケース生成機能にも適用できる。 The present invention can be applied to uses such as a test case generation apparatus that generates a test case in a test in software development, and a program for realizing the test case generation apparatus on a computer. The test case generation function includes the test case generation function for hardware in hardware development, the test case generation function for models in model-based development, and the test case generation function for logical description languages such as business logic and business processes. It can also be applied to.
10 テストケース生成装置
11 入力部
12 パス解析部
13 述語正規化部
14 実行可能性判定部
15 パス解析結果記憶部
16 出力部
20 ソースコード記憶部
30 テストケース記憶部
40 CPU
41 記憶媒体
42 プログラム
60 テストケース生成装置
61 抽出部
62 判定部
DESCRIPTION OF
41
Claims (3)
前記抽出手段により抽出された判断条件を正規化する正規化手段と、
前記正規化手段により正規化された判断条件に基づいて、前記パスが実行可能であるか否かを判定し、実行可能でないと判定された場合、該パスを前記テストケースから除外する判定手段と
を備え、
前記判定手段は、前記正規化手段により正規化された複数の判断条件を含むパスのうち、当該複数の判断条件が互いに等価である場合に成立しないパス、および当該複数の判断条件が互いに排反する場合に成立しないパスを、実行可能でないと判定し、前記テストケースから除外するテストケース生成装置。 An extraction means for extracting, as a test case, a path indicating a flow when the computer program represented by the source code is executed from the input source code, and extracting a determination condition included in the extracted path;
Normalizing means for normalizing the judgment condition extracted by the extracting means;
A determination unit that determines whether or not the path is executable based on the determination condition normalized by the normalization unit; and when the path is determined not to be executable, a determination unit that excludes the path from the test case; equipped with a,
The determination unit includes a plurality of determination conditions normalized by the normalization unit, a path that does not hold when the plurality of determination conditions are equivalent to each other, and the plurality of determination conditions are mutually exclusive. A test case generation device that determines that a path that does not hold in the case is not executable and excludes the path from the test case.
前記抽出された判断条件を正規化し、 Normalizing the extracted judgment condition;
前記正規化された判断条件に基づいて、前記パスが実行可能であるか否かを判定し、実行可能でないと判定された場合、該パスを前記テストケースから除外し、 Based on the normalized determination condition, determine whether or not the path is executable, and if it is determined that the path is not executable, exclude the path from the test case,
前記パスが実行可能であるか否かの判定にあたり、前記正規化された複数の判断条件を含むパスのうち、当該複数の判断条件が互いに等価である場合に成立しないパス、および当該複数の判断条件が互いに排反する場合に成立しないパスを、実行可能でないと判定し、前記テストケースから除外するテストケース生成方法。 In determining whether the path can be executed, among the paths including the plurality of normalized determination conditions, a path that is not satisfied when the plurality of determination conditions are equivalent to each other, and the plurality of determinations A test case generation method that determines that a path that does not hold when the conditions are mutually exclusive is not executable and excludes the path from the test case.
前記抽出された判断条件を正規化する正規化処理と、 Normalization processing for normalizing the extracted judgment condition;
前記正規化された判断条件に基づいて、前記パスが実行可能であるか否かを判定し、実行可能でないと判定された場合、該パスを前記テストケースから除外する判定処理と、 Based on the normalized determination condition, it is determined whether or not the path is executable, and when it is determined that the path is not executable, a determination process of excluding the path from the test case;
前記判定処理において、前記正規化された複数の判断条件を含むパスのうち、当該複数の判断条件が互いに等価である場合に成立しないパス、および当該複数の判断条件が互いに排反する場合に成立しないパスを、実行可能でないと判定し、前記テストケースから除外する処理を、コンピュータに実行させるテストケース生成プログラム。 In the determination process, among the paths including the plurality of normalized determination conditions, a path that is not satisfied when the plurality of determination conditions are equivalent to each other, and a path that is not satisfied when the plurality of determination conditions are mutually exclusive A test case generation program for causing a computer to execute a process of determining that a pass is not executable and excluding it from the test case.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010204439A JP5755861B2 (en) | 2010-09-13 | 2010-09-13 | Test case generation apparatus, test case generation method, and test case generation program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010204439A JP5755861B2 (en) | 2010-09-13 | 2010-09-13 | Test case generation apparatus, test case generation method, and test case generation program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012059202A JP2012059202A (en) | 2012-03-22 |
JP5755861B2 true JP5755861B2 (en) | 2015-07-29 |
Family
ID=46056184
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010204439A Active JP5755861B2 (en) | 2010-09-13 | 2010-09-13 | Test case generation apparatus, test case generation method, and test case generation program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5755861B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5900197B2 (en) * | 2012-01-31 | 2016-04-06 | 富士通株式会社 | Route condition selection apparatus, program, and method |
JP5900212B2 (en) * | 2012-07-18 | 2016-04-06 | 富士通株式会社 | Test data generation apparatus, program, and method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04260941A (en) * | 1991-01-25 | 1992-09-16 | Mitsubishi Electric Corp | Automatic formation device for test data |
JPH04271440A (en) * | 1991-02-27 | 1992-09-28 | Hitachi Ltd | System for automatically preparing test item |
JP2000347900A (en) * | 1999-06-02 | 2000-12-15 | Fujitsu Ltd | Input parameter generating device and method, and recording medium |
-
2010
- 2010-09-13 JP JP2010204439A patent/JP5755861B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2012059202A (en) | 2012-03-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6607565B2 (en) | Integrated automated test case generation for safety critical software | |
US20090319829A1 (en) | Pattern extraction method and apparatus | |
JP2016115175A (en) | Software test apparatus and software test program | |
JP2008191963A (en) | Source code verification system, source code verification method and source code verification program | |
JP6559600B2 (en) | Information processing apparatus, information processing program, and inspection system | |
US20150220733A1 (en) | Apparatus and method for detecting a malicious code based on collecting event information | |
JP5755861B2 (en) | Test case generation apparatus, test case generation method, and test case generation program | |
JP2012181666A (en) | Information processing device, information processing method and information processing program | |
JP6903249B2 (en) | Test case generator, test case generator, and test case generator | |
JP6790921B2 (en) | Program analyzer, program analysis method and program analysis program | |
JP6107455B2 (en) | Test schedule determination device and program | |
JP2009134360A (en) | Model inspection system, model inspection method, and model inspection program | |
WO2012049816A1 (en) | Model checking device, method, and program | |
JP6723483B2 (en) | Test case generation device, test case generation method, and test case generation program | |
JP6878707B2 (en) | Test equipment, test methods and test programs | |
JP2017151594A (en) | Supporting device, supporting method, and program | |
JP5516277B2 (en) | Test case relation extraction method, test case relation extraction device, and test case relation extraction program | |
JP6362970B2 (en) | Compiling method, compiling device, and compiler program | |
US11907710B2 (en) | Source code analysis apparatus | |
JP7059827B2 (en) | Source code generator | |
JP2018147114A (en) | Test case generation method, computer, and program | |
JP5233354B2 (en) | Property verification system, property verification method, and program | |
JP2008262473A (en) | Equipment maintenance management system | |
JP2013061893A (en) | Information processor, information processing method, and program | |
JP2014115960A (en) | Verification device, verification method, and verification program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130815 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140520 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140603 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140723 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140930 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20141106 |
|
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: 20150507 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150528 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5755861 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |