[go: up one dir, main page]

JP2009104490A - Program testing equipment - Google Patents

Program testing equipment Download PDF

Info

Publication number
JP2009104490A
JP2009104490A JP2007277056A JP2007277056A JP2009104490A JP 2009104490 A JP2009104490 A JP 2009104490A JP 2007277056 A JP2007277056 A JP 2007277056A JP 2007277056 A JP2007277056 A JP 2007277056A JP 2009104490 A JP2009104490 A JP 2009104490A
Authority
JP
Japan
Prior art keywords
response
pseudo
driver
test
program
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.)
Withdrawn
Application number
JP2007277056A
Other languages
Japanese (ja)
Inventor
Yukio Kobayashi
幸夫 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2007277056A priority Critical patent/JP2009104490A/en
Publication of JP2009104490A publication Critical patent/JP2009104490A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

【課題】従来、ハードウェアのドライブプログラムを開発または修正する方法であるためテスト環境構築の技術的な難易度が高く、コンピュータ資源の熟練者やOSカーネル内部を熟知していることが求められ、容易にテスト環境に求められる要件を満たすことができなかった。
【解決手段】被テストプログラムの動作検証を行う際、被テストプログラムによるコンピュータハードウェア資源(実I/O機器62)へのアクセスに対する各種応答処理の妥当性を検証する装置であって、コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な復帰値を、予め与えられたパラメータに基づいた任意の応答値と差し替える機能により、各種の疑似応答を発生させる疑似ドライバ23を備え、疑似ドライバ23を介し任意の応答処理に対する動作検証を行う。
【選択図】図1
Conventionally, since it is a method of developing or correcting a hardware drive program, it is required to have a high technical difficulty in constructing a test environment and to be familiar with computer resource experts and the inside of an OS kernel. The requirements for the test environment could not be easily met.
When verifying the operation of a program under test, an apparatus for verifying the validity of various response processes for access to a computer hardware resource (real I / O device 62) by the program under test is provided. A pseudo driver 23 that generates various pseudo responses by a function of replacing a normal return value from an interface that services access to a hardware resource with an arbitrary response value based on a predetermined parameter. The operation verification for an arbitrary response process is performed.
[Selection] Figure 1

Description

本発明は、コンピュータ上で動作する被テストプログラムの動作検証を行う際、前記被テストプログラムによるコンピュータハードウェア資源へのアクセスに対する各種応答処理の妥当性を検証するプログラムのテスト装置に関する。   The present invention relates to a test apparatus for a program for verifying the validity of various response processes for access to a computer hardware resource by a program under test when performing operation verification of a program under test operating on a computer.

本発明は、特に、コンピュータハードウェア資源に対するアクセス異常応答を含む各種の応答処理に関して動作検証する際に使用する、疑似応答(障害を含む)発生プログラムで構成された疑似ドライバを備え、該疑似ドライバを使用してプログラムのテストを行うプログラムのテスト装置に関する。   In particular, the present invention includes a pseudo driver configured with a pseudo response (including fault) generation program, which is used when verifying operations related to various response processes including an abnormal access response to a computer hardware resource. The present invention relates to a program test apparatus for performing a program test using a computer.

(1) :従来例1
以下、従来実施されていたテスト方法を従来例1として説明する。
(1): Conventional example 1
Hereinafter, a conventional test method will be described as Conventional Example 1.

従来例1では、次のようなテスト方法が実施されていた。即ち、被テストプログラムのコンピュータハードウェア資源へのアクセスで異常応答を含む各種の応答が発生した場合の処理の妥当性確認では、実際のハードウェアに物理的な方法で異常が発生するように細工をしたテスト用I/O装置を用いたり、コンピュータハードウェア資源アクセスをサービスするインタフェースから呼ばれるハードウェアのドライバプログラムを開発するか、または修正し、疑似的に障害応答を含む各種の応答を組み込むことで、異常応答を含む各種の応答を発生させていた。   In Conventional Example 1, the following test method was performed. In other words, when various responses including abnormal responses occur when accessing the computer hardware resources of the program under test, the validity of processing is crafted so that abnormalities occur in the actual hardware using physical methods. Develop or modify a hardware driver program called from an interface that services a computer hardware resource access using a tested I / O device, and incorporate various responses including pseudo failure responses And various responses including abnormal responses were generated.

(2) :従来例2
以下、特許文献1を従来例2として説明する。従来例2には次のような内容が記載されている。
(2): Conventional example 2
Hereinafter, Patent Document 1 will be described as Conventional Example 2. Conventional Example 2 describes the following contents.

(a) :「応用ソフトの入出力処理の評価テストを行うことができる計算機システム及びデバイス入出力シミュレータを提供する。」・・・要約の欄を参照
(b) :「APからの入出力要求は、システムコール層により入出力のパラメータがチェックされ、異常がなければデバイスドライバ層3に送られる。デバイスドライバ層3では、送られてきたデータに基づいて先ずステップS1で模擬入出力を行うか否かを判断する。模擬の入出力をしないのであれば、ステップS2に移行して実デバイスにデータを送って処理する。
(a): “Provide computer system and device input / output simulator capable of performing application software input / output processing evaluation tests.” See the summary section.
(b): “The input / output request from the AP is checked by the system call layer for input / output parameters, and if there is no abnormality, it is sent to the device driver layer 3. The device driver layer 3 is based on the received data. First, in step S1, it is determined whether or not to perform simulated input / output.If simulated input / output is not performed, the process proceeds to step S2 to send data to the actual device for processing.

一方、模擬入出力処理を行う場合は、ステップS3に移行して、模擬入出力を行って、デバイス入出力にかえることができる。また、ステップS4では、APから送られてきた入出力要求が処理の履歴情報を記録するトレース処理を必要としているか否かを判断し、必要としていれば、ステップS5に移行してトレースを行う。」・・・要約の欄を参照
(3) :従来例3
以下、特許文献2を従来例3として説明する。従来例3には次のような内容が記載されている。
On the other hand, when the simulated input / output process is performed, the process proceeds to step S3, where the simulated input / output is performed to change to the device input / output. In step S4, it is determined whether or not the input / output request sent from the AP requires a trace process for recording the history information of the process. If necessary, the process proceeds to step S5 to perform the trace. Refer to the summary column.
(3): Conventional example 3
Hereinafter, Patent Document 2 will be described as Conventional Example 3. Conventional Example 3 describes the following contents.

(a) :「CPUと入出力装置間の複雑な連携動作の検証を容易かつ迅速に行うことが可能な入出力シミュレーション技術を提供する。」・・・要約の欄を参照
(b) :「たとえばマイクロコンピュータなどのソフトウェアの入出力シミュレーションにおいて、入出力命令や割込み動作の結果を時系列的な表現で図示するので、操作者などがシミュレーション結果を迅速かつ的確に把握することが可能となり、CPUと入出力装置との間などにおける複雑な連携動作を容易に検証することが可能になる。」・・・段落番号[0031]参照
(4) :従来例4
以下、特許文献3を従来例4として説明する。従来例4には次のような内容が記載されている。
(a): “Provide input / output simulation technology that enables easy and quick verification of complex cooperative operation between CPU and input / output device.” See the summary section.
(b): “In an I / O simulation of software such as a microcomputer, the results of I / O commands and interrupt operations are shown in time series, so that the operator etc. can grasp the simulation results quickly and accurately. This makes it possible to easily verify a complicated cooperative operation between the CPU and the input / output device. "... Refer to paragraph [0031].
(4): Conventional example 4
Hereinafter, Patent Document 3 will be described as Conventional Example 4. Conventional Example 4 describes the following contents.

(a) :「入出力装置部分の動作も擬似し、かつ、その擬似動作を被試験プログラム実行の中断・再開動作等と同期させることにより、I/Oハンドラ等の被試験プログラムと入出力装置との結合試験を容易に実現することを目的とし、」・・・(公報第2頁左上欄第8行目〜第2頁左上欄第12行目参照)
特開平10−133914号公報 特開平5−224994号公報 特開平1−76236号公報
(a): “The program under test such as an I / O handler and the input / output device are simulated by simulating the operation of the input / output device part and synchronizing the simulated operation with the suspended / restarting operation of the program under test. "... (see the second page, upper left column, line 8 to page 2, upper left column, line 12)"
JP-A-10-133914 JP-A-5-224994 JP-A-1-76236

(1) :従来例1のテストでは、高度なスキルを持ったテスト実施者が、ハードウェアに手を加えたり、ドライバプログラムを開発又は、ドライバプログラムに手を入れる等を実施しており、テストの信頼性に問題があった。   (1): In the test of Conventional Example 1, a tester with a high level of skill is working on hardware, developing a driver program, or putting a hand in the driver program. There was a problem with reliability.

(2) :一般に、従来例1のようなプログラムのテストでは、テスト環境の構築内容により、被テストプログラムの問題を検出できる精度(テストカバレッジ)が左右され、また、問題発生時の原因究明の容易さに大きく影響する。このため、問題の検出精度やテストのカバー範囲を明確にしたテストや、問題の原因特定に主眼を置いたテスト環境を構築する場合、テスト環境やテスト方法として以下の事項が求められる。   (2): In general, in the test of a program as in Conventional Example 1, the accuracy (test coverage) that can detect a problem in the program under test depends on the contents of the test environment, and the cause of the problem when it occurs It greatly affects ease. For this reason, when building a test environment that focuses on problem detection accuracy and test coverage, or a test environment that focuses on identifying the cause of the problem, the following items are required as the test environment and test method.

(a) :テスト環境には同一条件の再現性があること。   (a): The test environment must be reproducible under the same conditions.

(b) :テスト環境の状態を長時間、安定させることができること。   (b): The state of the test environment can be stabilized for a long time.

(c) :テスト環境は担当者のスキルに依存せず、誰でも均一に構築できること。   (c): The test environment should not depend on the skill of the person in charge, and anyone can build a uniform environment.

(d) :被テストプログラムの応答処理の種類に応じ、網羅的にテストができること。   (d): A comprehensive test can be performed according to the type of response processing of the program under test.

(e) :テストでは、実際と同等なI/Oの応答タイミング絡みのテストができること。   (e): The test should be able to test the I / O response timing entanglement equivalent to the actual one.

(f) :テスト環境では、巨大データ(数百MB超)及び、実I/Oの制御データ等の実際と同様なテストができること。   (f): In the test environment, the same test as actual data such as huge data (over several hundred MB) and actual I / O control data can be performed.

ところが、前記従来例1のテスト方法では、実際のハードウェアを細工したり、コンピュータハードウェア資源へのアクセスをサービスするアプリケーションインタフェースから呼ばれる、ハードウェアのドライブプログラムを開発または修正する方法であるため、テスト環境構築の技術的な難易度が高く、コンピュータ資源の熟練者や、OSカーネル内部を熟知していることが求められ、容易にテスト環境に求められる要件を満たすことができなかった。   However, since the test method of the conventional example 1 is a method of developing or correcting a hardware drive program called from an application interface that crafts actual hardware or services access to computer hardware resources, The technical difficulty of constructing the test environment is high, and it is required to be a computer resource expert and to be familiar with the inside of the OS kernel, so that the requirements required for the test environment cannot be easily satisfied.

(3) :従来例2では、被テストプログラムの入出力処理の評価を行うことができる計算機システム及びデバイス入出力シミュレータによる評価手法について記載されている。しかし、従来例2は、実I/Oをシミュレータによる疑似I/Oに置き換える技術で、実I/Oを使用しない環境でのテストを効果的に行う方法に関するものであり、疑似I/Oで実現している機能のみとしては、従来のシミュレータの域を出るような独自技術ではなく、従来例1で課題となっていた事項とは異なる課題を解決する技術であり、本発明の参考程度の内容である。   (3): Conventional example 2 describes an evaluation method using a computer system and a device input / output simulator capable of evaluating input / output processing of a program under test. However, Conventional Example 2 is a technique for replacing real I / O with simulated I / O by a simulator, and relates to a method for effectively performing a test in an environment that does not use real I / O. The only function that has been realized is not a unique technology that leaves the area of the conventional simulator, but a technology that solves a problem that is different from the problem that has been a problem in Conventional Example 1, Content.

(4) :従来例3は、CPUと入出力装置間の複雑な連携動作の検証を容易かつ迅速に行うことが可能な入出力シミュレーション技術を提供するものであり、本発明の参考程度の内容である。   (4): Conventional Example 3 provides an input / output simulation technique capable of easily and quickly verifying a complicated cooperative operation between a CPU and an input / output device, and is a content of reference level of the present invention. It is.

(5) :従来例4は、入出力装置部分の動作も擬似し、かつ、その擬似動作を被試験プログラム実行の中断・再開動作等と同期させることにより、I/Oハンドラ等の被試験プログラムと入出力装置との結合試験を容易に実現するものであり、本発明の参考程度の内容である。   (5): Conventional example 4 simulates the operation of the input / output device part, and synchronizes the simulated operation with the suspended / resumed operation of the program under test, thereby allowing the program under test such as an I / O handler. And the input / output device are easily realized, and the content of the present invention is a reference level.

本発明は従来の課題を解決するためになされたものであり、各種の疑似応答発生機能を有するコンピュータハードウェア資源アクセスプログラムで構成された疑似ドライバを介し、任意の応答処理に対する動作検証が行えるようにすることを目的としている。   The present invention has been made to solve the conventional problems, and can perform operation verification for any response process via a pseudo driver configured by a computer hardware resource access program having various pseudo response generation functions. The purpose is to be.

本発明は前記の目的を達成するため、次のように構成した。   In order to achieve the above object, the present invention is configured as follows.

即ち、コンピュータ上で動作する被テストプログラムの動作検証を行う際、前記被テストプログラムによるコンピュータハードウェア資源へのアクセスに対する各種応答処理の妥当性を検証するプログラムのテスト装置であって、コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な復帰値を、予め与えられたパラメータに基づいた任意の応答値と差し替える機能により、各種の疑似応答を発生させる疑似ドライバを備え、前記疑似ドライバを介し任意の応答処理に対する動作検証を行う機能を備えている。   That is, a test apparatus for a program for verifying the validity of various response processes for access to a computer hardware resource by a program under test when performing operation verification of a program under test operating on a computer, A pseudo driver that generates various pseudo responses by a function of replacing a normal return value from an interface that services access to a resource with an arbitrary response value based on a predetermined parameter is provided via the pseudo driver. It has a function to perform operation verification for arbitrary response processing.

(作用)
図1は本発明の原理説明図である。以下、図1を参照しながら前記構成に基づく本発明の作用を説明する。
(Function)
FIG. 1 is a diagram illustrating the principle of the present invention. The operation of the present invention based on the above configuration will be described below with reference to FIG.

疑似ドライバ23は、OSカーネル21とドライバ層の実I/Oドライバ60との間に位置し、OSカーネル21のフック機能として登録することで、実I/Oドライバ60に処理が渡される直前に疑似ドライバ23に処理が渡されるようになる(その様に登録する)。   The pseudo driver 23 is located between the OS kernel 21 and the real I / O driver 60 in the driver layer, and is registered as a hook function of the OS kernel 21 so that the process is passed to the real I / O driver 60 immediately before the process is passed. Processing is passed to the pseudo driver 23 (registered as such).

このフック機能により、アプリ層(被テストプログラム)からのI/O処理要求は、実I/Oドライバ60に渡る直前で疑似ドライバ23に渡される(図の点線のルートR1、R2ではなく、実線のルートR3、R4を通る)ため、以後の処理は疑似ドライバ23の処理に従うことになる。   With this hook function, an I / O processing request from the application layer (program under test) is passed to the pseudo driver 23 immediately before passing to the real I / O driver 60 (instead of the dotted lines R1 and R2 in FIG. Therefore, the subsequent processing follows the processing of the pseudo driver 23.

即ち、図1中R1及びR2の点線で示したルートは、疑似ドライバ23をフックしない場合の処理ルートであり、R3及びR4の実線で示したルートは、疑似ドライバ23をフックした場合の処理ルートになる。ここで、疑似ドライバ23は、ドライバ層からの応答に対して、異常応答を含む各種応答に変換してアプリ層に応答する。被テストプログラムは、疑似ドライバ23からの異常応答を含む各種応答に基づいた処理を行う。   That is, the routes indicated by dotted lines R1 and R2 in FIG. 1 are processing routes when the pseudo driver 23 is not hooked, and the routes indicated by solid lines R3 and R4 are processing routes when the pseudo driver 23 is hooked. become. Here, the pseudo driver 23 converts the response from the driver layer into various responses including an abnormal response and responds to the application layer. The program under test performs processing based on various responses including an abnormal response from the pseudo driver 23.

なお、疑似ドライバ23の振る舞いとして、どの様な応答をするかは、パラメータにより設定することが可能である。また、疑似ドライバ23は、アプリ層から見た場合は通常のドライバ層に見えるので、被テストプログラムには何ら手を加える必要が無いので、通常の製品版でのテストが可能となる。   Note that the response of the pseudo driver 23 can be set by a parameter. Further, since the pseudo driver 23 looks like a normal driver layer when viewed from the application layer, it is not necessary to make any changes to the program under test, so that a test with a normal product version is possible.

ここで、基本的にI/O処理は実I/Oを使用し、応答値またはデータのみをパラメータによって差し替える方式であり、特別なI/Oドライバやシミュレータプログラムを開発しなくて済む様にしている。   Here, I / O processing basically uses real I / O, and only response values or data are replaced by parameters, so that it is not necessary to develop special I / O drivers or simulator programs. Yes.

従って、コンピュータハードウェア資源(ハード層の実I/O機器62)へのアクセスをサービスするインタフェースからの正常な復帰値を、予め与えられたパラメータに基づいた任意の応答値と差し替える機能により、各種の疑似応答を発生させる疑似ドライバ23を備え、疑似ドライバ23を介し任意の応答処理に対する動作検証(テスト)を行う。このようにして、各種の疑似応答発生機能を有するコンピュータハードウェア資源アクセスプログラムで構成された疑似ドライバ23を介し、任意の応答処理に対する動作検証を行なえる。   Accordingly, various functions can be used to replace a normal return value from an interface that services access to computer hardware resources (real I / O device 62 in the hardware layer) with an arbitrary response value based on a predetermined parameter. The pseudo driver 23 for generating the pseudo response is provided, and an operation verification (test) for an arbitrary response process is performed via the pseudo driver 23. In this way, operation verification for an arbitrary response process can be performed via the pseudo driver 23 configured by a computer hardware resource access program having various pseudo response generation functions.

本発明は請求項1乃至5では、次のような効果がある。   The present invention has the following effects in claims 1 to 5.

(1) :テスト環境には同一条件の再現性がある。即ち、疑似ドライバは操作員が設定した応答テーブルのパラメータに基づいた動作をするため、同じ環境下で被テストプログラムと同じ応答テーブルでテストを実施することで、同じテストの再現性は容易である。   (1): The test environment has reproducibility under the same conditions. In other words, since the pseudo driver operates based on the response table parameters set by the operator, it is easy to reproduce the same test by executing the test using the same response table as the program under test in the same environment. .

(2) :テスト環境の状態を長時間安定させることができる。即ち、テスト開始後は操作員の介入はなく、被テストプログラムと応答テーブルのみでテストが進むため、リピートの設定等により繰り返し実行することで、同じ状態で安定して維持できる。   (2): The test environment can be stabilized for a long time. In other words, there is no operator intervention after the start of the test, and the test proceeds with only the program under test and the response table. Therefore, the test can be repeatedly executed by setting repeats and the like, so that the same state can be stably maintained.

(3) :テストの実施は担当者のスキルに依存せず、誰でも均一な環境が構築できる。即ち、疑似ドライバの実施内容は、OSカーネルや、I/Oドライバの開発の様な高い専門知識やスキルを要求するものでは無く、条件判定と変換処理を行う、通常のアプリケーションを開発できる技術で実現できる。また、テストでは、応答テーブルを使用し、ほぼ自動で行えるため、だれでも容易に同じ内容のテストができる。なお、テスト内容は応答テーブルのパラメータ設定のみであり、スキル依存は無い。   (3): Test implementation does not depend on the skill of the person in charge, and anyone can build a uniform environment. In other words, the implementation of the pseudo driver does not require a high level of expertise or skill like OS kernel or I / O driver development, but is a technology that can develop normal applications that perform condition determination and conversion processing. realizable. In addition, since the test can be performed almost automatically using a response table, anyone can easily test the same content. The test contents are only response table parameter settings, and there is no skill dependence.

(4) :被テストプログラムの応答処理の種類に応じ、網羅的にテストができる。即ち、テストの網羅性は、応答テーブルのパラメータの組み合わせに依存している。応答テーブルのパラメータ設定の組み合わせとして、被テストプログラムの処理ルートの組み合わせに基づいたパラメータを網羅的に抜き出すことができる。   (4): Extensive testing can be performed according to the type of response processing of the program under test. That is, the completeness of the test depends on the combination of the response table parameters. As combinations of response table parameter settings, it is possible to comprehensively extract parameters based on combinations of processing routes of the program under test.

また、アクセステーブルに処理の流れが記録され、かつ、応答テーブルに差し替え実施の記録があるため、テスト実施者にこれらの記録を分析することで、実際にどこまでのルートが網羅されたかを容易に把握できる。この結果を基に、網羅されていない部分を応答テーブルに追加して行くことで、最終的に、期待した網羅性を達成する応答テーブルを作り上げることができる。   In addition, since the flow of processing is recorded in the access table, and there is a record of replacement execution in the response table, it is easy for the tester to analyze the records and find out how far the route was actually covered I can grasp. Based on this result, by adding uncovered portions to the response table, it is possible to finally create a response table that achieves the expected coverage.

(5) :テストでは、実際と同等なI/Oの応答タイミング絡みのテストができる。即ち、I/O動作は、実I/Oを用い、応答値のみを差し替えることに特徴があり、被テストプログラムが実際に動作、運用する環境と同様なI/Oの応答タイミングでのテストが実施できる。このことが、シミュレータを用いる方法と最も異なり、かつ、優れている点である。   (5): In the test, the I / O response timing entanglement test equivalent to the actual one can be performed. In other words, the I / O operation is characterized by using the real I / O and replacing only the response value, and the test at the I / O response timing similar to the environment in which the program under test actually operates and operates. Can be implemented. This is the most different and superior to the method using a simulator.

(6) :テスト環境では、巨大データ(数百MB超)および、実I/Oの制御データ等の実際と同様なテストができる。即ち、I/O動作は実I/Oを用い、応答値のみを差替えることに特徴があり、入出力データ及び制御データは実I/Oの結果を使用するため、被テストプログラムが実際に動作、運用する環境と同様なデータでのテストが実施できる。このことが、シミュレータを用いる方法と最も異なり、かつ、優れている点である。   (6): In the test environment, the same tests as actual data such as huge data (over several hundred MB) and actual I / O control data can be performed. In other words, I / O operation uses real I / O, and only response values are replaced. Input / output data and control data use actual I / O results, so the program under test actually Tests can be performed with data similar to the operating and operating environment. This is the most different and superior to the method using a simulator.

(7) :タイミング依存を拡張したテストができる。即ち、応答テーブルの「遅延時間範囲」の機能は、通常のI/O要求(又はI/O処理完了の応答)を任意の時間遅延させることができる。この機能により、例えばマルチタスクで、各タスクのI/O制御を遅延させ、タスクの実行順序を故意に入れ換えることが可能である。このことは、タスクの実行順序とI/O処理の順序に依存関係が有るような場合、例えば、タスクAとタスクBにおいて、タスクAのI/O処理完了後にタスクBのI/O処理をしなければならない場合、通常、タスク間でセマフォを設定し、明らかに排他制御させる必要があるが、プログラム作成時にセマフォの設定を誤った場合、タスクの実行順序が補償されなくなるため、通常であればテスト時に矛盾を検出するが、タイミング依存であり、タスク間の順序が期待した通りである場合もあり、その場合はテストで見つからないこともある。このようなプログラムの誤りに対して、I/O処理の処理タイミングを故意にずらすことで、順序性(タイミング依存)のテストができる。   (7): Tests with extended timing dependence can be performed. In other words, the “delay time range” function of the response table can delay a normal I / O request (or a response indicating completion of I / O processing) by an arbitrary time. With this function, for example, in multitasking, it is possible to delay I / O control of each task and intentionally change the task execution order. This means that if there is a dependency relationship between the task execution order and the I / O processing order, for example, in task A and task B, task I I / O processing is completed after task A I / O processing is completed. In general, it is necessary to set semaphores between tasks and control them clearly. However, if the semaphores are set incorrectly when creating a program, the task execution order will not be compensated. For example, inconsistencies are detected during testing, but it is timing dependent and the order between tasks may be as expected, and in that case it may not be found in the test. With respect to such a program error, it is possible to test the order (timing dependence) by intentionally shifting the processing timing of the I / O processing.

§1:概要説明
図1は本発明の原理説明図である。図1において、21はOSカーネル、23は疑似ドライバ、60はドライバ層(実I/Oドライバ)、61はI/Oポート、62はハード層(実I/O機器)を示す。また、R1、R2は、OSカーネル21のフック機能により疑似ドライバ23がフックされない場合(通常の処理)のアクセスと応答の各ルートを示し、R3、R4はOSカーネル21のフック機能により疑似ドライバ23がフックされた場合のアクセスと応答の各ルートを示す。
§1: Outline Description FIG. 1 is a diagram illustrating the principle of the present invention. In FIG. 1, 21 is an OS kernel, 23 is a pseudo driver, 60 is a driver layer (real I / O driver), 61 is an I / O port, and 62 is a hardware layer (real I / O device). R1 and R2 indicate access and response routes when the pseudo driver 23 is not hooked by the hook function of the OS kernel 21 (normal processing), and R3 and R4 indicate the pseudo driver 23 by the hook function of the OS kernel 21. Indicates the access and response routes when is hooked.

(1) :コンピュータ上で動作する被テストプログラムの動作検証を行う際、前記被テストプログラムによるコンピュータハードウェア資源(ハード層の実I/O機器62)へのアクセスに対する各種応答処理の妥当性を検証するプログラムのテスト装置であって、コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な復帰値を、予め与えられたパラメータに基づいた任意の応答値と差し替える機能により、各種の疑似応答を発生させる疑似ドライバ23を備え、疑似ドライバ23を介し任意の応答処理に対する動作検証を行う機能を備えている。   (1): When verifying the operation of a program under test running on a computer, the validity of various response processes for accessing the computer hardware resource (hard layer real I / O device 62) by the program under test is checked. A test apparatus for a program to be verified, and various pseudo-responses by a function of replacing a normal return value from an interface that services access to computer hardware resources with an arbitrary response value based on a predetermined parameter. And a function of performing operation verification for an arbitrary response process via the pseudo driver 23.

(2) :前記(1) のプログラムのテスト装置において、疑似ドライバ23は、コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な応答値を、予め与えられたスケジュールに基づいた任意の時間後に、任意の応答値と差し替える機能を有し、該疑似ドライバ23を介し、任意の疑似応答処理に対する動作検証を行う機能を備えている。   (2): In the program test apparatus according to (1), the pseudo driver 23 sets a normal response value from an interface that services access to computer hardware resources to an arbitrary time based on a predetermined schedule. After that, it has a function of replacing an arbitrary response value, and has a function of performing an operation verification for an arbitrary pseudo response process via the pseudo driver 23.

(3) :前記(1) のプログラムのテスト装置において、疑似ドライバ23は、コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な応答値を、予め与えられた、アクセス条件や応答値の組み合わせに対してスケジュールしておき、そのスケジュールに基づいた任意の応答値を返すことで、各種の疑似応答を発生させる機能を有し、該疑似ドライバ23を介し、任意の疑似応答処理に対する動作検証を行う。   (3): In the test apparatus for the program of (1), the pseudo driver 23 receives a normal response value from an interface that services access to the computer hardware resource, and is given a predetermined access condition or response value. It has a function to generate various pseudo responses by scheduling an arbitrary combination and returning an arbitrary response value based on the schedule. Through the pseudo driver 23, operation verification for an arbitrary pseudo response process is performed. I do.

(4) :前記(1) のプログラムのテスト装置において、疑似ドライバ23は、コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な復帰値を、予め与えられた、アクセス条件や応答値の組み合わせに対してスケジュールしておき、そのスケジュールに基づいて任意の応答値を返す被テストプログラムのテスト機能を備え、該疑似ドライバの機能により、返した応答値を記録し、記録された応答値からテストの実施範囲を把握できるようにした。   (4): In the program test apparatus according to (1), the pseudo driver 23 uses a normal return value from an interface that services access to computer hardware resources as a pre-given access condition or response value. A test function for a program under test that returns an arbitrary response value based on the schedule is prepared, and the returned response value is recorded by the function of the pseudo driver, from the recorded response value. The scope of the test was able to be grasped.

(5) :前記(1) のプログラムのテスト装置において、疑似ドライバ23は、動作を実I/Oに実行させることにより、実環境と同じデータに対する処理のテストを行い、かつ、応答値は予め与えられた、アクセス条件や応答値の組み合わせのスケジュールされた任意の疑似応答値を返す機能を有することで、動作検証を行う。   (5): In the program test apparatus of (1), the pseudo driver 23 performs a process test on the same data as the real environment by causing the real I / O to execute the operation, and the response value is set in advance. Operation verification is performed by having a function of returning a given pseudo-response value scheduled for a combination of access conditions and response values.

§2:プログラムのテスト装置を構成するコンピュータの構成の説明
図2は装置の全体構成図である。以下、図2に基づいて、プログラムのテスト装置を構成するコンピュータの構成を説明する。
§2: Description of the configuration of a computer constituting the program test apparatus FIG. 2 is an overall configuration diagram of the apparatus. The configuration of a computer constituting the program test apparatus will be described below with reference to FIG.

前記プログラムのテスト装置(例えば、図1参照)は、図2に示したコンピュータにより実現する。該コンピュータは、パーソナルコンピュータ、ワークステーションなど、任意のコンピュータにより構成する(以下、プログラムのテスト装置を構成するコンピュータを、単に「コンピュータ」とも記す)。   The program test apparatus (see, for example, FIG. 1) is realized by the computer shown in FIG. The computer is composed of an arbitrary computer such as a personal computer or a workstation (hereinafter, the computer constituting the program test apparatus is also simply referred to as “computer”).

図2に示したように、プログラムのテスト装置を構成するコンピュータ(又はコンピュータシステム)は、コンピュータ本体1と、該コンピュータ本体1に接続された入力装置2と、表示装置3と、その他のI/O機器(例えば、ファイル装置)62等で構成されている。そして、前記コンピュータ本体1には、CPU11(プロセッサ)と、メモリ装置15と、メモリ制御部12と、I/O制御部13と、通信制御部14等が設けてある。   As shown in FIG. 2, the computer (or computer system) constituting the program test apparatus includes a computer main body 1, an input device 2 connected to the computer main body 1, a display device 3, and other I / Os. An O device (for example, a file device) 62 is configured. The computer main body 1 is provided with a CPU 11 (processor), a memory device 15, a memory control unit 12, an I / O control unit 13, a communication control unit 14, and the like.

更に、メモリ装置15には、OSカーネル21と、被テストプログラム22と、疑似ドライバ23と、該疑似ドライバ23が使用するアクセステーブル51及び応答テーブル52(これらのテーブル51、52は図3参照)と、該疑似ドライバ23が使用する疑似ドライバ設定ユーティリティ53と、I/O機器62等の各種I/O機器を駆動する実I/Oドライバ60(以下、単に「I/Oドライバ60」とも記す)等が設けてある。前記各部の詳細な説明は次の通りである。   Further, the memory device 15 includes an OS kernel 21, a program under test 22, a pseudo driver 23, an access table 51 and a response table 52 used by the pseudo driver 23 (see FIG. 3 for these tables 51 and 52). A pseudo driver setting utility 53 used by the pseudo driver 23 and a real I / O driver 60 (hereinafter simply referred to as “I / O driver 60”) for driving various I / O devices such as the I / O device 62. ) Etc. are provided. The detailed description of each part is as follows.

入力装置2は、当該コンピュータ(又はコンピュータシステム)に対し情報の入力を行うものである。また、該入力装置2は、操作員が操作することで、コンピュータやアプリケーションプログラムとの会話に使用する。表示装置3は、当該コンピュータ(又はコンピュータシステム)において、各種の情報(又はデータ)を表示するものである。   The input device 2 inputs information to the computer (or computer system). The input device 2 is used for a conversation with a computer or an application program when operated by an operator. The display device 3 displays various information (or data) in the computer (or computer system).

ハード層のI/O機器62(各種のI/O機器含む)は、ファイル装置(例えば、ハードディスク装置)や通信制御装置等も含まれる。CPU11は当該コンピュータを構成するプロセッサである。メモリ制御部12は、メモリ装置15等のメモリの制御を行うものである。I/O制御部13は、外部の入出力装置であるI/O機器62の制御を行うものである。通信制御部14は、通信機器の制御を行うものである。   The hard layer I / O device 62 (including various I / O devices) includes a file device (for example, a hard disk device), a communication control device, and the like. The CPU 11 is a processor constituting the computer. The memory control unit 12 controls a memory such as the memory device 15. The I / O control unit 13 controls the I / O device 62 that is an external input / output device. The communication control unit 14 controls the communication device.

メモリ装置15は、各種のデータ(プログラムも含む)を記憶しておくものである。OSカーネル21は、メモリ装置15に格納された当該コンピュータを制御するOSカーネルである。被テストプログラム22は、メモリ装置15に格納された被テストプログラムである。疑似ドライバ23はメモリ装置15に格納された疑似ドライバである。   The memory device 15 stores various data (including programs). The OS kernel 21 is an OS kernel that controls the computer stored in the memory device 15. The program under test 22 is a program under test stored in the memory device 15. The pseudo driver 23 is a pseudo driver stored in the memory device 15.

実I/Oドライバ60は、メモリ装置15に格納された各種の実I/Oドライバである。アクセステーブル51及び応答テーブル52は、メモリ装置15に格納された疑似ドライバ23が参照したり更新を行うアクセステーブル及び動作パラメータの書かれた応答テーブル(図3参照)である。疑似ドライバ設定ユーティリティ53は、操作員との会話形式により、疑似ドライバ23に各種設定を行うユーティリティである。   The real I / O driver 60 is various real I / O drivers stored in the memory device 15. The access table 51 and the response table 52 are an access table that is referred to or updated by the pseudo driver 23 stored in the memory device 15 and a response table in which operation parameters are written (see FIG. 3). The pseudo driver setting utility 53 is a utility that performs various settings for the pseudo driver 23 in a conversation format with an operator.

§3:疑似ドライバの詳細な構成の説明
図3は疑似ドライバの説明図である。以下、図3に基づいて、疑似ドライバの構成を詳細に説明する。
§3: Detailed configuration of pseudo driver FIG. 3 is an explanatory diagram of a pseudo driver. Hereinafter, the configuration of the pseudo driver will be described in detail with reference to FIG.

前記疑似ドライバ23は、疑似ドライバ制御部31と、アクセス解析部32と、スケジューラ33と、応答生成部34と、応答解析部35等を備えると共に、メモリ共通域50(図2のメモリ装置15の一部の領域)にはアクセステーブル51と、応答テーブル52を備えている。   The pseudo driver 23 includes a pseudo driver control unit 31, an access analysis unit 32, a scheduler 33, a response generation unit 34, a response analysis unit 35, and the like, and a memory common area 50 (the memory device 15 of FIG. 2). Some areas) have an access table 51 and a response table 52.

また、スケジューラ33には、設定解析部36と、異常応答部37と、正常応答部38と、ノットレディ部39と、タイムアウト部40と、センスデータ生成部41と、異常データ生成部42を接続している。前記各部の機能は次の通りである。   The scheduler 33 is connected with a setting analysis unit 36, an abnormal response unit 37, a normal response unit 38, a not ready unit 39, a timeout unit 40, a sense data generation unit 41, and an abnormal data generation unit 42. is doing. The function of each part is as follows.

疑似ドライバ制御部31は、疑似ドライバ全体の制御を行うものである。アクセス解析部32は、アプリ層からのアクセス内容(I/O要求)を解析するものである。スケジューラ33は、テスト実施者の設定に従い、ドライバ層からの応答を変換するスケジュールを行うものである。   The pseudo driver control unit 31 controls the entire pseudo driver. The access analysis unit 32 analyzes access contents (I / O request) from the application layer. The scheduler 33 performs a schedule for converting a response from the driver layer according to the setting of the tester.

応答生成部34は、スケジューラ33からの設定に従い、ドライバ層の結果を変換し、アプリ層に応答を返す。応答解析部35は、ドライバ層からの応答を解析し、結果をスケジューラに通知するものである。設定解析部36は、テスト実施者の設定内容を解析し、スケジューラに通知するものである。   The response generation unit 34 converts the result of the driver layer according to the setting from the scheduler 33 and returns a response to the application layer. The response analysis unit 35 analyzes the response from the driver layer and notifies the scheduler of the result. The setting analysis unit 36 analyzes the setting contents of the tester and notifies the scheduler.

異常応答部37は、テスト実施者の設定に従い、異常応答を生成する。正常応答部38は、テスト実施者の設定に従い、正常応答を生成するものである。ノットレディ部39は、テスト実施者の設定に従い、ノットレディを生成するものである。タイムアウト部40は、テスト実施者の設定に従い、タイムアウトを生成するものである。   The abnormal response unit 37 generates an abnormal response according to the setting of the tester. The normal response unit 38 generates a normal response according to the setting of the tester. The knot ready unit 39 generates knot ready according to the setting of the tester. The timeout unit 40 generates a timeout according to the setting of the tester.

センスデータ生成部41は、テスト実施者の設定に従い、センスデータを生成するものである。異常データ生成部42は、テスト実施者の設定に従い、読み込みデータに異常を生成するものである。アクセステーブル51は、アプリ層からのアクセス内容(I/O要求)を解析した結果を格納したテーブルで、アクセス解析部32にて作成されるものである。   The sense data generation unit 41 generates sense data according to the setting of the tester. The abnormal data generation unit 42 generates an abnormality in the read data in accordance with the setting of the tester. The access table 51 is a table that stores the result of analyzing the access content (I / O request) from the application layer, and is created by the access analysis unit 32.

応答テーブル52は、テスト実施者の設定により、アプリ層からのアクセス内容(I/O要求)と、その応答内容を結び付けた情報を格納したテーブルで、スケジューラにより作成されるものである。なお、アクセステーブル51及び応答テーブル52は、疑似ドライバ23及び疑似ドライバ設定ユーティリティ53(図2参照)から参照できる様、メモリ共通域50に置かれるものとする。   The response table 52 is a table storing access contents (I / O requests) from the application layer and information associated with the response contents according to the setting of the tester, and is created by the scheduler. It is assumed that the access table 51 and the response table 52 are placed in the memory common area 50 so that they can be referred to from the pseudo driver 23 and the pseudo driver setting utility 53 (see FIG. 2).

§4:テスト方法の概念の説明
図4はテスト方法の概念説明図である。以下、図4に基づいて、テスト方法の概念を説明する。
§4: Description of concept of test method FIG. 4 is a conceptual diagram of the test method. The concept of the test method will be described below based on FIG.

以下に説明する例のテスト方法では、被テストプログラムの走行環境にて、被テストプログラムがアクセスしたコンピュータハードウェア資源からの通常応答に対し、疑似ドライバ23が変換を行い疑似応答を返すことで、被テストプログラムの応答処理ルートにおいて、異常応答を含む各種応答を検証しテストするものである。   In the example test method described below, the pseudo driver 23 converts and returns a pseudo response to a normal response from a computer hardware resource accessed by the program under test in the running environment of the program under test. In the response processing route of the program under test, various responses including abnormal responses are verified and tested.

図4に示したように、アプリ層にある被テストプログラムは、ファイルやネットワーク等のコンピュータハードウェア資源(実I/O機器62)をアクセスする際に、コンピュータハードウェア資源アクセスをサービスするインタフェース(API)を介して、ドライバ層の実I/Oドライバ60を使用することになるが、ここで、ドライバ層の実I/Oドライバ60とアプリ層(プログラムで構成されたもの)の間に、いわゆるミドル層として前記疑似ドライバ23(プログラムで構成されたもの)を配置する。   As shown in FIG. 4, the program under test in the application layer has an interface (service for accessing computer hardware resources) when accessing computer hardware resources (real I / O device 62) such as files and networks. The actual I / O driver 60 of the driver layer is used via the API), but here, between the real I / O driver 60 of the driver layer and the application layer (configured by a program), The pseudo driver 23 (configured by a program) is arranged as a so-called middle layer.

通常、アプリ層(被テストプログラム)からのI/O処理は、アプリケーションインタフェース(以降、「API」と記す)によりシステムコール等としてOSカーネル21に依頼され、OSカーネル21が実I/Oドライバ60に処理を渡すことで実現されている。   Normally, I / O processing from the application layer (program under test) is requested to the OS kernel 21 as a system call or the like by an application interface (hereinafter referred to as “API”), and the OS kernel 21 receives the real I / O driver 60. It is realized by passing processing to.

疑似ドライバ23は、OSカーネル21と実I/Oドライバ60の間に位置し、OSカーネル21のフック機能として登録することで、実I/Oドライバ60に処理が渡される直前に疑似ドライバ23に処理が渡されるようになる(その様に登録する)。   The pseudo driver 23 is located between the OS kernel 21 and the real I / O driver 60 and is registered as a hook function of the OS kernel 21, so that the pseudo driver 23 immediately passes processing to the real I / O driver 60. Processing will be passed (register as such).

このフック機能により、アプリ層(被テストプログラム)からのI/O処理要求は、実I/Oドライバ60に渡る直前で疑似ドライバ23に渡される(図の点線のルートR1、R2ではなく、実線のルートR3、R4を通る)ため、以後の処理は疑似ドライバ23の処理に従うことになる。   With this hook function, an I / O processing request from the application layer (program under test) is passed to the pseudo driver 23 immediately before passing to the real I / O driver 60 (instead of the dotted lines R1 and R2 in FIG. Therefore, the subsequent processing follows the processing of the pseudo driver 23.

即ち、図4中R1及びR2の点線で示したルートは、疑似ドライバ23をフックしない場合の処理ルートであり、R3及びR4の実線で示したルートは、疑似ドライバ23をフックした場合の処理ルートになる。ここで、疑似ドライバ23は、ドライバ層からの応答に対して、異常応答を含む各種応答に変換してアプリ層に応答する。被テストプログラムは、疑似ドライバ23からの異常応答を含む各種応答に基づいた処理を行う。   That is, the routes indicated by dotted lines R1 and R2 in FIG. 4 are processing routes when the pseudo driver 23 is not hooked, and the routes indicated by solid lines R3 and R4 are processing routes when the pseudo driver 23 is hooked. become. Here, the pseudo driver 23 converts the response from the driver layer into various responses including an abnormal response and responds to the application layer. The program under test performs processing based on various responses including an abnormal response from the pseudo driver 23.

なお、疑似ドライバ23の振る舞いとして、どの様な応答をするかは、パラメータにより設定することが可能である。また、疑似ドライバ23は、アプリ層から見た場合は通常のドライバ層に見えるので、被テストプログラムには何ら手を加える必要が無いので、通常の製品版でのテストが可能となる。   Note that the response of the pseudo driver 23 can be set by a parameter. Further, since the pseudo driver 23 looks like a normal driver layer when viewed from the application layer, it is not necessary to make any changes to the program under test, so that a test with a normal product version is possible.

ここで、基本的にI/O処理は実I/Oを使用し、応答値またはデータのみをパラメータによって差し替える方式であり、特別なI/Oドライバやシミュレータプログラムを開発しなくて済む様にしている。   Here, I / O processing basically uses real I / O, and only response values or data are replaced by parameters, so that it is not necessary to develop special I / O drivers or simulator programs. Yes.

§5:アクセステーブル例及び応答テーブル例の説明
図5はアクセステーブル例及び応答テーブル例である。以下、図5に基づいて、アクセステーブル例及び応答テーブル例を説明する。
§5: Description of Access Table Example and Response Table Example FIG. 5 shows an access table example and a response table example. Hereinafter, an example of an access table and an example of a response table will be described with reference to FIG.

(1) :アクセステーブル例
図5のA図に示したアクセステーブル例において、アクセス内容(I/O要求)と、データ量(Byte)、差し替え実施項番(記録)の各項目が設けてあり、各項目毎にデータが格納されるようになっている。
(1): Access table example In the access table example shown in FIG. 5A, each item of access contents (I / O request), data amount (bytes), and replacement execution item number (record) is provided. Data is stored for each item.

前記アクセス内容(I/O要求)の項目は、被テストプログラムがドライバに要求したアクセス内容(I/O要求)の記録である。前記データ量(Byte)の項目は、被テストプログラムがドライバに要求したデータ量の記録である。前記差し替え実施項番(記録)の項目は、被テストプログラムのアクセス条件が、応答テーブルの条件に一致し、応答値を差し替えた場合の、応答テーブル上の項番の記録である。なお、差し替え無かった場合は「−」とする。   The item of access content (I / O request) is a record of the access content (I / O request) requested to the driver by the program under test. The item of data amount (Byte) is a record of the amount of data requested by the program under test from the driver. The item of the replacement execution item number (record) is a record of the item number on the response table when the access condition of the program under test matches the condition of the response table and the response value is replaced. If there is no replacement, “−” is assumed.

(2) :応答テーブル例
図5のB図に示した応答テーブル例において、項番と、条件と、差し替え応答値と、差し替え実施記録と、ワンショットと、遅延時間範囲(ms)の各項目が設けてあり、各項目毎にデータが格納されるようになっている。この場合、前記条件の項目には、アクセス内容(I/O要求)と、データ量と、元応答値との各項目別の条件に分かれている。
(2): Response table example In the response table example shown in FIG. 5B, each item of item number, condition, replacement response value, replacement execution record, one shot, and delay time range (ms) Is provided, and data is stored for each item. In this case, the condition item is divided into conditions for each item of access contents (I / O request), data amount, and original response value.

前記アクセス内容(I/O要求)の項目は、ドライバへのアクセスで、差し替え対象とするアクセスの種類を、テスト実施者が設定するものである。前記条件の項目は、ドライバの応答を差し替える条件を、テスト実施者により設定するものである。前記差し替え応答値の項目は、応答値を差し替える条件が一致した場合の、差し替え値を、テスト実施者が設定するものである。   The item of access content (I / O request) is access to the driver, and the tester sets the type of access to be replaced. In the condition item, a condition for replacing the driver response is set by the tester. In the item of the replacement response value, the tester sets a replacement value when the conditions for replacing the response value match.

前記差し替え実施記録の項目は、応答値の差し替えが発生した場合に記録されるものである。前記ワンショットは、応答値の差し替えが発生した場合、最初の1回のみ差し替えるか、以後も繰り返し差替えるかを、テスト実施者が設定するものである。前記遅延時間範囲(ms)の項目は、ドライバからの応答値を被テストプログラムに通知するときの、応答遅延時間を、テスト実施者が設定するものである。なお、直ぐに返す場合は「0」を、全く返さない場合は「−」を設定する。   The item of replacement execution record is recorded when response value replacement occurs. In the one-shot, when a response value is replaced, the tester sets whether to replace only the first time or to replace it repeatedly thereafter. In the item of the delay time range (ms), the tester sets the response delay time when the response value from the driver is notified to the program under test. Note that “0” is set when returning immediately, and “−” is set when not returning at all.

§6:処理(又は動作)等の詳細な説明
1.疑似ドライバの処理(又は動作)
以下、図3に基づいて、疑似ドライバの処理(又は動作)を説明する。
§6: Detailed description of processing (or operation), etc. Pseudo driver processing (or operation)
Hereinafter, the process (or operation) of the pseudo driver will be described with reference to FIG.

先ず、疑似ドライバ制御部31は、疑似ドライバ23を構成している各モジュールの起動及び停止や、作業領域や制御テーブルの初期化やテスト終了時の返却、テスト実施者との会話機能を行うのみで、テスト実施中は動作し続けている。アクセス解析部32は、アプリ層からハードウェアのアクセスが行われると、そのアクセス内容(I/O要求)を解析し、アクセステーブル51を作成し、スケジューラ33に通知する。   First, the pseudo driver control unit 31 performs only the function of starting and stopping each module constituting the pseudo driver 23, initializing the work area and the control table, returning at the end of the test, and the conversation function with the tester. So it continues to work during the test. When hardware access is performed from the application layer, the access analysis unit 32 analyzes the access content (I / O request), creates an access table 51, and notifies the scheduler 33.

スケジューラ33は、テスト実施者の設定により、アプリ層からのアクセス内容(I/O要求)と、その内容の結び付けを行い、応答テーブル52を作成する。ドライバ層からの応答があると、応答解析部35からの応答値をもらい、応答テーブル52に従った応答値に変換し、応答生成部34に通知する。   The scheduler 33 links the access content (I / O request) from the application layer with the content according to the setting of the tester, and creates the response table 52. When there is a response from the driver layer, a response value from the response analysis unit 35 is obtained, converted into a response value according to the response table 52, and notified to the response generation unit 34.

また、応答テーブル52に従い、異常応答部37、正常応答部38、ノットレディ部39、タイムアウト部40、センスデータ生成部41、異常データ生成部42の各モジュールを起動して、応答値を生成する制御を行う。   Further, according to the response table 52, the abnormal response unit 37, normal response unit 38, not ready unit 39, timeout unit 40, sense data generation unit 41, and abnormal data generation unit 42 are activated to generate response values. Take control.

応答生成部34はスケジューラ33からの応答値の設定に従い、生成された結果をアプリ層に応答する。応答解析部35は、ドライバ層からの応答を解析し、結果をスケジューラ33に通知する。設定解析部36は、テスト実施者からの応答値に関する設定内容を解析し、スケジューラ33に通知する。   The response generation unit 34 responds the generated result to the application layer according to the setting of the response value from the scheduler 33. The response analysis unit 35 analyzes the response from the driver layer and notifies the scheduler 33 of the result. The setting analysis unit 36 analyzes the setting content related to the response value from the tester and notifies the scheduler 33 of the setting content.

2.アプリ層からのアクセスに対してテスト実施者の設定に従った応答値が得られるまでの動作説明
以下、図3を参照しながら、アプリ層からのアクセスに対してテスト実施者の設定に従った応答値が得られるまでの動作を説明する。
2. Explanation of operation until a response value according to the tester's setting is obtained for the access from the application layer. Hereinafter, according to the tester's setting for the access from the application layer, referring to FIG. The operation until a response value is obtained will be described.

(a) :テスト実施者は、テスト開始時点で、応答テーブル52を作成する操作を行う。アプリ層からの応答(I/O要求)に対して、アクセス終了後に返すべき応答値を決定し、テーブル化する。   (a): The tester performs an operation of creating the response table 52 at the start of the test. In response to a response (I / O request) from the application layer, a response value to be returned after the access is completed is determined and tabulated.

(b) :次に、アプリを起動してテストを開始する。   (b): Next, start the application and start the test.

(c) :アプリが起動されると、アプリ層からドライバ(実I/Oドライバ60)を介してハードウェアをアクセスする要求が出るが、疑似ドライバ23のアクセス解析部32によってアクセスの内容が解析され、アクセステーブル51に格納されると同時にスケジューラ33に通知される。   (c): When the application is started, a request for accessing the hardware is issued from the application layer via the driver (real I / O driver 60). The access analysis unit 32 of the pseudo driver 23 analyzes the access contents. The information is stored in the access table 51 and notified to the scheduler 33 at the same time.

(d) :スケジューラ33は、アクセステーブル51と、先に作成された応答テーブル52を索引し、指定された応答値を準備する。   (d): The scheduler 33 indexes the access table 51 and the response table 52 created previously, and prepares the specified response value.

(e) :ハードウェアの動作が完了し、ドライバ層からの応答値が応答解析部35に返って来ると、スケジューラ33に通知される。   (e): When the hardware operation is completed and the response value from the driver layer is returned to the response analysis unit 35, the scheduler 33 is notified.

(f) :スケジューラ33は、応答解析部35からの応答値に問題がなければ、先に準備した応答値に置き換えて応答生成部34に通知する。   (f): If there is no problem in the response value from the response analysis unit 35, the scheduler 33 replaces the response value prepared in advance and notifies the response generation unit 34.

(g) :応答生成部34は、スケジューラ33から指示された応答値をアプリ層に返す。以上の(a) 乃至(g) までの動作により、アプリ層からのアクセスに対してテスト実施者の設定に従った応答値が得られる。   (g): The response generation unit 34 returns the response value instructed from the scheduler 33 to the application layer. With the above operations (a) to (g), a response value according to the setting of the tester is obtained for access from the application layer.

ここで、予めテスト実施者により、被テストプログラムの動作検証に必要な、応答値として、障害時にしか発生し得ないような応答値を用意することで、障害時のテストが可能になる。   Here, a tester can prepare a response value that can be generated only at the time of failure as a response value necessary for verifying the operation of the program under test by a tester in advance.

3.処理(又は動作)時における遅延時間範囲の説明
図6は遅延処理例のタイムチャートである。図6において、Aは被テストプログラムのI/O要求とタイムアウト監視、Bは疑似ドライバの遅延時間処理、CはI/Oドライバ、DはI/Oの各タイムチャートである。以下、図6を参照しながら、動作時における遅延時間範囲について説明する。なお、以下の説明では、(1) 乃至(9) は図6の数字と同じである。
3. Description of Delay Time Range During Processing (or Operation) FIG. 6 is a time chart of a delay processing example. In FIG. 6, A is an I / O request and timeout monitoring of the program under test, B is a pseudo driver delay time process, C is an I / O driver, and D is an I / O time chart. Hereinafter, the delay time range during operation will be described with reference to FIG. In the following description, (1) to (9) are the same as the numbers in FIG.

以下に説明する機能は、I/O機器の処理完了のタイミングによる被テストプログラムへの影響をテストする目的の機能であり、主に、I/O応答が期待する完了時間に近い場合から、異常に長い場合(例えば、数時間)までを想定したケースにおいて問題なく機能するかを確認するものである。   The functions described below are for the purpose of testing the effect on the program under test due to the timing of completion of processing of the I / O device, and are mainly abnormal when the I / O response is close to the expected completion time. In this case, it is confirmed whether or not the device functions without any problem in a case assuming a long time (eg, several hours).

一般に、被テストプログラムのタイムアウト監視処理により異常終了するが、マルチタスク制御型のアプリケーションでは、次のI/O処理要求が走り出してしまい、処理結果の順序性が保てなくなる等の重大問題となる場合がある(このテストに効果がある)。   Generally, the program is abnormally terminated by the timeout monitoring process of the program under test. However, in a multitask control type application, the next I / O processing request starts running, which causes a serious problem such that the order of processing results cannot be maintained. There are cases (this test is effective).

(1) :被テストプログラム22(アプリ層)は、システムコールにてI/O要求を出すと共に、I/O処理完了のタイムアウト監視に入る。   (1): The program under test 22 (application layer) issues an I / O request by a system call and enters time-out monitoring for completion of I / O processing.

(2) :疑似ドライバ23は、被テストプログラム22からのI/O要求をフックし、応答テーブル52に従い実I/Oドライバ60にI/O要求を渡す。   (2): The pseudo driver 23 hooks the I / O request from the program under test 22 and passes the I / O request to the real I / O driver 60 according to the response table 52.

(3) :実I/Oドライバ60は、疑似ドライバ23からのI/O要求に従い、I/O機器62を起動した後にI/O機器62の処理完了の監視に入る。   (3): The real I / O driver 60 starts monitoring the processing of the I / O device 62 after starting the I / O device 62 in accordance with the I / O request from the pseudo driver 23.

(4) :I/O機器62は、要求された処理を完了した時点で、完了を実I/Oドライバ60に通知する。   (4): The I / O device 62 notifies the real I / O driver 60 of completion when the requested processing is completed.

(5) :実I/Oドライバ60は、I/O処理が完了した事を、疑似ドライバ23に通知する。   (5): The real I / O driver 60 notifies the pseudo driver 23 that the I / O processing has been completed.

(6) :疑似ドライバ23は、I/O機器62の処理完了を被テストプログラム22に通知するが、その際に、応答テーブル52の「遅延時間範囲」に従った時間の遅延後に通知する。   (6): The pseudo driver 23 notifies the program under test 22 that the processing of the I / O device 62 has been completed, but at this time, notifies it after a time delay according to the “delay time range” of the response table 52.

(7) :被テストプログラム22は、応答テーブル52の「遅延時間範囲」分の遅延をもって、疑似ドライバ23からI/O処理完了の通知を受け取る。   (7): The program under test 22 receives a notification of completion of I / O processing from the pseudo driver 23 with a delay corresponding to the “delay time range” of the response table 52.

(8) :被テストプログラム22は、遅延によりI/O機器62の処理完了が、設定したタイムアウト監視時間内であれば、次の処理に移る。   (8): The program under test 22 proceeds to the next processing if the processing completion of the I / O device 62 is within the set timeout monitoring time due to delay.

(9) :被テストプログラム22は、遅延によりI/O機器62が処理完了が、設定したタイムアウト監視時間後であれば、タイムアウト処理に移る。   (9): If the I / O device 62 completes processing due to a delay but the set timeout monitoring time has elapsed, the program under test 22 proceeds to timeout processing.

なお、「遅延時間範囲」に「−1」が設定された場合は、I/O機器62からの応答を待たずに、疑似応答を作成し、直ぐに応答を返す。また、この例では、遅延時間の機能をI/O機器62の完了としているが、他の径として、OSカーネル21からのI/O要求の遅延として機能する様にすることも可能であり、更に、それらの切り替え可能な様に実施することもできる。   When “−1” is set in the “delay time range”, a pseudo response is created without waiting for a response from the I / O device 62, and the response is immediately returned. In this example, the function of the delay time is the completion of the I / O device 62. However, as another diameter, it is also possible to function as a delay of the I / O request from the OS kernel 21. Furthermore, it can also be implemented so that they can be switched.

以上のように、疑似ドライバ23と応答テーブル52の設定により、I/O機器62の処理の完了を擬似的に遅延させることにより、被テストプログラム22が備えている処理ルートをテストすることができる。また、同様に、被テストプログラム22が複数のI/O機器62を同時に制御している場合では、それぞれのI/O処理完了通知のタイミングを任意に組み合わせたテストができ、例えば、被テストプログラム22のI/O処理順序の誤り等のテストができる。   As described above, the processing route provided in the program under test 22 can be tested by artificially delaying the completion of the processing of the I / O device 62 by setting the pseudo driver 23 and the response table 52. . Similarly, in the case where the program under test 22 controls a plurality of I / O devices 62 at the same time, a test can be performed by arbitrarily combining the timings of notification of completion of each I / O processing. 22 I / O processing order errors can be tested.

また、図3に示したアクセステーブル51内の差し替え実施項番(記録)には、応答テーブル52の条件を満たしたアクセスの場合の応答テーブル52の項番を記録する。これは、疑似ドライバ23により、実際の応答値を差し替えたことを意味しており、テストされたことの記録(テストのトレース)になる。   Further, in the replacement execution item number (record) in the access table 51 shown in FIG. 3, the item number of the response table 52 in the case of access that satisfies the conditions of the response table 52 is recorded. This means that the actual response value has been replaced by the pseudo driver 23, and this is a record of the test (test trace).

テストが完了した際に、アクセステーブル51には、被テストプログラム22の全アクセスの記録(トレース)と、疑似ドライバ23により応答の差し替えの対応が記録されるため、この記録からテストの実施の範囲(テストカバレッジ)を把握することが可能になる。   When the test is completed, the access table 51 records all access records (traces) of the program under test 22 and response replacement by the pseudo driver 23. (Test coverage) can be grasped.

§7:フローチャートによる処理(又は動作)の説明
図7はテスト処理フローチャート(その1)、図8はテスト処理フローチャート(その2)である。以下、図7、8に基づいて、処理(又は動作)を説明する。なお、図7、8においてS1〜S18は各処理ステップを示す。
§7: Explanation of processing (or operation) by flowchart FIG. 7 is a test processing flowchart (part 1), and FIG. 8 is a test processing flowchart (part 2). Hereinafter, the processing (or operation) will be described with reference to FIGS. 7 and 8, S1 to S18 indicate processing steps.

先ず、操作員により、疑似ドライバ設定ユーテリティを起動し、操作員により、テスト内容を反映した応答テーブル52を設定する(S1)。次に、操作員は、疑似ドライバ23を起動する(S2)。そして、疑似ドライバ23は、OSカーネル21にI/O要求をフックする(S3)。次に、操作員は、被テストプログラム22にを起動する(S4)。そして、被テストプログラム22はI/O要求を出す(S5)。   First, the operator activates the pseudo driver setting utility, and the operator sets the response table 52 reflecting the test contents (S1). Next, the operator activates the pseudo driver 23 (S2). Then, the pseudo driver 23 hooks an I / O request to the OS kernel 21 (S3). Next, the operator activates the program under test 22 (S4). Then, the program under test 22 issues an I / O request (S5).

次に、OSカーネル21は、I/O要求をフック先の疑似ドライバ23に確認する(S6)。その結果、フック有りの場合は、OSカーネル21は疑似ドライバ23にI/O処理を渡す(S7)。そして、アクセステーブル51/応答テーブル52は設定されているか否かを判断する(S8)。その結果、アクセステーブル51/応答テーブル52が設定されていれば疑似ドライバ23は応答テーブル52の設定に従う(S9)。   Next, the OS kernel 21 confirms the I / O request with the pseudo driver 23 at the hook destination (S6). As a result, if there is a hook, the OS kernel 21 passes I / O processing to the pseudo driver 23 (S7). Then, it is determined whether or not the access table 51 / response table 52 is set (S8). As a result, if the access table 51 / response table 52 is set, the pseudo driver 23 follows the setting of the response table 52 (S9).

次に、疑似ドライバ23はI/O要求の内容をトレースする(S10)。そして、疑似ドライバ23は実I/Oドライバ60に処理を渡す(S11)。次に、疑似ドライバ23は、ハード層の実I/O機器62を起動し、処理を開始する(S12)。実I/O機器62は処理が完了すると実I/Oドライバ60に応答する(S13)。そして、実I/Oドライバ60はハード層の実I/O機器62からの応答を監視して応答が有るのを待ち(S14)、応答があれば、実I/Oドライバ60はI/O応答を疑似ドライバ23に渡す(S15)。   Next, the pseudo driver 23 traces the contents of the I / O request (S10). Then, the pseudo driver 23 passes the processing to the real I / O driver 60 (S11). Next, the pseudo driver 23 activates the real I / O device 62 in the hardware layer and starts processing (S12). When the processing is completed, the real I / O device 62 responds to the real I / O driver 60 (S13). The real I / O driver 60 monitors the response from the real I / O device 62 in the hardware layer and waits for a response (S14). The response is passed to the pseudo driver 23 (S15).

次に、疑似ドライバ23は、応答内容と応答テーブル52の内容を比較し応答テーブル52の設定値の処理を行う(S16)。そして、操作員は、被テストプログラム22の完了を監視し(S17)、継続ならば前記S16の処理へ以降し、終了ならば、操作員は、疑似ドライバ23を停止する(S18)。   Next, the pseudo driver 23 compares the response contents with the contents of the response table 52 and processes the set values in the response table 52 (S16). Then, the operator monitors the completion of the program under test 22 (S17). If the operation is continued, the operation proceeds to S16. If the operation is completed, the operator stops the pseudo driver 23 (S18).

また、前記S6の処理でフック無しの場合、及び前記S8の処理で、アクセステーブル51/応答テーブル52が設定されていない場合には、S18の処理へ移行する。このようにして前記処理を終了する。   Further, when there is no hook in the process of S6 and when the access table 51 / response table 52 is not set in the process of S8, the process proceeds to S18. In this way, the process is finished.

§8:主ルートの処理(動作)の説明
図9は主ルートの処理フローチャート(その1)、図10は主ルートの処理フローチャート(その2)である。以下、図9、10に基づいて、主ルートの処理(動作)を説明する。以下に説明する主ルートの処理は、図8に示したS16の処理の詳細な説明である。なお、図9、10においてS21〜S35は各処理ステップを示す。
§8: Description of main route processing (operation) FIG. 9 is a main route processing flowchart (part 1), and FIG. 10 is a main route processing flowchart (part 2). The main route processing (operation) will be described below with reference to FIGS. The processing of the main route described below is a detailed description of the processing of S16 shown in FIG. 9 and 10, S21 to S35 indicate each processing step.

前記図8のS16では、疑似ドライバ23は、応答内容と応答テーブル52の内容を比較し応答テーブル52の設定値の処理を行うが、その詳細な処理は次の通りである。この処理で疑似ドライバ23は、先ず、被テストプログラム22からI/O要求は有るかどうかを判定し(S21)、被テストプログラム22からI/O要求が無ければ、要求が有るのを待ち、被テストプログラム22からI/O要求があれば、アクセス解析の処理により、被テストプログラム22のI/O要求をアクセステーブル51に記録する(S22)。次に、I/O要求を実I/Oドライバ60に渡し(S23)、実I/Oドライバ60からの応答はあったかどうかを判定する(S24)。   In S16 of FIG. 8, the pseudo driver 23 compares the response contents with the contents of the response table 52 and processes the set values in the response table 52. The detailed process is as follows. In this process, the pseudo driver 23 first determines whether or not there is an I / O request from the program under test 22 (S21), and if there is no I / O request from the program under test 22, waits for the request. If there is an I / O request from the program under test 22, the I / O request for the program under test 22 is recorded in the access table 51 by an access analysis process (S 22). Next, the I / O request is passed to the real I / O driver 60 (S23), and it is determined whether or not there is a response from the real I / O driver 60 (S24).

その結果、実I/Oドライバ60からの応答が無ければ、応答が有るのを待ち、実I/Oドライバ60からの応答が有れば、I/O要求内容と実I/Oドライバ60からの応答の組み合わせ条件は、応答テーブル52に有るかどうかを判定する(S25)。その結果、I/O要求と実I/Oドライバ60からの応答の組み合わせ条件が応答テーブル52に有れば、該当する差し替え応答値を応答テーブル52から得る(S26)。   As a result, if there is no response from the real I / O driver 60, it waits for a response, and if there is a response from the real I / O driver 60, the I / O request content and the real I / O driver 60 It is determined whether or not the response combination condition is in the response table 52 (S25). As a result, if the combination condition of the response from the I / O request and the real I / O driver 60 exists in the response table 52, the corresponding replacement response value is obtained from the response table 52 (S26).

次に、該当する応答遅延時間を応答テーブル52から得る(S27)。そして、応答テーブル52の該当する差し替え応答記録欄に「実施」を記録する(S28)。また、該当する「項番」を得る(S29)。次に、疑似ドライバ23は、アクセステーブル51の該当する差し替え項番に「項番」を記録する(S30)。そして、応答テーブル52の条件に従った応答値及びデータを生成する(S31)。   Next, the corresponding response delay time is obtained from the response table 52 (S27). Then, “execution” is recorded in the corresponding replacement response recording column of the response table 52 (S28). Further, the corresponding “item number” is obtained (S29). Next, the pseudo driver 23 records “item number” in the corresponding replacement item number of the access table 51 (S30). And the response value and data according to the conditions of the response table 52 are produced | generated (S31).

次に、スケジューラ33により応答遅延時間後に差し替え応答値を被テストプログラム22に応答する(S32)。そして、アクセステーブル51のポインタを更新する(S33)。次に、操作員による停止指示が有るかどうかを判断し(S34)、有れば、アクセステーブル51及び応答テーブル52を所定の格納領域に保存する(S35)。   Next, the scheduler 33 returns a replacement response value to the program under test 22 after the response delay time (S32). Then, the pointer of the access table 51 is updated (S33). Next, it is determined whether or not there is a stop instruction by the operator (S34), and if there is, the access table 51 and the response table 52 are stored in a predetermined storage area (S35).

また、前記S34の処理で、操作員による停止指示が無ければ、S21の処理へ移行する。また、S25の処理で、I/O要求内容と実I/Oドライバ60からの応答の組み合わせ条件が応答テーブル52に無いと判定した場合はS33の処理へ移行する。このようにして、S35の処理が終了すれば、この処理を終了する。   If there is no stop instruction from the operator in the process of S34, the process proceeds to S21. If it is determined in the process of S25 that the combination condition of the I / O request content and the response from the real I / O driver 60 is not in the response table 52, the process proceeds to S33. In this way, when the process of S35 ends, this process ends.

§9:その他の説明
前記プログラムのテスト装置(コンピュータ)によるプログラムのテスト方法には、次のようなテスト方法も含まれる。
§9: Other description The program test method using the program test apparatus (computer) includes the following test methods.

(1) :コンピュータ上で動作するプログラム自身(被テストプログラム)の動作検証(テスト方法)に関し、被テストプログラムによるコンピュータハードウェア資源へのアクセスに対する各種(異常を含む)応答処理の妥当性をテストする方法において、各種の疑似応答発生機能を有するコンピュータハードウェア資源アクセスプログラム(疑似ドライバ)を介し、任意の応答処理に対する動作検証を行う。   (1): Tests the validity of various types of response processing (including anomalies) for access to computer hardware resources by the program under test, regarding the operation verification (test method) of the program itself (program under test) running on the computer In this method, operation verification for an arbitrary response process is performed through a computer hardware resource access program (pseudo driver) having various pseudo response generation functions.

(2) :コンピュータ上で動作するプログラム自身(被テストプログラム)の動作検証(テスト方法)に関し、被テストプログラムによるコンピュータハードウェア資源へのアクセスに対する各種(異常を含む)応答処理の妥当性をテストする方法において、動作を実I/Oに実行させることにより、実環境と同等な応答タイミングのテストを行い、かつ、応答値は予め与えられた、アクセス条件や応答値の組み合わせのスケジュールされた任意の応答値を返す。   (2): Regarding the operation verification (test method) of the program itself (program under test) that runs on the computer, test the validity of various (including abnormal) response processes for access to computer hardware resources by the program under test In this method, a response timing test equivalent to that in the actual environment is performed by causing the actual I / O to execute the operation, and the response value is given in advance, and any combination of the access condition and the response value is scheduled. Returns the response value of.

§10:付記の説明
前記の説明に対し、次の構成を付記する。
§10: Explanation of additional notes The following configuration is added to the above description.

(付記1)
コンピュータ上で動作する被テストプログラムの動作検証を行う際、前記被テストプログラムによるコンピュータハードウェア資源へのアクセスに対する各種応答処理の妥当性を検証するプログラムのテスト装置であって、
コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な復帰値を、予め与えられたパラメータに基づいた任意の応答値と差し替える機能により、各種の疑似応答を発生させる疑似ドライバを備え、
前記疑似ドライバを介し任意の応答処理に対する動作検証を行う機能を備えているプログラムのテスト装置。
(Appendix 1)
A test apparatus for a program for verifying the validity of various types of response processing to access to computer hardware resources by a program under test when performing operation verification of a program under test operating on a computer,
A pseudo driver that generates various pseudo responses by a function of replacing a normal return value from an interface that services access to computer hardware resources with an arbitrary response value based on a predetermined parameter;
A program test apparatus having a function of performing operation verification for an arbitrary response process via the pseudo driver.

(付記2)
前記疑似ドライバは、前記コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な応答値を、予め与えられたスケジュールに基づいた任意の時間後に、任意の応答値と差し替える機能を有し、
該疑似ドライバを介し、任意の疑似応答処理に対する動作検証を行う機能を備えている付記1記載のプログラムのテスト装置。
(Appendix 2)
The pseudo driver has a function of replacing a normal response value from an interface that services access to the computer hardware resource with an arbitrary response value after an arbitrary time based on a predetermined schedule,
The program test apparatus according to appendix 1, which has a function of performing operation verification for an arbitrary pseudo response process via the pseudo driver.

(付記3)
前記疑似ドライバは、前記コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な応答値を、予め与えられた、アクセス条件や応答値の組み合わせに対してスケジュールしておき、そのスケジュールに基づいた任意の応答値を返すことで、各種の疑似応答を発生させる機能を有し、
該疑似ドライバを介し、任意の疑似応答処理に対する動作検証を行う付記1記載のプログラムのテスト装置。
(Appendix 3)
The pseudo driver schedules a normal response value from an interface that services access to the computer hardware resource for a combination of access conditions and response values given in advance, and based on the schedule. It has a function to generate various pseudo responses by returning an arbitrary response value,
The program test apparatus according to appendix 1, which performs operation verification for an arbitrary pseudo response process via the pseudo driver.

(付記4)
前記疑似ドライバは、前記コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な復帰値を、予め与えられた、アクセス条件や応答値の組み合わせに対してスケジュールしておき、そのスケジュールに基づいて任意の応答値を返す被テストプログラムのテスト機能を備え、
該疑似ドライバの機能により、返した応答値を記録し、記録された応答値からテストの実施範囲を把握できるようにした付記1記載のプログラムのテスト装置。
(Appendix 4)
The pseudo driver schedules a normal return value from an interface that services access to the computer hardware resource for a combination of access conditions and response values given in advance, and based on the schedule. It has a test program test function that returns an arbitrary response value.
The program test apparatus according to appendix 1, wherein the returned response value is recorded by the function of the pseudo driver, and the execution range of the test can be grasped from the recorded response value.

(付記5)
前記疑似ドライバは、動作を実I/Oに実行させることにより、実環境と同じデータに対する処理のテストを行い、かつ、応答値は予め与えられた、アクセス条件や応答値の組み合わせのスケジュールされた任意の疑似応答値を返す機能を有することで、前記動作検証を行う付記1記載のプログラムのテスト装置。
(Appendix 5)
The pseudo driver performs a process test on the same data as the real environment by causing the real I / O to execute an operation, and a response value is given in advance, and a combination of access conditions and response values is scheduled. The program test apparatus according to appendix 1, wherein the operation verification is performed by having a function of returning an arbitrary pseudo response value.

(付記6)
コンピュータ上で動作する被テストプログラムの動作検証を行う際、前記被テストプログラムによるコンピュータハードウェア資源へのアクセスに対する各種応答処理の妥当性を検証するプログラムのテスト装置のテスト方法であって、
コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な復帰値を、予め与えられたパラメータに基づいた任意の応答値と差し替える機能により、各種の疑似応答を発生させる疑似ドライバを介し任意の応答処理に対する動作検証を行うプログラムのテスト装置のテスト方法。
(Appendix 6)
A test method for a test apparatus for a program for verifying the validity of various response processes for accessing a computer hardware resource by a program under test when performing operation verification of a program under test operating on a computer,
Any response via a pseudo driver that generates various pseudo responses by the function of replacing the normal return value from the interface that services access to computer hardware resources with an arbitrary response value based on a predetermined parameter. A test method of a test apparatus for a program for performing operation verification on processing.

(付記7)
前記コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な応答値を、予め与えられたスケジュールに基づいた任意の時間後に、任意の応答値と差し替える機能を有する疑似ドライバを介し、任意の疑似応答処理に対する動作検証を行う付記6記載のプログラムのテスト装置のテスト方法。
(Appendix 7)
An arbitrary pseudo-driver is provided via a pseudo driver having a function of replacing a normal response value from an interface that services access to the computer hardware resource with an arbitrary response value after an arbitrary time based on a predetermined schedule. The test method of a test apparatus for a program according to appendix 6, wherein operation verification for response processing is performed.

(付記8)
前記コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な応答値を、予め与えられた、アクセス条件や応答値の組み合わせに対してスケジュールしておき、そのスケジュールに基づいた任意の応答値を返すことで、各種の疑似応答を発生させる疑似ドライバを介し、任意の疑似応答処理に対する動作検証を行う付記6記載のプログラムのテスト装置のテスト方法。
(Appendix 8)
A normal response value from an interface that services access to the computer hardware resource is scheduled against a combination of access conditions and response values given in advance, and an arbitrary response value based on the schedule is set. The program test apparatus test method according to appendix 6, wherein operation verification is performed for an arbitrary pseudo-response process via a pseudo driver that generates various pseudo-responses by returning the program.

(付記9)
前記コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な復帰値を、予め与えられた、アクセス条件や応答値の組み合わせに対してスケジュールしておき、そのスケジュールに基づいて任意の応答値を返す被テストプログラムのテスト機能を有する疑似ドライバにより、返した応答値を記録し、記録された応答値からテストの実施範囲を把握できるようにした付記6記載のプログラムのテスト装置のテスト方法。
(Appendix 9)
A normal return value from the interface that services access to the computer hardware resource is scheduled for a combination of access conditions and response values given in advance, and an arbitrary response value is set based on the schedule. The program test apparatus test method according to appendix 6, wherein the returned response value is recorded by a pseudo driver having a test function of the program to be returned, and the execution range of the test can be grasped from the recorded response value.

(付記10)
動作を実I/Oに実行させることにより、実環境と同じデータに対する処理のテストを行い、かつ、応答値は予め与えられた、アクセス条件や応答値の組み合わせのスケジュールされた任意の疑似応答値を返す機能を有する疑似ドライバにより、前記動作検証を行う付記6記載のプログラムのテスト装置のテスト方法。
(Appendix 10)
By causing the real I / O to execute the operation, a test of the processing for the same data as the real environment is performed, and the response value is given in advance, and any pseudo-response value scheduled for a combination of access conditions and response values The test method of a test apparatus for a program according to appendix 6, wherein the operation verification is performed by a pseudo driver having a function of returning.

本発明の原理説明図である。It is a principle explanatory view of the present invention. 実施の形態における装置の全体構成図である。1 is an overall configuration diagram of an apparatus according to an embodiment. 実施の形態における疑似ドライバの説明図である。It is explanatory drawing of the pseudo driver in embodiment. 実施の形態におけるテスト方法の概念説明図である。It is a conceptual explanatory view of a test method in an embodiment. 実施の形態におけるアクセステーブル例及び応答テーブル例であり、A図はアクセステーブル例、B図は応答テーブル例を示す。FIG. 4A is an example of an access table and an example of a response table in the embodiment, FIG. 実施の形態における遅延処理例のタイムチャートである。It is a time chart of the example of delay processing in an embodiment. 実施の形態におけるテスト処理フローチャート(その1)である。It is a test processing flowchart (the 1) in an embodiment. 実施の形態におけるテスト処理フローチャート(その2)である。It is a test processing flowchart (the 2) in an embodiment. 実施の形態における主ルートの処理フローチャート(その1)である。It is a processing flowchart (the 1) of the main route in an embodiment. 実施の形態における主ルートの処理フローチャート(その2)である。It is a processing flowchart (the 2) of the main route in an embodiment.

符号の説明Explanation of symbols

1 コンピュータ本体
2 入力装置
3 表示装置
11 CPU
12 メモリ制御部
13 I/O制御部
14 通信制御部
15 メモリ装置
21 OSカーネル
22 被テストプログラム
23 疑似ドライバ
31 疑似ドライバ制御部
32 アクセス解析部
33 スケジューラ
34 応答生成部
35 応答解析部
36 設定解析部
37 異常応答部
38 正常応答部
39 ノットレディ部
40 タイムアウト部
41 センスデータ生成部
42 異常データ生成部
50 メモリ共通域
51 アクセステーブル
52 応答テーブル
53 疑似ドライバ設定ユーティリティ
60 ドライバ層(実I/Oドライバ)
61 I/Oポート
62 ハード層(実I/O機器)
1 Computer Main Body 2 Input Device 3 Display Device 11 CPU
DESCRIPTION OF SYMBOLS 12 Memory control part 13 I / O control part 14 Communication control part 15 Memory device 21 OS kernel 22 Test program 23 Pseudo driver 31 Pseudo driver control part 32 Access analysis part 33 Scheduler 34 Response generation part 35 Response analysis part 36 Setting analysis part 37 abnormal response unit 38 normal response unit 39 not ready unit 40 timeout unit 41 sense data generation unit 42 abnormal data generation unit 50 memory common area 51 access table 52 response table 53 pseudo driver setting utility 60 driver layer (real I / O driver)
61 I / O port 62 Hardware layer (real I / O device)

Claims (5)

コンピュータ上で動作する被テストプログラムの動作検証を行う際、前記被テストプログラムによるコンピュータハードウェア資源へのアクセスに対する各種応答処理の妥当性を検証するプログラムのテスト装置であって、
コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な復帰値を、予め与えられたパラメータに基づいた任意の応答値と差し替える機能により、各種の疑似応答を発生させる疑似ドライバを備え、
前記疑似ドライバを介し任意の応答処理に対する動作検証を行う機能を備えているプログラムのテスト装置。
A test apparatus for a program for verifying the validity of various types of response processing to access to computer hardware resources by a program under test when performing operation verification of a program under test operating on a computer,
A pseudo driver that generates various pseudo responses by a function of replacing a normal return value from an interface that services access to computer hardware resources with an arbitrary response value based on a predetermined parameter;
A program test apparatus having a function of performing operation verification for an arbitrary response process via the pseudo driver.
前記疑似ドライバは、前記コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な応答値を、予め与えられたスケジュールに基づいた任意の時間後に、任意の応答値と差し替える機能を有し、
該疑似ドライバを介し、任意の疑似応答処理に対する動作検証を行う機能を備えている請求項1記載のプログラムのテスト装置。
The pseudo driver has a function of replacing a normal response value from an interface that services access to the computer hardware resource with an arbitrary response value after an arbitrary time based on a predetermined schedule,
2. The program test apparatus according to claim 1, further comprising a function of performing operation verification for an arbitrary pseudo response process via the pseudo driver.
前記疑似ドライバは、前記コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な応答値を、予め与えられた、アクセス条件や応答値の組み合わせに対してスケジュールしておき、そのスケジュールに基づいた任意の応答値を返すことで、各種の疑似応答を発生させる機能を有し、
該疑似ドライバを介し、任意の疑似応答処理に対する動作検証を行う請求項1記載のプログラムのテスト装置。
The pseudo driver schedules a normal response value from an interface that services access to the computer hardware resource for a combination of access conditions and response values given in advance, and based on the schedule. It has a function to generate various pseudo responses by returning an arbitrary response value,
The program test apparatus according to claim 1, wherein operation verification for an arbitrary pseudo response process is performed via the pseudo driver.
前記疑似ドライバは、前記コンピュータハードウェア資源へのアクセスをサービスするインタフェースからの正常な復帰値を、予め与えられた、アクセス条件や応答値の組み合わせに対してスケジュールしておき、そのスケジュールに基づいて任意の応答値を返す被テストプログラムのテスト機能を備え、
該疑似ドライバの機能により、返した応答値を記録し、記録された応答値からテストの実施範囲を把握できるようにした請求項1記載のプログラムのテスト装置。
The pseudo driver schedules a normal return value from an interface that services access to the computer hardware resource for a combination of access conditions and response values given in advance, and based on the schedule. It has a test program test function that returns an arbitrary response value.
The program test apparatus according to claim 1, wherein the returned response value is recorded by the function of the pseudo driver, and the test execution range can be grasped from the recorded response value.
前記疑似ドライバは、動作を実I/Oに実行させることにより、実環境と同じデータに対する処理のテストを行い、かつ、応答値は予め与えられた、アクセス条件や応答値の組み合わせのスケジュールされた任意の疑似応答値を返す機能を有することで、前記動作検証を行う請求項1記載のプログラムのテスト装置。   The pseudo driver performs a process test on the same data as the real environment by causing the real I / O to execute an operation, and a response value is given in advance, and a combination of access conditions and response values is scheduled. The program test apparatus according to claim 1, wherein the operation verification is performed by having a function of returning an arbitrary pseudo response value.
JP2007277056A 2007-10-25 2007-10-25 Program testing equipment Withdrawn JP2009104490A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007277056A JP2009104490A (en) 2007-10-25 2007-10-25 Program testing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007277056A JP2009104490A (en) 2007-10-25 2007-10-25 Program testing equipment

Publications (1)

Publication Number Publication Date
JP2009104490A true JP2009104490A (en) 2009-05-14

Family

ID=40706082

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007277056A Withdrawn JP2009104490A (en) 2007-10-25 2007-10-25 Program testing equipment

Country Status (1)

Country Link
JP (1) JP2009104490A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013546077A (en) * 2011-05-09 2013-12-26 ヒョンダイ モーター カンパニー Exception processing test apparatus and method
JP2014157506A (en) * 2013-02-15 2014-08-28 Omron Corp Controller, information processing device, and program
JP2014174592A (en) * 2013-03-06 2014-09-22 Nec Corp Information processor, device evaluation system, device evaluation method and computer program
JP2015130170A (en) * 2014-01-06 2015-07-16 富士通株式会社 Method and computing system enabling method for injecting hardware faults into running applications

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013546077A (en) * 2011-05-09 2013-12-26 ヒョンダイ モーター カンパニー Exception processing test apparatus and method
US9047401B2 (en) 2011-05-09 2015-06-02 Hyundai Motor Company Exception handling test apparatus and method
EP2709016A4 (en) * 2011-05-09 2016-03-30 Hyundai Motor Co Ltd DEVICE FOR TESTING THE TREATMENT OF EXCEPTIONS AND ASSOCIATED METHOD
JP2014157506A (en) * 2013-02-15 2014-08-28 Omron Corp Controller, information processing device, and program
US9984244B2 (en) 2013-02-15 2018-05-29 Omron Corporation Controller, information processing apparatus, and recording medium
JP2014174592A (en) * 2013-03-06 2014-09-22 Nec Corp Information processor, device evaluation system, device evaluation method and computer program
JP2015130170A (en) * 2014-01-06 2015-07-16 富士通株式会社 Method and computing system enabling method for injecting hardware faults into running applications

Similar Documents

Publication Publication Date Title
US20190294536A1 (en) Automated software deployment and testing based on code coverage correlation
US8930912B2 (en) Method and system for performing software verification
US6002869A (en) System and method for automatically testing software programs
CA3053003C (en) Generalized virtualization platform for systems using hardware abstraction software layers
US20050278576A1 (en) Methods, Systems, and media for management of functional verification
US20130326486A1 (en) Keyword based software testing system and method
US20140331209A1 (en) Program Testing Service
US10521335B2 (en) Context-based device testing
JP6283096B2 (en) Program test service
US7243059B2 (en) Simulation of hardware based on smart buffer objects
US9842044B2 (en) Commit sensitive tests
US8762781B2 (en) Method and apparatus useful in manufacturing test case operations
US20140331205A1 (en) Program Testing Service
JP2009104490A (en) Program testing equipment
CN103713977B (en) Microprocessor IP (internet protocol) kernel comparison and verification implementation method
JP6771413B2 (en) Software verification device and software verification program
US7831962B2 (en) Testing subsystems on platforms for software applications
US7873498B2 (en) Remote hardware inspection system and method
KR20120051933A (en) System and method for evaluating performance robot software componet based on simulator
CN111628910B (en) TTCN software testing system of cellular communication terminal protocol stack
JP4957521B2 (en) Software partial test system, method and program used therefor
CN106656684B (en) Grid resource reliability monitoring method and device
CN119692262A (en) A method for automating single-thread operation in a digital IC verification environment
US9582410B2 (en) Testing software on a computer system
JP2010182218A (en) Software behavior analysis system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20110104