JP2020524862A - Software test apparatus, software test method, and software test program - Google Patents
Software test apparatus, software test method, and software test program Download PDFInfo
- Publication number
- JP2020524862A JP2020524862A JP2019571278A JP2019571278A JP2020524862A JP 2020524862 A JP2020524862 A JP 2020524862A JP 2019571278 A JP2019571278 A JP 2019571278A JP 2019571278 A JP2019571278 A JP 2019571278A JP 2020524862 A JP2020524862 A JP 2020524862A
- Authority
- JP
- Japan
- Prior art keywords
- verification
- software
- test
- detection rule
- generation unit
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
Abstract
ソフトウェア試験装置は、正常な通信データを定義する検知ルール101を用いて、検証対象ソフトウェア106が出力すべき実行結果の期待値を生成するための検証用ソフトウェア103を生成する検証用ソフトウェア生成部102と、検証用ソフトウェア103にテストパターンを入力して、検証用ソフトウェア103を実行させて、実行結果の期待値をテストケース105として生成するテストケース生成部104と、テストパターンと同一のテストパターンを検証対象ソフトウェア106に入力して、検証対象ソフトウェア106を実行させて、得られた実行結果とテストケース105の実行結果の期待値とを比較することで、検証対象ソフトウェア106の合否を判定する検証実行部107とを備えている。The software testing apparatus uses the detection rule 101 that defines normal communication data to generate the verification software 103 for generating the expected value of the execution result that the verification target software 106 should output, and the verification software generation unit 102. Then, a test pattern is input to the verification software 103, the verification software 103 is executed, and an expected value of the execution result is generated as a test case 105. Verification for determining whether the verification target software 106 is acceptable or not by inputting the verification target software 106 to execute the verification target software 106 and comparing the obtained execution result with the expected value of the execution result of the test case 105. And an execution unit 107.
Description
本発明は、ソフトウェア試験装置、ソフトウェア試験方法、および、ソフトウェア試験プログラムに関する。 The present invention relates to a software test device, a software test method, and a software test program.
近年、制御機器がネットワークに接続されるケースが増えている。また、IoT(Internet of Things)機器の普及が進んでいる。そのため、制御機器およびIoT機器が、サイバー攻撃の標的になるケースが増加している。 In recent years, the number of cases where control devices are connected to networks has increased. In addition, IoT (Internet of Things) devices are becoming widespread. Therefore, control devices and IoT devices are increasingly targeted by cyber attacks.
一般的に、制御機器およびIoT機器では、通信データが固定的である。そのため、制御機器およびIoT機器では、正常な通信データを定義した検知ルールを予め設定しておくことが比較的容易である。そこで、検知ルールを予め設定しておくことで、サイバー攻撃を検知するホワイトリスト型攻撃検知方式が注目されている。ホワイトリスト型攻撃検知方式においては、検知ルールを予め設定しておき、受信した通信データが当該検知ルールから逸脱したときに、当該通信データが異常であると判定することで、サイバー攻撃を検知する。 In general, communication data is fixed in the control device and the IoT device. Therefore, in the control device and the IoT device, it is relatively easy to preset the detection rule defining the normal communication data. Therefore, a whitelist attack detection method that detects a cyber attack by setting detection rules in advance has been receiving attention. In the whitelist attack detection method, a detection rule is set in advance, and when the received communication data deviates from the detection rule, it is determined that the communication data is abnormal, thereby detecting a cyber attack. ..
ホワイトリスト型攻撃検知方式を使用した製品の性能および品質は、適用可能な検知ルールの種別の多さに大きく依存する。高信頼な攻撃検知ソフトウェアを開発する際には、実際のシステムに攻撃検知ソフトウェアを導入する前に、システムごとに異なる検知ルールに応じた攻撃検知ソフトウェアの実装試験が必要である。そのため、実装試験の際に使用するための各検知ルールに応じた高信頼なテストデータの作成が必要となる。 The performance and quality of products that use the whitelist attack detection method largely depend on the number of types of applicable detection rules. When developing highly reliable attack detection software, it is necessary to test the attack detection software according to different detection rules for each system before introducing the attack detection software into the actual system. Therefore, it is necessary to create highly reliable test data according to each detection rule to be used in the mounting test.
従来技術においては、テストデータを手動で作成していた。しかしながら、検知ルールに応じたテストデータの生成を手動で行うため、テストデータに関する漏れの発生または誤りの混入の可能性がある。したがって、漏れおよび誤りの無い高信頼なテストデータの生成が課題となる。 In the prior art, test data was created manually. However, since the test data is manually generated according to the detection rule, there is a possibility that the test data may be leaked or an error may be mixed. Therefore, the generation of highly reliable test data without leakage and error is an issue.
特許文献1では、テストデータを手動で作成するのではなく、自動的に作成することを提案している。特許文献1では、UML(Unified Modeling Language)クラス図およびアクティビティ図などの設計モデルからテストデータを自動生成する。
特許文献2では、網羅的なテストデータを自動的に作成することを提案している。特許文献2では、列車走行に関する実運用上のルールからテストデータを自動生成している。
特許文献3では、安全重視ソフトウェアのモデルベース設計において、テストデータを自動的に生成することを提案している。特許文献3では、モデル検査または他の形式解析技術を用いて、仕様モデルからテストデータを自動生成している。 Patent Document 3 proposes to automatically generate test data in a model-based design of safety-oriented software. In Patent Document 3, test data is automatically generated from a specification model using model checking or other formal analysis technology.
特許文献1では、設計モデルからテストデータを自動生成することを提案している。しかしながら、特許文献1では、テストデータに向けた設計モデルを作成する必要があるという課題があった。
特許文献2では、網羅的なテストデータを自動的に作成することを提案している。しかしながら、特許文献2では、テストデータの期待値を生成していないため、テスト結果の判定は、自動的に行うことができず、人手で行う必要があるという課題があった。
特許文献3では、仕様モデルから形式解析技術を用いてテストデータを自動生成することを提案している。しかしながら、特許文献3では、テストデータに向けた仕様モデルを作成する必要があるという課題があった。 Patent Document 3 proposes to automatically generate test data from a specification model using a formal analysis technique. However, Patent Document 3 has a problem that it is necessary to create a specification model for test data.
本発明は、実装試験の際に使用するための検知ルールに応じたテストデータを生成する必要なしに、簡単な入力を行うだけで、検証対象のソフトウェアの検証結果を自動的に得ることができる、ソフトウェア試験装置、ソフトウェア試験方法、および、ソフトウェア試験プログラムを得ることを目的としている。 INDUSTRIAL APPLICABILITY According to the present invention, the verification result of the software to be verified can be automatically obtained only by making a simple input, without the need to generate the test data according to the detection rule used in the mounting test. , A software testing device, a software testing method, and a software testing program.
本発明は、検証対象ソフトウェアが導入される機器が通信を行う正常な通信データを定義する検知ルールを用いて、検証対象ソフトウェアが出力すべき実行結果の期待値を生成するための検証用ソフトウェアを生成する検証用ソフトウェア生成部と、検証用ソフトウェアにテストパターンを入力して、検証用ソフトウェアを実行させて、実行結果の期待値をテストケースとして生成するテストケース生成部と、テストパターンと同一のテストパターンを検証対象ソフトウェアに入力して、検証対象ソフトウェアを実行させて、得られた実行結果とテストケースの実行結果の期待値とを比較することで、検証対象ソフトウェアの合否を判定する検証実行部とを備えた、ソフトウェア試験装置である。 The present invention provides verification software for generating an expected value of an execution result to be output by the verification target software by using a detection rule that defines normal communication data with which a device into which the verification target software is installed communicates. The verification software generator that generates the test pattern, the test pattern generator that inputs the test pattern to the verification software, executes the verification software, and generates the expected value of the execution result as a test case Executing the verification pattern by inputting the test pattern into the verification target software, executing the verification target software, and comparing the obtained execution result with the expected value of the test case execution result And a software testing device.
本発明に係るソフトウェア試験装置によれば、簡単な入力を行うだけで、検証対象のソフトウェアの検証結果を自動的に得ることができる。 According to the software testing device of the present invention, it is possible to automatically obtain the verification result of the software to be verified only by making a simple input.
以下、本発明に係る試験装置の実施の形態について、図面を用いて説明する。 Embodiments of a test apparatus according to the present invention will be described below with reference to the drawings.
実施の形態1.
図1は、本実施の形態1に係るソフトウェア試験装置100の全体構成例を示す。ソフトウェア試験装置100は、図1に示すように、検証用ソフトウェア生成部102と、テストケース生成部104と、検証実行部107とを備えて構成されている。ソフトウェア試験装置100は、検証対象ソフトウェア106についての検証を行って合否判定する装置である。ここでは、検証対象ソフトウェア106として、例えば、サイバー攻撃等による異常な通信データを検知する攻撃検知ソフトウェアを例に挙げて説明する。検証対象ソフトウェア106は、制御機器およびIoT機器などの機器に導入されて、当該機器が通信を行う通信データが正か否かを判定するためのソフトウェアである。
FIG. 1 shows an example of the overall configuration of a
検証実行部107は、テストケース105と検証対象ソフトウェア106とを入力にして、検証結果108を出力する。
The
検証用ソフトウェア生成部102は、検知ルール101を入力にして、検証用ソフトウェア103を生成する。検証用ソフトウェア103は、定義した通信データのみを正とするテストオラクルとして使用されるソフトウェアである。
The verification
テストケース生成部104は、テストパターンを検証用ソフトウェア103に入力して実行させることで、テストケース105を生成する。
The test
検証対象ソフトウェア106の試験を行う際には、検証対象ソフトウェア106にテストパターンを入力したときに、その実行結果が正しいか否かを判定するための判定基準として、実行結果の期待値が必要である。テストケース105は、実行結果の期待値となるデータである。従って、検証対象ソフトウェア106にテストパターンを入力したときに、その実行結果がテストケース105の実行結果と一致すれば、検証対象ソフトウェア106が正しく動作していると判定することができる。
When the test of the
なお、ソフトウェア試験装置100の各部の詳細については後述する。
The details of each unit of the
図2は、図1に示したソフトウェア試験装置100のハードウェア構成例を示す。図2に示すように、本実施の形態1に係るソフトウェア試験装置100は、コンピュータ200から構成されている。
FIG. 2 shows a hardware configuration example of the
コンピュータ200は、ハードウェアとして、プロセッサ201、補助記憶装置202、メモリ203、表示装置204、および、操作装置205を備えて構成されている。
The
補助記憶装置202には、図1に示す検証用ソフトウェア生成部102、テストケース生成部104、および、検証実行部107の各部の機能を実現するプログラムが記憶されている。また、補助記憶装置202には、ソフトウェア試験装置100に入力される検知ルール101および検証対象ソフトウェア106が記憶されている。さらに、補助記憶装置202には、ソフトウェア試験装置100の各部から出力される検証用ソフトウェア103、テストケース105、および、検証結果108が記憶されている。
The
このように、図1に示す検証用ソフトウェア生成部102、テストケース生成部104、および、検証実行部107の各部の機能は、プログラムにより実現される。検証用ソフトウェア生成部102、テストケース生成部104、および、検証実行部107の各部の機能を実現するプログラムは、メモリ203にロードされ、プロセッサ201により実行される。
As described above, the functions of the verification
図2では、プロセッサ201が、検証用ソフトウェア生成部102、テストケース生成部104、および、検証実行部107の各部の機能を実現するプログラムを実行している状態を模式的に表している。
FIG. 2 schematically illustrates a state in which the processor 201 is executing a program that implements the functions of the verification
表示装置204は、操作装置205の補助を行うとともに、検証結果108のデータを表示する。
The display device 204 assists the
操作装置205は、検知ルール101、検証対象ソフトウェア106などの各データのデータ入力操作を実施するのに用いられる。
The
次に、図1に示す検証用ソフトウェア生成部102、テストケース生成部104、および、検証実行部107の詳細について説明する。
Next, details of the verification
検証用ソフトウェア生成部102は、正常な通信データを定義した検知ルール101に基づいて、定義した通信データのみを正として判定する検証用ソフトウェア103を生成する。
The verification
テストケース生成部104は、検証用ソフトウェア103に、境界値または確率的な入力による任意のテストパターンを入力し、検証用ソフトウェア103を実行させて、実行結果を得る。テストケース生成部104は、検証用ソフトウェア103に入力したテストパターンと実行結果とのペアを、テストケース105として生成する。テストケース105に含まれる実行結果は、検証対象ソフトウェア106に同じテストパターンを入力したときに得られる実行結果の期待値となる。そのため、以下では、テストケース105内の実行結果を、「実行結果の期待値」または「期待値」と呼ぶこととする。
The test
検証実行部107は、検証用ソフトウェア103に入力したテストパターンと同一のテストパターンを検証対象ソフトウェア106に入力し、その実行結果をテストケース105内の期待値と比較し、比較結果を検証結果108として出力する。
The
次に、図3を用いて、ソフトウェア試験装置100の動作例を説明する。但し、図3は、ソフトウェア試験装置100の動作フローの一例S1000を示しており、ソフトウェア試験装置100の動作フローは必ずしも図3の通りでなくてもよい。
Next, an operation example of the
図3において、まず、ステップS1001で、ソフトウェア試験装置100に検知ルール101を入力する。
In FIG. 3, first, in step S1001, the
次に、ステップS1002において、検証用ソフトウェア生成部102が、ステップS1001で入力した検知ルールから、検証用ソフトウェア103を生成する。検証用ソフトウェア生成動作の詳細な処理フローは後述する。
Next, in step S1002, the verification
次に、ステップS1003において、テストケース生成部104が、ステップS1002で生成した検証用ソフトウェア103に、テストパターンを入力する。
Next, in step S1003, the test
次に、ステップS1004において、テストケース生成部104が、検証用ソフトウェア103を実行させ、実行結果とステップS1003で入力したテストパターンとの組を、テストケース105として生成する。テストケース105に含まれる実行結果は、上述したように、「実行結果の期待値」として用いられる。
Next, in step S1004, the test
次に、ステップS1005において、テストケース生成部104が、ステップS1004で全てのテストケース105を生成したか否かを判定する。ステップS1004で全てのテストケース105を生成したと判定した場合、ステップS1006へ進む。一方、全てのテストケース105の生成が途中の場合には、ステップS1003に戻る。全てのテストケース105の生成が完了するまで、ステップS1003からステップS1005までの処理を繰り返す。
Next, in step S1005, the test
ステップS1006において、検証実行部107が、ステップS1003からステップS1005までの処理で生成したテストケース105内のテストパターンを、検証対象ソフトウェア106に入力する。
In step S1006, the
ステップS1007において、検証実行部107が、検証対象ソフトウェア106を実行させて得られた実行結果と、テストケース105内の実行結果の期待値とを比較する。検証対象ソフトウェア106の実行結果とテストケース105内の実行結果の期待値とが一致していれば、比較結果は「一致」となり、一致していなければ、比較結果は「不一致」として出力される。
In step S1007, the
ステップS1008において、検証実行部107が、ステップS1007で全てのテストケース105についての検証を実行したか否かを判定する。全てのテストケース105についての検証を実行したと判定した場合、ステップS1009へ進む。一方、検証の実行が途中の場合には、ステップS1006に戻る。全てのテストケース105の検証の実行が完了するまで、ステップS1006からステップS1008の処理を繰り返す。
In step S1008, the
ステップS1009において、検証実行部107は、全ての比較結果を、検証結果108として出力し、図3の動作フローの処理を終了する。
In step S1009, the
次に、図4を用いて、図3に示すステップS1002の「検証用ソフトウェア生成」の動作の詳細な処理フローを説明する。 Next, the detailed processing flow of the operation of “verification software generation” in step S1002 shown in FIG. 3 will be described using FIG.
図4において、ステップS2001において、検証用ソフトウェア生成部102に検知ルール101を入力する。検知ルール101の例を図5に示す。図5に示す検知ルール101は、正常な通信データの定義項目として、送信元情報、送信先情報、データ長、ペイロードなどの情報を含んでいる。図5の例では、検知ルール101が、ルール1からルールNまでのN個の検知ルールを含んでいる。検証用ソフトウェア103および検証対象ソフトウェア106においては、検知ルール101に含まれるN個の通信データが正となり、それ以外は異常データと判定される。
In FIG. 4, in step S2001, the
ステップS2002において、検証用ソフトウェア生成部102は、ステップS2001で入力された検知ルール101を、検知ルール解析することにより、ルールリスト木400を作成する。ルールリスト木の例を図6に示す。図6に示すルールリスト木400は、定義項目が葉、各ルールを木として、ルールリストを表している。
In step S2002, the verification
ステップS2003において、検証用ソフトウェア生成部102は、ステップS2002で生成されたルールリスト木400から、全ての木の定義項目を共通な項目ごとに結合する。
In step S2003, the verification
ステップS2004において、検証用ソフトウェア生成部102は、決定木500を構築する。決定木500の例を図7に示す。図7に示す決定木500は、ステップS2003で定義項目を結合されたルールリスト木400を決定木構造に変換し、また、各枝に不一致の葉を追加したものである。
In step S2004, the verification
ステップS2005において、検証用ソフトウェア生成部102は、ステップS2004で生成した決定木500から、検証用ソフトウェア103となるプログラムを生成する。検証用ソフトウェア103となるプログラム600の例を図8に示す。
In step S2005, the verification
ステップS2006において、検証用ソフトウェア生成部102は、ステップS2005で生成されたプログラム600を検証用ソフトウェア103として出力し、終了する。
In step S2006, the verification
図8のプログラム600から構成された検証用ソフトウェア103について説明する。検証用ソフトウェア103においては、テストデータが、図5に示すルール1からルールNまでのN個の検知ルールのいずれか1つに一致すれば、当該テストデータを正と判定する。一方、テストデータが、これらのN個の検知ルールのいずれにも一致しなければ、当該テストデータは異常となり、サイバー攻撃を受けている可能性があると判定する。具体的には、テストデータの送信元情報が送信元情報1で、送信先情報が送信先情報1で、データ長がデータ長1で、ペイロードがペイロード1の場合、ルール1と一致するので、当該テストデータは正と判定できる。
The
このように、本実施の形態1においては、検証用ソフトウェア生成部102が、検知ルール101から、図8に示す検証用ソフトウェア103を生成する。テストケース生成部104は、検証用ソフトウェア103に、M個のテストパターンA,B,C,・・・,Mを入力し、それぞれの実行結果を、実行結果の期待値Aout、Bout,Cout,・・・,Moutとして得る。検証実行部107は、試験対象の検証対象ソフトウェア106に、テストパターンA,B,C,・・・,Mを入力し、それぞれの実行結果を、実行結果Aout’、Bout’,Cout’,・・・,Mout’として得る。検証実行部107は、実行結果の期待値Aout、Bout,Cout,・・・,Moutと実行結果Aout’、Bout’,Cout’,・・・,Mout’とをそれぞれ比較して、M個のうち、一致した個数が予め設定された閾値以上であれば、検証対象ソフトウェア106を合格とし、一致した個数が閾値未満であれば、検証対象ソフトウェア106を不合格と判定する。なお、閾値は、Mに設定してもよく、あるいは、Mより小さい値に設定してもよい。
As described above, in the first embodiment, the verification
以上のように、本実施の形態1係るソフトウェア試験装置100によれば、検知ルール101と検証対象ソフトウェア106とを入力するだけで、検証対象ソフトウェア106の試験が全自動で実行することができる。したがって、従来のように手動によりテストケースを生成することが不要であり、テスト時間の削減ができる。
As described above, according to the
本実施の形態1に係るソフトウェア試験装置100は、全自動でテストケースが生成されるため、人間の介入によるテストケースに関する漏れの発生および誤りの混入の可能性が低減できる。
In the
本実施の形態に係るソフトウェア試験装置100は、検知ルール101からテストケース105を生成し、検証対象ソフトウェア106の検証テストを実行するため、検証対象ソフトウェア106の内容がブラックボックスで不明であっても、検証テストを行うことが可能である。
Since the
本実施の形態に係るソフトウェア試験装置100は、検証用ソフトウェア103を用いて実行結果の期待値としてのテストケース105を得ることができるので、検証対象ソフトウェア106の合否の判定結果を自動的に得ることができるので、合否の判定を人手によって行う必要がない。
The
実施の形態2.
図9を用いて、本発明の実施の形態2に係るソフトウェア試験装置について説明する。図9は、上述した図3に示すステップS1002の「検証用ソフトウェア生成」の動作の詳細な処理フローを示す。
A software test apparatus according to the second embodiment of the present invention will be described with reference to FIG. FIG. 9 shows a detailed processing flow of the operation of “verification software generation” in step S1002 shown in FIG. 3 described above.
なお、実施の形態2に係るソフトウェア試験装置の全体構成は、図1に示した実施の形態1に係るソフトウェア試験装置100の構成と同じである。また、実施の形態2のハードウェア構成例は、図2に示した実施の形態1のハードウェア構成と同じである。実施の形態2のソフトウェア試験装置の動作は、図3の実施の形態1と基本的に同じである。本実施の形態2において、実施の形態1と異なる点は、実施の形態1の図4の代わりに、図9の動作フローを行う点だけである。ここで生成される形式検証プロパティは、検査対象の通信データと図5の検知ルール101との一致を検証するために用いられる。形式検証プロパティには、図5の検知ルール101に定義されたN個の検知ルールが形式的に変換されたものが記述されている。例えば、図5の検知ルール101のルール1からは、「ルール1 == sender == 送信元情報1 && receiver == 送信先情報1 && length ==データ長1 && command == ペイロード1」といった形式検証プロパティが作成される。ここで、sender、 receiver、length、commandは、検査対象の通信データの内容である。
The overall configuration of the software test apparatus according to the second embodiment is the same as the configuration of the
図9において、ステップS3001、ステップS3002、ステップS3003、ステップS3005、ステップS3006、ステップS3008は、それぞれ、実施の形態1の図4のステップS2001、ステップS2002、ステップS2003、ステップS2004、ステップS2005、ステップS2006と同じであるため、ここでは、その説明を省略する。すなわち、図9においては、図4に対して、ステップS3004の「形式検証プロパティ生成」のステップが追加されている。形式検証プロパティは、検証用ソフトウェア103の動作を形式的に検証するためのプロパティである。
9, step S3001, step S3002, step S3003, step S3005, step S3006, and step S3008 are respectively step S2001, step S2002, step S2003, step S2004, step S2005, and step S2006 in FIG. 4 of the first embodiment. Therefore, the description thereof is omitted here. That is, in FIG. 9, the step of “form verification property generation” of step S3004 is added to FIG. The formal verification property is a property for formally verifying the operation of the
図9において、ステップS3004において、検証用ソフトウェア生成部102は、ステップS3002で生成した図6のルールリスト木400から、検知ルール101に応じた形式検証プロパティを生成する。
9, in step S3004, the verification
ステップS3007において、検証用ソフトウェア生成部102は、ステップS3006で生成したプログラム600について、ステップS3004で生成した形式検証プロパティを用いて、図5の検知ルール101が、正しく、プログラム600に反映されているか否かを検証する。
In step S3007, the verification
以上のように、実施の形態2においても、実施の形態1と同様に、検知ルール101と検証対象ソフトウェア106とを入力するだけで、自動的に、検証対象ソフトウェア106の合否判定を行うことができるので、上記の実施の形態1と同様の効果が得られる。
As described above, also in the second embodiment, similarly to the first embodiment, the acceptance/rejection determination of the
さらに、本実施の形態2においては、検証用ソフトウェア生成部102が、検知ルール101に応じた形式検証プロパティを生成する。形式検証プロパティを用いた形式検証を行うことにより、検証用ソフトウェア103にバグが無いことが証明される。したがって、高信頼なテストケース105を生成することができる。
Further, in the second embodiment, the verification
実施の形態3.
図10は、本発明の実施の形態3に係るソフトウェア試験装置100Aの全体構成例を示す。
Embodiment 3.
FIG. 10 shows an example of the overall configuration of a
ソフトウェア試験装置100Aは、図10に示すように、図1の実施の形態1の構成に対して、モデル検査部702と検知ルール生成部703とが追加されている。
As shown in FIG. 10, the
モデル検査部702は、通信モデル701を入力とし、モデル検査を行う。 The model checking unit 702 inputs the communication model 701 and performs model checking.
検知ルール生成部703は、モデル検査部702から出力されるモデル検査後の通信モデルから、検知ルール101を出力する。
The detection rule generation unit 703 outputs the
なお、モデル検査部701と検知ルール生成部703との詳細については後述する。 The details of the model checking unit 701 and the detection rule generating unit 703 will be described later.
本実施の形態3に係るソフトウェア試験装置100Aのハードウェア構成例は、図2の実施の形態1に係るソフトウェア試験装置100のハードウェア構成に対して、モデル検査部702と検知ルール生成部703との機能を加えた構成であり、モデル検査部702と検知ルール生成部703とは、検証用ソフトウェア生成部102と同様に、プログラムにより実現される。このように、本実施の形態3に係るソフトウェア試験装置100Aのハードウェア構成例は、図2の実施の形態1に係るソフトウェア試験装置100のハードウェア構成と基本的に同じであるため、ここでは、その説明を省略する。なお、通信モデル701は、補助記憶装置202に格納されるか、あるいは、メモリ203に格納される。
The hardware configuration example of the
次に、図10に示す本実施の形態3に係るソフトウェア試験装置100Aにおける、通信モデル701、モデル検査部702、および、検知ルール生成部703の詳細を説明する。他の構成については、実施の形態1と同じであるため、ここでは、その説明を省略する。
Next, details of the communication model 701, the model checking unit 702, and the detection rule generating unit 703 in the
通信モデル701は、検証対象ソフトウェア106が導入される制御機器あるいはIoT機器などの機器によって通信される通信データの設計モデルである。通信モデル701は、例えばブロック図または状態遷移図で記述され、通信機能の実装に必要な情報が含まれている。
The communication model 701 is a design model of communication data communicated by a device such as a control device or an IoT device into which the
モデル検査部702は、予め設定されたモデル検査ルールに従って、通信モデル701に誤りがないかのモデル検査を行う。例えば、モデル検査部702は、通信シーケンスにおいて、デッドロックが発生しないか等を、モデル検査により、形式検証する。 The model checking unit 702 performs model checking whether the communication model 701 has an error according to a preset model checking rule. For example, the model checking unit 702 performs format verification by model checking whether deadlock occurs in the communication sequence.
検知ルール生成部703は、モデル検査後の通信モデル701を入力とし、正常な通信データを定義した検知ルール101を生成する。検知ルール生成部703は、通信モデル701に含まれる通信機能の仕様を抽出し、抽出した通信機能を、検知ルール101の定義項目として定義する。
The detection rule generation unit 703 receives the communication model 701 after model checking as an input, and generates the
次に、図11を用いて、ソフトウェア試験装置100Aの動作について説明する。但し、図11は、ソフトウェア試験装置100Aの動作の一例S4000を示しており、ソフトウェア試験装置100Aの動作フローは必ずしも図11の通りでなくてもよい。
Next, the operation of the
図11において、まず、ステップS4001において、ソフトウェア試験装置100Aに通信モデル701を入力する。
In FIG. 11, first, in step S4001, the communication model 701 is input to the
次に、ステップS4002において、モデル検査部702が、ステップS4001で入力された通信モデル701をモデル検査により形式検証する。 Next, in step S4002, the model checking unit 702 formally verifies the communication model 701 input in step S4001 by model checking.
次に、ステップS4003において、検知ルール生成部703が、ステップS4002でモデル検査された通信モデル701から、検知ルール101を生成する。生成される検知ルール101の一例は、例えば、図5に示されるものである。
Next, in step S4003, the detection rule generation unit 703 generates the
ステップS4003で生成された検知ルール101は、検証用ソフトウェア生成部102への入力となる。
The
図11のステップS4004からステップS4011の処理は、それぞれ、図3の実施の形態1のステップS1002からステップS1009と同様であるため、ここでは、その説明を省略する。 The processes of steps S4004 to S4011 of FIG. 11 are the same as steps S1002 to S1009 of the first embodiment of FIG. 3, respectively, and therefore description thereof will be omitted here.
以上のように、本実施の形態3においても、通信モデル701と検証対象ソフトウェア106とを入力するだけで、自動的に、検証対象ソフトウェア106の合否判定を行うことができるので、上記の実施の形態1と同様の効果が得られる。
As described above, also in the third embodiment, the acceptance/rejection determination of the
さらに、本実施の形態3においては、モデル検査を実施した後の通信モデル701から検知ルール101を生成するようにしたので、通信モデル701から検知ルール101の生成及び検証対象ソフトウェア106の検証テストまでが、全自動かつ高信頼なテストスキームで実現できる。
Further, in the third embodiment, since the
最後に、図2のソフトウェア試験装置100および100Aのハードウェア構成の補足説明を行う。
Lastly, a supplementary description of the hardware configurations of the
プロセッサ201は、プロセッシングを行うIC(Integrated Circuit)である。プロセッサ201は、例えば、CPU(Central Processing Unit)、DSP(Digital Signal Processor)である。 The processor 201 is an IC (Integrated Circuit) that performs processing. The processor 201 is, for example, a CPU (Central Processing Unit) or a DSP (Digital Signal Processor).
補助記憶装置202は、例えば、ROM(Read Only Memory)、フラッシュメモリ、HDD(Hard Disk Drive)である。
The
メモリ203は、例えば、RAM(Random Access Memory)である。 The memory 203 is, for example, a RAM (Random Access Memory).
表示装置204は、例えば、ディスプレイ、ランプ、音声によるオペレータである。 The display device 204 is, for example, a display, a lamp, or a voice operator.
操作装置205は、例えば、マウス、キーボード、タッチパネルである。
The
補助記憶装置202には、OS(Operating System)も記憶されている。そして、OSの少なくとも一部がメモリ203にロードされる。プロセッサ201はOSを実行しながら、検証用ソフトウェア生成部102、テストケース生成部104、検証実行部107、モデル検査部702、および、検知ルール生成部703の各部の機能を実現するプログラムを実行する。
An OS (Operating System) is also stored in the
プロセッサ201がOSを実行することで、タスク管理、メモリ管理、ファイル管理、通信制御等が行われる。 When the processor 201 executes the OS, task management, memory management, file management, communication control, etc. are performed.
また、ソフトウェア試験装置100および100Aは、プロセッサ201を代替する複数のプロセッサを備えていてもよい。これら複数のプロセッサは、検証用ソフトウェア生成部102、テストケース生成部104、検証実行部107、モデル検査部702、および、検知ルール生成部703の各部の機能を実現するプログラムの実行を分担する。それぞれのプロセッサは、プロセッサ201と同じように、プロセッシングを行うICである。
Further, the
また、検証用ソフトウェア生成部102、テストケース生成部104、検証実行部107、モデル検査部702、および、検知ルール生成部703の各部の処理の結果を示す情報およびデータが、メモリ203、補助記憶装置202、又は、プロセッサ201内のレジスタ又はキャッシュメモリにファイルとして記憶される。
Information and data indicating the results of the processes of the verification
また、検証用ソフトウェア生成部102、テストケース生成部104、検証実行部107、モデル検査部702、および、検知ルール生成部703の各部の機能を実現するプログラムは、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ブルーレイ(登録商標)ディスク、DVD等の可搬記憶媒体に記憶されてもよい。
Further, the programs that implement the functions of the verification
また、検証用ソフトウェア生成部102、テストケース生成部104、検証実行部107、モデル検査部702、および、検知ルール生成部703の各部の「部」を、「回路」又は「工程」又は「手順」又は「処理」に読み替えてもよい。
In addition, the “software”
また、ソフトウェア試験装置100および100Aは、ロジックIC(Integrated Circuit)、GA(Gate Array)、ASIC(Application Specific Integrated Circuit)、FPGA(Field−Programmable Gate Array)といった電子回路により実現されてもよい。その場合は、検証用ソフトウェア生成部102、テストケース生成部104、検証実行部107、モデル検査部702、および、検知ルール生成部703の各部は、それぞれ電子回路の一部として実現される。
In addition, the
なお、プロセッサ及び上記の電子回路を総称してプロセッシングサーキットリーともいう。 The processor and the electronic circuits described above are also collectively referred to as a processing circuit.
100,100A ソフトウェア試験装置、101 検知ルール、102 検証用ソフトウェア生成部、103 検証用ソフトウェア、104 テストケース生成部、105 テストケース、106 検証対象ソフトウェア、107 検証実行部、108 検証結果、201 プロセッサ、202 補助記憶装置、203 メモリ、204 表示装置、205 操作装置、701 通信モデル、702 モデル検査部、703 検知ルール生成部。 100, 100A software testing device, 101 detection rule, 102 verification software generation unit, 103 verification software, 104 test case generation unit, 105 test case, 106 verification target software, 107 verification execution unit, 108 verification result, 201 processor, 202 auxiliary storage device, 203 memory, 204 display device, 205 operating device, 701 communication model, 702 model checking unit, 703 detection rule generation unit.
Claims (6)
前記検証用ソフトウェアにテストパターンを入力して、前記検証用ソフトウェアを実行させることで、前記期待値をテストケースとして生成するテストケース生成部と、
前記テストパターンと同一のテストパターンを前記検証対象ソフトウェアに入力して、前記検証対象ソフトウェアを実行させることで得られた実際の実行結果と、前記テストケースによる前記期待値とを比較することで、前記検証対象ソフトウェアの合否を判定する検証実行部と
を備えた、ソフトウェア試験装置。 Generation of verification software for generating verification software for generating an expected value that the verification software should output as an execution result using a detection rule that defines normal communication data in a device in which the verification software is installed Department,
A test case generation unit that generates a test case by inputting a test pattern into the verification software and executing the verification software,
By inputting the same test pattern as the test pattern to the verification target software, by comparing the actual execution result obtained by executing the verification target software and the expected value by the test case, And a verification execution unit that determines whether the verification target software is acceptable or not.
前記モデル検査後の前記通信モデルに基づいて、前記検知ルールを生成する検知ルール生成部と
をさらに備えた、請求項1に記載のソフトウェア試験装置。 According to a preset model checking rule, a model checking unit for checking whether or not there is an error in the communication model which is the design model of the normal communication data,
The software test apparatus according to claim 1, further comprising: a detection rule generation unit that generates the detection rule based on the communication model after the model inspection.
前記正常な通信データを定義する定義項目として、送信元情報、送信先情報、データ長さ、ペイロードのうちの少なくとも1つの情報を含む、前記検知ルールが入力され、
前記検知ルールを検知ルール解析して、前記定義項目を葉とし、各ルールを木とする、ルールリスト木を生成し、
前記ルールリスト木から、全ての木の前記定義項目を共通な項目ごとに結合して、決定木を生成し、
前記決定木から、前記検証用ソフトウェアを生成する、
請求項1または2に記載のソフトウェア試験装置。 The verification software generation unit,
As a definition item that defines the normal communication data, the detection rule including at least one information of transmission source information, transmission destination information, data length, and payload is input,
Analyzing the detection rule detection rule, the definition item as a leaf, each rule as a tree, to generate a rule list tree,
From the rule list tree, combine the definition items of all trees for each common item to generate a decision tree,
Generating the verification software from the decision tree,
The software test apparatus according to claim 1 or 2.
前記ルールリスト木から、前記検知ルールに応じた形式検証プロパティを生成し、
前記形式検証プロパティを用いて、前記決定木から生成した前記検証用ソフトウェアを形式的に検証する、
請求項3に記載のソフトウェア試験装置。 The verification software generation unit,
Generate a formal verification property according to the detection rule from the rule list tree,
Formally verifying the verification software generated from the decision tree using the formal verification property,
The software testing device according to claim 3.
前記検証用ソフトウェアにテストパターンを入力して、前記検証用ソフトウェアを実行させることで、前記期待値をテストケースとして生成するテストケース生成ステップと、
前記テストパターンと同一のテストパターンを前記検証対象ソフトウェアに入力して、前記検証対象ソフトウェアを実行させることで得られた実際の実行結果と、前記テストケースによる前記期待値とを比較することで、前記検証対象ソフトウェアの合否を判定する検証実行ステップと
を備えた、ソフトウェア試験方法。 Generation of verification software for generating verification software for generating an expected value that the verification software should output as an execution result using a detection rule that defines normal communication data in a device in which the verification software is installed Steps,
A test case generation step of generating a test case of the expected value by inputting a test pattern into the verification software and executing the verification software;
By inputting the same test pattern as the test pattern to the verification target software, by comparing the actual execution result obtained by executing the verification target software and the expected value by the test case, And a verification execution step of judging whether the verification target software is acceptable or not.
検証対象ソフトウェアが導入される機器における正常な通信データを定義する検知ルールを用いて、前記検証対象ソフトウェアが実行結果として出力すべき期待値を生成するための検証用ソフトウェアを生成する検証用ソフトウェア生成ステップと、
前記検証用ソフトウェアにテストパターンを入力して、前記検証用ソフトウェアを実行させることで、前記期待値をテストケースとして生成するテストケース生成ステップと、
前記テストパターンと同一のテストパターンを前記検証対象ソフトウェアに入力して、前記検証対象ソフトウェアを実行させることで得られた実際の実行結果と前記テストケースによる前記期待値とを比較することで、前記検証対象ソフトウェアの合否を判定する検証実行ステップと
を実行させるためのソフトウェア試験プログラム。 On the computer,
Generation of verification software for generating verification software for generating an expected value that the verification software should output as an execution result using a detection rule that defines normal communication data in a device in which the verification software is installed Steps,
A test case generation step of generating a test case of the expected value by inputting a test pattern into the verification software and executing the verification software;
By inputting the same test pattern as the test pattern into the verification target software and comparing the actual execution result obtained by executing the verification target software with the expected value of the test case, A software test program for executing the verification execution step of judging whether the verification target software is acceptable or not.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/EP2018/084616 WO2019242868A1 (en) | 2018-12-12 | 2018-12-12 | Software testing device, software testing method, and software testing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020524862A true JP2020524862A (en) | 2020-08-20 |
JP6765554B2 JP6765554B2 (en) | 2020-10-07 |
Family
ID=64870443
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019571278A Active JP6765554B2 (en) | 2018-12-12 | 2018-12-12 | Software test equipment, software test methods, and software test programs |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP6765554B2 (en) |
WO (1) | WO2019242868A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111858298B (en) * | 2020-05-29 | 2022-08-30 | 卡斯柯信号有限公司 | Software testing method based on 3V model |
CN112749084A (en) * | 2020-12-17 | 2021-05-04 | 中国农业银行股份有限公司 | Test case generation method and device |
CN113918474B (en) * | 2021-12-15 | 2022-03-11 | 杭银消费金融股份有限公司 | Test case management method and device based on data mode |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5164919B2 (en) | 2009-05-13 | 2013-03-21 | 日本電信電話株式会社 | Test data generation method, apparatus and program |
JP5088403B2 (en) * | 2010-08-02 | 2012-12-05 | 横河電機株式会社 | Unauthorized communication detection system |
JP2014046800A (en) | 2012-08-31 | 2014-03-17 | Hitachi Ltd | Test data covering generation device and method |
WO2014155650A1 (en) * | 2013-03-29 | 2014-10-02 | 株式会社日立製作所 | Information controller, information control system, and information control method |
US10346140B2 (en) | 2015-08-05 | 2019-07-09 | General Electric Company | System and method for model based technology and process for safety-critical software development |
US10248552B2 (en) * | 2016-07-20 | 2019-04-02 | International Business Machines Corporation | Generating test scripts for testing a network-based application |
-
2018
- 2018-12-12 JP JP2019571278A patent/JP6765554B2/en active Active
- 2018-12-12 WO PCT/EP2018/084616 patent/WO2019242868A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
WO2019242868A1 (en) | 2019-12-26 |
JP6765554B2 (en) | 2020-10-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Le Goues et al. | A systematic study of automated program repair: Fixing 55 out of 105 bugs for $8 each | |
US20180336356A1 (en) | Auto-remediation workflow for computer security testing utilizing pre-existing security controls | |
JP6765554B2 (en) | Software test equipment, software test methods, and software test programs | |
US8572747B2 (en) | Policy-driven detection and verification of methods such as sanitizers and validators | |
US10049031B2 (en) | Correlation of violating change sets in regression testing of computer software | |
US20210334384A1 (en) | Detecting a potential security leak by a microservice | |
US9703683B2 (en) | Software testing coverage | |
Segura et al. | Automated metamorphic testing of variability analysis tools | |
US10387288B2 (en) | Interactive analysis of a security specification | |
Mesecan et al. | Hypergi: Automated detection and repair of information flow leakage | |
US20110131031A1 (en) | Dynamic generation of tests | |
Kang et al. | Dependability arguments with trusted bases | |
CN113486358A (en) | Vulnerability detection method and device | |
JPWO2014050424A1 (en) | Signature verification apparatus, signature verification method and program | |
US11023368B1 (en) | Reduction of testing space for system testing infrastructure using combinatorics | |
US10481969B2 (en) | Configurable system wide tests | |
Nguyen et al. | Multiple program analysis techniques enable precise check for SEI CERT C coding standard | |
Svoboda et al. | Static analysis alert audits: Lexicon & rules | |
AU2021227739B2 (en) | Executing tests in deterministic order | |
Adebiyi et al. | Security Assessment of Software Design using Neural Network | |
Aslam et al. | ASArP: automated security assessment & audit of remote platforms using TCG-SCAP synergies | |
Langari et al. | Quality, cleanroom and formal methods | |
Li et al. | Tabular‐expression‐based method for constructing metamorphic relations | |
Kommrusch | Artificial Intelligence Techniques for Security Vulnerability Prevention | |
Duque-Torres et al. | Exploring a test data-driven method for selecting and constraining metamorphic relations |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20191223 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20191223 |
|
A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20200519 |
|
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: 20200818 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200915 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6765554 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |