JP7279497B2 - TEST CODE GENERATOR, TEST CODE GENERATION METHOD AND PROGRAM - Google Patents

TEST CODE GENERATOR, TEST CODE GENERATION METHOD AND PROGRAM Download PDF

Info

Publication number
JP7279497B2
JP7279497B2 JP2019085935A JP2019085935A JP7279497B2 JP 7279497 B2 JP7279497 B2 JP 7279497B2 JP 2019085935 A JP2019085935 A JP 2019085935A JP 2019085935 A JP2019085935 A JP 2019085935A JP 7279497 B2 JP7279497 B2 JP 7279497B2
Authority
JP
Japan
Prior art keywords
test code
information
template
test
declarative model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019085935A
Other languages
Japanese (ja)
Other versions
JP2020181509A (en
Inventor
直城 岡田
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP2019085935A priority Critical patent/JP7279497B2/en
Publication of JP2020181509A publication Critical patent/JP2020181509A/en
Application granted granted Critical
Publication of JP7279497B2 publication Critical patent/JP7279497B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明は、テストコード生成装置、テストコード生成方法およびプログラムに関する。 The present invention relates to a test code generation device, test code generation method and program.

プログラムまたはシステムのテストに関して幾つかの技術が提案されている。
例えば、特許文献1に記載の方法では、アプリケーションにかかわる複数の独立したテストケースを、テストケース毎に異なる動作環境で実行する。テストケース毎の動作環境は、テストマスタドキュメントと呼ばれるテストドキュメントによって示される。
Several techniques have been proposed for program or system testing.
For example, in the method described in Patent Literature 1, a plurality of independent test cases related to an application are executed in different operating environments for each test case. An operating environment for each test case is indicated by a test document called a test master document.

特開2018-139106号公報Japanese Patent Application Laid-Open No. 2018-139106

プログラムを用いてシステムを構築する方法の1つに、宣言的モデルを用いてシステムを構築する方法がある。宣言的モデルから構築されたシステムが、モデルの作成ミス、パラメータ誤り、または、実行環境の問題など様々な理由により正しく動作しないことがある。このため、宣言的モデルから構築されたシステムに対して宣言(意図)した通りに構築され正しく動作するかの確認が必要とされる。 One method of building a system using a program is to build a system using a declarative model. A system built from a declarative model may not work correctly for various reasons, such as model creation errors, parameter errors, or execution environment problems. For this reason, it is necessary to check whether the system constructed from the declarative model is constructed as declared (intended) and operates correctly.

構築されたシステムに対してテストを行う都度、手作業でテスト設計(テスト項目の決定等)してテストコードを生成する場合、適切なテスト設計およびテストコード生成には高いスキルが求められ、作業者のスキルによってはテスト設計およびテストコード生成を適切に行えない場合がある。また、テスト設計やテストコード作成でミスが発生した場合も、テストを適切に行えない。 If test code is generated by manual test design (determination of test items, etc.) every time a system is tested, a high level of skill is required for appropriate test design and test code generation. Depending on the skill of the person, it may not be possible to perform test design and test code generation appropriately. Also, if a mistake occurs in test design or test code creation, the test cannot be performed properly.

本発明は、上述の課題を解決することのできるテストコード生成装置、テストコード生成方法およびプログラムを提供することを目的としている。 An object of the present invention is to provide a test code generation device, a test code generation method, and a program that can solve the above-described problems.

本発明の第1の態様によれば、テストコード生成装置は、宣言的モデルの情報から、その宣言的モデルの構成要素の情報を抽出する情報取得部と、前記構成要素の情報に紐づけられているテストコードのテンプレートを取得するテンプレート取得部と、前記構成要素の情報に紐づけられ、かつ、パラメータ値を要求することを示しているルールに従って、前記テンプレートに適用するパラメータ値を宣言的モデルオーケストレーション装置から取得するパラメータ値取得部と、得られたパラメータ値を前記テンプレートに適用してテストコードを取得するパラメータ値適用部と、を備える。 According to the first aspect of the present invention, a test code generation device includes: an information acquisition unit for extracting information on a component of the declarative model from information on the declarative model; and a template acquisition unit that acquires a test code template declaratively declaratively declaratively sets parameter values to be applied to the template in accordance with a rule that is linked to the information of the component and indicates that the parameter value is required. A parameter value acquisition unit that acquires from the model orchestration device , and a parameter value application unit that applies the acquired parameter values to the template to acquire a test code.

本発明の第2の態様によれば、テストコード生成方法は、コンピュータが、宣言的モデルの情報から、その宣言的モデルの構成要素の情報を抽出する工程と、前記構成要素の情報に紐づけられているテストコードのテンプレートを取得する工程と、前記構成要素の情報に紐づけられ、かつ、パラメータ値を要求することを示しているルールに従って、前記テンプレートに適用するパラメータ値を宣言的モデルオーケストレーション装置から取得する工程と、得られたパラメータ値を前記テンプレートに適用してテストコードを取得する工程と、を実行することを含む。 According to a second aspect of the present invention, a test code generation method includes the step of extracting, from information of a declarative model, information of a component of the declarative model; a declarative model for setting parameter values to be applied to the template according to a rule that is linked to the information of the component and indicates that parameter values are required; The steps of obtaining from an orchestration device and applying the obtained parameter values to the template to obtain test code are performed .

本発明の第3の態様によれば、プログラムは、コンピュータに、宣言的モデルの情報から、その宣言的モデルの構成要素の情報を抽出する工程と、前記構成要素の情報に紐づけられているテストコードのテンプレートを取得する工程と、前記構成要素の情報に紐づけられ、かつ、パラメータ値を要求することを示しているルールに従って、前記テンプレートに適用するパラメータ値を宣言的モデルオーケストレーション装置から取得する工程と、得られたパラメータ値を前記テンプレートに適用してテストコードを取得する工程と、を実行させるためのプログラムである。
According to a third aspect of the present invention, a program comprises, in a computer, a step of extracting information of a component of the declarative model from information of the declarative model; A declarative model orchestration device for obtaining a template of test code , and setting parameter values to be applied to the template according to a rule linked to the information of the component and indicating a request for parameter values. and applying the obtained parameter values to the template to obtain test code.

この発明によれば、宣言的モデルを用いて構築されたシステムに対して、より適切にテストを行うことができる。 According to the present invention, a system built using a declarative model can be tested more appropriately.

実施形態に係るテストコード生成装置の配置例を示す概略構成図である。It is a schematic block diagram which shows the example of arrangement|positioning of the test code generation apparatus which concerns on embodiment. 実施形態に係る宣言的モデルオーケストレーション装置の機能構成の例を示す概略ブロック図である。1 is a schematic block diagram showing an example of a functional configuration of a declarative model orchestration device according to an embodiment; FIG. 実施形態に係るテストコード生成装置の機能構成の例を示す概略ブロック図である。1 is a schematic block diagram showing an example of a functional configuration of a test code generation device according to an embodiment; FIG. 実施形態に係るテスト情報記憶部が記憶するテンプレート情報の例を示す図である。FIG. 5 is a diagram showing an example of template information stored in a test information storage unit according to the embodiment; 実施形態に係るテスト情報記憶部が記憶するテスト情報の例を示す図である。It is a figure which shows the example of the test information which the test information storage part which concerns on embodiment memorize|stores. 実施形態に係る宣言的モデルの例を示す図である。FIG. 4 is a diagram illustrating an example of a declarative model according to an embodiment; 実施形態に係る構成要素およびサーバ情報の抽出例を示す図である。It is a figure which shows the component which concerns on embodiment, and the extraction example of server information. 実施形態に係るパラメータ値の取得例を示す図である。It is a figure which shows the acquisition example of the parameter value which concerns on embodiment. 実施形態に係るテストコード生成部が生成するテストコードの第1例を示す図である。It is a figure which shows the 1st example of the test code which the test code production|generation part which concerns on embodiment produces|generates. 実施形態に係るテストコード生成部が生成するテストコードの第2例を示す図である。It is a figure which shows the 2nd example of the test code which the test code production|generation part which concerns on embodiment produces|generates. 実施形態に係るテストコード生成装置がテストコードを生成する処理手順の例を示す図である。FIG. 4 is a diagram illustrating an example of a processing procedure for generating test code by the test code generation device according to the embodiment; 実施形態に係るテストコード生成装置の構成の例を示す図である。It is a figure which shows the example of a structure of the test code generation apparatus which concerns on embodiment. 実施形態に係るテストコード生成方法における処理の手順の例を示す図である。It is a figure which shows the example of the procedure of a process in the test code generation method which concerns on embodiment. 少なくとも1つの実施形態に係るコンピュータの構成を示す概略ブロック図である。1 is a schematic block diagram showing a configuration of a computer according to at least one embodiment; FIG.

以下、本発明の実施形態を説明するが、以下の実施形態は請求の範囲にかかる発明を限定するものではない。また、実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。
図1は、実施形態に係るテストコード生成装置の配置例を示す概略構成図である。図1に示す構成で、宣言的モデルオーケストレーション装置100と、テストコード生成装置200と、実行環境500とが、通信ネットワーク900に接続されている。宣言的モデルオーケストレーション装置100と、テストコード生成装置200と、実行環境500とは、通信ネットワーク900を介して通信を行う。
Embodiments of the present invention will be described below, but the following embodiments do not limit the invention according to the claims. Also, not all combinations of features described in the embodiments are essential for the solution of the invention.
FIG. 1 is a schematic configuration diagram showing an arrangement example of a test code generation device according to an embodiment. In the configuration shown in FIG. 1, a declarative model orchestration device 100, a test code generation device 200, and an execution environment 500 are connected to a communication network 900. FIG. The declarative model orchestration device 100 , the test code generation device 200 and the execution environment 500 communicate via a communication network 900 .

宣言的モデルオーケストレーション装置100は、対象システム(実行環境500に実行させるシステム)の宣言的モデルを解釈して実行環境に応じた処理形式に変換し、プロビジョニング処理を行う装置である。宣言的モデルでは、モデルによって対象システムの性質(特に、そのシステムの出力の性質ないし内容)が示される。
宣言的モデルオーケストレーション装置100の例として、OASIS (Organization for the Advancement of Structured Information Standards) TOSCA (Topology and Orchestration Specification for Cloud Applications) リファレンス実装、および、OpenStack Heat 実装を挙げることができるが、これらに限定されない。
The declarative model orchestration device 100 is a device that interprets a declarative model of a target system (system to be executed by the execution environment 500), converts it into a processing format according to the execution environment, and performs provisioning processing. In a declarative model, the model describes the properties of the target system (in particular, the properties or content of the system's outputs).
Examples of the declarative model orchestration apparatus 100 include, but are not limited to, the OASIS (Organization for the Advancement of Structured Information Standards) TOSCA (Topology and Orchestration Specification for Cloud Applications) reference implementation and the OpenStack Heat implementation. not.

実行環境500は、対象システムを稼働させる実行環境である。実行環境500に、仮想マシン、コンテナ、または物理サーバの何れが用いられていてもよいし、これらの組み合わせが用いられていてもよい。実行環境500の例として、OpenStack、AWS、および、VMware を挙げることができるが、これらに限定されない。 The execution environment 500 is the execution environment for operating the target system. The execution environment 500 may use any of virtual machines, containers, physical servers, or a combination thereof. Examples of execution environment 500 can include, but are not limited to, OpenStack, AWS, and VMware.

テストコード生成装置200は、対象システムをテストするためのテストコードを自動生成する。具体的には、テストコード生成装置200は、対象システムのコードを宣言的モデルオーケストレーション装置100から取得し、対象システムの構成要素の情報を抽出する。テストコード生成装置200は、構成要素毎に予め用意されたテンプレートに、対象システムの構成要素の情報に基づいて取得したパラメータ値を適用することで、テストコードを生成する。 The test code generation device 200 automatically generates test code for testing the target system. Specifically, the test code generation device 200 acquires the code of the target system from the declarative model orchestration device 100 and extracts the information of the components of the target system. The test code generation device 200 generates test code by applying parameter values acquired based on information on the components of the target system to templates prepared in advance for each component.

通信ネットワーク900は、宣言的モデルオーケストレーション装置100と、テストコード生成装置200と、実行環境500との通信を仲介する。通信ネットワーク900は、特定の種類のネットワークに限定されない。例えば、通信ネットワーク900がインターネット(Internet)であり、テストコード生成装置200がクラウドサービスを提供するようになっていてもよいが、これに限定されない。 The communication network 900 mediates communication between the declarative model orchestration device 100 , the test code generation device 200 and the execution environment 500 . Communication network 900 is not limited to any particular type of network. For example, the communication network 900 may be the Internet and the test code generation device 200 may provide a cloud service, but is not limited to this.

図2は、宣言的モデルオーケストレーション装置100の機能構成の例を示す概略ブロック図である。図2に示す構成で、宣言的モデルオーケストレーション装置100は、第一通信部110と、第一記憶部180と、第一制御部190とを備える。第一制御部190は、宣言的モデルオーケストレータ部191と、プロビジョニング処理実行部192とを備える。
第一通信部110は、他の装置と通信を行う。特に、第一通信部110は、対象システムをプロビジョニングするための命令を実行環境500に送信して実行させる。また、第一通信部110は、テストコード生成装置200に対して対象システムのコードを送信する。
FIG. 2 is a schematic block diagram showing an example of the functional configuration of the declarative model orchestration device 100. As shown in FIG. With the configuration shown in FIG. 2 , the declarative model orchestration device 100 includes a first communication unit 110 , a first storage unit 180 and a first control unit 190 . The first control unit 190 includes a declarative model orchestrator unit 191 and a provisioning processing execution unit 192 .
The first communication unit 110 communicates with other devices. In particular, the first communication unit 110 transmits a command for provisioning the target system to the execution environment 500 for execution. Also, the first communication unit 110 transmits the code of the target system to the test code generation device 200 .

第一記憶部180は、各種情報を記憶する。第一記憶部180は、宣言的モデルオーケストレーション装置100が備える記憶デバイスを用いて構成される。
特に、第一記憶部180は、宣言的モデル、宣言的モデルの構成要素、実行時のパラメータを格納(記憶)する。例えば OASIS TOSCA では、宣言的モデルは Service Template と言われているシステム構成全体を表す定義であり、構成要素は Node Type や Relationship Type などの Type と言われている型定義である。宣言的モデルはこの型定義をもとに記述する。また、実行時のパラメータはTopology Template(Service Template の一部)の inputs で指定されるようなユーザが指定する値、あるいは実行環境から取得される値である。
The first storage unit 180 stores various information. The first storage unit 180 is configured using a storage device included in the declarative model orchestration device 100 .
In particular, the first storage unit 180 stores (memorizes) a declarative model, components of the declarative model, and runtime parameters. For example, in OASIS TOSCA, the declarative model is a definition that represents the entire system configuration called Service Template, and the constituent elements are type definitions called Types such as Node Type and Relationship Type. The declarative model is based on this type definition. Also, runtime parameters are values supplied by the user, such as those specified in the inputs of a Topology Template (part of a Service Template), or values obtained from the execution environment.

第一制御部190は、宣言的モデルオーケストレーション装置100の各部を制御して各種処理を実行する。第一制御部190の機能は、宣言的モデルオーケストレーション装置100が備えるCPU(Central Processing Unit、中央処理装置)が、第一記憶部180からプログラムを読み出して実行することで実行される。 The first control unit 190 controls each unit of the declarative model orchestration device 100 to execute various processes. The functions of the first control unit 190 are executed by a CPU (Central Processing Unit) of the declarative model orchestration device 100 reading out a program from the first storage unit 180 and executing it.

宣言的モデルオーケストレータ部191は、宣言的モデルおよびその宣言的モデルに適用されるパラメータ値を、実行処理を行う内部インタプリタのデータ形式にデータ変換する。例えば宣言的モデルオーケストレータ部191は、宣言的モデルおよびパラメータ値を、実行環境500に対応した命令を部品とするワークフローに変換するように動作する。 The declarative model orchestrator unit 191 converts the declarative model and the parameter values applied to the declarative model into the data format of the internal interpreter that performs execution processing. For example, the declarative model orchestrator unit 191 operates to convert the declarative model and parameter values into a workflow having instructions corresponding to the execution environment 500 as components.

プロビジョニング処理実行部192は、宣言的モデルオーケストレータ部191が生成した内部インタプリタの形式のデータを実行することで、実行環境500への対象システムのプロビジョニング処理を行う。例えばプロビジョニング処理実行部192は、前記のようにワークフローを実行する機能を有する。 The provisioning processing execution unit 192 executes the data in the internal interpreter format generated by the declarative model orchestrator unit 191 to perform provisioning processing of the target system to the execution environment 500 . For example, the provisioning processing execution unit 192 has the function of executing the workflow as described above.

図3は、テストコード生成装置200の機能構成の例を示す概略ブロック図である。図3に示す構成で、テストコード生成装置200は、第二通信部210と、第二記憶部280と、第二制御部290とを備える。第二記憶部280は、テスト情報記憶部281を備える。第二制御部290は、情報取得部291と、テストコード生成部292とを備える。テストコード生成部292は、テンプレート取得部293と、パラメータ値取得部294と、パラメータ値適用部295とを備える。
第二通信部210は、他の装置と通信を行う。特に、第二通信部210は、宣言的モデルオーケストレーション装置100から対象システムのコードを受信する。また、第二通信部210は、宣言的モデルオーケストレーション装置100からパラメータ値を受信する。
FIG. 3 is a schematic block diagram showing an example of the functional configuration of the test code generation device 200. As shown in FIG. With the configuration shown in FIG. 3 , the test code generation device 200 includes a second communication section 210 , a second storage section 280 and a second control section 290 . The second storage section 280 has a test information storage section 281 . The second control section 290 includes an information acquisition section 291 and a test code generation section 292 . The test code generation section 292 includes a template acquisition section 293 , a parameter value acquisition section 294 and a parameter value application section 295 .
The second communication unit 210 communicates with other devices. In particular, the second communication unit 210 receives the code of the target system from the declarative model orchestration device 100 . The second communication unit 210 also receives parameter values from the declarative model orchestration device 100 .

第二記憶部280は、各種情報を記憶する。第二記憶部280は、テストコード生成装置200が備える記憶デバイスを用いて構成される。
テスト情報記憶部281は、宣言的モデルの構成要素に対するテストコードのテンプレート(ひな型)とパラメータの置換ルールとを格納(記憶)する。テスト情報記憶部281は、宣言的モデルの構成要素に対するテストコードのテンプレートを、後述するテンプレート情報の形式で記憶する。また、テスト情報記憶部281は、後述するテスト情報に、パラメータの置換ルールを含んで記憶する。
第二制御部290は、テストコード生成装置200の各部を制御して各種処理を実行する。第二制御部290の機能は、テストコード生成装置200が備えるCPUが、第二記憶部280からプログラムを読み出して実行することで実行される。
The second storage unit 280 stores various information. The second storage unit 280 is configured using a storage device included in the test code generation device 200 .
The test information storage unit 281 stores (memorizes) test code templates and parameter replacement rules for the components of the declarative model. The test information storage unit 281 stores test code templates for the components of the declarative model in the form of template information, which will be described later. In addition, the test information storage unit 281 stores test information, which will be described later, including parameter replacement rules.
The second control unit 290 controls each unit of the test code generation device 200 to execute various processes. The functions of the second control unit 290 are executed by the CPU included in the test code generation device 200 reading a program from the second storage unit 280 and executing it.

情報取得部291は、第二通信部210を介して宣言的モデルオーケストレーション装置100と通信を行い、第一記憶部180に格納されている情報を取得する。
テストコード生成部292は、情報取得部291が取得した情報とテスト情報記憶部281に格納されている情報(テンプレート情報およびテスト情報)とをもとに、宣言的モデルから作成されたシステム(対象システム)に対するテストコードを生成する。
The information acquisition unit 291 communicates with the declarative model orchestration device 100 via the second communication unit 210 and acquires information stored in the first storage unit 180 .
The test code generation unit 292 generates a system (target system).

テンプレート取得部293は、宣言的モデルの構成要素に対するテストコードのテンプレートを取得する。具体的には、テンプレート取得部293は、宣言的モデルの構成要素の情報に基づいて、その構成要素をテストするためのテストコードのテンプレートをテスト情報記憶部281から読み出す。 The template acquisition unit 293 acquires test code templates for the components of the declarative model. Specifically, the template acquisition unit 293 reads from the test information storage unit 281 a test code template for testing the component based on the information on the component of the declarative model.

パラメータ値取得部294は、宣言的モデルの構成要素に対するテストコードのテンプレートに含まれるパラメータのパラメータ値を取得する。具体的には、テスト情報記憶部281が、テストコードのテンプレート毎にそのテンプレートのパラメータ値の取得ルールを記憶しておく。パラメータ値取得部294は、その取得ルールに基づいてパラメータ値を取得する。パラメータ値の取得ルールが、パラメータ値を固定値(定数)で指定している場合もあるし、宣言的モデルオーケストレーション装置100からパラメータ値を取得するよう指示する場合もある。あるいは、パラメータ値取得部294が、実行環境500からパラメータ値を取得するようにしてもよい。 The parameter value acquisition unit 294 acquires the parameter values of the parameters included in the test code template for the components of the declarative model. Specifically, the test information storage unit 281 stores, for each test code template, a rule for obtaining parameter values of the template. The parameter value acquisition unit 294 acquires parameter values based on the acquisition rule. The parameter value acquisition rule may specify the parameter value as a fixed value (constant), or may instruct to acquire the parameter value from the declarative model orchestration device 100 . Alternatively, the parameter value acquisition unit 294 may acquire parameter values from the runtime environment 500 .

パラメータ値適用部295は、パラメータ値取得部294が取得したパラメータ値をテンプレート取得部293が取得したテンプレートに適用する。これにより、パラメータ値適用部295は、宣言的モデルの構成要素に対するテストコードを取得する。
上記構成により、テストコード生成装置200は、テストコードを自動的に生成する機能を生み出すことが可能である。
The parameter value application unit 295 applies the parameter value acquired by the parameter value acquisition unit 294 to the template acquired by the template acquisition unit 293 . As a result, the parameter value application unit 295 acquires test code for the components of the declarative model.
With the above configuration, the test code generation device 200 can create a function of automatically generating test code.

テストコード生成装置200が行う処理についてさらに詳細に説明する。
まず、事前の準備について説明する。
ユーザは宣言的モデルの構成要素に対するテストコードのテンプレート(ひな型)とパラメータの置換ルールとをテスト情報記憶部281に格納する。宣言的モデルの構成要素に対するテストコードのテンプレートを、テストコードのテンプレート、または、単にテンプレートとも称する。
Processing performed by the test code generation device 200 will be described in more detail.
First, preparation in advance will be explained.
The user stores test code templates and parameter replacement rules for the components of the declarative model in the test information storage unit 281 . A test code template for a declarative model component is also referred to as a test code template, or simply a template.

図4は、テスト情報記憶部281が記憶するテンプレート情報の例を示す図である。
図4の例で、テンプレート情報は、表形式の情報として構成されており、テンプレート毎に、テンプレートIDと、テンプレート名と、テンプレートのソースコード(プログラム)とが示されている。
FIG. 4 is a diagram showing an example of template information stored in the test information storage unit 281. As shown in FIG.
In the example of FIG. 4, the template information is configured as tabular information, and the template ID, template name, and template source code (program) are shown for each template.

テンプレートIDは、テンプレートを識別する識別情報である。図4の例では、テンプレートIDとして通番が用いられているが、これに限定されない。
テンプレート名は、テンプレートに付されている名称である。テンプレートを識別する識別情報として、テンプレートIDに加えて、あるいは代えて、テンプレート名を用いることができる。
「テンプレート」の列のテストコード中で、パラメータ名が2つの「:」に挟まれて「:(パラメータ名):」の形式で示されている。このパラメータ名が記述された部分は、パラメータ値適用部295によってパラメータ値に置換される。
A template ID is identification information that identifies a template. Although a serial number is used as the template ID in the example of FIG. 4, it is not limited to this.
The template name is the name given to the template. As identification information for identifying a template, a template name can be used in addition to or instead of the template ID.
In the test code in the "template" column, the parameter name is shown in the form of ": (parameter name):" sandwiched between two ":". The part in which this parameter name is described is replaced with a parameter value by the parameter value applying unit 295 .

図5は、テスト情報記憶部281が記憶するテスト情報の例を示す図である。
図5の例で、テスト情報は、表形式の情報として構成されており、テストIDと、1つ以上のテストIDに紐づけられるタイプ名と、テストID毎のテスト名、テンプレートID、および、パラメータ(パラメータ値の置換ルール)が示されている。
タイプ名(「タイプ名」の列の情報)は宣言的モデルの構成要素を示しており、テスト情報は、宣言的モデルの構成要素と、その構成要素に使用するテストコードのテンプレートとの対応関係の一覧を示している。
FIG. 5 is a diagram showing an example of test information stored in the test information storage unit 281. As shown in FIG.
In the example of FIG. 5, the test information is configured as tabular information, including a test ID, a type name associated with one or more test IDs, a test name for each test ID, a template ID, and Parameters (replacement rules for parameter values) are shown.
The type name (information in the "Type name" column) indicates the component of the declarative model, and the test information is the correspondence between the component of the declarative model and the test code template used for that component. shows a list of

例えば、構成要素を示す「タイプ名」の列の「tosca.nodes.DBMS.MySQL」の欄と、「テンプレートID」の列の「1」、「2」、「3」および「4」の4つの欄とが紐づけられている。これによって、構成要素tosca.nodes.DBMS.MySQLに対して、図4のテンプレートのうち、テンプレートIDが「1」、「2」、「3」および「4」の4つのテンプレートを使用することが示されている。 For example, "tosca.nodes.DBMS.MySQL" in the "type name" column and 4 of "1", "2", "3" and "4" in the "template ID" column are associated with one column. As a result, four templates with template IDs "1", "2", "3" and "4" among the templates in FIG. 4 can be used for the component tosca.nodes.DBMS.MySQL. It is shown.

「パラメータ」の列は、前記した置換対象となるパラメータ名と値の情報を格納する。ここで、パラメータ値には固定値の他に実行時のパラメータ値も指定可能とする。例えば、図5の例で「prop」、「req」の表記は、それぞれ、紐づけられる構成要素に対するproperties、requirementsを示す。これらは、情報取得部291が宣言的モデルオーケストレーション装置100から値を取得することを示している。例えば「prop.port」との表記は、実行時に当該構成要素の「port」プロパティに指定された値を取得することを示す。
実行時にパラメータ値を取得する記述は、「prop」および「req」に限定されず、宣言的モデルオーケストレーション装置100の種類に応じた記述とすることができる。
The "parameter" column stores information on the parameter name and value to be replaced. Here, in addition to fixed values, parameter values at runtime can also be designated as parameter values. For example, in the example of FIG. 5, the notations "prop" and "req" respectively indicate properties and requirements for linked components. These indicate that the information acquisition unit 291 acquires values from the declarative model orchestration device 100 . For example, the notation "prop.port" indicates that the value specified in the "port" property of the component is obtained at runtime.
Descriptions for acquiring parameter values at runtime are not limited to “prop” and “req”, and may be descriptions according to the type of declarative model orchestration device 100 .

次に、テストコード生成装置200による処理の実行について説明する。
情報取得部291は、テスト対象となるシステム(対象システム)を示す宣言的モデルの情報を宣言的モデルオーケストレーション装置100から取得する。
図6は、宣言的モデルの例を示す図である。
テストコード生成部292は、図6に例示される宣言的モデルから、その宣言的モデルの構成要素を抽出する。構成要素には、プロビジョニング先のサーバ情報(仮想サーバ、コンテナおよび物理サーバの何れでもよい)と、そのサーバ情報が示すサーバ上で動作するミドルウェアまたはアプリケーション等の機能の情報とを含む。
Next, execution of processing by the test code generation device 200 will be described.
The information acquisition unit 291 acquires from the declarative model orchestration device 100 declarative model information indicating a system to be tested (target system).
FIG. 6 is a diagram showing an example of a declarative model.
The test code generator 292 extracts the components of the declarative model from the declarative model illustrated in FIG. The configuration elements include provisioning destination server information (virtual server, container, or physical server), and function information such as middleware or applications that operate on the server indicated by the server information.

図7は、構成要素およびサーバ情報の抽出例を示す図である。
図7の例では、テストコード生成部292が図6の宣言的モデルから抽出したノード名と、そのノードのタイプ名(構成要素)と、そのノードがプロビジョニングされるサーバ情報とが示されている。
FIG. 7 is a diagram showing an example of extraction of component and server information.
In the example of FIG. 7, the node name extracted from the declarative model of FIG. 6 by the test code generator 292, the type name (component) of the node, and the server information provisioned by the node are shown. .

テストコード生成部292は、図6の例で「node_templates」のラベルの下に示される「wrodpress」、「apache」、「web_serber」、「wordpress_db」、「mysql」、「db_server」の各ラベルを、ノード名の表記として抽出し、図7の「ノード名」の列に書き込む。
また、テストコード生成部292は、ノード毎に、「type:・・・」で示されるタイプ名(構成要素)を抽出し、図7の「タイプ名」の列に書き込む。
The test code generation unit 292 converts the labels "wrodpress", "apache", "web_server", "wordpress_db", "mysql", and "db_server" shown under the label "node_templates" in the example of FIG. It is extracted as a notation of a node name and written in the "node name" column in FIG.
The test code generation unit 292 also extracts the type name (component) indicated by "type:..." for each node, and writes it to the "type name" column in FIG.

また、テストコード生成部292は、ノード毎に「host:・・・」の記載を検出し、そこに記載されるノードをさらに辿ってサーバ名を抽出する。例えば、テストコード生成部292は、「wordpress」ノードの「host:apache」との記載を検出してノード「appache」を辿り、「host:web_server」との記載を検出する。さらに「web_server」ノードを辿ると「host:・・・」の記載がないことから、テストコード生成部292は、サーバ名が「web_server」であると判定して図7の「サーバ」の列の該当欄に書き込む。 Also, the test code generation unit 292 detects the description of “host: . For example, the test code generation unit 292 detects the description of "host:apache" in the "wordpress" node, traces the node "appache", and detects the description of "host:web_server". Furthermore, when the "web_server" node is traced, there is no description of "host:...", so the test code generation unit 292 determines that the server name is "web_server", and the "server" column in FIG. Fill in the appropriate fields.

テストコード生成部292は、同様に、「apache」、「wordpress_db」、「myspl」の各ノードについて、それぞれサーバ名「web_server」、「db_server」、「db_server」を検出して図7の「サーバ」の列の該当欄に書き込んでいる。
一方、「web_server」、「db_server」の各ノードについては、「host:・・・」の記載がないことからサーバ名を検出しない。図7の例では、サーバ名を検出しないことを「-」で示している。
Similarly, the test code generation unit 292 detects the server names "web_server", "db_server", and "db_server" for the nodes "apache", "wordpress_db", and "myspl", respectively, and generates "server" in FIG. is written in the corresponding column of the column.
On the other hand, for each node of "web_server" and "db_server", the server name is not detected because "host:..." is not described. In the example of FIG. 7, "-" indicates that the server name is not detected.

さらに、テストコード生成部292は当該抽出情報とテスト情報(図5)とをもとに、実施が必要なテストを決定する。
図7の例の場合、テストコード生成部292は、図7に示されるタイプ名(構成要素)毎に、図5でそのタイプ名に紐づけられているテストを行うことに決定する。例えば、テストコード生成部292は、db_server 上の mysql ノードに対してテストID「1」、「2」、「3」および「4」のテストを行うことに決定する。また、テストコード生成部292は、wordpress_db ノードに対してテストID「5」のテストを行うことに決定する。また、テストコード生成部292は、web_server 上の apache ノードに対してテストID「6」、「7」および「8」のテストを行うことに決定する。さらに、テストコード生成部292は、wordpress ノードに対してテストID「9」および「10」のテストを行うことに決定する。
Furthermore, the test code generation unit 292 determines a test that needs to be performed based on the extracted information and the test information (FIG. 5).
In the example of FIG. 7, the test code generation unit 292 determines to perform the test associated with the type name in FIG. 5 for each type name (component) shown in FIG. For example, the test code generator 292 determines to perform tests with test IDs "1", "2", "3" and "4" for the mysql node on db_server. Also, the test code generation unit 292 determines to perform the test with the test ID “5” on the wordpress_db node. Also, the test code generator 292 determines to perform tests with test IDs "6", "7" and "8" for the apache node on web_server. Furthermore, the test code generator 292 determines to test the wordpress node with test IDs "9" and "10".

さらに、テストコード生成部292はパラメータ置換のために必要な情報を宣言的モデルオーケストレーション装置100から情報取得部291を通して取得する。そして、テストコード生成部292は、テストコードのテンプレートの対象部分を得られた情報に置換してテストコードを生成する。 Further, the test code generation unit 292 acquires information required for parameter replacement from the declarative model orchestration device 100 through the information acquisition unit 291 . Then, the test code generation unit 292 replaces the target portion of the template of the test code with the obtained information to generate the test code.

図8は、パラメータ値の取得例を示す図である。
図8の例では、パラメータ名毎に、テストコード生成部292が取得するパラメータ値の例が示されている。例えば、テストコード生成部292は、wp_db_nameパラメータの値として「wordpress」を取得する。
FIG. 8 is a diagram illustrating an example of parameter value acquisition.
In the example of FIG. 8, examples of parameter values acquired by the test code generation unit 292 are shown for each parameter name. For example, the test code generator 292 acquires "wordpress" as the value of the wp_db_name parameter.

図9は、テストコード生成部292が生成するテストコードの第1例を示す図である。図9は、テストコード生成部292が生成する、db_serverに対するテストコードの例を示す。
図9の例で、テストコード生成部292は、db_serverに対するテストとして上記のように決定したテストID「1」、「2」、「3」、「4」および「5」の各テストのテンプレートID「1」、「2」、「3」、「4」および「5」を、図5に例示するテスト情報から読み出す。
FIG. 9 is a diagram showing a first example of test code generated by the test code generator 292. As shown in FIG. FIG. 9 shows an example of test code for db_server generated by the test code generation unit 292 .
In the example of FIG. 9, the test code generator 292 generates the template IDs of the test IDs "1", "2", "3", "4" and "5" determined as described above as tests for db_server. "1", "2", "3", "4" and "5" are read from the test information illustrated in FIG.

そして、テストコード生成部292は、読み出したテンプレートIDのテンプレートを図4に例示するテンプレート情報から読み出す。
さらに、テストコード生成部292は、読み出したテンプレートに対し、図5に示されるルールに従ってパラメータ値を挿入する。
Then, the test code generation unit 292 reads the template of the read template ID from the template information illustrated in FIG.
Further, the test code generator 292 inserts parameter values into the read template according to the rules shown in FIG.

例えば、テストコード生成部292は、テンプレートID「1」のテンプレートの「:package:」の記載を、図5のルールに従って「mysql」に置き換える。また、テストコード生成部292は、テンプレートID「3」のテンプレートの「:port:」の記載を、図5のルールに従って、db_serverから得られた値「3306」(図8の「mysql_port」の行参照)に置き換える。
これにより、テストコード生成部292は、db_serverに対するテストコードとして、図9に示されるテストコードを取得する。
For example, the test code generation unit 292 replaces the description of ":package:" in the template with the template ID "1" with "mysql" according to the rules in FIG. In addition, the test code generation unit 292 replaces the description of ":port:" in the template with the template ID "3" with the value "3306" obtained from db_server ("mysql_port" row in FIG. 8) according to the rule in FIG. see).
As a result, the test code generator 292 acquires the test code shown in FIG. 9 as the test code for db_server.

図10は、テストコード生成部292が生成するテストコードの第2例を示す図である。図10は、テストコード生成部292が生成する、web_serverに対するテストコードの例を示す。
テストコード生成部292は、web_serverに対するテストについても、上記のように決定したテストID「6」、「7」、「8」、「9」および「10」の各テストのテンプレートID「1」、「2」、「3」、「6」および「7」を、図5に例示するテスト情報から読み出す。
FIG. 10 is a diagram showing a second example of the test code generated by the test code generator 292. As shown in FIG. FIG. 10 shows an example of test code for web_server generated by the test code generation unit 292 .
For the test for web_server, the test code generation unit 292 generates template IDs "1", "2", "3", "6" and "7" are read from the test information illustrated in FIG.

そして、テストコード生成部292は、読み出したテンプレートIDのテンプレートを図4に例示するテンプレート情報から読み出す。
さらに、テストコード生成部292は、読み出したテンプレートに対し、図5に示されるルールに従ってパラメータ値を挿入する。
これにより、テストコード生成部292は、web_serverに対するテストコードとして、図10に示されるテストコードを取得する。
Then, the test code generation unit 292 reads the template of the read template ID from the template information illustrated in FIG.
Further, the test code generator 292 inserts parameter values into the read template according to the rules shown in FIG.
As a result, the test code generator 292 acquires the test code shown in FIG. 10 as the test code for web_server.

次に、図11を参照してテストコード生成装置200の動作について説明する。
図11は、テストコード生成装置200がテストコードを生成する処理手順の例を示す図である。
図11の処理で、情報取得部291は、宣言的モデルの構成要素を示す構成要素情報を取得する(ステップS101)。具体的には、情報取得部291は、第一通信部110が宣言的モデルオーケストレーション装置100から取得する宣言的モデルのコード(対象システムのコード)を解析して、構成要素情報を抽出する。
Next, operation of the test code generation device 200 will be described with reference to FIG.
FIG. 11 is a diagram showing an example of a processing procedure for the test code generation device 200 to generate test code.
In the process of FIG. 11, the information acquisition unit 291 acquires component element information indicating components of the declarative model (step S101). Specifically, the information acquisition unit 291 analyzes the code of the declarative model (the code of the target system) acquired by the first communication unit 110 from the declarative model orchestration device 100, and extracts the component element information.

次に、テンプレート取得部293は、宣言的モデルの構成要素のテストコードのテンプレートを取得する(ステップS102)。具体的には、テストコード生成部292が、テスト情報記憶部281が記憶しているテスト情報を参照して、宣言的モデルの構成要素(対象システムの構成要素)に対するテストを決定する。そして、テンプレート取得部293は、決定したテストに紐づけられているテストコードのテンプレートを取得する。 Next, the template acquisition unit 293 acquires a test code template for the components of the declarative model (step S102). Specifically, the test code generation unit 292 refers to the test information stored in the test information storage unit 281 to determine the test for the components of the declarative model (components of the target system). Then, the template acquisition unit 293 acquires a test code template linked to the determined test.

また、パラメータ値取得部294は、テンプレート取得部293が取得したテンプレートに適用するためのパラメータ値を取得する(ステップS103)。具体的には、パラメータ値取得部294は、テストコード生成部282が決定したテストに紐づけられているパラメータ値取得ルールに従ってパラメータ値を取得する。 Also, the parameter value acquisition unit 294 acquires parameter values to be applied to the template acquired by the template acquisition unit 293 (step S103). Specifically, the parameter value acquisition unit 294 acquires parameter values according to the parameter value acquisition rule linked to the test determined by the test code generation unit 282 .

パラメータ値適用部295は、テンプレート取得部293が取得したテンプレートに、パラメータ値取得部294が取得したパラメータ値を適用する(ステップS104)。これにより、パラメータ値適用部295は、宣言的モデルをテストするためのテストコードを取得する。
ステップS104の後、テストコード生成装置200は、図11の処理を終了する。
The parameter value application unit 295 applies the parameter values acquired by the parameter value acquisition unit 294 to the template acquired by the template acquisition unit 293 (step S104). Thereby, the parameter value application unit 295 obtains test code for testing the declarative model.
After step S104, the test code generation device 200 ends the processing of FIG.

以上のように、情報取得部291は、宣言的モデルの情報から、その宣言的モデルの構成要素の情報を抽出する。テンプレート取得部293は、構成要素の情報に紐づけられているテストコードのテンプレートを取得する。パラメータ値取得部294は、テンプレートに適用するパラメータ値を、構成要素の情報に紐づけられているルールに従って取得する。パラメータ値適用部295は、得られたパラメータ値をテンプレートに適用してテストコードを取得する。 As described above, the information acquisition unit 291 extracts the information of the constituent elements of the declarative model from the information of the declarative model. The template acquisition unit 293 acquires a test code template linked to the information of the component. The parameter value acquisition unit 294 acquires parameter values to be applied to the template according to the rules linked to the information on the constituent elements. The parameter value application unit 295 applies the obtained parameter values to the template to acquire test codes.

テストコード生成装置200によれば、宣言的モデルを用いて構築されたシステムに対するテストコードを、システムの構成に応じて自動的に生成することができる。テストコードを自動生成できる点で、テストコード生成装置200では、テストコードを生成する人的負担を必要とせず、また、人的なスキルを必要としない。したがって、テストコード生成装置200では、人的スキルの不足により適切なテストコードを生成できないといった事態を回避できる。また、テストコード生成装置200では、人的ミスによって適切なテストコードを生成できないといった事態も回避できる。
このように、テストコード生成装置200によれば、宣言的モデルを用いて構築されたシステムに対して、より適切にテストを行うことができる。
According to the test code generation device 200, it is possible to automatically generate test code for a system constructed using a declarative model, according to the configuration of the system. In that the test code can be automatically generated, the test code generation device 200 does not require the human burden of generating the test code, nor does it require human skill. Therefore, the test code generation device 200 can avoid a situation in which an appropriate test code cannot be generated due to lack of human skill. In addition, the test code generation device 200 can avoid a situation in which an appropriate test code cannot be generated due to human error.
Thus, according to the test code generation device 200, it is possible to more appropriately test a system constructed using a declarative model.

また、パラメータ値取得部294は、パラメータ値取得のルールがパラメータ値を要求することを示している場合、そのルールに従って宣言的モデルオーケストレーション装置100からパラメータ値を取得する。
これにより、テストコード生成装置200では、パラメータ値がノードに応じて定まる場合に対応してテストコードを自動的に生成することができる。
Further, when the parameter value acquisition rule indicates that the parameter value is required, the parameter value acquisition unit 294 acquires the parameter value from the declarative model orchestration device 100 according to the rule.
As a result, the test code generation device 200 can automatically generate test code corresponding to the case where the parameter value is determined according to the node.

図12は、実施形態に係るテストコード生成装置の構成の例を示す図である。図12に示すテストコード生成装置400は、情報取得部401と、テンプレート取得部402と、パラメータ値取得部403と、パラメータ値適用部404とを備える。 FIG. 12 is a diagram illustrating an example of the configuration of a test code generation device according to the embodiment; A test code generation device 400 shown in FIG. 12 includes an information acquisition unit 401 , a template acquisition unit 402 , a parameter value acquisition unit 403 , and a parameter value application unit 404 .

かかる構成にて、情報取得部401は、宣言的モデルの情報から、その宣言的モデルの構成要素の情報を抽出する。テンプレート取得部402は、構成要素の情報に紐づけられているテストコードのテンプレートを取得する。パラメータ値取得部403は、テンプレートに適用するパラメータ値を、構成要素の情報に紐づけられているルールに従って取得する。パラメータ値適用部404は、得られたパラメータ値をテンプレートに適用してテストコードを取得する。 With such a configuration, the information acquisition unit 401 extracts information about the components of the declarative model from the information about the declarative model. The template acquisition unit 402 acquires a test code template linked to the information of the component. The parameter value acquisition unit 403 acquires parameter values to be applied to the template according to the rules linked to the information on the constituent elements. A parameter value application unit 404 applies the obtained parameter values to the template to acquire test codes.

テストコード生成装置400によれば、宣言的モデルを用いて構築されたシステムに対するテストコードを、システムの構成に応じて自動的に生成することができる。テストコードを自動生成できる点で、テストコード生成装置400では、テストコードを生成する人的負担を必要とせず、また、人的なスキルを必要としない。したがって、テストコード生成装置400では、人的スキルの不足により適切なテストコードを生成できないといった事態を回避できる。また、テストコード生成装置400では、人的ミスによって適切なテストコードを生成できないといった事態も回避できる。
このように、テストコード生成装置400によれば、宣言的モデルを用いて構築されたシステムに対して、より適切にテストを行うことができる。
According to the test code generation device 400, it is possible to automatically generate test code for a system built using a declarative model according to the system configuration. Since the test code can be automatically generated, the test code generation device 400 does not require the human burden of generating the test code, nor does it require human skill. Therefore, the test code generation device 400 can avoid a situation in which an appropriate test code cannot be generated due to lack of human skill. In addition, the test code generation device 400 can avoid a situation in which an appropriate test code cannot be generated due to human error.
Thus, according to the test code generation device 400, it is possible to more appropriately test a system constructed using a declarative model.

図13は、実施形態に係るテストコード生成方法における処理の手順の例を示す図である。図13に示すテストコード生成方法は、構成要素情報およびサーバ情報の取得工程(ステップS201)と、テンプレート取得工程(ステップS202)と、パラメータ値取得工程(ステップS203)と、パラメータ値適用工程(ステップS204)とを含む。 FIG. 13 is a diagram illustrating an example of a processing procedure in the test code generation method according to the embodiment; The test code generation method shown in FIG. 13 includes a component element information and server information acquisition step (step S201), a template acquisition step (step S202), a parameter value acquisition step (step S203), and a parameter value application step (step S204).

構成要素情報およびサーバ情報の取得工程(ステップS201)では、宣言的モデルの情報から、その宣言的モデルの構成要素の情報を抽出する。テンプレート取得工程(ステップS202)では、構成要素の情報に紐づけられているテストコードのテンプレートを取得する。パラメータ値取得工程(ステップS203)では、テンプレートに適用するパラメータ値を、構成要素の情報に紐づけられているルールに従って取得する。パラメータ値適用工程(ステップS204)では、得られたパラメータ値をテンプレートに適用してテストコードを取得する。 In the component element information and server information acquisition step (step S201), the component information of the declarative model is extracted from the information of the declarative model. In the template acquisition step (step S202), a template of the test code linked to the information of the component is acquired. In the parameter value acquisition step (step S203), parameter values to be applied to the template are acquired according to the rules linked to the information on the constituent elements. In the parameter value applying step (step S204), the obtained parameter values are applied to the template to obtain the test code.

このテストコード生成方法によれば、宣言的モデルを用いて構築されたシステムに対するテストコードを、システムの構成に応じて自動的に生成することができる。このテストコード生成方法では、テストコードを自動生成できる点で、テストコードを生成する人的負担を必要とせず、また、人的なスキルを必要としない。したがって、このテストコード生成方法では、人的スキルの不足により適切なテストコードを生成できないといった事態を回避できる。また、このテストコード生成方法では、人的ミスによって適切なテストコードを生成できないといった事態も回避できる。
このように、このテストコード生成方法によれば、宣言的モデルを用いて構築されたシステムに対して、より適切にテストを行うことができる。
According to this test code generation method, test code for a system constructed using a declarative model can be automatically generated according to the system configuration. This test code generation method does not require the human burden of generating the test code, nor does it require human skill, in that the test code can be generated automatically. Therefore, with this test code generation method, it is possible to avoid a situation in which an appropriate test code cannot be generated due to lack of human skill. In addition, this test code generation method can avoid a situation in which an appropriate test code cannot be generated due to human error.
Thus, according to this test code generation method, a system constructed using a declarative model can be tested more appropriately.

図14は、少なくとも1つの実施形態に係るコンピュータの構成を示す概略ブロック図である。
図14に示す構成で、コンピュータ700は、CPU710と、主記憶装置720と、補助記憶装置730と、インタフェース740とを備える。
上記のテストコード生成装置200および400のうち何れか1つ以上が、コンピュータ700に実装されてもよい。その場合、上述した各処理部の動作は、プログラムの形式で補助記憶装置730に記憶されている。CPU710は、プログラムを補助記憶装置730から読み出して主記憶装置720に展開し、当該プログラムに従って上記処理を実行する。また、CPU710は、プログラムに従って、上述した各記憶部に対応する記憶領域を主記憶装置720に確保する。各装置と他の装置との通信は、インタフェース740が通信機能を有し、CPU710の制御に従って通信を行うことで実行される。
FIG. 14 is a schematic block diagram showing the configuration of a computer according to at least one embodiment;
With the configuration shown in FIG. 14, computer 700 includes CPU 710 , main storage device 720 , auxiliary storage device 730 , and interface 740 .
Any one or more of the test code generation apparatuses 200 and 400 described above may be implemented in the computer 700 . In that case, the operation of each processing unit described above is stored in the auxiliary storage device 730 in the form of a program. The CPU 710 reads out the program from the auxiliary storage device 730, develops it in the main storage device 720, and executes the above processing according to the program. In addition, the CPU 710 secures storage areas corresponding to the storage units described above in the main storage device 720 according to the program. Communication between each device and another device is executed by the interface 740 having a communication function and performing communication under the control of the CPU 710 .

テストコード生成装置200がコンピュータ700に実装される場合、第二制御部290の動作は、プログラムの形式で補助記憶装置730に記憶されている。CPU710は、プログラムを補助記憶装置730から読み出して主記憶装置720に展開し、当該プログラムに従って上記処理を実行する。
また、CPU710は、プログラムに従って、第二記憶部280に対応する記憶領域を主記憶装置720に確保する。第二通信部210が行う通信は、インタフェース740が通信機能を有し、CPU710の制御に従って通信を行うことで実行される。
When the test code generation device 200 is implemented in the computer 700, the operations of the second control unit 290 are stored in the auxiliary storage device 730 in the form of programs. The CPU 710 reads out the program from the auxiliary storage device 730, develops it in the main storage device 720, and executes the above processing according to the program.
Further, the CPU 710 secures a storage area corresponding to the second storage section 280 in the main storage device 720 according to the program. Communication performed by the second communication unit 210 is performed by the interface 740 having a communication function and performing communication according to the control of the CPU 710 .

テストコード生成装置400がコンピュータ700に実装される場合、情報取得部401、テンプレート取得部402、パラメータ値取得部403、および、パラメータ値適用部404の動作は、プログラムの形式で補助記憶装置730に記憶されている。CPU710は、プログラムを補助記憶装置730から読み出して主記憶装置720に展開し、当該プログラムに従って上記処理を実行する。 When the test code generation device 400 is implemented in the computer 700, the operations of the information acquisition unit 401, the template acquisition unit 402, the parameter value acquisition unit 403, and the parameter value application unit 404 are stored in the auxiliary storage device 730 in the form of programs. remembered. The CPU 710 reads out the program from the auxiliary storage device 730, develops it in the main storage device 720, and executes the above processing according to the program.

なお、テストコード生成装置200および400が行う処理の全部または一部を実行するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより各部の処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM(Read Only Memory)、CD-ROM(Compact Disc Read Only Memory)等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
A program for executing all or part of the processing performed by the test code generation devices 200 and 400 is recorded on a computer-readable recording medium, and the program recorded on this recording medium is read by the computer system, You may process each part by executing. It should be noted that the "computer system" referred to here includes hardware such as an OS and peripheral devices.
In addition, "computer-readable recording medium" refers to portable media such as flexible discs, magneto-optical discs, ROM (Read Only Memory), CD-ROM (Compact Disc Read Only Memory), hard disks built into computer systems It refers to a storage device such as Further, the program may be for realizing part of the functions described above, or may be capable of realizing the functions described above in combination with a program already recorded in the computer system.

以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。 Although the embodiment of the present invention has been described in detail with reference to the drawings, the specific configuration is not limited to this embodiment, and design and the like are included within the scope of the gist of the present invention.

100 宣言的モデルオーケストレーション装置
110 第一通信部
180 第一記憶部
190 第一制御部
191 宣言的モデルオーケストレータ部
192 プロビジョニング処理実行部
200、400 テストコード生成装置
210 第二通信部
280 第二記憶部
290 第二制御部
291、401 情報取得部
292 テストコード生成部
293、402 テンプレート取得部
294、403 パラメータ値取得部
295、404 パラメータ値適用部
500 実行環境
900 通信ネットワーク
100 declarative model orchestration device 110 first communication unit 180 first storage unit 190 first control unit 191 declarative model orchestrator unit 192 provisioning processing execution unit 200, 400 test code generation device 210 second communication unit 280 second storage Section 290 Second Control Section 291, 401 Information Acquisition Section 292 Test Code Generation Section 293, 402 Template Acquisition Section 294, 403 Parameter Value Acquisition Section 295, 404 Parameter Value Application Section 500 Execution Environment 900 Communication Network

Claims (3)

宣言的モデルの情報から、その宣言的モデルの構成要素の情報を抽出する情報取得部と、
前記構成要素の情報に紐づけられているテストコードのテンプレートを取得するテンプレート取得部と、
記構成要素の情報に紐づけられ、かつ、パラメータ値を要求することを示しているルールに従って、前記テンプレートに適用するパラメータ値を宣言的モデルオーケストレーション装置から取得するパラメータ値取得部と、
得られたパラメータ値を前記テンプレートに適用してテストコードを取得するパラメータ値適用部と、
を備えるテストコード生成装置。
an information acquisition unit that extracts information about the components of the declarative model from the information about the declarative model;
a template acquisition unit that acquires a test code template linked to the information of the component;
a parameter value acquisition unit that acquires , from a declarative model orchestration device, parameter values to be applied to the template according to a rule that is linked to the information of the component and indicates that the parameter values are requested ;
a parameter value application unit that applies the obtained parameter value to the template to obtain a test code;
A test code generator comprising:
コンピュータが、
宣言的モデルの情報から、その宣言的モデルの構成要素の情報を抽出する工程と、
前記構成要素の情報に紐づけられているテストコードのテンプレートを取得する工程と、
記構成要素の情報に紐づけられ、かつ、パラメータ値を要求することを示しているルールに従って、前記テンプレートに適用するパラメータ値を宣言的モデルオーケストレーション装置から取得する工程と、
得られたパラメータ値を前記テンプレートに適用してテストコードを取得する工程と、
を実行することを含むテストコード生成方法。
the computer
extracting information of the components of the declarative model from the information of the declarative model;
obtaining a test code template linked to the information of the component;
a step of acquiring parameter values to be applied to the template from a declarative model orchestration device, according to a rule linked to the information of the component and indicating a request for parameter values ;
applying the resulting parameter values to the template to obtain test code;
A test code generation method that includes executing
コンピュータに、
宣言的モデルの情報から、その宣言的モデルの構成要素の情報を抽出する工程と、
前記構成要素の情報に紐づけられているテストコードのテンプレートを取得する工程と、
記構成要素の情報に紐づけられ、かつ、パラメータ値を要求することを示しているルールに従って、前記テンプレートに適用するパラメータ値を宣言的モデルオーケストレーション装置から取得する工程と、
得られたパラメータ値を前記テンプレートに適用してテストコードを取得する工程と、
を実行させるためのプログラム。
to the computer,
extracting information of the components of the declarative model from the information of the declarative model;
obtaining a test code template linked to the information of the component;
a step of acquiring parameter values to be applied to the template from a declarative model orchestration device, according to a rule that is linked to the information of the component and indicates that parameter values are required ;
applying the resulting parameter values to the template to obtain test code;
program to run the
JP2019085935A 2019-04-26 2019-04-26 TEST CODE GENERATOR, TEST CODE GENERATION METHOD AND PROGRAM Active JP7279497B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019085935A JP7279497B2 (en) 2019-04-26 2019-04-26 TEST CODE GENERATOR, TEST CODE GENERATION METHOD AND PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019085935A JP7279497B2 (en) 2019-04-26 2019-04-26 TEST CODE GENERATOR, TEST CODE GENERATION METHOD AND PROGRAM

Publications (2)

Publication Number Publication Date
JP2020181509A JP2020181509A (en) 2020-11-05
JP7279497B2 true JP7279497B2 (en) 2023-05-23

Family

ID=73024239

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019085935A Active JP7279497B2 (en) 2019-04-26 2019-04-26 TEST CODE GENERATOR, TEST CODE GENERATION METHOD AND PROGRAM

Country Status (1)

Country Link
JP (1) JP7279497B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112799971B (en) * 2021-04-09 2021-06-22 腾讯科技(深圳)有限公司 Data processing method, data processing equipment and computer readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060294506A1 (en) 2004-11-30 2006-12-28 Microsoft Corporation Isolating declarative code to preserve customizations
JP2013145443A (en) 2012-01-13 2013-07-25 Ntt Data Corp Test code generation device, test code generation method and test code generation program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060294506A1 (en) 2004-11-30 2006-12-28 Microsoft Corporation Isolating declarative code to preserve customizations
JP2013145443A (en) 2012-01-13 2013-07-25 Ntt Data Corp Test code generation device, test code generation method and test code generation program

Also Published As

Publication number Publication date
JP2020181509A (en) 2020-11-05

Similar Documents

Publication Publication Date Title
Saha et al. Apache tez: A unifying framework for modeling and building data processing applications
US7937455B2 (en) Methods and systems for modifying nodes in a cluster environment
JP5970617B2 (en) Development support system
ES2291278T3 (en) APPLIANCE AND METHOD FOR CATALOGING SYMBOLIC DATA FOR USE IN COMPUTER PROGRAM OPERATION ANALYSIS.
US9298482B2 (en) Plug-in based templatization framework for automating the creation of open virtualization format virtual appliances
US10552296B2 (en) Human-readable, language-independent stack trace summary generation
Koslovski et al. Reliability support in virtual infrastructures
JP2017062767A5 (en)
US10466985B2 (en) Hybrid deoptimization mechanism for class hierarchy analysis
WO2017033441A1 (en) System construction assistance system and method, and storage medium
JP6040837B2 (en) Information processing apparatus management method and program
US20150347170A1 (en) Grouping virtual machines in a cloud application
TW201229749A (en) An automated operating system test framework
WO2017017937A1 (en) Deployment device, deployment method, and recording medium
JP7279497B2 (en) TEST CODE GENERATOR, TEST CODE GENERATION METHOD AND PROGRAM
US20150160955A1 (en) Dynamically modifiable component model
US8589734B2 (en) Verifying correctness of processor transactions
JP2014174609A (en) Hardware configuration estimation system, hardware configuration estimation method and hardware configuration estimation program
JP2014191472A (en) Device, program, and method for supporting operation environmental transition
US9652260B2 (en) Scriptable hierarchical emulation engine
US20190317877A1 (en) Application state monitoring
JP2022118286A (en) Detection apparatus, test system, detection method, and program
CN116339908A (en) Virtual machine starting method, device, computer equipment and storage medium
JP6705482B2 (en) System construction parameter management device, system construction parameter management system, system construction parameter management method, and system construction parameter management program
US20180167278A1 (en) A system and method for facilitating migration of server infrastructure services

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220310

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20221214

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230213

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: 20230411

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230424

R151 Written notification of patent or utility model registration

Ref document number: 7279497

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151