JP2019101801A - Interface aggregation device and interface management method - Google Patents
Interface aggregation device and interface management method Download PDFInfo
- Publication number
- JP2019101801A JP2019101801A JP2017232547A JP2017232547A JP2019101801A JP 2019101801 A JP2019101801 A JP 2019101801A JP 2017232547 A JP2017232547 A JP 2017232547A JP 2017232547 A JP2017232547 A JP 2017232547A JP 2019101801 A JP2019101801 A JP 2019101801A
- Authority
- JP
- Japan
- Prior art keywords
- test
- interface
- test case
- aggregation device
- api
- 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
Landscapes
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
【課題】サービスの開発及び改善のサイクルの速度に合わせて、継続的にサービスの提供するために必要な情報を自動的に設定する。【解決手段】アプリケーション及びサービスの間のAPI(インタフェース)を介したデータの入出力を制御するAPI集約装置であって、サービスは種類が異なる複数のAPIを有し、API集約装置は、任意のサービスが有する複数のAPIの中からターゲットAPIの代替APIを特定するためのテストの実行契機を検知した場合、フレームワーク情報に基づいて複数のテストケースを生成し、複数のテストケースを解析し、解析の結果に基づいて削除可能なテストケースを特定し、特定されたテストケースを削除し、テストケースに基づいてテストを実行し、テストの実行結果に基づいて代替APIを特定し、互換情報に登録する。【選択図】図1PROBLEM TO BE SOLVED: To automatically set information necessary for continuously providing a service in accordance with the speed of a cycle of service development and improvement. Kind Code: A1 An API aggregation device that controls input/output of data via an API (interface) between an application and a service, wherein a service has a plurality of APIs of different types, and the API aggregation device is an arbitrary device. When a trigger to execute a test for identifying an alternative API of a target API is detected from among a plurality of APIs included in a service, a plurality of test cases are generated based on the framework information, the plurality of test cases are analyzed, Identify the test cases that can be deleted based on the analysis results, delete the specified test cases, execute the test based on the test cases, specify the alternative API based on the test execution results, register. [Selection diagram] Figure 1
Description
本発明は、API(インタフェース)を介したアプリケーション及びマイクロサービスの接続を管理するAPI集約装置及びAPI管理方法に関する。 The present invention relates to an API aggregation device and API management method for managing connection of applications and microservices via an API (interface).
近年のビジネス環境では、開発部門及び運用部門が連携し、サービスの開発及び改善を継続的に行うDevOpsが注目されている。 In recent business environments, DevOps, in which development departments and operation departments cooperate to continuously develop and improve services, are attracting attention.
DevOpsの一つとして、マイクロサービスという考え方がある。この考え方では、サービスを複数の小さなマイクロサービスに分割し、各マイクロサービスを個別に開発する。開発対象のマイクロサービスは小さい単位のシステムであるため、マイクロサービス開発及び改善のサイクルを短くできる。各マイクロサービスはAPIを介して連携することによって、システムとして一貫性した動作が可能となる。 One of the DevOps is the idea of microservices. In this view, the service is divided into multiple small microservices, and each microservice is developed individually. Since the microservices to be developed are small unit systems, the cycle of microservice development and improvement can be shortened. The microservices cooperate with each other through an API to enable consistent operation as a system.
マイクロサービスの開発及び改善のサイクルは短いため、APIのバージョンの更新が頻繁に発生する。頻繁なAPIのバージョンの更新に伴ってAPIの互換性が失われ、サービス全体が正常に動作しない可能性がある。 Since the cycle of development and improvement of microservices is short, API version updates frequently occur. With frequent API version updates, API incompatibility may be lost and the entire service may not work properly.
APIの機能不全を解決するための手段として特許文献1に記載の技術が知られている。特許文献1には、「API集約装置24は、通信システムのアプリケーション25aとイネーブラ27a〜27dとの間にAPI26a、28a〜28dを介して接続される。API集約装置24は、アプリケーション25aから所望のイネーブラ27bへAPI26b、28bを介してリクエスト情報を送信した際に、当該リクエスト情報の内容に適合したレスポンス情報が返信されない機能不全の場合、当該機能不全のイネーブラ27bに予め対応付けられた対応イネーブラ27cからのレスポンス情報を、当該対応イネーブラ27cに繋がる対応API28cを介して当該アプリケーション25aへ返信するAPI互換処理を行う。」ことが記載されている。
The technique described in
特許文献1の技術では、API及び対応APIを予め対応づけて管理する必要がある。DevOpsでは、APIのバージョンの更新が頻繁に発生するため、API及び対応APIの登録を頻繁に行う必要がある。したがって、管理コストがかかり、また、サービスの開発及び改善のサイクルの速度に対応できない可能性がある。
In the technology of
上記課題を解決するためには、サービスの開発及び改善のサイクルの速度に合わせて、継続的にサービスの提供するために必要な情報を動的に設定する必要がある。 In order to solve the above-mentioned problems, it is necessary to dynamically set the information necessary for continuously providing the service according to the speed of the service development and improvement cycle.
本発明は、APIのバージョンの更新が頻繁に発生する場合でも、サービスの開発及び改善のサイクルの速度に合わせて、継続的にサービスの提供するために必要な情報を自動的に設定する装置及び方法を提供することを目的とする。 The present invention is an apparatus for automatically setting information required to continuously provide services in accordance with the speed of service development and improvement cycles, even if API version updates occur frequently. Intended to provide a method.
本願において開示される発明の代表的な一例を示せば以下の通りである。すなわち、少なくとも一つのアプリケーション及び複数のサービスの間のインタフェースを介したデータの入出力を制御するインタフェース集約装置であって、前記複数のサービスの各々は、種類が異なる複数のインタフェースを有し、前記インタフェース集約装置は、プロセッサ、前記プロセッサに接続されるメモリ、及び前記プロセッサに接続されるネットワークインタフェースを備え、テストの要件を定義するテストケースを生成するために用いられるフレームワーク情報、及び任意のインタフェースと互換性を有する代替インタフェースを管理するための互換情報を保持し、任意のサービスが有する前記複数のインタフェースの中からターゲットインタフェースの前記代替インタフェースを特定するためのテストの実行契機を検知した場合、前記フレームワーク情報に基づいて複数のテストケースを生成し、前記複数のテストケースを解析し、前記解析の結果に基づいて削除可能な少なくとも一つのテストケースを特定して、前記特定された少なくとも一つのテストケースを削除し、前記複数のテストケースに基づいてテストを実行し、前記テストの実行結果に基づいて前記ターゲットインタフェースの代替インタフェースを特定し、前記ターゲットインタフェース及び前記ターゲットインタフェースの代替インタフェースを対応づけたデータを前記互換情報に登録することを特徴とする。 The following is a representative example of the invention disclosed in the present application. That is, an interface aggregation device that controls input / output of data via an interface between at least one application and a plurality of services, wherein each of the plurality of services has a plurality of interfaces of different types, The interface aggregation device comprises a processor, a memory connected to the processor, and a network interface connected to the processor, and framework information used to generate a test case defining test requirements, and any interface Maintaining compatibility information for managing an alternative interface compatible with the above, and detecting an execution opportunity of a test for specifying the alternative interface of the target interface among the plurality of interfaces possessed by any service In the case, a plurality of test cases are generated based on the framework information, the plurality of test cases are analyzed, and at least one test case that can be deleted is identified based on a result of the analysis, and the specified At least one test case is deleted, a test is executed based on the plurality of test cases, an alternative interface of the target interface is specified based on the execution result of the test, and an alternative interface of the target interface and the target interface Are registered in the compatible information.
本発明の一形態によれば、インタフェース集約装置は、サービスの開発及び改善のサイクルの速度に合わせて、互換情報を自動的に設定できる。上記した以外の課題、構成及び効果は、以下の実施例の説明により明らかにされる。 According to one aspect of the present invention, the interface aggregation device can automatically set compatibility information in accordance with the speed of the service development and improvement cycle. Problems, configurations, and effects other than those described above will be clarified by the description of the following embodiments.
以下、本発明の実施例を、図面を用いて説明する。ただし、本発明は以下に示す実施の形態の記載内容に限定して解釈されるものではない。本発明の思想ないし趣旨から逸脱しない範囲で、その具体的構成を変更し得ることは当業者であれば容易に理解される。 Hereinafter, embodiments of the present invention will be described using the drawings. However, the present invention should not be construed as being limited to the description of the embodiments below. Those skilled in the art can easily understand that the specific configuration can be changed without departing from the spirit or the spirit of the present invention.
以下に説明する発明の構成において、同一又は類似する構成又は機能には同一の符号を付し、重複する説明は省略する。 In the configurations of the invention described below, the same or similar configurations or functions are denoted by the same reference numerals, and overlapping descriptions will be omitted.
本明細書等における「第1」、「第2」、「第3」等の表記は、構成要素を識別するために付するものであり、必ずしも、数又は順序を限定するものではない。 In the present specification and the like, the notations “first”, “second”, “third” and the like are used to identify the constituent elements, and the number or order is not necessarily limited.
図面等において示す各構成の位置、大きさ、形状、及び範囲等は、発明の理解を容易にするため、実際の位置、大きさ、形状、及び範囲等を表していない場合がある。したがって、本発明では、図面等に開示された位置、大きさ、形状、及び範囲等に限定されない。 The positions, sizes, shapes, ranges, and the like of the components shown in the drawings and the like may not represent actual positions, sizes, shapes, ranges, and the like in order to facilitate understanding of the invention. Accordingly, the present invention is not limited to the position, size, shape, range, and the like disclosed in the drawings and the like.
図1は、実施例1の計算機システムの構成例を示す図である。図2は、実施例1のAPI集約装置100のハードウェア構成の一例を示す図である。
FIG. 1 is a diagram illustrating an example of the configuration of a computer system according to a first embodiment. FIG. 2 is a diagram illustrating an example of a hardware configuration of the
計算機システムは、API集約装置100、複数のアプリケーション101、及び複数のマイクロサービス102から構成される。アプリケーション101は計算機(図示省略)上で稼働し、マイクロサービス102は一つ以上の計算機から構成されるシステム(図示省略)上で稼働する。なお、本発明は、アプリケーション101及びマイクロサービス102の種類及び数に限定されない。
The computer system comprises an
API集約装置100、アプリケーション101を実行する計算機、及びマイクロサービス102を実行するシステムは、ネットワークを介して互いに接続される。ネットワークは、WAN(Wide Area Network)及びLAN(Local Area Network)等である。ネットワークの接続形式は、有線又は無線のいずれでもよい。
The
API集約装置100は、一つのアプリケーション101に対して、API集約装置100と接続するための少なくとも一つのAPI105を提供する。また、一つのマイクロサービス102は、API集約装置100と接続するための少なくとも一つのAPI106を提供する。
The
一つのアプリケーション101に提供される複数のAPI105はバージョンが異なり、また、一つのマイクロサービス102が提供する複数のAPI106はバージョンが異なる。なお、API105は、マイクロサービス102毎に異なるバージョンのAPIが含まれてもよい。なお、一つのマイクロサービス102が提供する複数のAPI106には、API106のバージョンを取得するためのAPIが含まれる。
The plurality of
本実施例のAPI集約装置100は、任意のAPI106(ターゲットAPI106)と互換性を有するAPIである代替API106を特定するためのテストの実行契機を検知した場合、テストの要件(テストの内容)を定義するテストケースを生成する。また、API集約装置100は、生成されたテストケースに基づいてテストを実行し、実行結果に基づいて代替API106を特定する。API集約装置100は、ターゲットAPI106及び代替API106を対応づけて、後述する互換情報121に登録する。
If the
また、本実施例のAPI集約装置100は、アプリケーション101から任意のマイクロサービス102のAPI106に対するリクエストを受信した場合、必要に応じて互換情報121を参照し、指定されたAPI106又は代替API106に当該リクエストを送信する。これによって、マイクロサービス102から正常な応答を得ることができるため、継続的なサービスの提供を実現できる。
Further, when the
API集約装置100は、図2に示すようにハードウェアとして、プロセッサ201、メモリ202、及びネットワークインタフェース203を有する。プロセッサ201、メモリ202、及びネットワークインタフェース203は、内部バスを介して互いに接続される。
The
プロセッサ201は、メモリ202に格納されるプログラムを実行する演算装置である。プロセッサ201がプログラムにしたがって処理を実行することによって、特定の機能を実現する機能部(モジュール)として動作する。以下の説明では、機能部を主語に処理を説明する場合、プロセッサ201が当該機能部を実現するプログラムを実行していることを表す。
The
メモリ202は、プロセッサ201が実行するプログラム及びプログラムが使用する情報を格納する記憶装置である。また、メモリ202は、プログラムが一時的に使用するワークエリアを含む。
The
ネットワークインタフェース203は、ネットワークを介して他の装置と接続するインタフェースである。
The
なお、API集約装置100は、HDD(Hard Disk Drive)及びSSD(Solid State Drive)等の記憶装置を有してもよい。また、API集約装置100は、キーボード、マウス、及びタッチパネル等の入力装置、並びに、ディスプレイ及びプリンタ等の出力装置と接続するインタフェースを有してもよい。
The
なお、API集約装置100には、ネットワークインタフェース203を介して図示しない管理用端末が接続される。
A management terminal (not shown) is connected to the
ここで、メモリ202に格納されるプログラム及び情報について説明する。メモリ202は、受信部110、送信部111、互換操作制御部112、テスト設定部113、テスト制御部114、及び代替API判定部115を実現するプログラムを格納する。また、メモリ202は、フレームワーク情報120、互換情報121、及び結果情報122を格納する。
Here, programs and information stored in the
フレームワーク情報120は、テストケースのひな形であるフレームワークを管理するための情報である。フレームワーク情報120のデータ構造の詳細は図3を用いて説明する。互換情報121は、API106及び代替API106の対応付けを管理するための情報である。互換情報121のデータ構造の詳細は図4を用いて説明する。結果情報122は、テスト結果を格納する情報である。結果情報122のデータ構造の詳細は、図5A及び図5Bを用いて説明する。
The
受信部110は、外部装置から送信されたデータの受信処理を実行する。例えば、受信部110は、アプリケーション101からマイクロサービス102に対するリクエストを受信し、また、マイクロサービス102から応答を受信する。
The receiving
送信部111は、外部装置に対するデータの送信処理を実行する。例えば、送信部111は、受信したリクエストをマイクロサービス102に送信し、また、受信した応答をアプリケーション101に送信する。
The
互換操作制御部112は、所定のAPI106に対するリクエストの送信を制御する。互換操作制御部112は、リクエストに対するAPI106からの応答が正常であるか否かを判定し、応答が正常でない場合、代替API106にリクエストを送信する。互換操作制御部112は、参照部131及び互換操作部132を含む。
The compatible
参照部131は、互換情報121を参照し、代替API106を特定する。互換操作部132は、受信したリクエストを代替API106宛てのリクエストに変換し、出力する。
The reference unit 131 refers to the
テスト設定部113は、代替API106を特定するためのテストのテストケースを生成する。本実施例では、一つのテストに対して一つのテストケースが生成される。テスト設定部113は、テストケース生成部141及び呼出部142を含む。
The
テストケース生成部141は、フレームワーク情報120に基づいてテストケースを生成する。呼出部142は、テスト制御部114を呼び出す。
The test case generation unit 141 generates a test case based on the
テスト制御部114は、テストケースを解析し、解析結果に基づいてテストケースを削除する。テスト制御部114は、テストケースに基づいてテストを実行し、実行結果を結果情報122に格納する。また、テスト制御部114は、テストを実行するためのテスト環境を構築する必要がある場合、テスト環境を構築する。テスト制御部114は、テストケース調整部151、テスト実行部152、及びテスト環境構築部153を含む。
The
テストケース調整部151は、テストケースを解析し、解析結果に基づいて削除可能なテストを特定し、特定されたテストケースを削除する。テスト実行部152は、テストケースに基づいて、代替API106を特定するためのテストを実行する。テスト環境構築部153はテスト環境を構築する。
The test case adjustment unit 151 analyzes the test case, identifies a deletable test based on the analysis result, and deletes the identified test case. The test execution unit 152 executes a test for identifying the
代替API判定部115は、結果情報122に基づいて代替API106を特定し、特定された代替API106に関する情報を互換情報121に登録する。
The alternative
なお、API集約装置100が有する各機能部については、複数の機能部を一つの機能部にまとめてもよいし、一つの機能部を機能毎に複数の機能部に分けてもよい。
In addition, about each function part which
図3は、実施例1のフレームワーク情報120のデータ構造の一例を示す図である。
FIG. 3 is a view showing an example of the data structure of the
フレームワーク情報120は、テスト種別301及び入力値種別302から構成されるエントリを格納する。なお、エントリには、テスト種別301及び入力値種別302以外のフィールドが含まれてもよい。
The
テスト種別301は、テストの種別を格納するフィールドである。例えば、テスト種別301には、データ更新、データ参照、及びデータ削除等のテストの種別を示す値が格納される。
The
入力値種別302は、テスト種別301に対応するテストにおいて入力される値の種別を格納するフィールドである。入力値種別302には、例えば、変数又は項目の名称等が格納される。
The
なお、フレームワーク情報120には、システム構成及びマイクロサービス102の条件等を管理するためのテーブルが含まれてもよい。
The
図4は、実施例1の互換情報121のデータ構造の一例を示す図である。
FIG. 4 is a view showing an example of the data structure of the
互換情報121は、代替元401及び代替先402から構成されるエントリを格納する。
The
代替元401は、代替元となるAPI106を特定するためのフィールド群であり、サービス名411、API名412、及びAPIバージョン413を含む。
The
サービス名411は、API106を提供するマイクロサービス102の名称を格納するフィールドである。なお、マイクロサービス102を識別できる情報であれば、名称以外の値でもよい。
The
API名412は、API106の名称を格納するフィールドである。なお、API106を識別できる情報であれば、名称以外の値でもよい。
The
APIバージョン413は、API106のバージョンを格納するフィールドである。
The
代替先402は、代替元401に対応するAPI106の代替API106を特定するためのフィールド群であり、サービス名421、API名422、及びAPIバージョン423を含む。サービス名421、API名422、及びAPIバージョン423は、サービス名411、API名412、及びAPIバージョン413と同様のフィールドである。
The
図5A及び図5Bは、実施例1の結果情報122のデータ構造の一例を示す図である。なお、図5及び図5Bに示すテーブルは、実際には一つのテーブルであるが説明のため二つに分けている。
5A and 5B are diagrams showing an example of the data structure of the
結果情報122は、API名501、APIバージョン502、実行時刻503、テスト種別504、処理結果505、実行回数506、成功結果507、及び失敗結果508から構成されるエントリを格納する。
The
API名501及びAPIバージョン502は、API名412及びAPIバージョン413と同様のフィールドである。また、テスト種別504は、テスト種別301と同様のフィールドである。
The
実行時刻503は、テストの開始時刻を格納するフィールドである。なお、実行時刻503には、テストの終了時刻が格納されてもよい。
The
処理結果505は、最新のテストの実行結果を格納するフィールドである。図6Aに示す処理結果505には、応答の意味を表すステータスコードが格納される。
The
実行回数506は、API名501、APIバージョン502、及びテスト種別504によって特定されるテストケースに基づくテストの実行回数を格納するフィールド群である。実行回数506は、成功511及び失敗512を含む。成功511は、実行結果が成功である回数を格納するフィールドである。失敗512は、実行結果が失敗である回数を格納するフィールドである。
The number of times of
成功結果507は、テストの実行結果が成功である場合の予測値及び出力値の関係を示すフィールド群である。成功結果507は、予測値513及び結果514を含む。予測値513はテストケースに含まれる出力値の予測値を格納するフィールドである。結果514はテストを実行することによって取得された出力値を格納するフィールドである。
The success result 507 is a group of fields indicating the relationship between the predicted value and the output value when the test execution result is successful. The success result 507 includes the predicted
失敗結果508は、テストの実行結果が失敗である場合の予測値及び出力値の関係を示すフィールド群である。失敗結果508は、予測値515及び結果516を含む。予測値515及び結果516は、予測値513及び結果514と同様のフィールドである。
The
図6は、実施例1のAPI集約装置100が、新規API106が追加された場合に実行する処理の一例を説明するフローチャートである。図7は、実施例1のAPI集約装置100によって生成されるテストケースの一例を示す図である。図8は、実施例1のマイクロサービス102のネストの一例を示す図である。
FIG. 6 is a flowchart illustrating an example of processing executed when the
API集約装置100は、管理用端末から新規API106の追加通知を受信する(ステップS101)。本実施例のAPI集約装置100は、新規API106の追加通知の受信を、代替API106を特定するためのテストの実行契機として検知する。このとき、API集約装置100は、テスト設定部113を呼び出す。追加通知には、マイクロサービス102及びAPI106を特定するための情報が含まれる。
The
テスト設定部113のテストケース生成部141は、新規API106の代替API106を特定するためのテストのテストケースを生成する(ステップS102)。テストケースの生成方法は公知の技術を用いればよい。例えば、以下のような生成方法が考えられる。
The test case generation unit 141 of the
テストケース生成部141は、フレームワーク情報120及び結果情報122を参照して、マイクロサービス102、API106、及びバージョンの組合せに対して、実行条件、テストの種別、入力値、及び予測値等から構成されるテストケースを生成する。より具体的には、テストケース生成部141は、API名501が追加通知に含まれるAPI106の情報に一致するエントリを検索する。テストケース生成部141は、検索された成功結果507等に基づいて実行条件、入力値、及び予測値を決定することによって、テストケースを生成する。
The test case generation unit 141 refers to the
テストケース生成部141は、例えば、図7に示すようなテストケースのリスト700を生成する。リスト700は、テストケースに対応するエントリを複数含む。エントリは、テスト内容701、入力値702、及び判定フラグ703から構成される。
The test case generation unit 141 generates, for example, a
テスト内容701は、テストの具体的な内容を格納するフィールドである。テスト内容701には、API106を特定する情報及びテスト種別等が格納される。入力値702は、テストの入力値を格納するフィールドである。
The
判定フラグ703は、他のマイクロサービス102にネストされたマイクロサービス102のテストケースの削減処理を実行するか否かを示すフラグを格納するフィールドである。
The
ここで、ネストとは、ルーチン及びデータブロックの中に、他のルーチン及びデータブロックが埋め込まれていることを示す。したがって、マイクロサービス102のネストとは、図8に示すように、あるマイクロサービス102の呼出に他のマイクロサービス102の呼出が含まれることを示す。
Here, nesting indicates that other routines and data blocks are embedded in routines and data blocks. Therefore, the nesting of the
図8では、実線は実際のアプリケーション実行パスを示す。一点鎖線はテストケースの対象となるアプリケーション実行パスを示す。テストケース生成部141は、ネストされたマイクロサービスを呼び出すAPI106の互換性を網羅的に確認するためのテストのテストケースを生成する。しかし、生成されるテストケースの数は膨大となるため、全てのテストケースに基づくテストを実行した場合、処理コストが大きくなる。そこで、本実施例では、テストケースの数を削減するための削減処理が実行される。
In FIG. 8, solid lines indicate actual application execution paths. An alternate long and short dash line indicates an application execution path to be subjected to the test case. The test case generation unit 141 generates a test case of a test for comprehensively checking the compatibility of the
判定フラグ703には、「有」及び「無」のいずれかが格納される。「有」は呼び出し時間及び実績等に基づいてテストケースの削減処理を実行することを示し、「無」は呼び出し時間及び実績等に基づいてテストケースの削減処理を実行しないことを示す。
The
なお、マイクロサービス102のネストの判定は、他のテストケースとの関係を解析することによって判定できる。また、呼出条件が予め設定されている場合、当該呼出条件に基づいて判定することもできる。
The determination of the nesting of the
テスト設定部113の呼出部142は、テストケースが生成された後、テスト制御部114を呼び出す。このとき、呼出部142は、生成されたテストケースをテスト制御部114に出力する。以上がステップS102の説明である。
The
次に、テスト制御部114のテストケース調整部151は、テストケース削減処理を実行する(ステップS103)。テストケース削減処理の詳細は図9を用いて説明する。
Next, the test case adjustment unit 151 of the
次に、テスト制御部114のテスト環境構築部153は、テスト環境構築処理を実行する(ステップS104)。テスト環境構築処理の詳細は図10を用いて説明する。
Next, the test environment construction unit 153 of the
次に、テスト制御部114のテスト実行部152は、生成されたテストケースに基づいてテストを実行する(ステップS105)。また、テスト実行部152は、テストの実行結果に基づいて結果情報122を更新する(ステップS106)。結果情報122は以下のようにして更新される。
Next, the test execution unit 152 of the
テスト実行部152は、API名501、APIバージョン502、テスト種別504の組合せに基づいて、実行したテストに対応するエントリを検索する。実行したテストに対応するエントリが存在しない場合、テスト実行部152は、エントリを追加し、API名501、APIバージョン502、テスト種別504に値を設定する。
The test execution unit 152 searches for an entry corresponding to the executed test based on the combination of the
テスト実行部152は、検索されたエントリ又は追加されたエントリの実行時刻503にテストの開始時刻を設定し、また、処理結果505にテストの実行結果を格納する。また、テスト実行部152は、テストの実行結果に基づいて成功511及び失敗512のいずれか一方の値に1を加算する。
The test execution unit 152 sets the test start time to the
テスト実行部152は、処理結果が成功である場合、成功結果507に値を設定し、処理結果が失敗である場合、失敗結果508に値を設定する。
The test execution unit 152 sets a value to the
テスト制御部114は、結果情報122の更新が完了した後、代替API判定部115を呼び出す。以上がステップS106の処理の説明である。
The
代替API判定部115は、新規API106の代替API106を特定するための代替API判定処理を実行し(ステップS107)、その後、処理を終了する。代替API判定処理の詳細は図11を用いて説明する。
The alternative
図9は、実施例1のテストケース調整部151が実行するテストケース削減処理の一例を説明するフローチャートである。 FIG. 9 is a flowchart illustrating an example of the test case reduction process performed by the test case adjustment unit 151 of the first embodiment.
テストケース調整部151は、テストケースを実行順番にソートし(ステップS201)、テストケースのループ処理を開始する(ステップS202)。具体的には、テストケース調整部151は、実行順にターゲットテストケースを選択する。 The test case adjustment unit 151 sorts the test cases in the order of execution (step S201), and starts loop processing of the test cases (step S202). Specifically, the test case adjustment unit 151 selects target test cases in order of execution.
テストケース調整部151は、ターゲットテストケースがネストのマイクロサービス102のテストケースであるか否かを判定する(ステップS203)。すなわち、ターゲットテストケースが削除候補のテストケースであるか否かが判定される。
The test case adjustment unit 151 determines whether the target test case is a test case of the
具体的には、テストケース調整部151は、ターゲットテストケースに対応するエントリの判定フラグ703が「有」であるか否かを判定する。判定フラグ703が「有」である場合、テストケース調整部151は、ターゲットテストケースがネストされたマイクロサービス102のテストケースであると判定する。
Specifically, the test case adjustment unit 151 determines whether the
ターゲットテストケースがネストのマイクロサービス102のテストケースでないと判定された場合、テストケース調整部151は、ステップS209に進む。
If it is determined that the target test case is not a test case of the nested
ターゲットテストケースがネストのマイクロサービス102のテストケースであると判定された場合、テストケース調整部151は、バージョン及び引数がターゲットテストケースと同一であり、実行順番が後のテストケースが存在し、かつ、二つのテストケースに基づくテストの実行間隔が第1閾値より小さいか否かを判定する(ステップS204)。
When it is determined that the target test case is a test case of the nested
以下の説明では、バージョン及び引数がターゲットテストケースと同一であり、実行順番が後のテストケースを重複テストケースと記載する。また、ステップS204の判定条件を第1削除条件と記載する。 In the following description, a test case whose version and arguments are the same as the target test case and whose execution order is later is described as a duplicate test case. In addition, the determination condition of step S204 is described as a first deletion condition.
なお、テストケース間の実行間隔は実行スケジュールに基づいて判定する方法が考えられる。また、結果情報の実行時刻503に基づいて実行間隔を算出する方法でもよい。
The execution interval between test cases may be determined based on the execution schedule. Alternatively, the execution interval may be calculated based on the
第1削除条件を満たさないと判定された場合、テストケース調整部151は、ステップS206に進む。 If it is determined that the first deletion condition is not satisfied, the test case adjustment unit 151 proceeds to step S206.
第1削除条件を満たすと判定された場合、テストケース調整部151は、重複テストケースを削除する(ステップS205)。その後、テストケース調整部151は、ステップS206に進む。ターゲットテストケース及び重複テストケースに基づくテストは、実行間隔が短い場合、同一の出力値が得られる可能性が高い。したがって、テストケース調整部151は、第1削除条件を満たす場合、重複テストケースを削除する。 If it is determined that the first deletion condition is satisfied, the test case adjustment unit 151 deletes the duplicate test case (step S205). Thereafter, the test case adjustment unit 151 proceeds to step S206. Tests based on the target test case and the duplicate test case are likely to obtain the same output value when the execution interval is short. Therefore, if the first deletion condition is satisfied, the test case adjustment unit 151 deletes the duplicate test case.
なお、重複テストケースが複数存在する場合、テストケース調整部151は、実行間隔が第1閾値より小さい重複テストケースを削除する。 When there are a plurality of duplicate test cases, the test case adjustment unit 151 deletes the duplicate test cases whose execution interval is smaller than the first threshold.
ステップS206では、テストケース調整部151は、ターゲットテストケースに基づくテストの実行結果として成功を示す出力値を得られる確率が第2閾値より大きく、かつ、前回の同一内容のテストケースに基づくテストの終了時刻からの経過時間が第3閾値より小さいか否かを判定する(ステップS206)。なお、第2閾値及び第3閾値は任意に設定できる。例えば、第2閾値は0.7、第3閾値は1時間と設定することができる。 In step S206, the test case adjustment unit 151 has a probability that an output value indicating success as a result of execution of the test based on the target test case is larger than the second threshold, and the test based on the previous test case with the same contents. It is determined whether the elapsed time from the end time is smaller than the third threshold (step S206). The second threshold and the third threshold can be arbitrarily set. For example, the second threshold may be set to 0.7 and the third threshold may be set to one hour.
以下の説明では、テストの実行結果として成功を示す出力値が得られる確率が第2閾値より大きいテストケースを成功テストケースと記載する。また、ステップS206の判定条件を第2削除条件と記載する。 In the following description, a test case in which the probability that an output value indicating success as a result of execution of a test can be obtained is greater than a second threshold is referred to as a success test case. In addition, the determination condition of step S206 is described as a second deletion condition.
第2削除条件を満たすと判定された場合、テストケース調整部151は、ターゲットテストケースを削除し(ステップS208)、その後、ステップS209に進む。前回のテストが完了してからの経過時間が短い成功テストケースに基づくテストを実行した場合、成功を示す出力値を得る可能性が高い。したがって、テストケース調整部151は、第2削除条件を満たす場合、成功テストケースを削除する。 If it is determined that the second deletion condition is satisfied, the test case adjustment unit 151 deletes the target test case (step S208), and then the process proceeds to step S209. If you run a test based on a success test case that has a short elapsed time since the previous test is completed, you are likely to get an output value that indicates success. Therefore, if the second deletion condition is satisfied, the test case adjustment unit 151 deletes the successful test case.
第2削除条件を満たさないと判定された場合、テストケース調整部151は、ターゲットテストケースに基づくテストの実行結果として失敗を示す出力値が得られる確率が第4閾値より大きく、かつ、前回の同一内容のテストケースに基づくテストの終了時刻からの経過時間が第5閾値より小さいか否かを判定する(ステップS207)。なお、閾値は任意に設定できる。例えば、第4閾値は0.85、第5閾値は24時間と設定することができる。 When it is determined that the second deletion condition is not satisfied, the test case adjustment unit 151 has a probability that an output value indicating failure as a result of execution of the test based on the target test case is larger than the fourth threshold and the previous one It is determined whether the elapsed time from the end time of the test based on the test case of the same contents is smaller than the fifth threshold (step S207). The threshold can be set arbitrarily. For example, the fourth threshold may be set to 0.85 and the fifth threshold may be set to 24 hours.
以下の説明では、テストの実行結果として失敗を示す出力値が得られる確率が第4閾値より大きいテストケースを失敗テストケースと記載する。また、ステップS207の判定条件を第3削除条件と記載する。 In the following description, a test case in which the probability that an output value indicating a failure is obtained as a test execution result is larger than a fourth threshold is referred to as a failure test case. In addition, the determination condition of step S207 is described as a third deletion condition.
第3削除条件を満たすと判定された場合、テストケース調整部151は、ターゲットテストケースを削除し(ステップS208)、その後、ステップS209に進む。前回のテストが完了してからの経過時間が短い失敗テストケースに基づくテストを実行した場合、失敗を示す出力値を得る可能性が高い。したがって、テストケース調整部151は、第3削除条件を満たす場合、失敗テストケースを削除する。 If it is determined that the third deletion condition is satisfied, the test case adjustment unit 151 deletes the target test case (step S208), and then the process proceeds to step S209. If you run a test based on a failure test case where the elapsed time since the previous test is completed is short, you are likely to get an output value that indicates failure. Therefore, the test case adjustment unit 151 deletes the failure test case when the third deletion condition is satisfied.
第3削除条件を満たさないと判定された場合、テストケース調整部151はステップS209に進む。 If it is determined that the third deletion condition is not satisfied, the test case adjustment unit 151 proceeds to step S209.
ステップS209では、テストケース調整部151は、ターゲットテストケースの後に実行されるテストケースが存在するか否かを判定する(ステップS209)。 In step S209, the test case adjustment unit 151 determines whether there is a test case to be executed after the target test case (step S209).
ターゲットテストケースの後に実行されるテストケースが存在すると判定された場合、テストケース調整部151は、ステップS202に戻り、新たなターゲットテストケースを選択し、同様の処理を実行する。 If it is determined that there is a test case to be executed after the target test case, the test case adjustment unit 151 returns to step S202, selects a new target test case, and executes the same processing.
ターゲットテストケースの後に実行されるテストケースが存在しないと判定された場合、テストケース調整部151はテストケース削減処理を終了する。 If it is determined that there is no test case to be executed after the target test case, the test case adjustment unit 151 ends the test case reduction process.
本実施例では、前述のような削除条件に基づいてテストケースの数を減らすことによって、テスト時間の短縮及びテストに使用する計算機リソースの削減が可能となる。これによって、サービスの開発及び改善のサイクルの速度に合わせたテストの実行が可能となる。 In this embodiment, by reducing the number of test cases based on the deletion condition as described above, it is possible to shorten the test time and reduce the computer resources used for the test. This allows the execution of tests tailored to the speed of the service development and improvement cycle.
図10は、実施例1のテスト環境構築部153が実行するテスト環境構築処理の一例を説明するフローチャートである。 FIG. 10 is a flowchart illustrating an example of the test environment construction process executed by the test environment construction unit 153 of the first embodiment.
テスト環境構築部153は、生成されたテストケースを参照し(ステップS301)、テストケースに基づいて実行されるテストが参照系のテストのみであるか否かを判定する(ステップS302)。 The test environment construction unit 153 refers to the generated test case (step S301), and determines whether the test executed based on the test case is only the test of the reference system (step S302).
具体的には、テスト環境構築部153は、リスト700に登録された全てのエントリのテスト内容701がデータ参照であるか否かを判定する。リスト700に登録された全てのエントリのテスト内容701がデータ参照である場合、テスト環境構築部153は、実行されるテストが参照系のテストのみであると判定する。
Specifically, the test environment construction unit 153 determines whether the
テストが参照系のテストのみであると判定された場合、テスト環境構築部153は処理を終了する。 If it is determined that the test is only the test of the reference system, the test environment construction unit 153 ends the process.
テストが参照系以外のテストを含むと判定された場合、テスト環境構築部153はテスト環境を構築する(ステップS303)。 If it is determined that the test includes a test other than the reference system, the test environment construction unit 153 constructs a test environment (step S303).
テスト環境の構築方法は、公知の技術を用いればよいため詳細な説明は省略する。なお、テスト環境が構築された場合、テスト制御部114は、更新系及び参照系のテストをテスト環境で実行するように制御してもよいし、更新系のテストはテスト環境で実行し、参照系のテストは実際のシステム環境で実行するように制御してもよい。
A method of constructing a test environment may be a known technique, and therefore detailed description will be omitted. When the test environment is established, the
次に、テスト環境構築部153は、テストが完了したか否かを判定する(ステップS304)。例えば、テスト環境構築部153は、テスト実行部152からテストの完了通知を受け付けた場合、テストが完了したと判定する。 Next, the test environment construction unit 153 determines whether the test has been completed (step S304). For example, when the test environment construction unit 153 receives a test completion notification from the test execution unit 152, the test environment construction unit 153 determines that the test is completed.
テストが完了していないと判定された場合、テスト環境構築部153は、テストが完了するまで待ち状態に移行する。 If it is determined that the test is not completed, the test environment construction unit 153 shifts to a waiting state until the test is completed.
テストが完了したと判定された場合、テスト環境構築部153は、テスト環境を破棄し(ステップS305)、その後、テスト環境構築処理を終了する。 If it is determined that the test is completed, the test environment construction unit 153 discards the test environment (step S305), and then ends the test environment construction process.
図11は、実施例1の代替API判定部115が実行する代替API判定処理の一例を説明するフローチャートである。
FIG. 11 is a flowchart illustrating an example of the alternative API determination process performed by the alternative
代替API判定部115は、結果情報を参照して、実行されたテストに対応するエントリの値を読み出す(ステップS401)。例えば、代替API判定部115は、現在時刻と実行時刻503との差が閾値より小さいエントリを、実行されたテストに対応するエントリとして特定できる。
The alternative
代替API判定部115は、エントリで示されたAPI106のループ処理を開始する(ステップS402)。
The alternative
具体的には、代替API判定部115は、実行したテストに対応するエントリの中から候補エントリを一つ選択する。また、代替API判定部115は、新規API106のテストケースの入力値及び出力値と、候補エントリに対応するAPI106のテストケースの入力値及び出力値とを比較する。以下の説明では、候補エントリに対応するAPI106を候補API106と記載する。
Specifically, the alternative
代替API判定部115は、候補API106のテストケースの入力値及び出力値が、新規API106のテストケースの入力値及び出力値と完全に一致しているか否かを判定する(ステップS403)。
The alternative
候補API106のテストケースの入力値及び出力値が、新規API106のテストケースの入力値及び出力値と完全に一致していると判定された場合、代替API判定部115は、新規API106の代替API106として候補API106を互換情報121に登録する(ステップS404)。その後、代替API判定部115はステップS406に進む。
When it is determined that the input value and the output value of the test case of the
具体的には、代替API判定部115は、互換情報121にエントリを追加し、追加されたエントリの代替元401に新規API106の情報を設定する。また、代替API判定部115は、追加されたエントリの代替先402に候補API106の情報を設定する。
Specifically, the alternative
候補API106のテストケースの入力値及び出力値が、新規API106のテストケースの入力値及び出力値と完全に一致していないと判定された場合、代替API判定部115は、候補API106への代替が可能であるか否かを判定する(ステップS405)。
If it is determined that the input value and the output value of the test case of the
具体的には、代替API判定部115は、判定ルールを適用し、新規API106及び候補API106のテストケースの入力値及び出力値のいずれかを置き換えて、同じ出力値が得られるか否かを判定する。例えば、以下に示す(1)、(2)、(3)に示すような判定ルールが考えられる。
Specifically, the alternative
(1)新規API106の引数の数(テストの入力値の数)が候補API106の引数の数より多い場合、代替API判定部115は、追加された引数にNullを入力し、新規API106のテストケースの出力値を取得する。代替API判定部115は、取得された出力値が候補API106のテストケースの出力値と同一である場合、候補API106への代替が可能であると判定する。
(1) When the number of arguments of the new API 106 (the number of test input values) is larger than the number of arguments of the
例えば、候補API106の引数がint_a及びstring_bであり、新規API106の引数がint_a、string_b、及びstring_cである場合、代替API判定部115は、string_cにNullを入力した新規API106のテストケースの出力値が、候補API106のテストケースの出力値と一致するか否かを判定する。
For example, when the arguments of the
(2)新規API106の変数及び候補API106の変数が異なる場合、代替API判定部115は、候補API106の変数を新規API106の変数に置き換えた候補API106のテストケースの出力値を取得する。代替API判定部115は、取得された出力値が新規API106のテストケースの出力値と同一である場合、候補API106への代替が可能であると判定する。
(2) When the variable of the
例えば、候補API106の変数がint_a及びstring_bであり、新規API106の変数がint_x及びstring_bである場合、代替API判定部115は、int_aをint_xに置き換えた候補API106のテストケースの出力値が新規API106のテストケースの出力値と同一であるか否かを判定する。
For example, when the variables of the
(3)新規API106の出力値の形式が異なる場合、代替API判定部115は、候補API106の出力値の形式を新規API106の出力値の形式に変換した候補API106のテストケースの出力値を取得する。代替API判定部115は、取得された出力値が新規API106のテストケースの出力値と同一である場合、候補API106への代替が可能であると判定する。
(3) When the format of the output value of the
例えば、候補API106の出力値がint_c=2及びstring_d=100であり、新規API106の出力値がint_c=2及びint_d=100である場合、代替API判定部115は、string型の値をint型の値に変換した候補API106のテストケースの出力値が新規API106のテストケースの出力値と同一であるか否かを判定する。
For example, when the output values of the
本実施例の代替API判定部115には前述したような判定ルールが予め設定されているものとする。なお、外部から判定ルールが入力されてもよい。この場合、メモリ202に判定ルールが格納され、代替API判定部115は、当該判定ルールを参照し、判定を行う。
It is assumed that the above-described determination rule is set in advance in the alternative
候補API106への代替が可能でないと判定された場合、代替API判定部115はステップS406に進む。
If it is determined that substitution to the
候補API106への代替が可能であると判定された場合、代替API判定部115はステップS404に進む。
If it is determined that the
ステップS406では、代替API判定部115は、ステップS401で取得した全てのエントリについて処理が完了したか否かを判定する(ステップS406)。
In step S406, the alternative
ステップS401で取得した全てのエントリについて処理が完了していないと判定された場合、代替API判定部115は、ステップS402に戻り、新たな候補エントリを選択し、同様の処理を実行する。
If it is determined in step S401 that the process has not been completed for all the acquired entries, the alternative
ステップS401で取得した全てのエントリについて処理が完了したと判定された場合、代替API判定部115は代替API判定処理を終了する。
If it is determined in step S401 that the process has been completed for all the acquired entries, the alternative
次に、アプリケーション101からリクエストを受信した場合のAPI集約装置100の処理について説明する。図12は、実施例1のAPI集約装置100がアプリケーション101からリクエストを受信した場合に実行する処理を説明するフローチャートである。
Next, processing of the
API集約装置100の受信部110は、アプリケーション101からリクエストを受信する(ステップS501)。リクエストには、マイクロサービス102を特定するための情報、API106のバージョン、メソッド、ヘッダ情報、及び認証情報等が含まれる。マイクロサービス102を特定するための情報は例えばURLが考えられる。
The receiving
次に、API集約装置100の互換操作制御部112は、送信部111を介して、指定されたマイクロサービス102のAPI106にリクエストを送信する(ステップS502)。
Next, the compatible
次に、API集約装置100の受信部110は、マイクロサービス102から応答を受信する(ステップS503)。受信部110は応答を互換操作制御部112に出力する。
Next, the receiving
次に、API集約装置100の互換操作制御部112は、受信した応答が正常な応答であるか否かを判定する(ステップS504)。
Next, the compatible
具体的には、互換操作制御部112は、応答に含まれるステータスコードに基づいて、受信した応答が正常な応答であるか否かを判定する。
Specifically, compatible
受信した応答が正常な応答であると判定された場合、互換操作制御部112は、送信部111を介して、アプリケーション101に受信した応答を送信する(ステップS505)。その後、互換操作制御部112は処理を終了する。
If it is determined that the received response is a normal response, the compatible
受信した応答が正常な応答でないと判定された場合、互換操作制御部112は、互換情報121に、リクエストを送信したAPI106の代替API106が登録されているか否かを判定する(ステップS506)。
If it is determined that the received response is not a normal response, the compatible
具体的には、互換操作制御部112の参照部131は、互換情報121の代替元401を参照し、リクエストの送信先のAPI106と一致する情報が設定されたエントリを検索する。エントリが存在する場合、参照部131は、リクエストを送信したAPI106の代替API106が登録されていると判定する。
Specifically, the reference unit 131 of the compatible
リクエストを送信したAPI106の代替API106が登録されていると判定された場合、互換操作制御部112の互換操作部132は、検索されたエントリの代替先402に対応する代替API106にリクエストを送信する(ステップS507)。互換操作制御部112は、マイクロサービス102から応答を受信した後、互換操作制御部112は、ステップS505に進む。
When it is determined that the
リクエストを送信したAPI106の代替API106が登録されていないと判定された場合、互換操作制御部112は、テスト設定部113に対して代替API選択処理の実行を指示する(ステップS508)。当該指示には、リクエストを送信したAPI106の名称及びバージョン等が含まれる。代替API選択処理の詳細は図13を用いて説明する。本実施例のAPI集約装置100は、正常でない応答を送信したAPI106の代替API106が互換情報121に登録されていないことを、代替API106を特定するためのテストの実行契機として検知する。
If it is determined that the
互換操作制御部112は、代替API判定部115から処理の終了通知を受け付けるまで待ち状態に移行する。
The compatible
互換操作制御部112の参照部131は、代替API判定部115から処理の終了通知を受け付けた場合、互換情報121に、リクエストを送信したAPI106の代替API106が登録されているか否かを判定する(ステップS509)。ステップS509の処理はステップS506の処理と同一である。
When the reference unit 131 of the compatible
リクエストを送信したAPI106の代替API106が登録されていると判定された場合、互換操作制御部112の互換操作部132は、ステップS507に進む。
If it is determined that the
リクエストを送信したAPI106の代替API106が登録されていないと判定された場合、互換操作制御部112の互換操作部132は、アプリケーション101にエラー応答を送信する(ステップS510)。その後、互換操作制御部112は処理を終了する。
If it is determined that the
図13は、実施例1のAPI集約装置100が実行する代替API選択処理を説明するフローチャートである。
FIG. 13 is a flowchart illustrating the alternative API selection process executed by the
テスト設定部113は、互換操作制御部112から代替API選択処理の実行指示を受け付ける(ステップS601)。ステップS602からステップS607の処理は、図6で説明したステップS102からステップS107の処理と同一であるため説明を省略する。ただし、リクエストを送信したAPI106に対して処理が実行される。
The
実施例1によれば、API集約装置100は、新規API106の追加時又はAPI106から正常な応答を得られなかった場合に、テストを実行し、テストの実行結果に基づいて、継続的にサービスの提供するために必要な互換情報121を自動的に生成及び更新できる。本実施例では、API集約装置100は、テストケースの数を削減することによって、サービスの開発及び改善のサイクルの速度に合わせたテストを実行できる。
According to the first embodiment, the
したがって、実施例1のAPI集約装置100は、サービスの開発及び改善のサイクルの速度に合わせて、互換情報121を自動的に生成及び更新できる。
Therefore, the
実施例2では、計算機システムの構成が異なる。具体的には、計算機システムは、複数のAPI集約装置100を有する。以下、実施例1との差異を中心に実施例2について説明する。
In the second embodiment, the configuration of the computer system is different. Specifically, the computer system has a plurality of
図14A及び図14Bは、実施例2の計算機システムの構成例を示す図である。なお、アプリケーション101及びAPI集約装置100の間のAPI105、並びにAPI集約装置100及びマイクロサービス102の間のAPI106は、説明の簡単のため省略している。
FIG. 14A and FIG. 14B are diagrams showing configuration examples of the computer system of the second embodiment. The
実施例2の計算機システムは、複数のAPI集約装置100を有する。このような構成にすることによって、API105、106の増加及びリクエストの増加に伴うAPI集約装置100の負荷を分散することができる。なお、実施例2のAPI集約装置100は、実施例1のAPI集約装置100と同一の処理を実行する。
The computer system of the second embodiment has a plurality of
アプリケーション101は、いずれかのAPI集約装置100に対してリクエストを送信する。
The
図14Aに示す計算機システムの場合、API集約装置100がアクセスするマイクロサービス102を予め設定し、また、マイクロサービス102にアクセスするためのURL等をハッシュ関数に入力して算出されるハッシュ値をAPI集約装置100に割り当てる。アプリケーション101は、前述のURL等をハッシュ関数に入力してハッシュ値を算出し、算出されたハッシュ値に基づいて、アクセス先のAPI集約装置100を決定する。API集約装置100は、リクエストを受信した場合、割り当てられたマイクロサービス102のAPI106にリクエストを送信する。
In the case of the computer system shown in FIG. 14A, the
図14Aに示すAPI集約装置100は、担当するマイクロサービス102に関する互換情報121を保持する。なお、API集約装置100の障害に対応するために、各API集約装置100は、少なくとも一つのAPI集約装置100に、互換情報121のコピーを送信する。
The
図14Bに示す計算機システムの場合、API集約装置100は各マイクロサービス102にアクセスできる。図14Bに示す計算機システムは、各API集約装置100にリクエストを振り分けるロードバランサ1300を有する。アプリケーション101は、ロードバランサ1300にリクエストを送信する。ロードバランサ1300は、負荷が分散するように各API集約装置100にリクエストを転送する。転送方式は、ラウンドロビン方式及びプロセッサ201の稼働率に基づく方式等が考えられる。
In the case of the computer system shown in FIG. 14B, the
図14Bに示すAPI集約装置100は、任意のタイミングで、互換情報121のコピーを他のAPI集約装置100に送信する。すなわち、各API集約装置100が保持する互換情報121は、同期するように管理される。
The
実施例2によれば、複数のAPI集約装置100をシステムに含めることによって、API集約装置100の負荷の増大を回避できる。これによって、マイクロサービス102の応答の遅延等のマイクロサービス102を利用したサービスの品質低下を抑止できる。
According to the second embodiment, an increase in the load on the
実施例3では、テストケース削減処理が一部異なる。以下、実施例1との差異を中心に実施例3について説明する。 In the third embodiment, the test case reduction process is partially different. The third embodiment will be described below focusing on the difference from the first embodiment.
実施例3のシステム構成は、実施例1と同一である。また、実施例3のAPI集約装置100のハードウェア構成及びソフトウェア構成は、実施例1のAPI集約装置100と同一である。
The system configuration of the third embodiment is the same as that of the first embodiment. The hardware configuration and the software configuration of the
実施例3の新規API106が追加された場合に実行する処理の流れは、実施例1の処理の流れと同一である。実施例3のアプリケーション101からリクエストを受信した場合に実行する処理の流れは、実施例1の処理の流れと同一である。実施例3では、テストケース削減処理が一部異なる。
The flow of the process performed when the
図15A及び図15Bは、実施例3のテストケース調整部151が実行するテストケース削減処理の一例を説明するフローチャートである。 15A and 15B are flowcharts for explaining an example of the test case reduction process performed by the test case adjustment unit 151 of the third embodiment.
実施例3のステップS201からステップS209の処理は、実施例1の処理と同一である。実施例3では、ステップS209の処理が実行された後、テストケース調整部151は、テストケースを実行した場合のAPI集約装置100の処理負荷を算出する(ステップS251)。
The processes of step S201 to step S209 of the third embodiment are the same as the processes of the first embodiment. In the third embodiment, after the process of step S209 is performed, the test case adjustment unit 151 calculates the processing load of the
テストケースを実行した場合のAPI集約装置100の処理負荷を算出する方法は、公知の方法を用いればよい。例えば、各テストケースに必要なリソース量の合計値をAPI集約装置100の処理負荷として算出する方法、又は各テストケースに必要なリソース量の最大値をAPI集約装置100の処理負荷として算出する方法等が考えられる。
A known method may be used to calculate the processing load of the
テストケース調整部151は、算出された処理負荷が第6閾値より大きいか否かを判定する(ステップS252)。 The test case adjustment unit 151 determines whether the calculated processing load is larger than a sixth threshold (step S252).
算出された処理負荷が第6閾値以下であると判定された場合、テストケース調整部151は、テストケース削減処理を終了する。 If it is determined that the calculated processing load is equal to or less than the sixth threshold, the test case adjustment unit 151 ends the test case reduction process.
算出された処理負荷が第6閾値より大きいと判定された場合、テストケース調整部151はテストケースのループ処理を開始する(ステップS253)。ステップS253の処理はステップS202の処理と同一である。 If it is determined that the calculated processing load is larger than the sixth threshold, the test case adjustment unit 151 starts loop processing of the test case (step S253). The process of step S253 is the same as the process of step S202.
テストケース調整部151は、ターゲットテストケースがネストのマイクロサービス102のテストケースであるか否かを判定する(ステップS254)。ステップS254の処理は、ステップS203の処理と同一である。
The test case adjustment unit 151 determines whether the target test case is a test case of the
ターゲットテストケースがネストのマイクロサービス102のテストケースであると判定された場合、テストケース調整部151は、重複テストケースが存在し、かつ、二つのテストケースに基づくテストの実行間隔が第7閾値より小さいか否かを判定する(ステップS255)。なお、第7閾値は、第1閾値より大きい値が設定される。
If it is determined that the target test case is a test case of the
以下の説明では、重複テストケースが存在し、かつ、二つのテストケースに基づくテストの実行間隔が第7閾値より小さいという条件を第4削除条件と記載する。 In the following description, a condition that a duplicate test case exists and an execution interval of a test based on two test cases is smaller than a seventh threshold is described as a fourth deletion condition.
第4削除条件を満たさないと判定された場合、テストケース調整部151は、ステップS259に進む。 If it is determined that the fourth deletion condition is not satisfied, the test case adjustment unit 151 proceeds to step S259.
第4削除条件を満たすと判定された場合、テストケース調整部151は、重複テストケースを削除する(ステップS256)。 If it is determined that the fourth deletion condition is satisfied, the test case adjustment unit 151 deletes the duplicate test case (step S256).
次に、テストケース調整部151は、テストケースを実行した場合のAPI集約装置100の処理負荷を算出する(ステップS257)。ステップS257の処理負荷の算出方法は、ステップS251の処理負荷の算出方法と同一である。
Next, the test case adjustment unit 151 calculates the processing load of the
テストケース調整部151は、算出された処理負荷が第6閾値より大きいか否かを判定する(ステップS258)。ステップS258の処理はステップS252と同一である。 The test case adjustment unit 151 determines whether the calculated processing load is larger than a sixth threshold (step S258). The process of step S258 is the same as step S252.
算出された処理負荷が第6閾値より大きいと判定された場合、テストケース調整部151は、ステップS259に進む。 If it is determined that the calculated processing load is larger than the sixth threshold, the test case adjustment unit 151 proceeds to step S259.
ステップS258では、テストケース調整部151は、ターゲットテストケースの後に実行されるテストケースが存在するか否かを判定する(ステップS259)。ステップS259の処理は、ステップS209の処理と同一である。 In step S258, the test case adjustment unit 151 determines whether there is a test case to be executed after the target test case (step S259). The process of step S259 is the same as the process of step S209.
算出された処理負荷が第6閾値以下であると判定された場合、テストケース調整部151は、テストケースのループ処理を終了し、その後、テストケース削減処理を終了する。 If it is determined that the calculated processing load is equal to or less than the sixth threshold, the test case adjustment unit 151 ends the loop processing of the test case, and then ends the test case reduction processing.
実施例3によれば、テストケースに基づくテストの実行に伴うAPI集約装置100の負荷を低減できる。これによって、マイクロサービス102の応答の遅延等のマイクロサービス102を利用したサービスの品質低下を抑止できる。
According to the third embodiment, it is possible to reduce the load on the
なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。また、例えば、上記した実施例は本発明を分かりやすく説明するために構成を詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、各実施例の構成の一部について、他の構成に追加、削除、置換することが可能である。 The present invention is not limited to the embodiments described above, but includes various modifications. Further, for example, the above-described embodiments are described in detail in order to explain the present invention in an easy-to-understand manner, and the present invention is not necessarily limited to those having all the described configurations. Further, part of the configuration of each embodiment can be added to, deleted from, or replaced with another configuration.
また、上記の各構成、機能、処理部、処理手段等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、本発明は、実施例の機能を実現するソフトウェアのプログラムコードによっても実現できる。この場合、プログラムコードを記録した記憶媒体をコンピュータに提供し、そのコンピュータが備えるプロセッサが記憶媒体に格納されたプログラムコードを読み出す。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施例の機能を実現することになり、そのプログラムコード自体、及びそれを記憶した記憶媒体は本発明を構成することになる。このようなプログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、CD−ROM、DVD−ROM、ハードディスク、SSD(Solid State Drive)、光ディスク、光磁気ディスク、CD−R、磁気テープ、不揮発性のメモリカード、ROMなどが用いられる。 Further, each of the configurations, functions, processing units, processing means, etc. described above may be realized by hardware, for example, by designing part or all of them with an integrated circuit. The present invention can also be realized by a program code of software that realizes the functions of the embodiment. In this case, a storage medium storing the program code is provided to the computer, and a processor included in the computer reads the program code stored in the storage medium. In this case, the program code itself read from the storage medium implements the functions of the above-described embodiments, and the program code itself and the storage medium storing the same constitute the present invention. As a storage medium for supplying such a program code, for example, a flexible disk, a CD-ROM, a DVD-ROM, a hard disk, an SSD (Solid State Drive), an optical disk, a magneto-optical disk, a CD-R, a magnetic tape, A non-volatile memory card, ROM or the like is used.
また、本実施例に記載の機能を実現するプログラムコードは、例えば、アセンブラ、C/C++、perl、Shell、PHP、Java(登録商標)等の広範囲のプログラム又はスクリプト言語で実装できる。 Further, program code for realizing the functions described in the present embodiment can be implemented by a wide range of programs or script languages such as, for example, assembler, C / C ++, perl, shell, PHP, Java (registered trademark).
さらに、実施例の機能を実現するソフトウェアのプログラムコードを、ネットワークを介して配信することによって、それをコンピュータのハードディスクやメモリ等の記憶手段又はCD−RW、CD−R等の記憶媒体に格納し、コンピュータが備えるプロセッサが当該記憶手段や当該記憶媒体に格納されたプログラムコードを読み出して実行するようにしてもよい。 Furthermore, by distributing the program code of the software for realizing the functions of the embodiment through a network, the program code is stored in a storage means such as a hard disk or a memory of a computer or a storage medium such as a CD-RW or CD-R. A processor included in the computer may read out and execute the program code stored in the storage unit or the storage medium.
上述の実施例において、制御線や情報線は、説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。全ての構成が相互に接続されていてもよい。 In the above-described embodiment, the control lines and the information lines indicate what is considered necessary for the description, and not all the control lines and the information lines in the product are necessarily shown. All configurations may be connected to each other.
100 API集約装置
101 アプリケーション
102 マイクロサービス
105、106 API
110 受信部
111 送信部
112 互換操作制御部
113 テスト設定部
114 テスト制御部
115 代替API判定部
120 フレームワーク情報
121 互換情報
122 結果情報
131 参照部
132 互換操作部
141 テストケース生成部
142 呼出部
151 テストケース調整部
152 テスト実行部
153 テスト環境構築部
201 プロセッサ
202 メモリ
203 ネットワークインタフェース
1300 ロードバランサ
100
110
Claims (14)
前記複数のサービスの各々は、種類が異なる複数のインタフェースを有し、
前記インタフェース集約装置は、
プロセッサ、前記プロセッサに接続されるメモリ、及び前記プロセッサに接続されるネットワークインタフェースを備え、
テストの要件を定義するテストケースを生成するために用いられるフレームワーク情報、及び任意のインタフェースと互換性を有する代替インタフェースを管理するための互換情報を保持し、
任意のサービスが有する前記複数のインタフェースの中からターゲットインタフェースの前記代替インタフェースを特定するためのテストの実行契機を検知した場合、前記フレームワーク情報に基づいて複数のテストケースを生成し、
前記複数のテストケースを解析し、前記解析の結果に基づいて削除可能な少なくとも一つのテストケースを特定して、前記特定された少なくとも一つのテストケースを削除し、
前記複数のテストケースに基づいてテストを実行し、
前記テストの実行結果に基づいて前記ターゲットインタフェースの代替インタフェースを特定し、
前記ターゲットインタフェース及び前記ターゲットインタフェースの代替インタフェースを対応づけたデータを前記互換情報に登録することを特徴とするインタフェース集約装置。 An interface aggregation device for controlling input and output of data via an interface between at least one application and a plurality of services, comprising:
Each of the plurality of services has a plurality of interfaces of different types;
The interface aggregation device
A processor, a memory connected to the processor, and a network interface connected to the processor;
Holds framework information used to generate test cases that define test requirements, and compatibility information to manage alternate interfaces compatible with any interface,
When a trigger for executing a test for identifying the alternative interface of the target interface is detected among the plurality of interfaces of any service, a plurality of test cases are generated based on the framework information,
Analyzing the plurality of test cases, identifying at least one test case that can be deleted based on a result of the analysis, and deleting the at least one test case identified;
Execute a test based on the plurality of test cases,
Identifying an alternate interface of the target interface based on the execution result of the test;
An interface aggregation device, which registers data corresponding to the target interface and an alternative interface of the target interface in the compatible information.
テストケースに基づくテストの実行結果の履歴を管理し、
前記解析の結果に基づいて、前記複数のテストケースの中から削除候補のテストケースを特定し、
前記削除候補のテストケースと同一内容であり、実行順番が後である重複テストケースが存在し、かつ、前記削除候補のテストケース及び前記重複テストケースに基づくテストの実行間隔が第1閾値より小さい場合、前記重複テストケースを削除する第1削除処理を実行し、
前記削除候補のテストケースに基づくテストの実行結果として成功を示す出力値が得られる確率が第2閾値より大きく、かつ、前回の前記削除候補のテストケースと同一内容のテストケースに基づくテストが実行されてからの経過時間が第3閾値より小さい場合、前記削除候補のテストケースを削除する第2削除処理を実行し、
前記削除候補のテストケースに基づくテストの実行結果として失敗を示す出力値が得られる確率が第4閾値より大きく、かつ、前回の前記削除候補のテストケースと同一内容のテストケースに基づくテストが実行されてからの経過時間が第5閾値より小さい場合、前記削除候補のテストケースを削除する第3削除処理を実行することを特徴とするインタフェース集約装置。 The interface aggregation device according to claim 1, wherein
Manage the history of test execution results based on test cases,
Based on the result of the analysis, a test case of deletion candidate is identified among the plurality of test cases,
There is a duplicate test case having the same contents as the deletion candidate test case and having a later execution order, and a test execution interval based on the deletion candidate test case and the duplicate test case is smaller than a first threshold If, execute the first deletion process to delete the duplicate test case,
The probability that an output value indicating success is obtained as the execution result of the test based on the test case for deletion candidate is larger than the second threshold, and the test based on the test case having the same contents as the previous test case for deletion candidate is executed If the elapsed time since the second test is less than the third threshold, the second delete process is executed to delete the test case of the delete candidate,
The probability that an output value indicating failure is obtained as the execution result of the test based on the deletion candidate test case is larger than the fourth threshold, and the test based on the test case having the same contents as the previous deletion candidate test case is executed An interface aggregation device that executes a third deletion process of deleting the test case of the deletion candidate if the elapsed time since being executed is less than a fifth threshold.
前記テストケースは入力値を含み、
前記インタフェース集約装置は、前記代替インタフェースを特定するために使用する判定ルールを保持し、
前記複数のテストケースは、前記ターゲットインタフェースに関する第1テストケース及び第1インタフェースに関する第2テストケースを含み、
前記第1テストケースに基づいてテストを実行することによって第1出力値を取得し、
前記第2テストケースに基づいてテストを実行することによって第2出力値を取得し、
前記第1テストケースの入力値及び前記第1出力値と、前記第2テストケースの入力値及び前記第2出力値とを比較し、
前記第2テストケースの入力値及び前記第2出力値が前記第1テストケースの入力値及び前記第1出力値と一致する場合、前記互換情報に、前記ターゲットインタフェースの代替インタフェースとして前記第1インタフェースを登録し、
前記第2テストケースの入力値及び前記第2出力値が前記第1テストケースの入力値及び前記第1出力値と一部異なる場合、前記判定ルールを適用することによって前記第2出力値が前記第1出力値と一致するか否かを判定し、
前記判定ルールを適用することによって前記第2出力値が前記第1出力値と一致すると判定された場合、前記互換情報に、前記ターゲットインタフェースの代替インタフェースとして前記第1インタフェースを登録することを特徴とするインタフェース集約装置。 The interface aggregation device according to claim 2, wherein
The test case contains input values,
The interface aggregation device holds determination rules used to specify the alternative interface,
The plurality of test cases include a first test case for the target interface and a second test case for the first interface,
Acquiring a first output value by executing a test based on the first test case,
Acquiring a second output value by executing a test based on the second test case,
Comparing the input value and the first output value of the first test case with the input value and the second output value of the second test case,
When the input value and the second output value of the second test case match the input value and the first output value of the first test case, the compatibility information includes the first interface as an alternative interface of the target interface. Register
When the input value of the second test case and the second output value are partially different from the input value of the first test case and the first output value, the second output value may be changed by applying the determination rule. It is determined whether or not it matches the first output value,
When it is determined that the second output value matches the first output value by applying the determination rule, the first interface is registered in the compatibility information as an alternative interface of the target interface. Interface aggregation device.
新規インタフェースの追加通知を受信した場合、及び、前記アプリケーションからのリクエストに対して正常でない応答をしたインタフェースの前記代替インタフェースが前記互換情報に登録されていない場合の少なくともいずれかを、前記テストの実行契機として検知することを特徴とするインタフェース集約装置。 The interface aggregation device according to claim 2, wherein
Execution of the test when at least one of receiving a notification of adding a new interface, and when the alternative interface of the interface which has not responded normally to the request from the application is not registered in the compatibility information An interface aggregation device characterized by being detected as a trigger.
前記アプリケーションから任意のサービスが有する第2インタフェースに対するリクエストを受信した場合、前記第2インタフェースに前記リクエストを送信し、
前記第2インタフェースを介して応答を受信し、
前記受信した応答が正常な応答であるか否かを判定し、
前記受信した応答が正常な応答でないと判定された場合、前記互換情報を参照し、前記第2インタフェースの代替インタフェースに対してリクエストを送信することを特徴とするインタフェース集約装置。 The interface aggregation device according to claim 2, wherein
The request is sent to the second interface when a request for the second interface of any service is received from the application.
Receiving a response via the second interface,
Determining whether the received response is a normal response;
An interface aggregation device characterized by referring to the compatibility information and transmitting a request to an alternative interface of the second interface when it is determined that the received response is not a normal response.
前記第1削除処理、前記第2削除処理、及び前記第3削除処理が実行された後、前記複数のテストケースを実行した場合の処理負荷を算出し、
前記処理負荷が第4閾値より大きい場合、前記削除候補のテストケースを特定し、
前記重複テストケースが存在し、かつ、前記削除候補のテストケース及び前記重複テストケースに基づくテストの実行間隔が第6閾値より小さい場合、前記重複テストケースを削除する第4削除処理を実行し、
前記第6閾値は前記第1閾値より大きいことを特徴とするインタフェース集約装置。 The interface aggregation device according to claim 2, wherein
Calculating processing loads when the plurality of test cases are executed after the first deletion process, the second deletion process, and the third deletion process are executed;
If the processing load is larger than a fourth threshold, a test case of the deletion candidate is identified;
If the duplicate test case exists and the test execution interval based on the delete candidate test case and the duplicate test case is smaller than a sixth threshold, the fourth delete process for deleting the duplicate test case is executed.
The interface aggregation device, wherein the sixth threshold is larger than the first threshold.
前記全てのテストケースが値の読み出しを行う参照系のテストを実行するためのテストケースであるか否かを判定し、
前記少なくとも一つのテストケースが前記参照系のテストを実行するためのテストケースではないと判定された場合、テスト環境を生成し、
前記テスト環境上で、前記複数のテストケースに基づくテストを実行することを特徴とするインタフェース集約装置。 The interface aggregation device according to claim 2, wherein
It is determined whether all the test cases are test cases for executing a reference system test for reading out values,
If it is determined that the at least one test case is not a test case for executing the test of the reference system, a test environment is generated,
An interface aggregation device that executes a test based on the plurality of test cases on the test environment.
前記複数のサービスの各々は、種類が異なる複数のインタフェースを有し、
前記インタフェース集約装置は、
プロセッサ、前記プロセッサに接続されるメモリ、及び前記プロセッサに接続されるネットワークインタフェースを有し、
テストの要件を定義するテストケースを生成するために用いられるフレームワーク情報、及び任意のインタフェースと互換性を有する代替インタフェースを管理するための互換情報を保持し、
前記インタフェース管理方法は、
前記インタフェース集約装置が、任意のサービスが有する前記複数のインタフェースの中からターゲットインタフェースの前記代替インタフェースを特定するためのテストの実行契機を検知した場合、前記フレームワーク情報に基づいて複数のテストケースを生成する第1のステップと、
前記インタフェース集約装置が、前記複数のテストケースを解析し、前記解析の結果に基づいて削除可能な少なくとも一つのテストケースを特定して、前記特定された少なくとも一つのテストケースを削除する第2のステップと、
前記インタフェース集約装置が、前記複数のテストケースに基づいてテストを実行する第3のステップと、
前記インタフェース集約装置が、前記テストの実行結果に基づいて前記ターゲットインタフェースの代替インタフェースを特定する第4のステップと、
前記インタフェース集約装置が、前記ターゲットインタフェース及び前記ターゲットインタフェースの代替インタフェースを対応づけたデータを前記互換情報に登録する第5のステップと、を含むことを特徴とするインタフェース管理方法。 An interface management method executed by an interface aggregation device for controlling input and output of data via an interface between at least one application and a plurality of services, comprising:
Each of the plurality of services has a plurality of interfaces of different types;
The interface aggregation device
A processor, a memory connected to the processor, and a network interface connected to the processor;
Holds framework information used to generate test cases that define test requirements, and compatibility information to manage alternate interfaces compatible with any interface,
The interface management method is
When the interface aggregation device detects an execution trigger of a test for identifying the alternative interface of the target interface among the plurality of interfaces possessed by any service, a plurality of test cases are displayed based on the framework information. The first step to generate
The interface aggregation device analyzes the plurality of test cases, identifies at least one test case that can be deleted based on a result of the analysis, and deletes the specified at least one test case. Step and
A third step of the interface aggregation device executing a test based on the plurality of test cases;
A fourth step of the interface aggregating apparatus specifying an alternative interface of the target interface based on the execution result of the test;
A fifth step of the interface aggregation device registering, in the compatibility information, data in which the target interface and an alternative interface of the target interface are associated with each other.
前記インタフェース集約装置は、テストケースに基づくテストの実行結果の履歴を管理し、
前記第2のステップは、
前記インタフェース集約装置が、前記解析の結果に基づいて、前記複数のテストケースの中から削除候補のテストケースを特定するステップと、
前記削除候補のテストケースと同一内容であり、実行順番が後である重複テストケースが存在し、かつ、前記削除候補のテストケース及び前記重複テストケースに基づくテストの実行間隔が第1閾値より小さい場合、前記重複テストケースを削除する第1削除処理を実行するステップと、
前記削除候補のテストケースに基づくテストの実行結果として成功を示す出力値が得られる確率が第2閾値より大きく、かつ、前回の前記削除候補のテストケースと同一内容のテストケースに基づくテストが実行されてからの経過時間が第3閾値より小さい場合、前記削除候補のテストケースを削除する第2削除処理を実行するステップと、
前記削除候補のテストケースに基づくテストの実行結果として失敗を示す出力値が得られる確率が第4閾値より大きく、かつ、前回の前記削除候補のテストケースと同一内容のテストケースに基づくテストが実行されてからの経過時間が第5閾値より小さい場合、前記削除候補のテストケースを削除する第3削除処理を実行するステップと、を含むことを特徴とするインタフェース管理方法。 The interface management method according to claim 8, wherein
The interface aggregation device manages a history of test execution results based on test cases,
The second step is
The interface aggregation device specifies a test case of a deletion candidate from among the plurality of test cases based on the result of the analysis;
There is a duplicate test case having the same contents as the deletion candidate test case and having a later execution order, and a test execution interval based on the deletion candidate test case and the duplicate test case is smaller than a first threshold And executing a first deletion process to delete the duplicate test case.
The probability that an output value indicating success is obtained as the execution result of the test based on the test case for deletion candidate is larger than the second threshold, and the test based on the test case having the same contents as the previous test case for deletion candidate is executed Executing a second deletion process for deleting the test case of the deletion candidate if the elapsed time since the execution is less than a third threshold;
The probability that an output value indicating failure is obtained as the execution result of the test based on the deletion candidate test case is larger than the fourth threshold, and the test based on the test case having the same contents as the previous deletion candidate test case is executed And D. performing a third deletion process of deleting the test case of the deletion candidate if the elapsed time after the execution is less than a fifth threshold.
前記テストケースは入力値を含み、
前記インタフェース集約装置は、前記代替インタフェースを特定するために使用する判定ルールを保持し、
前記複数のテストケースは、前記ターゲットインタフェースに関する第1テストケース及び第1インタフェースに関する第2テストケースを含み、
前記第4のステップは、
前記インタフェース集約装置が、前記第1テストケースに基づいてテストを実行することによって第1出力値を取得するステップと、
前記インタフェース集約装置が、前記第2テストケースに基づいてテストを実行することによって第2出力値を取得するステップと、
前記インタフェース集約装置が、前記第1テストケースの入力値及び前記第1出力値と、前記第2テストケースの入力値及び前記第2出力値とを比較するステップと、
前記第2テストケースの入力値及び前記第2出力値が前記第1テストケースの入力値及び前記第1出力値と一致する場合、前記インタフェース集約装置が、前記互換情報に、前記ターゲットインタフェースの代替インタフェースとして前記第1インタフェースを登録するステップと、
前記第2テストケースの入力値及び前記第2出力値が前記第1テストケースの入力値及び前記第1出力値と一部異なる場合、前記インタフェース集約装置が、前記判定ルールを適用することによって前記第2出力値が前記第1出力値と一致するか否かを判定するステップと、
前記判定ルールを適用することによって前記第2出力値が前記第1出力値と一致すると判定された場合、前記インタフェース集約装置が、前記互換情報に、前記ターゲットインタフェースの代替インタフェースとして前記第1インタフェースを登録するステップと、を含むことを特徴とするインタフェース管理方法。 The interface management method according to claim 9, wherein
The test case contains input values,
The interface aggregation device holds determination rules used to specify the alternative interface,
The plurality of test cases include a first test case for the target interface and a second test case for the first interface,
The fourth step is
Obtaining the first output value by executing the test based on the first test case, the interface aggregation device;
Acquiring the second output value by the interface aggregation device executing a test based on the second test case;
The interface aggregation device compares the input value and the first output value of the first test case with the input value and the second output value of the second test case;
When the input value and the second output value of the second test case match the input value and the first output value of the first test case, the interface aggregation device substitutes the compatibility information for the target interface. Registering the first interface as an interface;
When the input value and the second output value of the second test case are partially different from the input value and the first output value of the first test case, the interface aggregation device applies the determination rule to apply the determination rule. Determining whether a second output value matches the first output value;
When it is determined that the second output value matches the first output value by applying the determination rule, the interface aggregation device uses the first interface as an alternative interface of the target interface to the compatibility information. And D. registering the interface.
第1のステップでは、前記インタフェース集約装置は、新規インタフェースの追加通知を受信した場合、及び、前記アプリケーションからのリクエストに対して正常でない応答をしたインタフェースの前記代替インタフェースが前記互換情報に登録されていない場合の少なくともいずれかを、前記テストの実行契機として検知することを特徴とするインタフェース管理方法。 The interface management method according to claim 9, wherein
In the first step, when the interface aggregation device receives a notification of addition of a new interface, and the alternative interface of the interface that has made a non-normal response to the request from the application is registered in the compatibility information. An interface management method comprising: detecting at least one of the cases where there is no case as an execution trigger of the test.
前記アプリケーションから任意のサービスが有する第2インタフェースに対するリクエストを受信した場合、前記インタフェース集約装置が、前記第2インタフェースに前記リクエストを送信するステップと、
前記インタフェース集約装置が、前記第2インタフェースを介して応答を受信するステップと、
前記インタフェース集約装置が、前記受信した応答が正常な応答であるか否かを判定するステップと、
前記受信した応答が正常な応答でないと判定された場合、前記インタフェース集約装置が、前記互換情報を参照し、前記第2インタフェースの代替インタフェースに対してリクエストを送信するステップと、を含むことを特徴とするインタフェース管理方法。 The interface management method according to claim 9, wherein
The interface aggregation device transmitting the request to the second interface when receiving a request for the second interface included in any service from the application;
The interface aggregation device receiving a response via the second interface;
The interface aggregation device determining whether the received response is a normal response;
And, if it is determined that the received response is not a normal response, the interface aggregation device refers to the compatible information and transmits a request to an alternative interface of the second interface. Interface management method.
前記インタフェース集約装置が、前記第1削除処理、前記第2削除処理、及び前記第3削除処理が実行された後、前記複数のテストケースを実行した場合の処理負荷を算出するステップと、
前記処理負荷が第4閾値より大きい場合、前記インタフェース集約装置が、前記削除候補のテストケースを特定するステップと、
前記重複テストケースが存在し、かつ、前記削除候補のテストケース及び前記重複テストケースに基づくテストの実行間隔が第6閾値より小さい場合、前記インタフェース集約装置が、前記重複テストケースを削除する第4削除処理を実行するステップと、を含み、
前記第6閾値は前記第1閾値より大きいことを特徴とするインタフェース管理方法。 The interface management method according to claim 9, wherein
Calculating the processing load when the plurality of test cases are executed after the interface aggregation device executes the first deletion process, the second deletion process, and the third deletion process;
If the processing load is larger than a fourth threshold, the interface aggregation device specifies the test case of the deletion candidate;
The interface aggregating apparatus deletes the duplicate test case if the duplicate test case exists and the test execution interval based on the deletion candidate test case and the duplicate test case is smaller than a sixth threshold. Performing the deletion process;
The interface management method, wherein the sixth threshold is larger than the first threshold.
前記第3のステップは、
前記インタフェース集約装置が、前記全てのテストケースが値の読み出しを行う参照系のテストを実行するためのテストケースであるか否かを判定するステップと、
前記少なくとも一つのテストケースが前記参照系のテストを実行するためのテストケースではないと判定された場合、前記インタフェース集約装置が、テスト環境を生成するステップと、
前記インタフェース集約装置が、前記テスト環境上で、前記複数のテストケースに基づくテストを実行するステップと、を含むことを特徴とするインタフェース管理方法。 The interface management method according to claim 9, wherein
The third step is
Determining whether the interface aggregation device is a test case for executing a test of a reference system for reading out all the test cases;
The interface aggregating apparatus generates a test environment if it is determined that the at least one test case is not a test case for performing a test of the reference system;
The interface aggregating apparatus executes a test based on the plurality of test cases on the test environment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017232547A JP6542865B2 (en) | 2017-12-04 | 2017-12-04 | Interface aggregation device and interface management method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017232547A JP6542865B2 (en) | 2017-12-04 | 2017-12-04 | Interface aggregation device and interface management method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019101801A true JP2019101801A (en) | 2019-06-24 |
JP6542865B2 JP6542865B2 (en) | 2019-07-10 |
Family
ID=66973723
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017232547A Active JP6542865B2 (en) | 2017-12-04 | 2017-12-04 | Interface aggregation device and interface management method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6542865B2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110569194A (en) * | 2019-09-09 | 2019-12-13 | 五八有限公司 | interface testing method and device, electronic equipment and storage medium |
WO2022043763A1 (en) * | 2020-08-26 | 2022-03-03 | Coupang Corp. | Systems and methods for automated application programming interface evaluation and migration |
JP2023554057A (en) * | 2020-12-15 | 2023-12-26 | インターナショナル・ビジネス・マシーンズ・コーポレーション | System testing infrastructure with hidden variables, hidden attributes, and hidden value detection |
-
2017
- 2017-12-04 JP JP2017232547A patent/JP6542865B2/en active Active
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110569194A (en) * | 2019-09-09 | 2019-12-13 | 五八有限公司 | interface testing method and device, electronic equipment and storage medium |
WO2022043763A1 (en) * | 2020-08-26 | 2022-03-03 | Coupang Corp. | Systems and methods for automated application programming interface evaluation and migration |
KR20220029795A (en) * | 2020-08-26 | 2022-03-08 | 쿠팡 주식회사 | Systems and methods for automated application programming interface evaluation and migration |
US11307913B2 (en) | 2020-08-26 | 2022-04-19 | Coupang Corp. | Systems and methods for automated application programming interface evaluation and migration |
KR102402680B1 (en) | 2020-08-26 | 2022-05-30 | 쿠팡 주식회사 | Systems and methods for automated application programming interface evaluation and migration |
JP2023554057A (en) * | 2020-12-15 | 2023-12-26 | インターナショナル・ビジネス・マシーンズ・コーポレーション | System testing infrastructure with hidden variables, hidden attributes, and hidden value detection |
Also Published As
Publication number | Publication date |
---|---|
JP6542865B2 (en) | 2019-07-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10776104B2 (en) | Systems and methods for tracking configuration file changes | |
US10715388B2 (en) | Using a container orchestration service for dynamic routing | |
CN116018788A (en) | Configuring service grid networking resources for dynamically discovered peers or network functions | |
CN108510389A (en) | Intelligent contract call method, equipment and readable storage medium storing program for executing based on block chain | |
CN106888233B (en) | Data updating system and method | |
JP6542865B2 (en) | Interface aggregation device and interface management method | |
US20220261275A1 (en) | Self-evolving microservices | |
WO2022267175A1 (en) | Information processing method and apparatus, and computer device and storage medium | |
CN111126613A (en) | Method, apparatus and computer program product for deep learning | |
CN108494867B (en) | Method, device and system for service gray processing and routing server | |
CN109155939A (en) | A kind of load migration method, apparatus and system | |
EP3887934A1 (en) | Configuration of workflows for coordinated device environments | |
EP4538871A1 (en) | Application management method, application subscription method, and related device | |
CN112181605B (en) | Load balancing method, device, electronic device and computer readable medium | |
WO2017002222A1 (en) | System deployment device and system deployment method | |
CN114844788B (en) | Network data analysis method, system, equipment and storage medium | |
WO2024030113A1 (en) | System and method for bulk update of resource data for view parameters | |
CN113472638B (en) | Edge gateway control method, system, device, electronic equipment and storage medium | |
JP2019082857A (en) | Computer system and data processing control method | |
CN109862089A (en) | Data processing method, device, system, computer readable storage medium | |
CN111314457B (en) | Method and device for setting virtual private cloud | |
CN106453592A (en) | Asynchronous call processing method and apparatus, and distributed system | |
US20210011758A1 (en) | Information processing method and information processing apparatus | |
US11151022B1 (en) | Testing of executable code for local device coordinator | |
CN109933432A (en) | Method and apparatus for sending data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180720 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190517 |
|
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: 20190604 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190613 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6542865 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |