JP6604892B2 - Rule test apparatus and rule test method - Google Patents
Rule test apparatus and rule test method Download PDFInfo
- Publication number
- JP6604892B2 JP6604892B2 JP2016077762A JP2016077762A JP6604892B2 JP 6604892 B2 JP6604892 B2 JP 6604892B2 JP 2016077762 A JP2016077762 A JP 2016077762A JP 2016077762 A JP2016077762 A JP 2016077762A JP 6604892 B2 JP6604892 B2 JP 6604892B2
- Authority
- JP
- Japan
- Prior art keywords
- test
- rule
- case
- input
- logical
- 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 rule test apparatus and a rule test method for detecting a failure of a rule.
流通や金融などの業務を支援するソフトウェアは、商品、サービス等の業務に関する法的な規制、業務上の規則および基準等(以下、「業務規則」という)に従って仕様が決定され設計される。
そのようなソフトウェアでは、IF−THEN形式でその仕様を整理する場合がある。IF−THEN形式の仕様(以下、IF節を「条件部」、THEN節を「結果部」という)は、ビジネスルール、システムルールおよびチェックルールなどのように、適用するフェーズに応じて様々な呼び名がある(以下、これらを「ルール」という)。ルールは、「もし〜ならば〜である」のような自然文による記述、「IF A=1 AND B=2 THEN R=1」のようなコンピュータにより解釈可能な所定の規則に従った記述および条件と結果の対応関係を表形式で定義した決定表による記述など、さまざまな形態で表現される。
Software that supports operations such as distribution and finance has its specifications determined and designed in accordance with legal regulations, business rules and standards (hereinafter referred to as “business rules”) regarding business such as products and services.
Such software may organize its specifications in IF-THEN format. The specifications in the IF-THEN format (hereinafter, IF clause is called “condition part” and THEN clause is called “result part”), such as business rules, system rules, check rules, etc. (Hereafter, these are called “rules”). The rule is a description in a natural sentence such as “if is”, a description according to a predetermined rule interpretable by a computer such as “IF A = 1 AND B = 2 THEN R = 1”, and Expressed in various forms, such as a description in a decision table that defines the correspondence between conditions and results in tabular form.
ルールは、業務規則に従って決定されるため、業務規則と整合している必要がある。整合性しているかどうかは、例えば、有識者によるレビューによって確認できる。しかし、例えば法的な規制を例にとると、膨大な数のルールがあり、また、ルール間の依存関係などにより複雑である。そのため、レビューでは、ルールと業務規則の整合性を確認することは非常に困難である。
ルールが、規則と整合しているかを確認する別の方法として、ルールに対して具体的な入力値を与え、期待する結果が得られるかを確認する方法(以下、「テスト」という)が、例えば、特許文献1に開示されている。
Since the rules are determined according to the business rules, they need to be consistent with the business rules. Whether it is consistent or not can be confirmed by a review by an expert, for example. However, taking legal regulations as an example, there are an enormous number of rules, and they are complicated by the dependency between rules. Therefore, it is very difficult to check the consistency between rules and business rules in reviews.
Another way to check if a rule is consistent with the rule is to give a specific input value to the rule and check if the expected result is obtained (hereinafter referred to as “test”) For example, it is disclosed in Patent Document 1.
特許文献1に開示されている技術により、具体的な入力値を使って、テストした範囲内で、ルールと業務規則の整合性を保証できるが、テストしていない範囲については、ルールと業務規則の整合性を保証できない。ルールと業務規則の整合性を保証するには、起こり得る全ての入力値の組合せを使ってテストする必要がある。しかし、起こり得る入力値の組合せ数が膨大になると、実用時間でテストを完了させることは、困難になる。 With the technology disclosed in Patent Document 1, it is possible to guarantee the consistency between rules and business rules within a tested range using specific input values. Cannot be guaranteed. To ensure consistency between rules and business rules, it is necessary to test using all possible combinations of input values. However, if the number of possible input value combinations becomes enormous, it will be difficult to complete the test in practical time.
本発明に係るルールテスト装置は、ソフトウェア仕様としてIF−THEN形式で記述したルールのテスト装置であって、前記ルールが成立するための条件を格納する条件部と当該条件が成立した場合の結果を格納する結果部とを含むルールの1以上の集まりであるルールセットを受け付けるルール作成・修正部と、論理式で記述されたテストの対象とする入力値の条件を格納する入力条件部と当該入力値の条件を満たす入力に対して期待する結果を格納する期待出力条件部とを含む1以上の論理テストケースを受け付けるテストケース修正・作成部と、1以上の前記ルールセットと1つの前記論理テストケースから、当該ルールセットの入出力のうち、当該論理テストケースの入力条件を満たしかつ当該論理テストケースの期待出力条件を満たさないケースを表す不合格ケース生成式を生成し、当該不合格ケース生成式の充足可能性を判定することで前記論理テストケースの入力条件を満たす全入力に対する結果が前記期待出力条件を満たすか否かの合否を判定するテスト実行部と、テスト実行部が判定したテスト結果を出力するテスト結果出力部とを備える。 The rule test apparatus according to the present invention is a rule test apparatus described in the IF-THEN format as a software specification, wherein a condition part for storing a condition for satisfying the rule and a result when the condition is satisfied are obtained. A rule creation / correction unit that accepts a rule set that is a set of one or more rules including a result part to be stored; an input condition unit that stores a condition of an input value to be tested described in a logical expression; and the input A test case correcting / creating unit that accepts one or more logical test cases including an expected output condition part that stores an expected result for an input that satisfies a value condition, one or more rule sets, and one logical test From the case, the input / output of the rule set satisfies the input condition of the logical test case and the expected output condition of the logical test case The result for all inputs that satisfy the input conditions of the logical test case is determined by generating a fail case generation expression that represents a case not to be satisfied and determining whether the fail case generation expression is satisfactory. A test execution unit that determines whether or not the test is performed, and a test result output unit that outputs a test result determined by the test execution unit.
本発明に係るルールテスト装置によれば、1つのテストケースで複数の入力に対してテストが実施でき、また、テストしていないルールへの入力を検知でき、ルールの網羅的なテストが実用時間で実施可能になる。 According to the rule test apparatus of the present invention, a test can be performed on a plurality of inputs in one test case, and an input to an untested rule can be detected. Can be implemented.
以下、本発明に係る実施形態を、実施例として、図面を参照して説明する。なお、以下に説明する実施形態は、特許請求の範囲に係る発明を限定するものではなく、また実施形態の中で説明する諸要素およびその組み合わせの全てが発明の解決手段に必須であるとは限らない。 DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments according to the present invention will be described as examples with reference to the drawings. The embodiments described below do not limit the invention according to the claims, and all elements and combinations thereof described in the embodiments are essential for the solution of the invention. Not exclusively.
本実施形態では、装置利用者がルールの不具合を検出するルールテスト装置を実施例として説明する。
図1は、本発明の実施例に係るルールテスト装置100の構成の例を示す図である。ルールテスト装置100は、少なくとも、CPU(Central Processing Unit)等のプロセッサ131、RAM(Random Access Memory)、ROM(Read Only Memory)等のメモリ132、補助記憶装置120、および、キーボード、表示モニタ等の入出力装置133を備えたコンピュータである。
In the present embodiment, a rule test apparatus in which an apparatus user detects a failure of a rule will be described as an example.
FIG. 1 is a diagram illustrating an example of the configuration of a
また、ルールテスト装置100は、ルール作成・修正部101、テストケース作成・修正部102、テストケース漏れ検査部103、テスト実行部104、テスト結果出力部105、補完テストケース生成部106、不具合箇所分析部107および影響範囲分析部108の機能ロジックを備える。これらの機能ロジックは、コンピュータプログラムとして実現され、メモリ132上でプロセッサ131により実行される。
さらに、ルールテスト装置100は、テストケース記録部121、ルール記録部122およびテスト結果記録部123などのデータを補助記憶装置120に保管している。これらのデータは、プロセッサ131が前述した機能ロジックを実行する際に補助記憶装置120から読み出して使用される。
Also, the
Further, the
図2は、2つのルールセット(RS1およびRS2)と1つのテストケースを使用したルールテストの例を示す図である。ルールセットについては後述する。条件部と結果部を有するルールは、ID(識別子)が付されている。例えば、条件部が「2001 <= 加入年」で、結果部が「加入期間 = 適用年 − 加入年」であるルールは、そのIDとしてR1が付され、「IF 2001 <=加入年 THEN 加入期間 = 適用年 − 加入年」を意味する。 FIG. 2 is a diagram illustrating an example of a rule test using two rule sets (RS1 and RS2) and one test case. The rule set will be described later. An ID (identifier) is attached to a rule having a condition part and a result part. For example, a rule in which the condition part is “2001 <= subscription year” and the result part is “subscription period = application year−subscription year” is given R1 as its ID, and “IF 2001 <= subscription year THEN subscription period” = Applicable year-Joined year ".
ルールを適用するときに、値が付与される変数を「入力項目」と呼び、ルールを適用した結果、値が付与される変数を「出力項目」と呼ぶ。
加入期間計算(RS2)のR1およびR2のルールでは、「適用年」および「加入年」が入力項目であり、「加入期間」が出力項目である。そして、入力項目の値を「入力値」、出力項目の値を「出力値」と呼ぶ。例えば、R1のルールでは、「適用年」および「加入年」として付与される値「2015」および「1995」が入力値であり、「加入期間」として付与される「20」(=2015−1995)が出力値である。
When applying a rule, a variable to which a value is assigned is called an “input item”, and a variable to which a value is assigned as a result of applying the rule is called an “output item”.
In the rule of R1 and R2 of the subscription period calculation (RS2), “applicable year” and “subscription year” are input items, and “subscription period” is an output item. The value of the input item is called “input value”, and the value of the output item is called “output value”. For example, in the rule of R1, values “2015” and “1995” given as “application year” and “joining year” are input values, and “20” (= 2015-1995) given as “subscription period”. ) Is the output value.
また、会員特典付与判定(RS1)のR1〜R8のルールでは、「特典付与」が出力項目であり、「しない」が出力値である。図2から明らかなように、入力値および出力値は必ずしも数値ではなく、文字列などの場合もある(以下、入力とは、入力値の集まりのことである)。 Further, in the rules R1 to R8 of the member privilege grant determination (RS1), “privilege grant” is an output item, and “do not” is an output value. As is clear from FIG. 2, the input value and the output value are not necessarily numerical values but may be a character string or the like (hereinafter, input is a collection of input values).
このようなルールの集まりを「ルールセット」と呼ぶ。図2では、会員特典付与判定と加入期間計算の2つのルールセット(RS1とRS2)を表している。ルールセットは1以上のルールの集まりであるところ、各ルールの出力項目は同一である。また、ルールが複数であれば、入力は、ルールセットに含まれるルールのいずれか1つのルールの条件部を真とする(成立させる)。例えば、加入期間計算のルールセット(RS2)においては、各ルールの出力項目は同一の「加入期間」である。「適用年」と「加入年」へ入力値を割当てると、R1〜R2のルールのいずれか1つの条件部を真とする。 A collection of such rules is called a “rule set”. In FIG. 2, two rule sets (RS1 and RS2) of member privilege grant determination and subscription period calculation are represented. Where a rule set is a collection of one or more rules, the output items of each rule are the same. If there are a plurality of rules, the input is true (establishes) the condition part of any one of the rules included in the rule set. For example, in the rule set (RS2) for calculating the subscription period, the output items of each rule are the same “subscription period”. When an input value is assigned to the “applied year” and “joined year”, any one of the condition parts of the rules R1 to R2 is true.
図2では、加入期間計算のルールセット(RS2)の出力項目は、会員特典付与判定のルールセット(RS1)の入力項目の1つとして用いられる(以下、ルールセットの出力項目が別のルールセットの入力項目になっている場合、これら2つのルールセット間の関係を「依存関係」という)。また、図2から明らかなように、入力項目には、他のルールセットの出力項目になっている入力項目と、他のルールセットの出力項目になっていない入力項目が存在する(以下、他のルールセットの出力項目になっている入力項目を、「依存入力項目」といい、他のルールセットの出力項目になっていない入力項目を、「非依存入力項目」という)。 In FIG. 2, the output item of the rule set for calculating the subscription period (RS2) is used as one of the input items of the rule set (RS1) for determining membership benefits (hereinafter, the output item of the rule set is a different rule set). The relationship between these two rule sets is called “dependency”. As is clear from FIG. 2, the input items include input items that are output items of other rulesets and input items that are not output items of other rulesets (hereinafter, other items). An input item that is an output item of the rule set is called a “dependent input item”, and an input item that is not an output item of another rule set is called an “independent input item”).
会員特典付与判定のルールセット(RS1)の入力項目では、ルールセットおよびルールの入力項目は1つとは限らず、個々の入力項目の条件式は演算子で結合されている。会員特典付与判定のルールセット(RS1)では、ANDの論理演算子を用いている。
なお、ルールセットの各ルールの出力項目は同一であるとしたが、複数種の出力項目に共通する(共用できる)ルールがある場合、1つのルールセットに複数種の出力項目を持たせることも可能である。しかし、ルールセットに複数種の出力項目があると、業務規則の変更に応じて、そのルールセットのルールの変更が複雑になる。そこで、ルールセットの意味の分かり易さおよびルールの変更の容易さの観点からいえば、複数種の出力項目に対しては、それぞれ1つの出力項目を有する複数のルールセットを設けることが望ましい。
In the input items of the rule set (RS1) for member privilege grant determination, the rule set and the input items of the rule are not limited to one, and the conditional expressions of the individual input items are combined by an operator. In the rule set (RS1) for member privilege grant determination, an AND logical operator is used.
Although the output items of each rule in the rule set are the same, if there are rules that are common to (can be shared with) multiple types of output items, a single rule set may have multiple types of output items. Is possible. However, if there are multiple types of output items in a rule set, changing the rules of the rule set becomes complicated according to changes in business rules. Therefore, from the viewpoint of easy understanding of the meaning of the rule set and easy change of the rule, it is desirable to provide a plurality of rule sets each having one output item for a plurality of types of output items.
これらのルールセット(1つの場合もある)単位で、業務規則と整合しているかを確認するため、まず、業務規則を人が解釈し、入力と期待する結果を作成する(以下、「テストケース」という)。次に、当該入力をルールセットに与え、得られる結果が期待を満たすか確認する。このとき、ルールセット間の依存関係を考慮せずにテストを実施する場合は、依存入力項目と非依存入力項目の両方に対する入力値を入力とする。また、ルールセット間の依存関係を考慮してテストを実施する場合は、非依存入力項目に対する入力値を入力とする。 In order to check whether these rulesets (which may be one) are consistent with the business rules, first, humans interpret the business rules and create the input and expected results (hereinafter referred to as “test cases”). "). Next, the input is given to the rule set, and it is confirmed whether the obtained result satisfies the expectation. At this time, when the test is performed without considering the dependency relationship between the rule sets, input values for both the dependent input item and the independent input item are input. When a test is performed in consideration of the dependency relationship between rule sets, an input value for an independent input item is used as an input.
図2の例では、「会員特典付与判定」と「加入期間計算」に対して、入力として、「適用年:2015、加入年:1995、年齢:40」を与えた結果、会員特典付与判定(RS1)のルールR5と加入期間計算(RS2)のルールR2が適用され、期待する結果としての「特典付与:しない」を満たす結果である「特典付与:しない」が得られる。よって、テストに合格していることが判明する。 In the example of FIG. 2, as a result of giving “applicable year: 2015, subscription year: 1995, age: 40” as inputs to “member privilege grant determination” and “subscription period calculation”, member privilege grant determination ( The rule R5 of the RS1) and the rule R2 of the subscription period calculation (RS2) are applied, and “privilege grant: not” that is a result satisfying “privilege grant: not” as the expected result is obtained. Therefore, it turns out that the test is passed.
以降では、入力に対して適用されるルールの集合を「適用ケース」という。なお、適用ケースにおいて、各ルールが含まれるルールセットはすべて異なっている。
本発明に係るルールテスト装置が実現するルールテストでは、テストケースとして具体的な入力値ではなく、論理式で記述されたテストを行う入力の条件(以下、「入力条件」という)と期待する結果の条件(以下、「期待出力条件」という)を使用する。
Hereinafter, a set of rules applied to the input is referred to as an “application case”. In the application case, all rule sets including each rule are different.
In the rule test realized by the rule test apparatus according to the present invention, not a specific input value as a test case but an input condition (hereinafter referred to as “input condition”) for performing a test described by a logical expression and an expected result (Hereinafter referred to as “expected output condition”).
図1に示すルールテスト装置100の各処理部の説明として、論理式で記述されたテストケースを用いたルールのテストの概要を含めて説明する(以下、論理式で記述されたテストケースを「論理テストケース」という。)。
ルール作成・修正部101は、装置利用者が追加、変更または削除した入力項目、出力項目およびルールに関する情報を受け付け、ルール記録部122に登録する。
テストケース作成・修正部102は、装置利用者が追加、変更または削除した論理テストケースに関する情報を受け付け、テストケース記録部121に登録する。
As an explanation of each processing unit of the
The rule creation /
The test case creation /
テストケース漏れ検査部103は、テストの対象とするルールセットが同一である1つ以上のテストケースの集まり(以下、「テストケースセット」という。)ごとに、テスト対象とするルールセットに起こり得る入力のうち、当該テストケースセットでは、テストしていない入力(以下、「入力の漏れ」という)が存在するかどうかを判定する。テストケース漏れ検査部103の処理については後述する。
The test case
テスト実行部104は、ルール記録部122に登録されているルールが、テストケース記録部121に登録されている各論理テストケースの入力条件を満たす全入力において、ルールの適用結果が期待出力条件を満たすかどうか判定する。この論理テストケースの入力条件を満たす全入力において、ルールの適用結果が期待出力条件を満たす場合は、テスト合格とみなし、ルールの適用結果が期待出力条件を満たさないケースがひとつでも存在する場合は、テスト不合格とみなす。
The
次に、テスト実行部104は、論理テストケースの入力条件を満たす入力において、結果が期待出力条件を満たすケースでの適用ケース(以下、「合格ケース」という)と、結果が期待出力条件を満たさないケースでの適用ケース(以下、「不合格ケース」という)をすべて取得する。図2では、入力として、「適用年:2015、加入年:1995、年齢:40」が与えられると、加入期間計算(RS2)のルールR2と、会員特典付与判定(RS1)のルールR5の条件部が真となり、これらのルールがそれぞれ適用される。その結果は「特典付与:しない」である。これは、期待する結果を満たす結果であるから、「加入期間計算(RS2)のルールR2および会員特典付与判定(RS1)のルールR5」は、合格ケースとなる。テスト実行部104の処理については後述する。次に、テスト実行部104は、テストの結果として、各論理テストケースの合否、合格ケースおよび不合格ケース(以下、「テスト結果」という)をテスト結果記録部123に記録する。
Next, the
テスト結果出力部105は、テスト結果記録部123に登録されたテスト結果を装置利用者等に対して表示する。
補完テストケース生成部106は、テストケース漏れ検査部103で検出した入力の漏れを対象とする論理テストケースを生成する。補完テストケース生成部106の処理については後述する。また、補完テストケース生成部106は、生成した論理テストケースをテストケース記録部121に記録する。
The test
The complementary test
不具合箇所分析部107は、テスト結果記録部123に記録されたテスト結果を用いて、不合格ケースに偏って含まれるルールや不合格ケースに共通するルールを特定する。不具合箇所分析部107の処理については後述する。
影響範囲分析部108は、ルールの編集を検知し、当該ルールの編集内容とテスト結果記録部123に登録されたテスト結果を用いて、テスト結果記録部123に記録された論理テストケースのうち、当該ルールの編集の結果、テスト結果の合否が変わる可能性のある論理テストケースを特定する。影響範囲分析部108の処理については後述する。
The failure location analysis unit 107 uses the test result recorded in the test
The influence range analysis unit 108 detects the editing of the rule, and uses the edited content of the rule and the test result registered in the test
図3は、ルール記録部122のデータ構造の例を示す図である。ルール記録部122は、ルールセット情報310、エンティティ情報320、ルール情報330、入力情報340、出力情報350および属性情報360の各テーブルを有する。図3の各テーブルの表記については、2つの四角形により構成され、上の四角形内にテーブル名を表し、下の四角形内に当該テーブルのカラム名を表している。また、テーブル間の関連については、ひし形と実線を結んで表し、ひし形側のテーブルと実線側のテーブルは、1対多の関係にあることを表す。以下に示す他のデータ構造の図についても、同様の表記を用いている。
FIG. 3 is a diagram illustrating an example of the data structure of the
図3に示すルールセット情報310は、ルールセットに関する情報として、ルールセットIDおよびルールセット名を有する。ルールセットIDは、ルールセット間でユニークな識別子である。図2では、ルールセットIDとして、会員特典付与判定のRS1と加入期間計算のRS2がある。ルールセット名は、ルールセットIDが示すルールセットの名称であることから、図2では、ルールセットの名称は、「会員特典付与判定」と「加入期間計算」である。
The rule set
エンティティ情報320は、当該ルールセットの入力値のエンティティの情報として、エンティティ名を有する。エンティティ名は、当該エンティティの名称である。
ルール情報330は、ルールセットに含まれるルールに関する情報として、ルールID、条件部論理式および結果部論理式を有する。ルールIDは、ルールセットにおいて、各ルールに付したユニークな識別子である。図2の例では、ルールセット「会員特典付与判定」に含まれるR1〜R8がルールIDである。条件部論理式は、ルールの条件部を表す論理式であり、入力項目、比較演算子(等式演算子を含む)、四則演算子および論理演算子などの組合せで表現される。結果部論理式は、ルールの結果部を表す論理式であり、入力項目、入力項目が取り得る値、出力項目、出力項目が取り得る値、等式演算子および四則演算子などの組合せで表現される。
The
The
入力情報340は、当該ルールセットの入力項目に関する情報として、入力項目名、参照種別および参照式を有する。入力項目名は、入力項目の名称である。参照種別は、当該入力項目に代入する値の参照先の種別であり、実施例では、「Entity」および「RuleSet」のいずれかである。参照種別が「Entity」の場合、参照先はエンティティ情報320であり、「RuleSet」の場合、参照先はルールセット情報310である。参照式は、当該入力項目に代入する値の参照先である。参照種別が「Entity」の場合、参照式は「エンティティ名.属性名」となり、参照種別が「RuleSet」の場合、参照式は「ルールセット名.出力項目名」となる。入力情報340の参照種別が「RuleSet」であるとき、他のルールセットの出力項目に依存していることを表すので、ルールセット間の依存関係を表現していることになる。
The
入力情報340の例を、図2の会員特典付与判定(RS1)を用いて説明する。会員特典付与判定のルールセット(RS1)の入力項目名は、「年齢」と「加入期間」である。「年齢」の参照種別は「Entity」であり、「エンティティ名.属性名」の参照式を用いて、後述するエンティティ情報320を参照し、エンティティ情報320の定義に従った値を、会員特典付与判定のルールセット(RS1)の「年齢」の入力値とする。「加入期間」の参照種別は「RuleSet」であり、「ルールセット名.出力項目名」の参照式として「加入期間計算.加入期間」を用いて、加入期間計算(RS2)の出力項目「加入期間」の出力値を、会員特典付与判定のルールセット(RS1)の「加入期間」の入力値とする。
An example of the
出力情報350は、当該ルールセットの出力項目に関する情報として、出力項目名および出力項目型を有する。出力項目名は、出力項目の名称である。出力項目型は、Integer型(整数型)、Bool型、Date型およびユーザ定義の列挙型のような出力項目のデータ型である。
属性情報360は、エンティティ情報320が有する属性に関する情報として、属性名および属性型を有する。属性名は、当該属性の名称である。属性型は、Integer型(整数型)、Bool型、Date型およびユーザ定義の列挙型のような当該属性のデータ型である。
The
The
図4は、テストケース記録部121のデータ構造の例を示す図である。テストケース記録部121は、テストケースセット情報410および論理テストケース情報420のテーブルを有する。
FIG. 4 is a diagram illustrating an example of the data structure of the test
テストケースセット情報410は、テストケースセットの情報として、テスト種別、テストケースセットID、テストケースセット名およびルールセットIDを有する。テスト種別は、テストケースセットを用いて実施するテストの種類であり、実施例では、「単体」または「結合」のいずれかである。テスト種別が「単体」の場合、テストを実施する際、ルールセットIDに対応するルールセット(以下、「テスト対象ルールセット」という)のみを使用する。テスト種別が「結合」の場合、テスト対象ルールセットと当該ルールセットの入力項目が直接的または間接的に依存しているルールセット(以下、「依存ルールセット」という)の全て(「依存ルールセット」の集合)を使用する。なお、以下では、テスト種別が「単体」となっているテストケースセットを用いたテストを「単体テスト」、テスト種別が「結合」となっているテストケースセットを用いたテストを「結合テスト」という。
The test case set
図2では、ルールセット会員特典付与判定(RS1)のテストにおいて、テストケースセットのテスト種別が「結合」となっている場合、ルールセット会員特典付与判定(RS1)の入力項目「加入期間」は、加入期間計算(RS2)に依存しているため、ルールセット会員特典付与判定(RS1)と加入期間計算(RS2)を使用して、結合テストを実施する。さらに、加入期間計算(RS2)の入力項目「加入年」が別のルールセットに依存している場合、当該ルールセットも使用してテストを実施する。 In FIG. 2, when the test type of the test case set is “combined” in the rule set member benefit grant determination (RS1) test, the input item “subscription period” of the rule set member benefit grant determination (RS1) is Since it depends on the subscription period calculation (RS2), the combination test is performed using the rule set member privilege grant determination (RS1) and the subscription period calculation (RS2). Furthermore, when the input item “subscription year” of the subscription period calculation (RS2) depends on another rule set, the rule set is also used to perform the test.
図4に戻り、テストケースセットIDは、テストケースセット間でユニークな識別子である。テストケースセット名は、テストケースセットIDに対するテストケースセットの名称である。ルールセットIDは、テストの対象とするルールセットのIDであり、ルールセット情報310のいずれかである。
Returning to FIG. 4, the test case set ID is an identifier unique among the test case sets. The test case set name is the name of the test case set for the test case set ID. The rule set ID is an ID of a rule set to be tested, and is any of the rule set
論理テストケース情報420は、テストケースセットに含まれる論理テストケースに関する情報として、テストケースID、入力条件および期待出力条件を有する。テストケースIDは、テストケースセットにおいて、論理テストケース間でユニークな識別子である。入力条件は、当該論理テストケースで対象とする入力の条件論理式であり、入力項目、入力項目が取り得る値、比較演算子(等式演算子を含む)、四則演算子および論理演算子などの組合せで表現される。単体テストを実施する場合、テスト対象ルールセットの入力項目は、当該論理テストケースの入力条件で使用可能である。結合テストを実施する場合、テスト対象ルールセットの非依存入力項目と当該テスト対象ルールセットの依存ルールセットの集合に含まれるルールセットの非依存入力項目を、当該論理テストケースの入力条件に使用できる。期待出力条件は、当該論理テストケースで対象とする入力から得られる結果が満たして欲しい条件の論理式であり、入力項目、テスト対象ルールセットの出力項目、当該出力項目が取り得る値、比較演算子(等式演算子を含む)、四則演算子および論理演算子などの組合せで表現される。
The logical
論理テストケースの例を、図5に示す、会員特典付与判定(RS1)へ結合テストを実施するテストケースセットの例を用いて説明する。
会員特典付与判定(RS1)の非依存項目は「年齢」であり、依存入力項目は「加入期間」であり、当該「加入期間」の入力値は加入期間計算(RS2)に依存している。加入期間計算(RS2)の非依存入力項目は、「加入年」および「適用年」であり、依存入力項目を持たない。当該テストケースセットのテスト種別は「結合」であり、入力条件に使用可能な入力項目は「年齢」、「加入年」および「適用年」である。当該テストケースセットの論理テストケース(T1)の入力条件は「100<=年齢」であり、期待出力条件は「特典付与=しない」であり、「年齢が100以上の入力」において、結果が「特典付与:しない」になることを期待している。
An example of a logical test case will be described using an example of a test case set for performing a combination test on the member privilege grant determination (RS1) shown in FIG.
The independent item of the member privilege grant determination (RS1) is “age”, the dependent input item is “subscription period”, and the input value of the “subscription period” depends on the subscription period calculation (RS2). The independent input items of the subscription period calculation (RS2) are “subscription year” and “application year”, and do not have a dependent input item. The test type of the test case set is “join”, and the input items that can be used for the input condition are “age”, “joining year”, and “application year”. The input condition of the logical test case (T1) of the test case set is “100 <= age”, the expected output condition is “privilege = not”, and the result is “input is 100 or older”. It is hoped that “granting: no”.
図6は、テスト結果記録部123のデータ構造の例を示す図である。テスト結果記録部123は、テスト結果情報610、適用ケース情報620およびルールパス情報630の各テーブルを有する。
テスト結果情報610は、テストの結果に関する情報として、テストケースセットID、テストケースIDおよびテスト合否を有する。テストケースセットIDは、テスト結果情報610が対応する論理テストケースが含まれるテストケースセットを識別する情報であり、テストケースセット情報410のいずれかである。テストケースIDは、テスト結果情報610が対応する論理テストケースを識別する情報であり、論理テストケース情報420のいずれかである。テスト合否は、当該論理テストケースの合否である。
FIG. 6 is a diagram illustrating an example of the data structure of the test
The test result
適用ケース情報620は、テスト結果の合格ケースおよび不合格ケースに関する情報として、適用ケースIDおよび合否を有する。適用ケースIDは、テスト結果内での一意の識別子である。合否は、適用ケースの種類であり、実施例では、「合格」または「不合格」のいずれかであり、合格ケースの場合、合否は「合格」となり、不合格ケースの場合、合否は「不合格」となる。
The
ルールパス情報630は、適用ケースに含まれるルールに関する情報として、ルールセットIDおよびルールIDを有する。ルールセットIDは、適用ケースに含まれるルールが含まれるルールセットを識別する情報であり、ルールセット情報310のいずれかである。ルールIDは、適用ケースに含まれるルールを識別する情報であり、ルール情報330のいずれかである。
The
図7は、ルールの作成・編集画面の例を示す図である。
ルール作成・編集画面700は、ルール作成・修正部101が、装置利用者からのルールの編集入力を受け付けるために、入出力装置133に表示される画面である。
ルール作成・編集画面700は、ルールセット基本情報表示エリア710、入力項目編集エリア720、出力項目編集エリア730、ルール編集エリア740およびテストケースセット表示エリア750を含む。
FIG. 7 is a diagram illustrating an example of a rule creation / editing screen.
The rule creation /
The rule creation /
ルールセット基本情報表示エリア710は、編集対象のルールセットに関する基本情報を表示する領域で、ルールセットIDおよびルールセット名を表示する。ルール作成・修正部101が「ルールセットID」および「ルールセット名」のタイトル(項目名)を表示し、装置利用者によるルールセットIDおよびルールセット名を入力する。図7では、ルールセットIDとして「RS1」、ルールセット名として「会員特典付与判定」が入力された例を示している。
The rule set basic
入力項目編集エリア720は、ルールセットの入力項目を編集(追加、変更および削除)する領域であり、入力項目名、種別および参照式の項目を表示する。ルール作成・修正部101は、入力項目の数に応じて入力項目編集エリア720の行数を追加または削除する。また、ルール作成・修正部101は、装置利用者による入力項目の編集(追加、変更および削除)の結果を、ルール記録部122に反映する。したがって、編集後の各項目の内容は、それぞれルール記録部122の入力情報340の入力項目名、参照種別および参照式に対応する。
The input
出力項目編集エリア730は、ルールセットの出力項目を編集(追加、変更および削除)する領域であり、出力項目名および型の項目を表示する。装置利用者による編集後の各項目の内容は、入力項目編集エリア720と同様に、ルール作成・修正部101によってルール記録部122に反映され、それぞれルール記録部122の出力情報350の出力項目名および出力項目型に対応する。
The output
ルール編集エリア740は、ルールセットのルールを編集(追加、変更および削除)する領域であり、ルールID、条件部論理式および結果部論理式を表示する。ルール作成・修正部101は、装置利用者が編集するルールを選択した際、編集前のルールID、条件部および結果部をメモリ132に保持する。装置利用者による条件部論理式または結果部論理式の編集後、ルール作成・修正部101は、編集後の当該ルールと編集前の当該ルールを、影響範囲分析部108に通知する。
The
影響範囲分析部108は、当該ルールの編集によって、合否が変わる可能性のある論理テストケースを用いてテストを実施し、当該ルール編集前後での論理テストケースの合否の変化を、ルール作成・修正部101に通知する。ルール作成・修正部101は、影響範囲分析部108から通知された当該論理テストケースの合否の変化を装置利用者に提示し、編集内容をルール記録部122に反映させるかを確認する。装置利用者が反映させることを選択した場合、ルール作成・修正部101は、メモリ132に記録した編集前のルールを削除し、編集内容をルール記録部122に反映する。編集後のルール編集エリア740の各項目の内容は、それぞれルール記録部122のルール情報330のルールID、条件部論理式および結果部論理式に対応する。
The influence range analysis unit 108 performs a test using a logical test case whose pass / fail may change by editing the rule, and creates / corrects a change in the pass / fail of the logical test case before and after editing the rule. Notification to the
テストケースセット表示エリア750は、対象が当該ルールセットになっているテストケースセットを表示する領域であり、テストケースセットIDおよびテストケースセット名を表示する。
The test case set
図8は、テストケースセットの作成・編集画面の例を示す図である。
テストケースセット作成・編集画面800は、テストケース作成・修正部102が、装置利用者からの論理テストケースの編集入力を受け付けるために、入出力装置133に表示される画面である。
テストケースセット作成・編集画面800は、テストケースセット基本情報表示エリア810、入力項目表示エリア820、出力項目表示エリア830、テストケース編集エリア840、漏れチェックボタン850およびテスト実行ボタン860を含む。
FIG. 8 is a diagram illustrating an example of a test case set creation / edit screen.
The test case set creation /
The test case set creation /
テストケースセット基本情報表示エリア810は、編集対象のテストケースセットに関する基本情報を表示する領域であり、テスト種別、テストケースセットID、テストケースセット名およびテスト対象ルールセットIDを表示する。テストケース作成・修正部102が「テスト種別」、「テストケースセットID」、「テストケースセット名」および「テスト対象ルールセットID」のタイトル(項目名)を表示し、装置利用者によるテストケースセットID、テストケースセット名およびテスト対象ルールセットIDを入力する。図8では、種別として「結合」、テストケースセットIDとして「TS1」、テストケースセット名として「会員特典付与判定の結合テスト」およびテスト対象ルールセットIDとして「RS1」が入力された例を示している。
The test case set basic
入力項目表示エリア820は、テストケースセットの論理テストケースの入力条件および期待出力条件で使用可能な入力項目を表示するための領域であり、図7の入力項目編集エリア720と同様に、入力項目名、種別および参照式を表示する。入力項目表示エリア820の構成要素は、図5のテストケースセットの例で示したように、「年齢」、「加入年」および「適用年」である。
The input
出力項目表示エリア830は、テストケースセットの論理テストケースの期待出力条件に使用可能な出力項目を表示するための領域であり、出力項目名および型を表示する。出力項目表示エリア830の構成要素は、図7の出力項目編集エリア730と同一である(当該構成要素の説明は省略)。
The output
テストケース編集エリア840は、テストケースセットの論理テストケースを編集(追加、変更および削除)する領域であり、テストケースID、入力条件および期待出力条件を表示する。テストケース作成・修正部102は、論理テストケースの数に応じてテストケース編集エリア840の行数を追加または削除する。また、テストケース作成・修正部102は、装置利用者による論理テストケースの編集(追加、変更および削除)の結果を、テストケース記録部121に反映する。したがって、編集後の各項目の内容は、それぞれテストケース記録部121の論理テストケース情報420のテストケースID、入力条件および期待出力条件に対応する。
The test
漏れチェックボタン850は、テストケース漏れ検査部103によるテストケースセットの漏れの検査を実施するための操作ボタンである。テストケース作成・修正部102は、装置利用者が当該ボタンを押下した後、テストケース漏れ検査部103による漏れの検査を実施し、テストケース漏れ検査部103は、当該検査の結果を後述する補完テストケース表示・編集画面1200に表示する。
The
テスト実行ボタン860は、テスト実行部104によるテストを実施するための操作ボタンである。テストケース作成・修正部102は、装置利用者が当該ボタンを押下した後、テスト実行部104によるテストを実施し、テスト実行部104は、当該テストの結果を後述するテスト結果表示画面900に表示する。
The
図9は、テスト結果表示画面の例を示す図である。
テスト結果表示画面900は、テスト実行部104が、テストの実行結果を表示するために、入出力装置133に表示される画面である。
テスト結果表示画面900は、テストケースセット基本情報表示エリア910およびテスト結果表示エリア920を含む。
FIG. 9 is a diagram illustrating an example of a test result display screen.
The test
The test
テストケースセット基本情報表示エリア910の構成要素は、図8のテストケースセット基本情報表示エリア810と同一である(当該構成要素の説明を省略)。
テスト結果表示エリア920は、テストの結果を表示するための領域であり、テストケースID、テスト合否、合格ケースおよび不合格ケースを表示する。各構成要素は、テスト結果情報610、適用ケース情報620またはルールパス情報630のいずれかを表示させる。テスト実行部104は、テスト結果表示エリア920の合格ケースおよび不合格ケースに表示される適用ケースのうち、1つ以上を装置利用者が選択すると、後述する適用ケース表示画面1000に当該適用ケースを図示する。
なお、テスト結果表示エリア920に、合格もしくは不合格となる場合の具体的な入力値の組合せを表示するようにしてもよい。
The components of the test case set basic
The test
In addition, you may make it display the specific combination of input value in the case of passing or failing in the test
図10は、適用ケース表示画面の一例を示す図である。
適用ケース表示画面1000は、テスト実行部104が、装置利用者が選択した適用ケースを表示するために、入出力装置133に表示する画面である。
適用ケース表示画面1000は、適用ケース表示エリア1010を含む。適用ケース表示エリア1010は、装置利用者が選択した適用ケースを図示する領域である。
FIG. 10 is a diagram illustrating an example of the application case display screen.
The application
The application
図10では、図9において、装置利用者が、テストケースIDが「T3」および「T5」の論理テストケースの適用ケースを選択した場合を示す図である。
適用ケース表示エリア1010に示される四角は、当該適用ケースに出現するルールを表し、楕円は、当該ルールが含まれるルールセットを表している。ルール間の線は、ルールが同一の適用ケース中に含まれていることを表し、実線は、当該適用ケースが合格ケースであること、点線は、当該適用ケースが不合格ケースであること、をそれぞれ表している。
FIG. 10 is a diagram illustrating a case where the apparatus user in FIG. 9 selects application cases of logical test cases with test case IDs “T3” and “T5”.
A square shown in the application
図11は、適用ケースの分析結果表示画面の一例を示す図である。
適用ケース分析結果表示画面1100は、不具合箇所分析部107が、装置利用者が選択した適用ケースに対するテストを実行し不具合箇所の分析結果を表示するために、入出力装置133に表示される画面である。
適用ケース分析結果表示画面1100は、適用ケース分析結果表示エリア1110を含む。
FIG. 11 is a diagram illustrating an example of an application case analysis result display screen.
The application case analysis
The application case analysis
適用ケース分析結果表示エリア1110は、不具合箇所の分析として、適用ケースを分析した結果をルールごとに表示する領域であり、ルール名、合格率および出現率(不合格)を含む。ルール名は、ルールのIDおよびそのルールを含むルールセットのIDであり、「当該ルールセットのID.ルールのID」の形で表示させる。
The application case analysis
合格率は、当該ルールが含まれる適用ケースのうち合格ケースの割合であり、「(当該ルールが含まれる合格ケース数/合格ケース数)/((当該ルールが含まれる合格ケース数/合格ケース数)+(当該ルールが含まれる不合格ケース数/不合格ケース数))」の式で算出する。
出現率(不合格)は、不合格ケースのうち当該ルールが含まれる不合格ケースの割合であり、「(当該ルールが含まれる不合格ケース数)/不合格ケース数」の式で算出する。
The pass rate is a ratio of the pass cases among the application cases including the rule, and “(the number of pass cases including the rule / the number of pass cases) / ((the number of pass cases including the rule / the number of pass cases. ) + (Number of failed cases including the rule / number of failed cases)) ”.
The appearance rate (failed) is a ratio of failed cases in which the rule is included among the failed cases, and is calculated by an expression “(number of failed cases in which the rule is included) / number of failed cases”.
また、不具合箇所分析部107は、装置利用者による操作指示に応じて、適用ケース分析結果表示エリア1110に表示するデータの並べ替えを可能にする。合格率の列に設けた三角形1111対して、三角形1111が下向きの状態で三角形1111を押下した場合は、合格率が低い順に並べ替え、三角形1111が上向きの状態で三角形1111を押下した場合は、合格率が高い順に並べ替える。同様に、出現率(不合格)の列に設けた三角形1112に対して、三角形1112が下向きの状態で三角形1112を押下した場合は、出現率(不合格)が低い順に並べ替え、三角形1112が上向きの状態で三角形1102を押下した場合は、出現率(不合格)が高い順に並べ替える。
なお、適用ケース分析結果表示エリア1110に、合格ケース数、不合格ケース数、当該ルールが含まれる合格ケース数および当該ルールが含まれる不合格ケース数を表示するようにしてもよい。
Further, the defect location analysis unit 107 enables rearrangement of data displayed in the application case analysis
The application case analysis
図12は、漏れ検査の結果および補完テストケース生成部106が生成したテストケース(以下、「補完テストケース」という)を表示および編集する画面の例を示す図である。
補完テストケース表示・編集画面1200は、テストケース漏れ検査部103が検査した漏れ検査の結果および補完テストケース生成部106が生成した論理テストケースを表示するためと装置利用者からの補完テストケースの編集入力を受け付けるために、入出力装置133に表示される画面である。
FIG. 12 is a diagram illustrating an example of a screen for displaying and editing the result of the leakage inspection and the test case generated by the complementary test case generation unit 106 (hereinafter referred to as “complementary test case”).
The complementary test case display /
補完テストケース表示・編集画面1200は、テストケースセット基本情報表示エリア
1210、漏れ検査結果表示エリア1220、補完テストケース編集エリア1230、漏れチェックボタン1240および終了ボタン1250を含む。
テストケースセット基本情報表示エリア1210の構成要素は、図8のテストケースセット基本情報表示エリア810と同一である(当該構成要素の説明を省略)。
The complementary test case display /
The constituent elements of the test case set basic
漏れ検査結果表示エリア1220は、漏れ検査の結果を表示するための領域であり、「漏れアリ」または「漏れナシ」のいずれかである。テストケース漏れ検査部103は、漏れ検査の結果、入力の漏れを検出した場合には「漏れアリ」を表示し、入力の漏れが存在しない場合には「漏れナシ」と表示する。なお、漏れ検査結果表示エリア1220は、この領域だけを独立した画面としてもよい。
The leak test
補完テストケース編集エリア1230は、テストケースセット作成・編集画面800で装置利用者が作成した論理テストケースを表示すると共に、補完テストケース生成部106が生成した補完テストケースを編集(追加、変更および削除)するための領域であり、採否1231、入力条件および期待出力条件を表示する。
採否1231は、補完テストケースを採用するかどうかを装置利用者が入力するためのチェックボックスであり、補完テストケースのみに表示される。
The complementary test
The acceptance /
漏れチェックボタン1240は、補完テストケース編集エリア1230の論理テストケースおよび採否1231がチェックされている補完テストケースに対して、テストケース漏れ検査部103による入力の漏れの検査を実施するためのボタンである。装置利用者が漏れチェックボタン1240を押下すると、テストケース漏れ検査部103は、補完テストケース編集エリア1230の論理テストケースおよび採否1231が、チェックされている補完テストケースの入力の漏れが存在するかを検査する。そして、当該入力の漏れを検知した場合は、漏れ検査結果表示エリア1220に、「漏れアリ」と表示し、補完テストケース部106を用いて、当該入力の漏れの補完テストケースを生成し、補完テストケース編集エリア1230に追加して、当該領域で採否1231がチェックされていない補完テストケースを削除する。漏れが存在しない場合は、当該領域で、採否1231がチェックされていない補完テストケースを削除する。なお、補完テストケースが生成できなった場合、テストケース漏れ検査部103はメッセージを表示する。これは、図8の漏れチェックボタン850を押下した場合も同様である。
The
終了ボタン1250は、補完テストケース編集エリア1230の採否1231がチェックされている補完テストケースを論理テストケースとして、テストケース記録部121に反映させるための操作ボタンである。装置利用者が終了ボタン1250を押下すると、テストケース漏れ検査部103は、補完テストケース編集エリア1230の採否1231がチェックされている補完テストケースに、テストケースIDを付与して論理テストケースとして、テストケース記録部121に追加する。したがって、補完テストケース編集エリア1230の入力条件および期待出力条件は、それぞれ論理テストケース情報420の入力条件および期待出力条件に対応する。
The
図13は、テストケース漏れ検査部103が実行する処理のフローチャートを示す図である。
ステップ1300(S1300)で、テストケース漏れ検査部103は、装置利用者が、図8の漏れチェックボタン850または図12の漏れチェックボタン1240を押下した場合に、処理を開始する。
FIG. 13 is a diagram illustrating a flowchart of processing executed by the test case
In step 1300 (S1300), the test case
ステップ1301(S1301)で、テストケース漏れ検査部103は、テストケース記録部121を参照し、入力の漏れ検査対象のテストケースセットに含まれる論理テストケースの入力条件を全て取得する。
ステップ1302(S1302)で、テストケース漏れ検査部103は、ルール記録部122を参照し、当該テストケースのテスト対象ルールセットを取得する。
In step 1301 (S1301), the test case
In step 1302 (S1302), the test case
ステップ1303(S1303)で、テストケース漏れ検査部103は、入力の漏れ検査対象のテストケースセットの種別を確認する。テストケース漏れ検査部103は、当該種別が「単体」の場合、ステップ1305(S1305)に進み、当該種別が「結合」の場合、ステップ1304(S1304)に進む。
In step 1303 (S1303), the test case
ステップ1304(S1304)で、テストケース漏れ検査部103は、テスト対象ルールセットの入力項目の依存関係を辿って依存ルールセットの集合を取得する。
ステップ1305(S1305)で、テストケース漏れ検査部103は、テストケースセットに漏れが存在するかどうかを判定するために、後述する漏れ検査式1400を生成する。
In step 1304 (S1304), the test case
In step 1305 (S1305), the test case
図14は、漏れ検査式1400および関連する論理式の例を示す図である。
漏れ検査式1400は、単体テストの場合、非テスト入力値式1410と対象ルールセット入力値式1420との論理積で結合した式であり、結合テストの場合、単体テストの論理積に依存関係制約式1430を加えて論理積で結合した式である。
FIG. 14 is a diagram illustrating an example of a
The
非テスト入力値式1410は、テストケースセットに含まれるすべての論理テストケースの入力条件を論理和で結合し、全体を否定した論理式である。
対象ルールセット入力値式1420は、テスト対象ルールセットに含まれるすべてのルールの条件部を論理和で結合した論理式である。
The non-test
The target rule set
依存関係制約式1430は、依存ルールセットの集合に含まれる各ルールセットに含まれる各ルールの条件部と結果部を論理包含で結合した論理式を論理積で結合した式を、依存ルールセットの集合において論理積で結合した論理式である。
なお、図14において、TSはテストケースセット、tcは当該テストケースセットに含まれる論理テストケース、tc.conは当該論理テストケースの入力条件、RS_SETは依存ルールセットの集合、DependRSは当該依存ルールセットの集合に含まれるルールセット、TargetRSはテスト対象ルールセット、ruleは当該テスト対象ルールセットに含まれるルール、rule.conは当該ルールの条件部、rule.resは当該ルールの結果部を表す。
The
In FIG. 14, TS is a test case set, tc is a logical test case included in the test case set, and tc. con is an input condition of the logical test case, RS_SET is a set of dependent rule sets, DependRS is a rule set included in the set of dependent rule sets, TargetRS is a test target rule set, and rule is a rule included in the test target rule set , Rule. con is a condition part of the rule, rule. res represents the result part of the rule.
図13に戻り、ステップ1306(S1306)で、テストケース漏れ検査部103は、当該漏れ検査式1400の充足可能性を判定し、充足可能の場合には漏れがあると判断し、充足不能の場合には漏れが無いと判断し、ステップ1307(S1307)で処理を終了する。
充足可能性とは、与えられた論理式を真(TRUE)にする変数の値の組合せが存在するか否かを表す性質である。漏れ検査式1400が充足可能とは、漏れ検査式1400が真になること、すなわち、テスト対象のルールセットに起こり得る入力のうち、テストケースセットでテストする入力に含まれない入力が存在することを意味している。
Returning to FIG. 13, in step 1306 (S 1306), the test case
Satisfiability is a property that indicates whether or not there is a combination of variable values that makes a given logical expression true. The
充足可能性は、単純には、すべての変数の値の組合せをチェックすることで判定可能である。また、DPLL(Davis−Putnam−Logemann−Loveland)アルゴリズムなど、変数の値の組合せではなく、論理式の構造に着目して効率的に充足可能性を判定するツールがある。例えば、SMT(Satisfiability Modulo Theories)ソルバは、充足可能性を判定するツールの一種であり、漏れ検査式1400の充足可能性を判定できる。
Satisfiability can be determined simply by checking the combinations of the values of all variables. In addition, there are tools such as a DPLL (Davis-Putnam-Logemann-Loveland) algorithm for efficiently determining satisfiability by focusing on the structure of a logical expression rather than a combination of variable values. For example, an SMT (Satisfiability Modulo Theories) solver is a type of tool that determines satisfiability, and can determine the sufficiency of the
図15は、テスト実行部104が実行する処理のフローチャートを示す図である。
ステップ1500(S1500)で、テスト実行部104は、装置利用者が図8のテスト実行ボタン860を押下した場合、または、図20を用いて後述する影響範囲分析部108により合否の変化する可能性のある論理テストケースを通知された場合に、テストを実施する論理テストケースごとに処理を開始する(S1500)。
FIG. 15 is a diagram illustrating a flowchart of processing executed by the
In step 1500 (S1500), the
ステップ1501(S1501)で、テスト実行部104は、テストケース記録部121から論理テストケースを取得する。
ステップ1502(S1502)で、テスト実行部104は、必要なルールセットを取得する。当該論理テストケースで実施するテストが、結合テストの場合には、テスト対象ルールセットと依存ルールセットの集合を取得し、単体テストの場合には、テスト対象ルールセットのみを取得する。
In step 1501 (S1501), the
In step 1502 (S1502), the
ステップ1503(S1503)で、テスト実行部104は、テスト対象ルールセットおよび依存ルールセットの集合内の各ルールセットにおいて、入力に対して条件部が真となるルール間で、出力値が整合していることを表すルール間の整合性を検査する。このとき、別の論理テストケースによるテスト実行において、既に当該ステップ1503(S1503)の処理を実行済みのルールセットに対しては、当該処理を省略する。また、ルール間の整合性の判定方法については、例えば、特開2012−190203号公報に開示される、充足可能性判定を用いた方法を使用することができる。
In step 1503 (S1503), the
ステップ1503(S1503)の整合性の検査結果が「整合していない」の場合、テスト実行部104は、ステップ1513(S1513)で処理を終了する。
ステップ1503(S1503)の整合性の検査結果が「整合している」の場合、テスト実行部104は、ステップ1504(S1504)に進む。
ステップ1504(S1504)で、テスト実行部104は、合格ケースを生成するために、後述する合格ケース生成式1600を生成する。
If the consistency check result in step 1503 (S1503) is “not consistent”, the
If the consistency check result in step 1503 (S1503) is “consistent”, the
In step 1504 (S1504), the
図16は、テスト実行部104の処理フローチャート中で生成する論理式の一例を示す図である。合格ケース生成式1600は、単体テストの場合、期待充足式1610とルールセット入出力式1620との論理積で結合した式であり、結合テストの場合、当該単体テストの論理積に依存関係制約式1430を論理積で結合した式である。
ここで、期待充足式1610は、論理テストケースの入力条件と期待出力条件とを論理積で結合した式である。ルールセット入出力式1620は、ルールセットに含まれるルールの条件部と結果部を論理包含で結合した式を、論理積で結合した式である。
FIG. 16 is a diagram illustrating an example of a logical expression generated in the process flowchart of the
Here, the expected
図16において、tc.conは当該論理テストケースの入力条件、tc.exresは当該論理テストケースの期待出力条件、RSはテスト対象ルールセット、ruleは当該テスト対象ルールセットに含まれるルール、rule.conは当該ルールの条件部、rule.resは当該ルールの結果部およびCaseは適用ケースを表す。 In FIG. 16, tc. con is the input condition of the logical test case, tc. exres is an expected output condition of the logical test case, RS is a test target rule set, rule is a rule included in the test target rule set, rule. con is a condition part of the rule, rule. res represents the result part of the rule and Case represents the application case.
図15に戻り、ステップ1505(S1505)で、テスト実行部104は、当該合格ケース生成式1600の充足可能性を判定する。合格ケース生成式1600が充足可能とは、合格ケース生成式1600が真になること、すなわち、論理テストケースの入力条件を満たすテスト対象ルールセットの入力値において、当該論理テストケースの期待出力条件を満たす結果が得られるケースが存在することを意味している。
Returning to FIG. 15, in step 1505 (S 1505), the
ステップ1505(S1505)で合格ケース生成式1600が「充足不能」と判定された場合、テスト実行部104は、ステップ1508(S1508)に進む。
ステップ1505(S1505)で合格ケース生成式1600が「充足可能」と判定された場合、テスト実行部104は、ステップ1506(S1506)に進む。
If it is determined in step 1505 (S1505) that the acceptable
If it is determined in step 1505 (S1505) that the acceptable
ステップ1506(S1506)で、テスト実行部104は、合格ケース生成式1600を真とするテスト対象のルールセットおよび依存ルールセットの集合内のルールセットへの入力(以下、「モデル」という)を取得して、そのモデルにおいて条件部が真となる、テスト対象ルールセットおよび依存ルールセットの集合のルールを取得し、当該ルールの集合を合格ケースとする。これは、ルールの条件部に入力としてモデルを実際に与えることで確認できる。なお、モデルにおいて、同一のルールセット内のルールで真となるルールが2つ以上の場合は、それぞれ別の合格ケースとする。
In step 1506 (S1506), the
ステップ1507(S1507)で、テスト実行部104は、当該合格ケースから、合格ケースに含まれるルールの条件部を論理積で結合して全体を否定した重複禁止制約式1630を生成する。そして、当該重複禁止制約式1630を合格ケース生成式1600と論理積で結合し、ステップ1505(S1505)に進む。なお、ステップ1506(S1506)で複数個の合格トレースを取得した場合は、すべての合格トレースから重複禁止制約1630を生成し、合格ケース生成式1600と論理積で結合する。
In step 1507 (S1507), the
ステップ1505(S1505)で、前述した合格ケース生成式1600の充足可能性が判定されるところ、ステップ1507(S1507)で同じものが出てこないように制約が追加されることになるから、最終的には「充足不能」となり、ステップ1508(S1508)に進むことになる。
ステップ1508(S1508)で、テスト実行部104は、不合格ケースを生成するために、後述する不合格ケース生成式1640を生成する。
In step 1505 (S1505), when the sufficiency of the above-described pass
In step 1508 (S1508), the
図16に示す不合格ケース生成式1640は、単体テストの場合、ルールセット入出力式1620と期待非充足式1650との論理積で結合した式であり、結合テストの場合、当該単体テストの論理積に依存関係制約式1430を加えて論理積で結合した式である。ここで、期待非充足式1650は、論理テストケースの入力条件と期待出力条件の否定を論理積で結合した式である。
The failure
図15に戻り、ステップ1509(S1509)で、テスト実行部104は、不合格ケース生成式1640の充足可能性を判定する。不合格ケース生成式1640が充足可能とは、不合格ケース生成式1640が真になること、すなわち、論理テストケースの入力条件を満たすテスト対象のルールセットの入力値において、当該論理テストケースの期待出力条件を満たさない結果が得られるケースが存在することを意味している。
Returning to FIG. 15, in step 1509 (S 1509), the
ステップ1509(S1509)で不合格ケース生成式1640が「充足不能」と判定された場合、テスト実行部104は、ステップ1512(S1512)に進む。
ステップ1509(S1509)で不合格ケース生成式1640が「充足可能」と判定された場合、テスト実行部104は、ステップ1510(S1510)に進む。
If it is determined in step 1509 (S1509) that the failed
If it is determined in step 1509 (S1509) that the failed
ステップ1510(S1510)で、テスト実行部104は、不合格ケース生成式1640のモデルを取得し、そのモデルにおいて条件部が真となる、テスト対象のルールセットおよび依存ルールセットの集合のルールを取得し、当該ルールの集合を不合格ケースとする。これは、ルールの条件部に入力としてモデルを実際に与えることで確認できる。なお、モデルにおいて、同一のルールセット内のルールで真となるルールが2つ以上の場合は、それぞれ別の不合格ケースとする。
In step 1510 (S1510), the
ステップ1511(S1511)で、テスト実行部104は、当該不合格ケースから、重複禁止制約式1630を生成する。そして、当該重複禁止制約式1630を不合格ケース生成式1640と論理積で結合し、ステップ1509(S1509)に進む。なお、ステップ1511(S1511)で複数個の不合格ケースを取得した場合は、すべての不合格ケースから重複禁止制約1630を生成し、不合格ケース生成式1640と論理積で結合する。
In step 1511 (S1511), the
ステップ1512(S1512)で、テスト実行部104は、生成された不合格ケースが1つ以上存在する場合、テスト不合格と判定し、1つも存在しない場合、テスト合格と判定する。そして、ステップ1513(S1513)で、テスト実行部104は処理を終了する。
In step 1512 (S1512), the
なお、実施例では、すべての合格トレースおよび不合格トレースを取得しているところ、所定の個数だけを取得するようにしてもよい。これは、例えば、ステップ1505(S1505)からステップ1507(S1507)の繰り返し処理、および、ステップ1509(S1509)からステップ1512(S1512)の繰り返し処理のループ回数を制限することで実現する。これにより、合格トレースおよび不合格トレースの数が膨大になる場合の処理時間を短縮できる。 In the embodiment, all pass traces and fail traces are acquired, but only a predetermined number may be acquired. For example, this is realized by limiting the number of loops of the repetition process from step 1505 (S1505) to step 1507 (S1507) and the repetition process from step 1509 (S1509) to step 1512 (S1512). Thereby, the processing time when the number of pass traces and fail traces becomes enormous can be shortened.
また、合格ケースを取得せず(ステップ1503(S1503)からステップ1507(S1507)の処理を省略)、ステップ1509(S1509)の処理を残し、不合格ケースを取得しない(ステップ1510(S1510)からステップ1511(S1511)を省略)ようにしてもよい。この場合には、テストの合否のみを取得でき、テストの合否のみを知りたい場合に有効である。 Also, a pass case is not acquired (the processing from step 1503 (S1503) to step 1507 (S1507) is omitted), the processing of step 1509 (S1509) is left, and a failure case is not acquired (step from step 1510 (S1510) to step 1511 (S1511 is omitted). In this case, only the pass / fail of the test can be acquired, which is effective when it is desired to know only the pass / fail of the test.
図17は、補完テストケース生成部106が実行する処理のフローチャートを示す図である。
ステップ1700(S1700)で、補完テストケース生成部106は、テストケース漏れ検査部103により入力の漏れが発見された場合に処理を開始する。
ステップ1701(S1701)で、補完テストケース生成部106は、入力の漏れが存在するテストケースセット(以下、「漏れテストケースセット」という)のテスト対象ルールセットおよびテスト対象ルールセットの依存ルールセットの集合において、各ルールセットが完全であるかをその完全性を検査して確認する。
FIG. 17 is a diagram illustrating a flowchart of processing executed by the complementary test
In step 1700 (S1700), the complementary test
In step 1701 (S1701), the complementary test
ルールセットが完全とは、すべての入力に対して、ルールセット内のいずれかのルールの条件部が真になることである。例えば、ルールセット内に「IF A<1 THEN R=1」と「IF A>1 THEN R=2」という2つのルールを想定する。入力がA=1の場合、いずれのルールの条件部も真とならないため、当該ルールセットは完全ではない。ルールセットの完全であるか否かの判定は、例えば、ルールセット内の条件部の論理和の否定の充足可能性を判定することにより行う。このとき、充足可能な場合は、当該ルールセットは完全ではなく、充足不能な場合は、当該ルールセットは完全である。 A rule set is complete when the condition part of any rule in the rule set is true for all inputs. For example, two rules “IF A <1 THEN R = 1” and “IF A> 1 THEN R = 2” are assumed in the rule set. When the input is A = 1, the condition part of any rule is not true, so the rule set is not complete. The determination of whether or not the rule set is complete is performed, for example, by determining whether or not the negation of the logical sum of the condition parts in the rule set is satisfied. At this time, if it is satisfiable, the rule set is not complete, and if it is not satisfactory, the rule set is complete.
ステップ1701(S1701)で、ルールセットが完全であると判定された場合、補完テストケース生成部106は、ステップ1702(S1702)で、漏れテストケースセットから、後述するルール適用式1800を生成する。
If it is determined in step 1701 (S1701) that the rule set is complete, the complementary test
図18は、補完テストケース生成部106の処理フローの中で生成する論理式の例を示す図である。
ルール適用式1800は、実施するテストが、単体テストの場合、ルールセット入出力式1620、非テスト入力値式1410および対象ルールセット入力値式1420の論理積であり、結合テストの場合、ルールセット入出力式1620、非テスト入力値式1410、対象ルールセット入力値式1420および依存関係制約式1430の論理積である。
FIG. 18 is a diagram illustrating an example of a logical expression generated in the processing flow of the complementary test
The
図18において、Caseは適用ケースを、ruleは当該適用ケース中のルール、rule.conは当該ルールの条件部を表している。また、rule.replaced_conは、当該ルールの条件部において、依存入力項目を、当該適用ケース中のルールのうち、当該依存入力項目が参照しているルールセットに含まれるルールの結果部に置き換えることで、全ての依存入力項目を除去した論理式である(以下、「置換済み条件部」という)。
例えば、図2において、適用ケース{会員特典付与判定(RS1).R5、加入期間計算(RS2).R1}の場合、会員特典付与判定(RS1).R5の置換済み条件部は、「年齢 < 60 and 25 <= 適用日―加入日」となる。」
In FIG. 18, Case indicates an application case, rule indicates a rule in the application case, rule. con represents the condition part of the rule. Also, rule. “replaced_con” replaces the dependency input item in the condition part of the rule with the result part of the rule included in the rule set referred to by the dependency input item among the rules in the application case. A logical expression from which input items are removed (hereinafter referred to as “replaced condition part”).
For example, in FIG. 2, the application case {member benefit grant determination (RS1). R5, subscription period calculation (RS2). In the case of R1}, member privilege grant determination (RS1). The replaced condition part of R5 is “age <60 and 25 <= application date−subscription date”. "
図17に戻って、ステップ1703(S1703)で、補完テストケース生成部106は、ルール適用式1800の充足可能性を判定する。ルール適用式1800が充足可能とは、ルール適用式が真になること、すなわち、入力の漏れにおいてルールが適用されるケースが存在することを表している。
ステップ1703(S1703)で、ルール適用式1800が「充足不能」と判定された場合、補完テストケース生成部106は、ステップ1706(S1706)に進む。
ステップ1703(S1703)で、ルール適用式1800が「充足可能」と判定された場合、補完テストケース生成部106は、ステップ1704(S1704)に進む。
Returning to FIG. 17, in step 1703 (S 1703), the complementary test
If it is determined in step 1703 (S1703) that the
If it is determined in step 1703 (S1703) that the
ステップ1704(S1704)で、補完テストケース生成部106は、ルール適用式1800のモデルから、テスト対象のルールセットの出力値と条件部が真となるテスト対象のルールセットおよびテスト対象のルールセットの依存ルールセットの集合のルールを特定し、当該特定したルールの集合を適用ケースとする。これは、ルールの条件部に入力としてモデルを実際に与えることで確認できる(以下、取得した出力値と適用ケースを「適用結果ペア」という。)なお、モデルにおいて、同一のルールセット内のルールで真となるルールが2つの場合は、それぞれ別の適用ケースとする。
In step 1704 (S1704), the complementary test
ステップ1705(S1705)で、補完テストケース生成部106は、適用結果ペアの適用ケースから重複禁止制約式1630を生成し、当該重複禁止制約式1630をルール適用式1800と論理積を用いて結合し、ステップ1703(S1703)に進む。なお、ステップ1704(S1704)で複数個の適用ケースを取得した場合は、すべての適用ケースから重複禁止制約1630を生成し、ルール適用式1800と論理積で結合する。
ステップ1706(S1706)で、補完テストケース生成部106は、適用結果ペアごとに、適用ケースから後述する同値クラス式1810を生成する。
In step 1705 (S1705), the complementary test
In step 1706 (S1706), the complementary test
図18において、同値クラス式1810は、漏れテストケースセットで実施するテストが、単体テストの場合、図14の非テスト入力値式1410と適用ケースに含まれる全ルールの条件部を論理積で結合した式とを論理積で結合した式であり、結合テストの場合、非テスト入力値式1410と適用ケースに含まれる全ルールの置換済み条件部とを論理積で結合した式をさらに論理積で結合した式である。
In FIG. 18,
図17に戻り、ステップ1707(S1707)で、補完テストケース生成部106は、全適用結果ペアに対して、適用結果ペアの同値クラス式1810を入力条件とし、出力値を「出力項目 = 項目値」形式で記述した論理式を期待出力条件として、補完テストケースを生成する。そして、ステップ1708(S1708)で、補完テストケース生成部106は処理を終了する。
Returning to FIG. 17, in step 1707 (S 1707), the complementary test
ここで、補完テストケース生成部106は、補完テストケース生成時に、同値クラス式1810をより短い論理式に変換してもよい。
例えば、論理式の真偽に影響を与えない部分(以下、「ドントケア」という)を削除することで、同値クラス式1810を短くすることが可能である。論理式中の一部がドントケアかどうかは、以下の判定を行う。漏れテストケースセットで実施するテストが単体テストならば、同値クラス式1810および一部を削除した同値クラス式(以下、「削除後同値クラス式」という)を用いて、「同値クラス式1810→削除後同値クラス式」と「削除後同値クラス式→同値クラス式1810」の論理積を否定したドントケア判定式1820の充足可能性を判定する。漏れテストケースセットで実施するテストが結合テストならば、当該単体テストの判定式に加えて、図14の依存関係制約式1430を論理積で結合したドントケア判定式1820の充足可能性を判定する。
Here, the complementary test
For example, it is possible to shorten the
ドントケア判定式1820が充足可能ならば、削除した部分はドントケアではない。ドントケア判定式1820が充足可能ならば、削除した部分はドントケアである。なお、同値クラス式1810の理解容易性を向上させるため、ド・モルガンの法則等を用いて、同値クラス式1810に存在する否定演算子「not」を、「入力項目 比較演算子 計算式」、「入力項目 比較演算子 項目値」などの比較式の直前に移動し、式中の括弧の数を減らすことも可能である。さらに、比較式中の比較演算子を当該演算子の否定に対応する比較演算子に変更することで、比較式直前の否定演算子を除去できる。
例えば、「not((加入年 >2001) or (加入年 < 2001))」という同値クラス式1810の場合、「not(加入年 >2001) and not(加入年 < 2001)」に変換し、さらに、「(加入年 <= 2001) and (加入年 >= 2001)」に変換することも可能である。
If the don't care
For example, in the case of the
図19は、不具合箇所分析部107が実行する処理のフローチャートを示す図である。
ステップ1900(S1900)で、不具合箇所分析部107は、1つ以上の論理テストケースに対してテストを実施した結果、不合格した論理テストケースが見つかった場合に処理を開始する。なお、図19のステップ1903(S1903)〜ステップ1906(S1906)は、テスト結果記録部123に記録されたテスト結果中の適用ケース(以下、「分析対象適用ケースの集合」という)に含まれるルール(以下、「分析対象ルール」という)ごとに処理を実行する。
FIG. 19 is a diagram illustrating a flowchart of processing executed by the defect location analysis unit 107.
In step 1900 (S1900), the failure location analysis unit 107 starts processing when a failed logical test case is found as a result of performing a test on one or more logical test cases. Note that steps 1903 (S1903) to 1906 (S1906) in FIG. 19 are rules included in application cases in the test results recorded in the test result recording unit 123 (hereinafter referred to as “analysis target application case set”). The process is executed for each (hereinafter referred to as “analysis target rule”).
ステップ1901(S1901)で、不具合箇所分析部107は、分析対象適用ケースの集合から合格ケース数をカウントする。
ステップ1902(S1902)で、不具合箇所分析部107は、分析対象適用ケースの集合から、不合格ケース数をカウントする。
ステップ1903(S1903)で、不具合箇所分析部107は、分析対象適用ケースの集合に含まれる分析対象ルールを取得する。
In step 1901 (S1901), the failure location analysis unit 107 counts the number of accepted cases from the set of analysis target application cases.
In step 1902 (S1902), the failure location analysis unit 107 counts the number of failed cases from the set of analysis target application cases.
In step 1903 (S1903), the defect location analysis unit 107 acquires analysis target rules included in the set of analysis target application cases.
ステップ1904(S1904)で、不具合箇所分析部107は、分析対象適用ケースの集合のうち、分析対象ルールが含まれる不合格ケース数をカウントして不合格の出現率を算出する。
ステップ1905(S1905)で、不具合箇所分析部107は、分析対象適用ケースの集合のうち、分析対象ルールが含まれる合格ケース数をカウントして合格の出現率を算出する。
In step 1904 (S1904), the defect location analysis unit 107 calculates the failure appearance rate by counting the number of failed cases including the analysis target rule in the set of analysis target application cases.
In step 1905 (S1905), the failure location analysis unit 107 calculates the appearance rate of the pass by counting the number of pass cases including the analysis target rule in the set of analysis target application cases.
ステップ1906(S1906)で、不具合箇所分析部107は、先に求めた出現率(不合格)と出現率(合格)とから合格率を算出する。この算出した結果から、不合格ケースに偏って含まれるルールや不合格ケースに共通するルールを特定することが可能となる。
不具合箇所分析部107は、すべての分析対象ルールに対して、ステップ1903(S1903)〜ステップ1906(S1906)の処理を実行した後、ステップ1907(S1907)で処理を終了する。
In step 1906 (S1906), the defect location analysis unit 107 calculates a pass rate from the appearance rate (failed) and the appearance rate (passed) obtained previously. From this calculation result, it is possible to specify a rule that is biased in the failed case or a rule that is common to the failed case.
The defect location analysis unit 107 executes the processing from step 1903 (S1903) to step 1906 (S1906) for all the analysis target rules, and then ends the processing at step 1907 (S1907).
図20は、影響範囲分析部108が実行する処理のフローチャートを示す図である。
ステップ2000(S2000)で、影響範囲分析部108は、図7のルール作成・編集画面700において、装置利用者によるルールの編集を検知した場合に、処理を開始する(以下、装置利用者によって編集されたルールを「編集済みルール」という)。
FIG. 20 is a diagram illustrating a flowchart of processing executed by the influence range analysis unit 108.
In step 2000 (S2000), the influence range analysis unit 108 starts processing when the rule creation /
ステップ2001(S2001)で、影響範囲分析部108は、編集前の当該ルールをメモリ132から、また、編集後の当該ルールを図7のルール編集エリア740から、それぞれ取得する。
ステップ2002(S2002)で、影響範囲分析部108は、編集内容を特定する。
例えば、ルールの追加・削除に関しては、編集前のルールが存在するか、または編集後のルールが存在するかによって特定できる。また、ルールIDおよび結果部の変更に関しては、文字列一致で変更されたかどうかを特定できる。さらに、条件部に関しては、入力値増加式「¬(編集後のルールの条件部→編集前のルールの条件部)」、および、入力値減少式「¬(編集前のルールの条件部→編集後のルールの条件部)」が充足可能かを判定することで、編集済みルールの条件部を真とする入力値の増加または減少を特定できる。
In step 2001 (S2001), the influence range analysis unit 108 acquires the rule before editing from the
In step 2002 (S2002), the influence range analysis unit 108 specifies the editing content.
For example, the addition / deletion of a rule can be specified depending on whether a rule before editing exists or a rule after editing exists. In addition, regarding the change of the rule ID and the result part, it can be specified whether or not the change has been made due to the character string match. Furthermore, regarding the condition part, the input value increasing expression “¬ (condition part of the rule after editing → condition part of the rule before editing)” and the input value decreasing expression “¬ (condition part of the rule before editing → editing) By determining whether or not the “condition part of the later rule” can be satisfied, an increase or decrease in the input value that makes the condition part of the edited rule true can be specified.
入力増加式が充足可能であるとは、入力値増加の検査式が真になること、すなわち、編集後のルールの条件部を真とする入力のうち、編集前のルールの条件部が真にならない入力が存在することを意味している。
また、入力減少式が充足可能であるとは、入力値減少の検査式が真になること、すなわち、編集前ルールの条件部を真とする入力のうち、編集後のルールの条件部が真にならない入力が存在することを意味している。
An input increase expression is satisfiable means that the check expression for increasing the input value is true, that is, among the inputs that make the condition part of the rule after editing true, the condition part of the rule before editing is true It means that there is an input that must not be.
Also, that the input reduction formula is satisfiable means that the input value reduction check formula is true, that is, among the inputs that make the pre-edit rule condition part true, the post-edit rule condition part is true. It means that there is an input that does not become.
ステップ2003(S2003)で、影響範囲分析部108は、編集によって合否の変わる可能性のある論理テストケースをテストケース記録部121から取得する。編集内容に対して、合否の変わる可能性のある論理テストケースは、例えば、図21に示す処理フローによって取得できる。
In step 2003 (S2003), the influence range analysis unit 108 acquires, from the test
図21は、影響範囲分析部108が、合否の変わる可能性のある論理テストケースを取得する処理のフローチャートを示す図である。
ステップ2100(S2100)で、影響範囲分析部108は、図20のステップ2003(S2003)において、図21のフローチャートの処理を開始する。
FIG. 21 is a diagram illustrating a flowchart of a process in which the influence range analysis unit 108 acquires a logical test case that may change pass / fail.
In step 2100 (S2100), the influence range analysis unit 108 starts the process of the flowchart of FIG. 21 in step 2003 (S2003) of FIG.
ステップ2101(S2101)で、影響範囲分析部108は、編集内容を確認する。
編集内容が「ルールの追加」の場合、影響範囲分析部108は、ステップ2102(S2102)に進む。
編集内容が「ルールの削除」の場合、影響範囲分析部108は、ステップ2104(S2104)に進む。
編集内容が「ルールの変更」の場合、影響範囲分析部108は、ステップ2106(S2106)に進む。
In step 2101 (S2101), the influence range analysis unit 108 confirms the editing content.
If the edited content is “add rule”, the influence range analyzing unit 108 proceeds to step 2102 (S2102).
If the edited content is “delete rule”, the influence range analyzing unit 108 proceeds to step 2104 (S2104).
If the edited content is “change rule”, the influence range analyzing unit 108 proceeds to step 2106 (S2106).
編集内容が「ルールの追加」の場合には、ステップ2102(S2102)で、影響範囲分析部108は、合否の変わる可能性のある論理テストケースとして、編集済みルールを含むルールセットをテスト対象ルールセットとするテストケースセットに含まれる論理テストケース(以下、「候補テストケース」という)を全て取得し、ステップ2103(S2103)で処理を終了する。 If the edited content is “add rule”, in step 2102 (S2102), the influence scope analysis unit 108 sets a rule set including the edited rule as a test target rule as a logical test case that may change pass / fail. All logical test cases (hereinafter referred to as “candidate test cases”) included in the test case set to be set are acquired, and the process ends in step 2103 (S2103).
編集内容が「ルールの削除」の場合には、ステップ2104(S2104)で、影響範囲分析部108は、候補テストケースのうち、編集済みルールを含む適用ケースを持つ論理テストケースを取得し、ステップ2105(S2105)で処理を終了する。 When the edited content is “delete rule”, in step 2104 (S2104), the influence range analysis unit 108 acquires a logical test case having an application case including the edited rule from the candidate test cases, The process ends in 2105 (S2105).
編集内容が「ルールの変更」の場合には、ステップ2106(S2106)で、影響範囲分析部108は、変更の対象を確認する。
変更対象が「ルールID」の場合、影響範囲分析部108は、ステップ2107(S2107)で処理を終了する。
変更対象が「結果部」の場合、影響範囲分析部108は、ステップ2108(S2108)に進む。
変更対象が「条件部」の場合、影響範囲分析部108は、ステップ2110(S2110)に進む。
If the edited content is “change rule”, in step 2106 (S2106), the influence range analysis unit 108 checks the change target.
When the change target is “rule ID”, the influence range analysis unit 108 ends the process in step 2107 (S2107).
When the change target is the “result part”, the influence range analysis unit 108 proceeds to step 2108 (S2108).
When the change target is the “condition part”, the influence range analysis unit 108 proceeds to step 2110 (S2110).
変更対象が「結果部」の場合には、ステップ2108(S2108)で、影響範囲分析部108は、候補テストケースのうち、編集済みルールを含む適用ケースを持つ論理テストケースを取得し、ステップ2109(S2109)で処理を終了する。
変更対象が「条件部」の場合には、ステップ2110(S2110)で、影響範囲分析部108は、入力増加式の充足可能性を確認する。
When the change target is the “result part”, in step 2108 (S2108), the influence range analysis unit 108 acquires a logical test case having an application case including the edited rule from the candidate test cases, and in
When the change target is the “condition part”, in step 2110 (S2110), the influence range analysis unit 108 confirms whether or not the input increase formula is satisfiable.
入力増加式が「充足可能」な場合、影響範囲分析部108は、ステップ2111(S2111)に進む。ステップ2111(S2111)で、影響範囲分析部108は、候補テストケースを全て取得し、ステップ2114(S2114)で処理を終了する。
入力増加式が「充足不能」な場合、影響範囲分析部108は、ステップ2112(S2112)に進む。ステップ2112(S2112)で、影響範囲分析部108は、入力減少式の充足可能性を確認する。
If the input increase formula is “satisfiable”, the influence range analysis unit 108 proceeds to step 2111 (S2111). In step 2111 (S2111), the influence range analysis unit 108 acquires all candidate test cases, and ends the process in step 2114 (S2114).
When the input increase formula is “unsatisfiable”, the influence range analysis unit 108 proceeds to Step 2112 (S2112). In step 2112 (S2112), the influence range analysis unit 108 checks the satisfiability of the input reduction formula.
入力減少式が「充足可能」な場合、影響範囲分析部108は、ステップ2113(S2113)に進む。ステップ2113(S2113)で、影響範囲分析部108は、候補テストケースのうち、編集済みルールを含む適用ケースを持つ論理テストケースを取得し、ステップ2114(S2114)で処理を終了する。
入力減少式が「充足不能」な場合、すなわち、入力増加式および入力減少式共に充足不能とは等価であり変更がないことを意味し、影響範囲分析部108は、ステップ2114(S2114)で処理を終了する。
If the input reduction formula is “satisfiable”, the influence range analysis unit 108 proceeds to step 2113 (S2113). In step 2113 (S2113), the influence range analysis unit 108 acquires a logical test case having an application case including the edited rule from the candidate test cases, and ends the process in step 2114 (S2114).
When the input decrease formula is “unsatisfiable”, that is, both the input increase formula and the input decrease formula are unsatisfactory, meaning that there is no change, and the influence range analysis unit 108 performs processing in step 2114 (S2114). Exit.
図20に戻り、ステップ2004(S2004)で、影響範囲分析部108は、影響を受ける論理テストケースに対してテストを実行し、ステップ2005(S2005)で処理を終了する。 Returning to FIG. 20, in step 2004 (S2004), the influence range analysis unit 108 executes a test on the affected logical test case, and ends the process in step 2005 (S2005).
100…ルールテスト装置、101…ルール作成・修正部、102…テストケース作成・修正部、103…テストケース漏れ検査部、104…テスト実行部、105…テスト結果出力部、106…補完テストケース生成部、107…不具合箇所分析部、108…影響範囲分析部、120…補助記憶装置、121…テストケース記録部、122…ルール記録部、123…テスト結果記録部、131…プロセッサ、132…メモリ、133…入出力装置
DESCRIPTION OF
Claims (10)
前記ルールが成立するための条件を格納する条件部と当該条件が成立した場合の結果を格納する結果部とを含む前記ルールの1以上の集まりであるルールセットを受け付けるルール作成・修正部と、
論理式で記述されたテストの対象とする入力値の条件を格納する入力条件部と当該入力値の条件を満たす入力に対して期待する結果を格納する期待出力条件部とを含む1以上の論理テストケースを受け付けるテストケース修正・作成部と、
1以上の前記ルールセットと1つの前記論理テストケースから、当該ルールセットの入出力のうち、当該論理テストケースの入力条件を満たしかつ当該論理テストケースの期待出力条件を満たさないケースを表す不合格ケース生成式を生成し、当該不合格ケース生成式の充足可能性を判定することで前記論理テストケースの入力条件を満たす全入力に対する結果が前記期待出力条件を満たすか否かの合否を判定するテスト実行部と、
前記テスト実行部が判定したテスト結果を出力するテスト結果出力部と
を備えるルールテスト装置。 A test device for rules described in IF-THEN format as software specifications,
A rule creation / modification unit that accepts a rule set that is a set of one or more of the rules, including a condition part that stores a condition for satisfying the rule and a result part that stores a result when the condition is satisfied;
One or more logics including an input condition part that stores a condition of an input value to be tested described by a logical expression and an expected output condition part that stores an expected result for an input that satisfies the condition of the input value A test case modification / creation unit that accepts test cases;
A failure indicating that the input / output of the rule set satisfies the input condition of the logical test case and does not satisfy the expected output condition of the logical test case from one or more rule sets and one logical test case Generates a case generation expression and determines whether or not the result for all inputs satisfying the input condition of the logical test case satisfies the expected output condition by determining the satisfaction of the reject case generation expression. A test execution unit;
A rule test apparatus comprising: a test result output unit that outputs a test result determined by the test execution unit.
前記テスト実行部は、前記論理テストケースごとの前記合否、前記論理テストケースの入力条件を満たしかつ当該論理テストケースの前記期待出力条件を満たさない時に適用される1以上の前記ルールを含む不合格ケース、および、前記論理テストケースの入力条件を満たしかつ当該論理テストケースの前記期待出力条件を満たすときに適用される1以上の前記ルールを含む合格ケース、を一部または全て取得および記録し、
前記テスト結果出力部は、前記テスト実行部が判定したテスト結果として前記テスト実行部が記録した前記合否、前記不合格ケースおよび前記合格ケースを表示する
ことを特徴とするルールテスト装置。 The rule test device according to claim 1,
The test execution unit includes the one or more rules applied when the pass / fail for each logical test case satisfies the input condition of the logical test case and does not satisfy the expected output condition of the logical test case. Obtaining and recording part or all of a case and a passing case including one or more of the rules applied when the input condition of the logical test case is satisfied and the expected output condition of the logical test case is satisfied,
The rule test apparatus, wherein the test result output unit displays the pass / fail, the fail case, and the pass case recorded by the test execution unit as test results determined by the test execution unit.
前記テストの対象が同じである前記論理テストケースを1以上含むテストケースセットごとに、テストしていない前記ルールセットの入力の存在を漏れとして検知するテストケース漏れ検査部と、
前記漏れおよび前記ルールセットを用いて、当該漏れに相当する前記ルールセットの入力の範囲をテストするための補完テストケースを1以上生成する補完テストケース生成部と
をさらに備えるルールテスト装置。 The rule test apparatus according to claim 1 or 2, wherein
For each test case set including one or more logical test cases with the same test target, a test case leak inspection unit that detects the presence of an input of the rule set that has not been tested as a leak,
A rule test apparatus further comprising a complementary test case generation unit that generates one or more complementary test cases for testing an input range of the rule set corresponding to the leakage using the leakage and the rule set.
前記論理テストケースごとの前記合否、前記不合格ケースおよび前記合格ケースを分析し、前記不合格ケースに偏って含まれる前記ルールおよび前記不合格ケースに共通する前記ルールを特定する不具合箇所分析部をさらに備えるルールテスト装置。 A rule test apparatus according to claim 3 quoting claim 2 or claim 2 ,
Analyzing the pass / fail for each logical test case, the fail case and the pass case, and identifying the rule that is biased to the fail case and the rule common to the fail case; A rule test device further provided.
前記ルールの編集内容および前記テスト実行部が判定したテスト結果を用いて、当該ルールの編集により前記テスト実行部が判定する前記合否が変わる可能性のある前記論理テストケースを特定する影響範囲分析部をさらに備えるルールテスト装置。 The rule test device according to claim 2 or 3,
Using the edited contents of the rule and the test result determined by the test execution unit, the influence range analysis unit for identifying the logical test case that may change the pass / fail determined by the test execution unit by editing the rule A rule test apparatus further comprising:
前記ルールが成立するための条件を格納する条件部と当該条件が成立した場合の結果を格納する結果部とを含む前記ルールの1以上の集まりであるルールセットを受け付ける第1のステップと、
論理式で記述されたテストの対象とする入力値の条件を格納する入力条件部と当該入力値の条件を満たす入力に対して期待する結果を格納する期待出力条件部とを含む1以上の論理テストケースを受け付ける第2のステップと、
1以上の前記ルールセットと1つの前記論理テストケースから、当該ルールセットの入出力のうち、当該論理テストケースの入力条件を満たしかつ当該論理テストケースの期待出力条件を満たさないケースを表す不合格ケース生成式を生成し、当該不合格ケース生成式の充足可能性を判定することで前記論理テストケースの入力条件を満たす全入力に対する結果が前記期待出力条件を満たすか否かの合否を判定する第3のステップと、
前記第3のステップで判定したテスト結果を出力する第4のステップと
を有するルールテスト方法。 A test method for rules described in IF-THEN format as software specifications,
A first step of accepting a rule set that is a set of one or more of the rules including a condition part for storing a condition for establishing the rule and a result part for storing a result when the condition is satisfied;
One or more logics including an input condition part that stores a condition of an input value to be tested described by a logical expression and an expected output condition part that stores an expected result for an input that satisfies the condition of the input value A second step of accepting the test case;
A failure indicating that the input / output of the rule set satisfies the input condition of the logical test case and does not satisfy the expected output condition of the logical test case from one or more rule sets and one logical test case Generates a case generation expression and determines whether or not the result for all inputs satisfying the input condition of the logical test case satisfies the expected output condition by determining the satisfaction of the reject case generation expression. A third step;
And a fourth step of outputting the test result determined in the third step.
前記第3のステップは、前記論理テストケースごとの前記合否、前記論理テストケースの入力条件を満たしかつ当該論理テストケースの前記期待出力条件を満たさない時に適用される1以上の前記ルールを含む不合格ケース、および、前記論理テストケースの入力条件を満たしかつ当該論理テストケースの前記期待出力条件を満たすときに適用される1以上の前記ルールを含む合格ケース、を一部または全て取得および記録することを含み、
前記第4のステップは、前記第3のステップで判定したテスト結果として記録した前記合否、前記不合格ケースおよび前記合格ケースを表示することを含む
ことを特徴とするルールテスト方法。 The rule test method according to claim 6,
The third step includes one or more rules that are applied when the pass / fail of each logical test case satisfies the input condition of the logical test case and does not satisfy the expected output condition of the logical test case. Acquire and record a part or all of a passing case and a passing case that satisfies the input condition of the logical test case and includes one or more of the rules applied when the expected output condition of the logical test case is satisfied Including
The rule test method according to claim 4, wherein the fourth step includes displaying the pass / fail, the fail case, and the pass case recorded as the test result determined in the third step.
前記テストの対象が同じである前記論理テストケースを1以上含むテストケースセットごとに、テストしていない前記ルールセットの入力の存在を漏れとして検知するテストケース漏れ検査ステップと、
前記漏れおよび前記ルールセットを用いて、当該漏れに相当する前記ルールセットの入力の範囲をテストするための補完テストケースを1以上生成する補完テストケース生成ステップと
をさらに有するルールテスト方法。 The rule test method according to claim 6 or 7, wherein
A test case leak check step for detecting the presence of an input of the rule set that is not tested as a leak for each test case set including one or more of the logical test cases with the same test target;
A rule test method further comprising: generating one or more complementary test cases for testing an input range of the rule set corresponding to the leak using the leak and the rule set.
前記論理テストケースごとの前記合否、前記不合格ケースおよび前記合格ケースを分析し、前記不合格ケースに偏って含まれる前記ルールおよび前記不合格ケースに共通する前記ルールを特定する不具合箇所分析ステップをさらに有するルールテスト方法。 A rule test method according to claim 8 quoting claim 7 or claim 7 ,
Analyzing the pass / fail, the fail case and the pass case for each logic test case, and the failure point analyzing step for identifying the rule common to the fail case and the rule common to the fail case A rule test method further comprising:
前記ルールの編集内容および前記第3のステップで判定したテスト結果を用いて、当該ルールの編集により前記第3のステップで判定する前記合否が変わる可能性のある前記論理テストケースを特定する影響範囲分析ステップをさらに有するルールテスト方法。
The rule test method according to claim 7 or 8, wherein
Using the edited contents of the rule and the test result determined in the third step, the influence range for specifying the logical test case that may change the pass / fail determined in the third step by editing the rule A rule test method further comprising an analysis step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016077762A JP6604892B2 (en) | 2016-04-08 | 2016-04-08 | Rule test apparatus and rule test method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016077762A JP6604892B2 (en) | 2016-04-08 | 2016-04-08 | Rule test apparatus and rule test method |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2017188001A JP2017188001A (en) | 2017-10-12 |
JP2017188001A5 JP2017188001A5 (en) | 2018-11-15 |
JP6604892B2 true JP6604892B2 (en) | 2019-11-13 |
Family
ID=60044928
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016077762A Active JP6604892B2 (en) | 2016-04-08 | 2016-04-08 | Rule test apparatus and rule test method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6604892B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7214440B2 (en) * | 2018-11-01 | 2023-01-30 | 三菱重工エンジニアリング株式会社 | Verification processing device, verification processing method and program |
CN110866055A (en) * | 2019-10-24 | 2020-03-06 | 广州永融科技股份有限公司 | Method for rule base management |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8069129B2 (en) * | 2007-04-10 | 2011-11-29 | Ab Initio Technology Llc | Editing and compiling business rules |
-
2016
- 2016-04-08 JP JP2016077762A patent/JP6604892B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2017188001A (en) | 2017-10-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2015343004B2 (en) | Debugging a graph | |
Sung et al. | Automated design knowledge capture and representation in single-user CAD environments | |
JP6205512B2 (en) | Rule management support device and rule management support method | |
Sun et al. | Automated testing of WS-BPEL service compositions: A scenario-oriented approach | |
JP6604892B2 (en) | Rule test apparatus and rule test method | |
Rabinovich et al. | Analyzing the behavior of event processing applications | |
Michalakoudis et al. | Using functional analysis diagrams to improve product reliability and cost | |
US8819620B1 (en) | Case management software development | |
Jena et al. | Test case creation from UML sequence diagram: a soft computing approach | |
Martini et al. | Process debt: A first exploration | |
Li et al. | Bibliometric analysis of model-based systems engineering: past, current, and future | |
Miranda et al. | NESSy: a new evaluator for software development tools | |
Sriganesh et al. | Externalizing business rules from business processes for model based testing | |
Boonmepipit et al. | Test case generation from bpmn with dmn | |
Al-Khanjari | Proposing a systematic approach to verify software requirements | |
WO2019012665A1 (en) | Information processing device, information processing method, and information processing program | |
Koo et al. | An effective technique for the software requirements analysis of NPP safety-critical systems, based on software inspection, requirements traceability, and formal specification | |
Schützenmeier et al. | Comparing the Expressiveness of Imperative and Declarative Process Models | |
CN116860227B (en) | Data development system and method based on big data ETL script arrangement | |
Duangkeaw et al. | Monitoring Call activity and Service Task Invocations for BPMN | |
Salgado et al. | Pharo Git thermite: A visual tool for deciding to weld a pull request | |
Xiao et al. | Framework Research on the Implementation of Automated Test User Requirements | |
Svetashova | Semantic Model Extensibility in Interoperable IoT Data Marketplaces: Methods, Tools, Automation Aspects. | |
Ahn et al. | Visualizing hierarchical properties of business process entities | |
JP6291131B2 (en) | Rule management support device and rule management support method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20181002 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20181002 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190724 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190806 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190829 |
|
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: 20191008 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20191015 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6604892 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |