Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5492006B2 - Test code generation program and apparatus - Google Patents
[go: Go Back, main page]

JP5492006B2 - Test code generation program and apparatus - Google Patents

Test code generation program and apparatus Download PDF

Info

Publication number
JP5492006B2
JP5492006B2 JP2010174804A JP2010174804A JP5492006B2 JP 5492006 B2 JP5492006 B2 JP 5492006B2 JP 2010174804 A JP2010174804 A JP 2010174804A JP 2010174804 A JP2010174804 A JP 2010174804A JP 5492006 B2 JP5492006 B2 JP 5492006B2
Authority
JP
Japan
Prior art keywords
screen
item
value
name
test
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
JP2010174804A
Other languages
Japanese (ja)
Other versions
JP2012037938A (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.)
Toshiba Corp
Toshiba Digital Solutions Corp
Original Assignee
Toshiba Corp
Toshiba Solutions 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 Toshiba Corp, Toshiba Solutions Corp filed Critical Toshiba Corp
Priority to JP2010174804A priority Critical patent/JP5492006B2/en
Publication of JP2012037938A publication Critical patent/JP2012037938A/en
Application granted granted Critical
Publication of JP5492006B2 publication Critical patent/JP5492006B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明の各実施形態は、Webアプリケーション開発のテスト工程に用いられるテストコードを生成するためのテストコード生成プログラム及び装置に関する。   Each embodiment of the present invention relates to a test code generation program and apparatus for generating a test code used in a test process of Web application development.

Webアプリケーション開発におけるテスト工程においては、設計書から作成されたWebアプリケーションに対し、例えば、Webブラウザ上で画面項目を確認するテスト、値を入力して画面遷移を確認するテスト、結果の値を確認するテスト、といった様々なテストが実行される。これらのテストを実行する方法としては、人手によって実行する方法と、テスト自動化ツールによって実行する方法とがある。近年では、テスト自動化ツールによって自動的に実行する方法が一般的に用いられる。   In the test process in Web application development, for example, a test for checking screen items on a Web browser, a test for checking screen transitions by entering values, and a result value for a Web application created from a design document Various tests are performed such as As a method for executing these tests, there are a method that is executed manually and a method that is executed by a test automation tool. In recent years, a method of automatically executing by a test automation tool is generally used.

しかしながら、テスト自動化ツールによって実行する方法は、テスト自動化ツールに入力されるテストコードを作成する必要がある。テストコードの作成には手間がかかるため、設計書などからテスト手順と一体化させたテストコードを自動的に生成する方法が幾つか提案されている。   However, the method executed by the test automation tool needs to create a test code input to the test automation tool. Since it takes time to create a test code, several methods for automatically generating a test code integrated with a test procedure from a design document or the like have been proposed.

特許第4148527号公報Japanese Patent No. 4148527 特開2002−366387号公報JP 2002-366387 A

しかしながら、以上のようなテストコードを自動生成する技術は、通常は何の問題もないが、本発明者の検討によれば、テスト手順と一体化させたテストコードを生成するため、テスト自動化ツールを変更した場合、テスト手順だけを再利用することが困難である。   However, the technology for automatically generating the test code as described above usually has no problem. However, according to the study of the present inventor, a test automation tool is used to generate the test code integrated with the test procedure. It is difficult to reuse only the test procedure.

また、テスト手順が分離されている場合も、テスト対象のソフトウェアごとにテスト手順を定義する必要があり、コストがかかる。   Even when the test procedures are separated, it is necessary to define a test procedure for each piece of software to be tested, which is expensive.

本明細書に開示した実施形態は、テスト手順を再利用化でき、テスト対象のソフトウェア毎にテスト手順を定義する必要がないテストコード生成プログラム及び装置を提供することを目的とする。   An object of the embodiment disclosed in the present specification is to provide a test code generation program and apparatus that can reuse a test procedure and does not need to define a test procedure for each software to be tested.

以下で説明する本発明の実施形態のテストコード生成装置は、検索対象の物理名の値と検索結果の値とを関連付けて記憶する関連テーブルとしてのデータベース部に接続され、Webアプリケーションにおける複数の設計書データからテスト自動化ツールで用いられるテストコードを生成する。   A test code generation device according to an embodiment of the present invention described below is connected to a database unit as a related table that stores a physical name value to be searched and a search result value in association with each other, and a plurality of designs in a Web application Test code used by test automation tool is generated from document data.

実施形態のテストコード生成装置は、前記各設計書データのうちの画面遷移設計書データであって、前記Webアプリケーションの各画面の遷移に関し、画面遷移IDの項目と値、シナリオ名の項目と値、リクエスト発生画面URLの項目と値、及び遷移先画面URLの項目と値、を関連付けて示す前記画面遷移設計書データの入力を受け付ける。   The test code generation device according to the embodiment is screen transition design document data among the respective design document data, and regarding the transition of each screen of the Web application, the item and value of the screen transition ID, the item and value of the scenario name The input of the screen transition design document data indicating the items and values of the request generation screen URL and the items and values of the transition destination screen URL in association with each other is received.

実施形態のテストコード生成装置は、前記各設計書データのうちの画面項目設計書データであって、前記Webアプリケーションの各画面の項目に関し、画面項目IDの項目と値、HTML要素の項目と値、デフォルト値の項目と値、Name属性の項目と値、及び関連テーブルの物理名の項目と値のうち、前記画面項目IDのうちの第1画面項目IDの項目と値、前記HTML要素の項目とタイトルを示す値、及び前記デフォルト値の項目と値を関連付けて示し、前記画面項目IDのうちの第2画面項目IDの項目と値、前記HTML要素の項目とテキストエリアを示す値、前記Name属性の項目と検索対象の物理名の値、及び前記関連テーブルの物理名の項目と値、を関連付けて示すと共に、前記画面項目IDのうちの第3画面項目IDの項目と値、前記HTML要素の項目とインプットを示す値、及び前記Name属性の項目と実行を示す値、を関連付けて示す前記画面項目設計書データの入力を受け付ける。   The test code generation device according to the embodiment is screen item design document data among the respective design document data, and relates to the item of each screen of the Web application, the item and value of the screen item ID, and the item and value of the HTML element. Among the screen item IDs, the item and value of the first element among the items and values of the default value, the item and value of the Name attribute, and the item and value of the physical name of the related table, the item of the HTML element And the value indicating the title, the item of the default value and the value are associated with each other, the item and value of the second screen item ID of the screen item ID, the value of the item of the HTML element and the text area, the Name The attribute item and the physical name value to be searched, and the physical name item and value in the association table are shown in association with each other, and the third screen item ID item in the screen item IDs Receives an input of the screen item design document data indicating associating a value, indicating the item and execution of the items and the values indicating the input of HTML elements, and the Name attribute.

実施形態のテストコード生成装置は、前記各設計書データのうちの画面一覧設計書データであって、前記Webアプリケーションの各画面に関し、画面IDの項目と値、及び画面URLの項目と値、を関連付けて示す前記画面一覧設計書データの入力を受け付ける。   The test code generation device according to the embodiment is screen list design document data of the respective design document data, and for each screen of the Web application, screen ID items and values, and screen URL items and values. The input of the screen list design document data shown in association is accepted.

実施形態のテストコード生成装置のテスト手順パターン記憶手段は、前記シナリオ名のいずれかの値と同一の文字列からなるテスト手順パターンIDと、テスト順番に沿って配列した複数のテスト手順名とを含むテスト手順パターン情報を記憶する。   The test procedure pattern storage means of the test code generation device of the embodiment includes a test procedure pattern ID composed of the same character string as any value of the scenario name, and a plurality of test procedure names arranged in the test order. The test procedure pattern information is stored.

実施形態のテストコード生成装置の操作記憶手段は、前記テスト手順名、操作及びテストコード断片IDを関連付けて記憶する。   The operation storage means of the test code generation device of the embodiment stores the test procedure name, operation, and test code fragment ID in association with each other.

実施形態のテストコード生成装置のテストコード断片記憶手段は、前記テストコード断片ID及び変数部分を含んでおり、前記変数部分としては、前記リクエスト発生画面URLの項目、前記遷移先画面URLの項目、前記HTML要素の項目とタイトルを示す値、前記HTML要素の項目とインプットを示す値、又は画面項目値の項目、を個別に含んでいる、複数のテストコード断片情報を記憶する。   The test code fragment storage means of the test code generation device of the embodiment includes the test code fragment ID and a variable part, and the variable part includes an item of the request generation screen URL, an item of the transition destination screen URL, A plurality of pieces of test code fragment information individually including values indicating the items and titles of the HTML elements, values indicating the items and inputs of the HTML elements, and items of screen item values are stored.

実施形態のテストコード生成装置は、前記入力を受け付けた画面遷移設計書データ内からシナリオ名の項目と値を抽出する。   The test code generation apparatus according to the embodiment extracts a scenario name item and a value from the screen transition design document data that has received the input.

実施形態のテストコード生成装置の画面遷移オブジェクト生成手段は、前記抽出したシナリオ名の値を含み、当該シナリオ名の値と同一のシナリオ名の値が他に抽出されている場合には更に識別番号を含むオブジェクト名と、プロパティとを含む画面遷移オブジェクトであって、当該プロパティとしては、当該オブジェクト名内のシナリオ名の値に前記画面遷移設計書データ内で関連付けられたリクエスト発生画面URLの項目と値及び遷移先画面URLの項目と値と、当該リクエスト発生画面URLの値に一致する前記画面一覧設計書内の画面URLの値に関連付けられた画面IDの値からなるリクエスト発生画面IDの値と項目と、当該リクエスト発生画面IDの値をオブジェクト名としたリクエスト発生画面オブジェクトを示すリクエスト発生画面項目と、当該遷移先画面URLの値に一致する前記画面一覧設計書内の画面URLの値に関連付けられた画面IDの値からなる遷移先画面IDと、当該遷移先画面IDの値をオブジェクト名とした遷移先画面オブジェクトを示す遷移先画面項目とを含んでいる、前記画面遷移オブジェクトを生成する。   The screen transition object generation unit of the test code generation device of the embodiment includes the extracted scenario name value, and further includes an identification number when another scenario name value identical to the scenario name value is extracted. A screen transition object including an object name including a property and a property, and the property includes a request generation screen URL item associated with a scenario name value in the object name in the screen transition design document data, and A request generation screen ID value including a value and a transition destination screen URL item and value, and a screen ID value associated with the screen URL value in the screen list design document that matches the request generation screen URL value; A request indicating a request generation screen object with the item and the value of the request generation screen ID as an object name Occurrence screen item, a transition destination screen ID consisting of a screen ID value associated with the value of the screen URL in the screen list design document that matches the value of the transition destination screen URL, and the value of the transition destination screen ID The screen transition object including the transition destination screen item indicating the transition destination screen object having the object name as the object name is generated.

実施形態のテストコード生成装置の発生画面オブジェクト生成手段は、前記画面遷移オブジェクトのリクエスト発生画面IDの値からなるオブジェクト名と、プロパティとを含むリクエスト発生画面オブジェクトであって、当該プロパティとしては、当該リクエスト発生画面IDの値に中間一致する前記画面項目設計書内の画面項目IDの値からなる画面項目を含んでいる、前記リクエスト発生画面オブジェクトを生成する。   The generation screen object generation means of the test code generation device of the embodiment is a request generation screen object including an object name consisting of a value of the request generation screen ID of the screen transition object and a property, The request generation screen object including the screen item including the value of the screen item ID in the screen item design document that matches the value of the request generation screen ID in the middle is generated.

実施形態のテストコード生成装置の発生画面項目オブジェクト生成手段は、前記リクエスト発生画面オブジェクトの画面項目IDの値からなるオブジェクト名と、プロパティとを含むリクエスト発生画面項目オブジェクトであって、当該プロパティとしては、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値及びデフォルト値の項目と値からなる第1発生画面項目と、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値、Name属性の項目と値及び関連テーブルの物理名の項目と値からなる第2発生画面項目と、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値及びName属性の項目と値からなる第3発生画面項目とのうちのいずれかの発生画面項目を含んでいる、前記リクエスト発生画面項目オブジェクトを個別に生成する。   The generation screen item object generation unit of the test code generation device of the embodiment is a request generation screen item object including an object name including a value of a screen item ID of the request generation screen object and a property, and the property includes , A first generation screen item composed of an HTML element item and value and a default value item and value associated with the screen item ID value in the screen item design document, and the screen item ID value. The second generation screen item consisting of the item and value of the HTML element and the item and value of the Name attribute and the physical name item and value of the related table associated with each other in the design document, and the screen item design in the value of the screen item ID Any of the HTML element items and values associated in the document and the third occurrence screen item consisting of the Name attribute items and values It contains Kano generation screen item, individually generates the request generation screen item objects.

実施形態のテストコード生成装置の遷移先画面オブジェクト生成手段は、前記画面遷移オブジェクトの遷移先画面IDの値からなるオブジェクト名と、プロパティとを含む遷移先画面オブジェクトであって、当該プロパティとしては、当該遷移先画面IDの値に中間一致する前記画面項目設計書内の画面項目IDの値からなる画面項目を含んでいる、前記遷移先画面オブジェクトを生成する。   The transition destination screen object generation means of the test code generation device of the embodiment is a transition destination screen object including an object name consisting of a value of the transition destination screen ID of the screen transition object and a property, and the property includes The transition destination screen object including the screen item including the value of the screen item ID in the screen item design document that matches the value of the transition destination screen ID in the middle is generated.

実施形態のテストコード生成装置の遷移先画面項目オブジェクト生成手段は、前記遷移先画面オブジェクトの画面項目IDの値からなるオブジェクト名と、プロパティとを含む遷移先画面項目オブジェクトであって、当該プロパティとしては、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値及びデフォルト値の項目と値からなる第1遷移先画面項目と、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値、Name属性の項目と値及び関連テーブルの物理名の項目と値からなる第2遷移先画面項目と、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値及びName属性の項目と値からなる第3遷移先画面項目とのうちのいずれかの遷移先画面項目を含んでいる、前記遷移先画面項目オブジェクトを個別に生成する。   The transition destination screen item object generation unit of the test code generation device of the embodiment is a transition destination screen item object including an object name including a value of a screen item ID of the transition destination screen object and a property, and the property Is a first transition destination screen item consisting of an HTML element item and value and a default value item and value associated with the value of the screen item ID in the screen item design document, and the value of the screen item ID. The HTML element item and value associated in the screen item design document, the Name attribute item and value, the second transition destination screen item consisting of the physical name item and value of the related table, and the value of the screen item ID Transition of any of the HTML element items and values associated with the screen item design document and the third transition destination screen item consisting of the Name attribute item and value Includes previous screen item, individually generates the transition destination screen item objects.

実施形態のテストコード生成装置の設計情報オブジェクト生成手段は、前記画面遷移オブジェクト、前記リクエスト発生画面オブジェクト、前記リクエスト発生画面項目オブジェクト、前記遷移先画面オブジェクト及び前記遷移先画面項目オブジェクトを含む設計情報オブジェクトを生成する。   The design information object generation means of the test code generation device of the embodiment includes a design information object including the screen transition object, the request generation screen object, the request generation screen item object, the transition destination screen object, and the transition destination screen item object Is generated.

実施形態のテストコード生成装置のテスト手順パターン読出手段は、前記設計情報オブジェクト内の画面遷移オブジェクトのオブジェクト名に含まれるシナリオ名の値に一致するテスト手順パターンIDを含むテスト手順パターン情報を前記テスト手順パターン記憶手段から読み出す。   The test procedure pattern reading means of the test code generation device according to the embodiment includes the test procedure pattern information including a test procedure pattern ID that matches a scenario name value included in the object name of the screen transition object in the design information object. Read from the procedure pattern storage means.

実施形態のテストコード生成装置は、当該読み出したテスト手順パターン情報内のテスト手順名を前記テスト順番に沿って読み出し、当該読み出したテスト手順名に一致する前記操作記憶手段内のテスト手順名に関連付けられたテストコード断片IDを当該操作記憶手段から読み出す。   The test code generation device of the embodiment reads the test procedure name in the read test procedure pattern information along the test order, and associates it with the test procedure name in the operation storage unit that matches the read test procedure name The read test code fragment ID is read from the operation storage means.

実施形態のテストコード生成装置は、当該読み出したテストコード断片IDに一致するテストコード断片IDを含むテストコード情報を前記テストコード断片記憶手段から読み出し、当該読み出したテストコード情報を前記テスト順番に沿って結合してテストコード雛形情報を作成する。   The test code generation device according to the embodiment reads test code information including a test code fragment ID that matches the read test code fragment ID from the test code fragment storage unit, and the read test code information in the test order. To create test code template information.

実施形態のテストコード生成装置は、前記テストコード雛形情報内の各々の変数部分のうち、「前記リクエスト発生画面URLの項目」又は「前記遷移先画面URLの項目」を示す変数部分を前記設計情報オブジェクト内で当該変数部分に一致する項目の値に置換し、前記各々の変数部分のうち、「前記HTML要素の項目がタイトルを示すデフォルト値の値」を示す変数部分を前記設計情報オブジェクト内で当該変数部分と同一オブジェクト内のデフォルト値の値に置換し、前記各々の変数部分のうち、「前記HTML要素の項目がインプットを示すName属性の値」又は「物理名がidを示す値」を示す変数部分を前記設計情報オブジェクト内で当該変数部分と同一オブジェクト内のName属性の値に置換し、当該「前記物理名がidを示す値」を示す変数部分については更に当該同一オブジェクト内の物理名の値に一致する前記データベース内の物理名の値に関連付けられた検索結果の値を当該置換したName属性の値の次の行に挿入することにより、前記テストコード雛形情報から前記テストコードを生成する。   The test code generation device according to the embodiment includes a variable portion indicating “the request generation screen URL item” or “the transition destination screen URL item” among the variable portions in the test code template information as the design information. The value of the item that matches the variable part in the object is replaced, and among the variable parts, the variable part indicating “the value of the default value indicating the title of the item of the HTML element” is set in the design information object. Replace with the value of the default value in the same object as the variable part, and in each of the variable parts, "the value of the Name attribute that the HTML element item indicates input" or "the value that the physical name indicates id" The variable part shown is replaced with the value of the Name attribute in the same object as the variable part in the design information object, and the “value indicating the physical name indicates id” is indicated. For the variable part, the value of the search result associated with the physical name value in the database that matches the physical name value in the same object is inserted into the line next to the value of the replaced Name attribute. The test code is generated from the test code template information.

第1の実施形態に係るテストコード生成装置及びその周辺構成を示すブロック図である。1 is a block diagram illustrating a test code generation device and its peripheral configuration according to a first embodiment. 同実施形態における動作を説明するためのフローチャートである。It is a flowchart for demonstrating the operation | movement in the embodiment. 第2の実施形態に係る画面遷移設計書データの構成を示す模式図である。It is a schematic diagram which shows the structure of the screen transition design document data which concerns on 2nd Embodiment. 同実施形態における画面項目設計書データの構成を示す模式図である。It is a schematic diagram which shows the structure of the screen item design document data in the embodiment. 同実施形態におけるテーブル項目設計書データの構成を示す模式図である。It is a schematic diagram which shows the structure of the table item design document data in the embodiment. 同実施形態における例外処理設計書データの構成を示す模式図である。It is a schematic diagram which shows the structure of the exception process design document data in the embodiment. 同実施形態における画面一覧設計書データの構成を示す模式図である。It is a schematic diagram which shows the structure of the screen list design document data in the embodiment. 同実施形態における入力画面の一例を示す模式図である。It is a schematic diagram which shows an example of the input screen in the embodiment. 同実施形態におけるテストコード断片情報の一例を示す模式図である。It is a schematic diagram which shows an example of the test code fragment information in the same embodiment. 同実施形態におけるテストコード断片情報の一例を示す模式図である。It is a schematic diagram which shows an example of the test code fragment information in the same embodiment. 同実施形態におけるテストコード断片情報の一例を示す模式図である。It is a schematic diagram which shows an example of the test code fragment information in the same embodiment. 同実施形態におけるテストコード断片情報の一例を示す模式図である。It is a schematic diagram which shows an example of the test code fragment information in the same embodiment. 同実施形態におけるテスト手順パターン情報の一例を示す模式図である。It is a schematic diagram which shows an example of the test procedure pattern information in the embodiment. 同実施形態における設計情報オブジェクトの一例を示す模式図である。It is a schematic diagram which shows an example of the design information object in the embodiment. 同実施形態におけるテストコード雛形情報の生成動作を説明するための模式図である。It is a schematic diagram for demonstrating the production | generation operation | movement of the test code template information in the embodiment. 同実施形態におけるテストコードの生成動作を説明するための模式図である。It is a schematic diagram for demonstrating the production | generation operation | movement of the test code in the same embodiment. 第3の実施形態に係るテストコード断片情報の一例を示す模式図である。It is a schematic diagram which shows an example of the test code fragment information which concerns on 3rd Embodiment. 同実施形態におけるテストコード断片情報の一例を示す模式図である。It is a schematic diagram which shows an example of the test code fragment information in the same embodiment. 同実施形態におけるテストコード断片情報の一例を示す模式図である。It is a schematic diagram which shows an example of the test code fragment information in the same embodiment. 同実施形態におけるテストコード断片情報の一例を示す模式図である。It is a schematic diagram which shows an example of the test code fragment information in the same embodiment. 同実施形態におけるテストコード雛形情報の生成動作を説明するための模式図である。It is a schematic diagram for demonstrating the production | generation operation | movement of the test code template information in the embodiment. 同実施形態におけるテストコードの生成動作を説明するための模式図である。It is a schematic diagram for demonstrating the production | generation operation | movement of the test code in the same embodiment.

以下、各実施形態について図面を用いて説明する。なお、以下のテストコード生成装置は、ハードウェア構成、又はハードウェア資源とソフトウェアとの組合せ構成のいずれでも実施可能となっている。組合せ構成のソフトウェアとしては、予めネットワーク又は記憶媒体からテストコード生成装置となるコンピュータにインストールされ、テストコード生成装置の機能を実現させるためのプログラムが用いられる。また、テストコード生成装置は、この名称に限らず、例えば、Webアプリケーション開発のテスト工程を支援することからWebアプリケーションテスト支援装置と呼んでもよく、また、テストコード作成装置やテストコード自動生成装置といった任意の名称で呼んでもよい。   Each embodiment will be described below with reference to the drawings. Note that the following test code generation apparatus can be implemented with either a hardware configuration or a combination configuration of hardware resources and software. As the software of the combination configuration, a program that is installed in advance from a network or a storage medium into a computer serving as a test code generation device and realizes the function of the test code generation device is used. The test code generation device is not limited to this name, and may be called a Web application test support device because it supports a test process of Web application development, or a test code generation device or a test code automatic generation device. You may call by arbitrary names.

(第1の実施形態)
図1は第1の実施形態に係るテストコード生成装置及びその周辺構成を示すブロック図である。このテストコード生成装置10は、設計書データ、テスト手順パターン情報、テストコード断片情報及びデータベース部20内のデータに基づいて、テストコードを生成して出力するものである。なお、データベース部20内のデータは、設計書データに基づいて、テーブルデータ生成部21により書き込まれている。また、出力されたテストコードは、テスト自動化ツール部30によるテストに用いられる。
(First embodiment)
FIG. 1 is a block diagram showing a test code generation device and its peripheral configuration according to the first embodiment. The test code generation device 10 generates and outputs a test code based on design document data, test procedure pattern information, test code fragment information, and data in the database unit 20. The data in the database unit 20 is written by the table data generation unit 21 based on the design document data. The output test code is used for the test by the test automation tool unit 30.

このようなテストコード生成装置10は、設計書読込部11、設計情報オブジェクト生成部12、テスト手順パターン記憶部13、操作記憶部14、テストコード断片記憶部15、テスト手順パターン抽出部16及びテストコード生成部17を備えている。   Such a test code generation device 10 includes a design document reading unit 11, a design information object generation unit 12, a test procedure pattern storage unit 13, an operation storage unit 14, a test code fragment storage unit 15, a test procedure pattern extraction unit 16, and a test. A code generation unit 17 is provided.

ここで、設計書読込部11は、ユーザの操作により、入力となる各種の設計書データの読込を実行し、読み込んだ設計書データを設計情報オブジェクト生成部12に送出するものである。各種の設計書データとしては、画面遷移設計書データ、画面項目設計書データ、テーブル項目設計書データ、画面一覧設計書データ及び例外処理設計書データがある。なお、ユーザの操作に対応するデータ又は命令の入力は、GUI(graphical user interface)を介して該当する機能部11〜17に伝えられる。   Here, the design document reading unit 11 reads various design document data to be input by a user operation, and sends the read design document data to the design information object generation unit 12. As various design document data, there are screen transition design document data, screen item design document data, table item design document data, screen list design document data, and exception processing design document data. In addition, input of data or a command corresponding to a user operation is transmitted to the corresponding functional units 11 to 17 via a GUI (graphical user interface).

設計情報オブジェクト生成部12は、設計書読込部11から送出された各種の設計書データのうちの画面遷移設計書データからテスト対象処理名(シナリオ名)を抽出する処理対象抽出機能と、抽出されたテスト対象処理名毎に、当該各種の設計書データから設計情報オブジェクトを生成する設計情報オブジェクト生成機能とをもっている。ここで、設計情報オブジェクトは、設計書データのうち、上位概念のデータ(例、画面に関するデータ項目とデータ)を上位のオブジェクトとして表し、この上位概念のデータに対する下位概念のデータ(例、画面内の項目に関するデータ項目とデータ)を下位のオブジェクトとして表し、上位と下位のオブジェクトを関連付けてなるオブジェクトデータである。   The design information object generation unit 12 is extracted with a process target extraction function that extracts a test target process name (scenario name) from the screen transition design document data among the various design document data sent from the design document reading unit 11. Each test target process name has a design information object generation function for generating a design information object from the various design document data. Here, the design information object represents the high-level concept data (eg, data items and data related to the screen) of the design document data as the high-level object, and the low-level concept data (eg, in the screen). Data items and data) are represented as lower objects, and the upper and lower objects are associated with each other.

テスト手順パターン記憶部13は、1つのテスト手順パターン名と、テスト順番に沿って記述された複数のテスト手順名とを含み、テスト対象処理としてのある機能における一連のテスト手順のパターンを示すテスト手順パターン情報を記憶している。ある機能とは、検索、更新、登録、削除などであり、ユーザが追加することも可能である。テスト手順パターン名は、設計情報オブジェクト部12により抽出されるテスト対象処理名と同一の文字列からなる。このようなテスト手順パターン情報は、予めユーザにより、テスト手順パターン記憶部13に書き込まれている。また、テスト手順パターン情報は、ユーザの操作により、適宜、追加、変更又は削除等の編集が可能となっている。   The test procedure pattern storage unit 13 includes a single test procedure pattern name and a plurality of test procedure names described in the test order, and indicates a series of test procedure patterns in a certain function as a test target process Procedure pattern information is stored. Some functions include search, update, registration, and deletion, and can be added by the user. The test procedure pattern name is composed of the same character string as the test target process name extracted by the design information object unit 12. Such test procedure pattern information is previously written in the test procedure pattern storage unit 13 by the user. Further, the test procedure pattern information can be appropriately added, changed, or deleted by user operation.

操作記憶部14は、テスト手順パターン記憶部13内のテスト手順パターン情報に含まれるテスト手順名と、テストコード断片記憶部15内のテストコード断片情報に含まれるテストコード断片IDとを関連付けて記憶する。操作記憶部14は、予めユーザの操作により、各情報が関連付けて書き込まれている。   The operation storage unit 14 stores the test procedure name included in the test procedure pattern information in the test procedure pattern storage unit 13 and the test code fragment ID included in the test code fragment information in the test code fragment storage unit 15 in association with each other. To do. In the operation storage unit 14, each information is written in advance in association with a user operation.

テストコード断片記憶部15は、テストコード断片IDと、設計書オブジェクト内の項目とを含んでテストコードの一部が記述されたテストコード断片情報を記憶する。テストコード断片情報は、予めユーザの操作により、テストコード断片記憶部15に書き込まれている。なお、テストコード断片情報は、テストコード雛形断片情報と呼んでもよい。   The test code fragment storage unit 15 stores test code fragment information in which a part of the test code is described including the test code fragment ID and the item in the design document object. The test code fragment information is previously written in the test code fragment storage unit 15 by a user operation. The test code fragment information may be called test code template fragment information.

テスト手順パターン抽出部16は、設計情報オブジェクト生成部12により抽出されたテスト対象処理名に基づいて、テスト手順パターン記憶部13からテスト手順パターン情報を読み出し、このテスト手順パターン情報をテストコード生成部17に送出する機能をもっている。   The test procedure pattern extraction unit 16 reads the test procedure pattern information from the test procedure pattern storage unit 13 based on the test target process name extracted by the design information object generation unit 12, and uses the test procedure pattern information as the test code generation unit. 17 to send to

テストコード生成部17は、テスト手順パターン抽出部16から送出されたテスト手順パターン情報と、当該テスト手順パターン情報内の各テスト手順名に操作記憶部14内で関連付けられたテストコード断片IDを含むテストコード断片記憶部15内のテストコード断片情報に基づいて、テストコード雛形情報を生成するテストコード雛形生成機能と、当該生成したテストコード雛形情報と、設計情報オブジェクト生成部12により生成された設計情報オブジェクトと、テストで使用するデータベース部20の値とに基づいてテストコードを生成するテストコード生成機能と、生成したテストコードを出力するテストコード出力機能とをもっている。   The test code generation unit 17 includes the test procedure pattern information sent from the test procedure pattern extraction unit 16 and the test code fragment ID associated in the operation storage unit 14 with each test procedure name in the test procedure pattern information. Based on the test code fragment information in the test code fragment storage unit 15, a test code template generation function for generating test code template information, the generated test code template information, and a design generated by the design information object generation unit 12 It has a test code generation function for generating a test code based on the information object and the value of the database unit 20 used in the test, and a test code output function for outputting the generated test code.

データベース部20は、テーブルデータ生成部21により書き込まれたテスト用のデータを記憶するテーブルであり、テストコード生成部17から読出可能となっている。補足すると、データベース部20は、検索対象の物理名の値と検索結果の値とを関連付けて記憶する関連テーブルとして用いられる。   The database unit 20 is a table for storing test data written by the table data generation unit 21 and can be read from the test code generation unit 17. Supplementally, the database unit 20 is used as an association table that stores a physical name value to be searched and a search result value in association with each other.

テーブルデータ生成部21は、各種設計書データのうちのテーブル項目設計書データに基づいてテスト用のデータを生成し、このデータをデータベース部20に登録する機能を持つ。このテーブルデータ生成部21は、既存技術が使用可能となっている。   The table data generation unit 21 has a function of generating test data based on table item design document data among various design document data and registering this data in the database unit 20. The table data generation unit 21 can use existing technology.

テスト自動化ツール部30は、テストコード生成装置10から出力されたテストコードを用いて、各種設計書データに示されたソフトウェアのテスト工程を実行するテスト自動化ツールプログラムを実行する機能をもっている。   The test automation tool unit 30 has a function of executing a test automation tool program for executing a software testing process indicated in various design document data using the test code output from the test code generation device 10.

次に、以上のように構成されたテストコード生成装置の動作を図2のフローチャートを用いて説明する。なお、データベース部20は、既存技術により、テスト用のデータが登録されているものとする。   Next, the operation of the test code generation apparatus configured as described above will be described with reference to the flowchart of FIG. It is assumed that the test data is registered in the database unit 20 using existing technology.

いま、テストコード生成装置10においては、ユーザの操作により、設計書読込部11が、入力となる各種の設計書データを読み込む(ST1)。読み込まれた各種の設計書データは、設計書読込部11から設計情報オブジェクト生成部12に送出される。   Now, in the test code generation device 10, the design document reading unit 11 reads various design document data to be input by a user operation (ST1). Various types of read design document data are sent from the design document reading unit 11 to the design information object generating unit 12.

次に、設計情報オブジェクト生成部12は、送出された設計書データのうちの画面遷移設計書からテスト対象処理名を抽出し(ST2)、抽出したテスト対象処理名毎に、各種の設計書データから設計情報オブジェクトを生成する(ST3)。   Next, the design information object generation unit 12 extracts the test target process name from the screen transition design document in the transmitted design document data (ST2), and various design document data for each extracted test target process name. A design information object is generated from (ST3).

テスト手順パターン抽出部16は、抽出されたテスト対象処理名に基づいて、テスト手順パターン記憶部13からテスト手順パターン情報を読み出す(ST4)。読み出されたテスト手順パターン情報は、テスト手順パターン抽出部16からテストコード生成部17に送出される。   The test procedure pattern extraction unit 16 reads test procedure pattern information from the test procedure pattern storage unit 13 based on the extracted test target process name (ST4). The read test procedure pattern information is sent from the test procedure pattern extraction unit 16 to the test code generation unit 17.

テストコード生成部17は、ユーザによりGUIから入力されたテストコード断片の種類から使用するテストコード断片情報を特定する(ST5)。例えば、複数のテスト自動化ツールA,Bがある場合、入力されたテストコード断片の種類が“ツールA用テストコード断片”であれば、ツールA用のテストコード断片情報を特定し、入力されたテストコード断片の種類が“ツールB用テストコード断片”であれば、ツールB用のテストコード断片情報を特定する。なお、ステップST5は、複数のテスト自動化ツールが無い場合等には省略可能となっている。   The test code generation unit 17 specifies test code fragment information to be used from the type of the test code fragment input from the GUI by the user (ST5). For example, in the case where there are a plurality of test automation tools A and B, if the type of the input test code fragment is “test code fragment for tool A”, the test code fragment information for tool A is identified and input If the type of the test code fragment is “test code fragment for tool B”, the test code fragment information for tool B is specified. Note that step ST5 can be omitted when there is no plurality of test automation tools.

テストコード生成部17は、テスト手順パターン抽出部16から送出されたテスト手順パターン情報と、当該テスト手順パターン情報内の各テスト手順名に操作記憶部14内で関連付けられたテストコード断片IDを含むテストコード断片記憶部15内のテストコード断片情報に基づき、テスト手順パターン情報内のテスト手順名の順番に沿ってテストコード断片情報を結合してテストコード雛形情報を生成する(ST6)。   The test code generation unit 17 includes the test procedure pattern information sent from the test procedure pattern extraction unit 16 and the test code fragment ID associated in the operation storage unit 14 with each test procedure name in the test procedure pattern information. Based on the test code fragment information in the test code fragment storage unit 15, the test code fragment information is generated by combining the test code fragment information in the order of the test procedure names in the test procedure pattern information (ST6).

また、テストコード生成部17は、当該生成したテストコード雛形情報と、設計情報オブジェクト生成部12により生成された設計情報オブジェクトと、テストで使用するデータベース部20の値とに基づいて、テストコードを生成する(ST7)。   Further, the test code generation unit 17 generates a test code based on the generated test code template information, the design information object generated by the design information object generation unit 12, and the value of the database unit 20 used in the test. Generate (ST7).

例えば、テストコード生成部17は、テストコード雛形情報を構成するテストコード断片情報内に含まれる「設計書オブジェクト内の項目」を「設計書オブジェクト内の当該項目の値」や「設計書オブジェクト内の当該項目の値に関連付けられたデータベース部20内の値」に置換することにより、テストコード雛形情報、設計書オブジェクト及びデータベース部20の値からテストコードを生成する。   For example, the test code generation unit 17 sets the “item in the design document object” included in the test code fragment information constituting the test code template information as “the value of the item in the design document object” or “in the design document object”. The test code is generated from the test code template information, the design document object, and the value of the database unit 20 by substituting the value in the database unit 20 associated with the value of the item.

しかる後、テストコード生成部17は、生成したテストコードを出力する(ST8)。出力されたテストコードは、テスト自動化ツール部30によるテスト工程に使用される。   Thereafter, the test code generation unit 17 outputs the generated test code (ST8). The output test code is used for a test process by the test automation tool unit 30.

上述したように本実施形態によれば、入力される設計書データに対し、予め記憶したテスト手順パターン情報及びテストコード断片情報に基づいてテストコードを生成する構成により、テスト手順とテストコードの分離によって、テスト自動化ツールの変更に容易に対応でき、設計書に基づいて、メンテナンス性の高いテストコードを効率的に生成できるため、テスト全体のコストを下げ、Webアプリケーションの品質向上に寄与することができる。   As described above, according to the present embodiment, the test procedure and test code are separated by the configuration in which the test code is generated based on the test procedure pattern information and the test code fragment information stored in advance for the input design document data. Can easily adapt to changes in the test automation tool, and can efficiently generate test code with high maintainability based on the design document, thus reducing the overall cost of testing and contributing to improving the quality of Web applications. it can.

補足すると、本実施形態によれば、テスト手順とテストコードを分離し、設計書データと汎用的なテスト手順パターンから機械的にテストコードを生成する構成により、従来とは異なり、テスト対象のソフトウェア毎にテスト手順を定義する必要がなく、コストを下げることができる。   Supplementally, according to the present embodiment, the test procedure is separated from the test code, and the test code is mechanically generated from the design document data and the general-purpose test procedure pattern. It is not necessary to define a test procedure every time, and the cost can be reduced.

(第2の実施形態)
第2の実施形態は、第1の実施形態に述べた図1の構成及び図2の動作において入出力を具体的に示した例であり、図3乃至図7に示す設計書データを入力し、コード書式がHTML(Hypertext Markup Language)のテスト自動化ツール(ツールA)のテストコードを出力する形態となっている。なお、設計書データの書式は、例えば図3乃至図7に示した如き、必要な内容が書かれていれば任意の書式が使用可能となっている。但し、装置を実装する際には便宜上形式を定める。
(Second Embodiment)
The second embodiment is an example specifically showing input / output in the configuration of FIG. 1 and the operation of FIG. 2 described in the first embodiment, and the design document data shown in FIGS. 3 to 7 is inputted. The test code of the test automation tool (tool A) whose code format is HTML (Hypertext Markup Language) is output. As the format of the design document data, any format can be used as long as necessary contents are written as shown in FIGS. 3 to 7, for example. However, the format is determined for convenience when the device is mounted.

ここで、画面遷移設計書データは、図3に示すように、Webアプリケーションの各画面の遷移に関し、画面遷移IDの項目と値、シナリオ名の項目と値、リクエスト発生画面URLの項目と値、及び遷移先画面URLの項目と値、を関連付けて示している。   Here, as shown in FIG. 3, the screen transition design document data relates to the transition of each screen of the Web application, the screen transition ID item and value, the scenario name item and value, the request generation screen URL item and value, In addition, items and values of the transition destination screen URL are shown in association with each other.

画面項目設計書データは、図4に示すように、Webアプリケーションの各画面の項目に関し、画面項目IDの項目と値、HTML要素の項目と値、デフォルト値の項目と値、Name属性の項目と値、及び関連テーブルの物理名の項目と値のうち、画面項目IDのうちの第1画面項目IDの項目と値、HTML要素の項目とタイトルを示す値、及びデフォルト値の項目と値を関連付けて示し、画面項目IDのうちの第2画面項目IDの項目と値、HTML要素の項目とテキストエリアを示す値、Name属性の項目と検索対象の物理名の値、及び関連テーブルの物理名の項目と値、を関連付けて示すと共に、画面項目IDのうちの第3画面項目IDの項目と値、HTML要素の項目とインプットを示す値、及びName属性の項目と実行を示す値、を関連付けて示している。   As shown in FIG. 4, the screen item design document data includes items and values of screen item IDs, items and values of HTML elements, items and values of default values, items of Name attributes, and items relating to items of each screen of the Web application. Among the items and values of the physical name of the value and related table, the item and value of the first screen item ID of the screen item ID, the value indicating the HTML element item and title, and the value of the default value are associated with the value. Of the second screen item ID of the screen item ID, the value indicating the HTML element item and the text area, the Name attribute item and the physical name value to be searched, and the physical name of the related table Item and value are shown in association with each other, and the item and value of the third screen item ID of the screen item ID, the value of the HTML element item and the input, and the item of the Name attribute and the value of execution are associated with each other. Shows Te.

テーブル項目設計書データは、図5に示すように、Webアプリケーションの検索処理に用いられる関連テーブルのテーブル項目に関し、項目名の項目と値、物理名の項目と値、主キーの項目と値、型の項目と値、及び桁の項目と値、を関連付けて示している。   As shown in FIG. 5, the table item design document data is related to the table items of the related table used in the search processing of the Web application, the item name item and value, the physical name item and value, the primary key item and value, The type item and value, and the digit item and value are shown in association with each other.

例外処理設計書データは、図6に示すように、Webアプリケーションの例外処理に関し、例外発生条件の項目と値、例外発生画面URLの項目と値、例外発生遷移先画面URLの項目と値、及び例外メッセージの項目と値を関連付けて示している。   As shown in FIG. 6, the exception processing design document data relates to exception processing of the Web application, items and values of exception occurrence conditions, items and values of exception occurrence screen URLs, items and values of exception occurrence transition destination screen URLs, and Exception message items are associated with values.

画面一覧設計書データは、図7に示すように、Webアプリケーションの各画面に関し、画面IDの項目と値、及び画面URLの項目と値、を関連付けて示している。   As shown in FIG. 7, the screen list design document data indicates the screen ID items and values and the screen URL items and values associated with each screen of the Web application.

設計書データとテストコード断片情報の種類の入力は、図8に示す入力画面G10から行う。テストコード断片情報の種類は、プルダウン又はリストボックスg11等により選択可能となっており、選択肢として、予めテストコード断片記憶部15に記憶されているテストコード断片情報の種類が表示される。   The type of design document data and test code fragment information is input from the input screen G10 shown in FIG. The type of test code fragment information can be selected by pull-down or list box g11, and the type of test code fragment information stored in advance in test code fragment storage unit 15 is displayed as an option.

ここでは、HTML形式のテストコード断片情報の例を図9乃至図12に示す。   Here, examples of test code fragment information in the HTML format are shown in FIGS.

図9に示したテストコード断片情報は、テストコード断片ID“open”及び変数部分を含んでおり、変数部分としては、リクエスト発生画面URLの項目“#リクエスト発生画面URL#”を含んでいる。同様のテストコード断片情報としては、テストコード断片ID“open”及び変数部分“#遷移先画面URL#を含むテストコード断片情報(図示せず)もテストコード断片記憶部15に記憶されている。   The test code fragment information shown in FIG. 9 includes a test code fragment ID “open” and a variable portion, and the variable portion includes a request generation screen URL item “# request generation screen URL #”. As similar test code fragment information, test code fragment information (not shown) including a test code fragment ID “open” and a variable portion “# transition destination screen URL #” is also stored in the test code fragment storage unit 15.

図10に示したテストコード断片情報は、テストコード断片ID“click”及び変数部分を含んでおり、変数部分としては、HTML要素の項目がインプットである値のName属性の示す値“name=”#HTML要素(input).Name属性#””を含んでいる。ここで、“name="#HTML要素(input).Name属性#"”は、先に示した図4の列タイトル「HTML要素」の値がinputである値の列タイトル「Name属性」の値が変数部分に入ることを意味する。そして、変数部分"#HTML要素(input).Name属性#"が"検索実行"に置き換わった後は、“name="検索実行"”となる。   The test code fragment information shown in FIG. 10 includes a test code fragment ID “click” and a variable part. As the variable part, the value “name =” indicated by the Name attribute of the value in which the item of the HTML element is an input. #HTML element (input) .Name attribute # "" is included. Here, “name =“ # HTML element (input) .Name attribute # ”” is the value of the column title “Name attribute” whose value is the value of the column title “HTML element” in FIG. Means to enter the variable part. Then, after the variable part “#HTML element (input) .Name attribute #” is replaced with “search execution”, “name =“ search execution ””.

図11に示したテストコード断片情報は、テストコード断片ID“assertTitle”及び変数部分を含んでおり、変数部分としては、HTML要素の項目がタイトルである値のデフォルト値の値#HTML要素(title).デフォルト値#”を含んでいる。   The test code fragment information shown in FIG. 11 includes a test code fragment ID “assertTitle” and a variable part. The variable part includes a default value #HTML element (title element whose title is an HTML element item). ). Contains the default value # ”.

図12に示したテストコード断片情報は、テストコード断片ID“type”及び変数部分を含んでおり、変数部分としては、HTML要素の項目がテキストエリアである値のName属性の示す値“name=“#HTML要素(textarea).Name属性#””を含んでいる。なお、各図9〜図12中、変数部分を記号#で挟んだ部分として示したが、これに限らず、他の記号で挟んだ部分を変数部分としてもよい。これは他の実施形態でも同様である。   The test code fragment information shown in FIG. 12 includes a test code fragment ID “type” and a variable part. As the variable part, the value “name =” indicated by the Name attribute whose value is an HTML element item is a text area. “#HTML element (textarea) .Name attribute #” ”is included. 9 to 12, the variable portion is shown as a portion sandwiched between symbols #, but the present invention is not limited to this, and a portion sandwiched between other symbols may be used as a variable portion. The same applies to other embodiments.

テスト手順パターン記憶部13には、予め図13に示す如き、シナリオ名のいずれかの値(search)と同一の文字列からなるテスト手順パターンID(search)と、テスト順番に沿って配列した複数のテスト手順名(access, check, type, click, check)とを含むテスト手順パターン情報が記憶されている。図示したテスト手順パターン情報は、一般的な検索処理のテスト手順パターンの例を示している。下線部分のテスト手順名は、操作記憶部14内の操作及びツールコード断片IDと1対1に対応している。   In the test procedure pattern storage unit 13, as shown in FIG. 13, a test procedure pattern ID (search) consisting of the same character string as any one of the scenario name values (search) and a plurality of sequences arranged in the test order Test procedure pattern information including the test procedure name (access, check, type, click, check) is stored. The illustrated test procedure pattern information shows an example of a test procedure pattern for a general search process. The underlined test procedure name has a one-to-one correspondence with the operation in the operation storage unit 14 and the tool code fragment ID.

テストコード断片記憶部15にも、すでにいくつかの書式のテストコード断片が記憶されている。テスト手順パターンの操作と各テストコードの操作の対応は、操作記憶部14に記憶されている。   The test code fragment storage unit 15 already stores test code fragments of several formats. The correspondence between the operation of the test procedure pattern and the operation of each test code is stored in the operation storage unit 14.

また、データベース部20は、検索対象の物理名の値と検索結果の値とを関連付けて記憶する関連テーブルとして用いられ、テストコード生成装置10に接続されている。   Further, the database unit 20 is used as an association table that stores the physical name value to be searched and the search result value in association with each other, and is connected to the test code generation device 10.

次に、以上のようなデータの具体例を用いた場合のテストコード生成装置の動作を図2のフローチャートに沿って説明する。   Next, the operation of the test code generation apparatus when using a specific example of data as described above will be described with reference to the flowchart of FIG.

ステップST1においては、テストコード生成装置10の設計書読込部11が、ユーザの操作により、入力画面G10から各種の設計書データの入力を受け付ける。また、設計書読込部11は、ユーザの操作により、テストコード断片情報の種類の選択を受け付ける。設計書データは本装置の書式に準拠したものとする。設計書読込部11は、本装置の書式に準拠しない設計書データが入力されたときには、画面に検証エラーを表示する。準拠しない旨の判定は、例えば予め保持する本装置の書式データに記述された項目と、入力された設計書データ内の項目とを比較し、両者が一致するか否か等により実行可能となっている。   In step ST1, the design document reading unit 11 of the test code generation device 10 receives input of various design document data from the input screen G10 by a user operation. In addition, the design document reading unit 11 accepts selection of the type of test code fragment information by a user operation. The design document data shall conform to the format of this device. The design document reading unit 11 displays a verification error on the screen when design document data that does not conform to the format of the apparatus is input. Judgment of non-compliance can be executed by comparing items described in the format data of the device held in advance with items in the input design document data, and whether or not they match. ing.

ステップST2においては、設計情報オブジェクト生成部12は、図3に示した如き、入力を受け付けた画面遷移設計書データ内からテスト対象処理名としてのシナリオ名の項目と値(search, search, search, regist)を抽出する。   In step ST2, as shown in FIG. 3, the design information object generation unit 12 receives scenario input items and values (search, search, search, regist).

ステップST3においては、設計情報オブジェクト生成部12は、抽出されたシナリオ名毎に、図14に示す如き、設計情報オブジェクトを生成する。   In step ST3, the design information object generation unit 12 generates a design information object as shown in FIG. 14 for each extracted scenario name.

設計情報オブジェクトは、画面遷移設計書データ、画面項目設計書データ、データ項目設計書データ、画面一覧設計書データ、例外処理設計書データから生成する。図14では、テスト対象として抽出された1つ目のsearch(search1)の設計情報オブジェクトを示している。以下にステップST3−1〜ST3−3として設計情報オブジェクト生成の手順を示す。   The design information object is generated from screen transition design document data, screen item design document data, data item design document data, screen list design document data, and exception handling design document data. FIG. 14 shows the design information object of the first search (search1) extracted as the test target. The design information object generation procedure is shown below as steps ST3-1 to ST3-3.

ステップST3−1においては、設計情報オブジェクト生成部12は、画面遷移設計書データから、search1のリクエスト発生画面と遷移先画面をプロパティとするsearch1オブジェクトを生成する。   In step ST 3-1, the design information object generation unit 12 generates a search 1 object having properties of the request generation screen and the transition destination screen of search 1 from the screen transition design document data.

詳しくは、設計情報オブジェクト生成部12は、抽出したシナリオ名の値(search)を含み、当該シナリオ名の値(search)と同一のシナリオ名の値(search)が他に抽出されている場合には更に識別番号(1)を含むオブジェクト名(search1)と、プロパティとを含む画面遷移オブジェクト(search1オブジェクト)を生成する。当該画面遷移オブジェクト(search1オブジェクト)のプロパティとしては、当該オブジェクト名内のシナリオ名の値(search)に画面遷移設計書データ内で関連付けられたリクエスト発生画面URLの項目と値(searchIndex.jsp)及び遷移先画面URLの項目と値(searchResult.jsp)と、当該リクエスト発生画面URLの値に一致する画面一覧設計書内の画面URLの値(searchIndex.jsp)に関連付けられた画面IDの値(S1)からなるリクエスト発生画面IDの値(S1)と項目と、当該リクエスト発生画面IDの値をオブジェクト名(S1)としたリクエスト発生画面オブジェクト(S1オブジェクト)を示すリクエスト発生画面項目と、当該遷移先画面URLの値(searchIndex.jsp)に一致する画面一覧設計書内の画面URLの値(searchIndex.jsp)に関連付けられた画面IDの値(S2)からなる遷移先画面IDと、当該遷移先画面IDの値をオブジェクト名とした遷移先画面オブジェクト(S2オブジェクト)を示す遷移先画面項目とを含んでいる。   Specifically, the design information object generation unit 12 includes the extracted scenario name value (search), and the scenario name value (search) that is the same as the scenario name value (search) is extracted elsewhere. Generates a screen transition object (search1 object) including an object name (search1) including the identification number (1) and a property. The properties of the screen transition object (search1 object) include the request generation screen URL item and value (searchIndex.jsp) associated with the scenario name value (search) in the object name in the screen transition design document data, and The transition destination screen URL item and value (searchResult.jsp), and the screen ID value (S1) associated with the screen URL value (searchIndex.jsp) in the screen list design document that matches the request generation screen URL value ) Request generation screen ID value (S1) and item, a request generation screen item indicating a request generation screen object (S1 object) with the request generation screen ID value as an object name (S1), and the transition destination The image associated with the screen URL value (searchIndex.jsp) in the screen list design document that matches the screen URL value (searchIndex.jsp) It includes a transition destination screen ID composed of a surface ID value (S2) and a transition destination screen item indicating a transition destination screen object (S2 object) with the value of the transition destination screen ID as an object name.

ステップST3−2においては、設計情報オブジェクト生成部12は、画面項目をプロパティとするリクエスト発生画面と遷移先画面のそれぞれのオブジェクトを生成する。   In step ST <b> 3-2, the design information object generation unit 12 generates objects of a request generation screen and a transition destination screen having screen items as properties.

詳しくは、設計情報オブジェクト生成部12は、画面遷移オブジェクト(search1オブジェクト)のリクエスト発生画面IDの値(S1)からなるオブジェクト名(S1)と、プロパティとを含むリクエスト発生画面オブジェクト(S1オブジェクト)を生成する。当該リクエスト発生画面オブジェクト(S1オブジェクト)のプロパティとしては、当該リクエスト発生画面IDの値に中間一致する画面項目設計書内の画面項目IDの値(S1-1, S1-2, S1-3)からなる画面項目を含んでいる、当該リクエスト発生画面オブジェクト(S1オブジェクト)を生成する。   Specifically, the design information object generation unit 12 generates a request generation screen object (S1 object) including an object name (S1) composed of the request generation screen ID value (S1) of the screen transition object (search1 object) and properties. Generate. As the property of the request generation screen object (S1 object), from the screen item ID value (S1-1, S1-2, S1-3) in the screen item design document that matches the request generation screen ID value in the middle The request generation screen object (S1 object) including the screen item is generated.

同様に、設計情報オブジェクト生成部12は、画面遷移オブジェクト(search1オブジェクト)の遷移先画面IDの値(S2)からなるオブジェクト名(S2)と、プロパティとを含む遷移先画面オブジェクト(S2オブジェクト)を生成する。当該遷移先画面オブジェクト(S2オブジェクト)のプロパティとしては、当該遷移先画面IDの値(S2)に中間一致する画面項目設計書内の画面項目IDの値(S2-1, S2-2, S2-3)からなる画面項目を含んでいる。   Similarly, the design information object generation unit 12 obtains a transition destination screen object (S2 object) including an object name (S2) composed of a transition destination screen ID value (S2) of the screen transition object (search1 object) and a property. Generate. As the property of the transition destination screen object (S2 object), the value (S2-1, S2-2, S2-) of the screen item ID in the screen item design document that matches the transition destination screen ID value (S2) in the middle The screen item consisting of 3) is included.

ステップST3−3においては、設計情報オブジェクト生成部12は、さらに画面項目要素をプロパティとする画面項目オブジェクトを作成する。   In step ST3-3, the design information object generation unit 12 further creates a screen item object whose property is a screen item element.

詳しくは、設計情報オブジェクト生成部12は、リクエスト発生画面オブジェクト(S1オブジェクト)の画面項目IDの値(S1-1, S1-2, S1-3)からなるオブジェクト名(S1-1, S1-2, S1-3)と、プロパティとを含むリクエスト発生画面項目オブジェクト(S1-1オブジェクト、S1-2オブジェクト、S1-3オブジェクト)を個別に生成する。   Specifically, the design information object generation unit 12 creates an object name (S1-1, S1-2) composed of the screen item ID values (S1-1, S1-2, S1-3) of the request generation screen object (S1 object). , S1-3) and a request generation screen item object (S1-1 object, S1-2 object, S1-3 object) including properties.

当該リクエスト発生画面項目オブジェクトのプロパティとしては、当該画面項目IDの値(S1-1)に画面項目設計書内で関連付けられたHTML要素の項目と値(title)及びデフォルト値の項目と値(検索条件画面)からなる第1発生画面項目と、当該画面項目IDの値(S1-2)に画面項目設計書内で関連付けられたHTML要素の項目と値(textarea)、Name属性の項目と値(idFromForSearch)及び関連テーブルの物理名の項目と値(id)からなる第2発生画面項目と、当該画面項目IDの値(S1-3)に画面項目設計書内で関連付けられたHTML要素の項目と値(input)及びName属性の項目と値(検索実行)からなる第3発生画面項目とのうちのいずれかの発生画面項目を含んでいる。   The properties of the request generation screen item object include the HTML element item and value (title) associated with the screen item ID value (S1-1) in the screen item design document, and the default value item and value (search The first occurrence screen item consisting of the condition screen), the HTML element item and value (textarea) associated with the screen item ID value (S1-2) in the screen item design document, the Name attribute item and value ( idFromForSearch) and the second generation screen item consisting of the physical name field and value (id) in the related table, and the HTML element field associated with the screen field ID value (S1-3) in the screen field design document It includes any occurrence screen item of a value (input) and Name attribute items and a third occurrence screen item consisting of a value (search execution).

このようなオブジェクトの状態にすることで、画面と画面項目、画面項目要素の関係がわかるようになる。   By making such an object state, the relationship between the screen and screen items and screen item elements can be understood.

また、設計情報オブジェクト生成部12は、ステップST3−1〜ST3−3に示したように生成した画面遷移オブジェクト、リクエスト発生画面オブジェクト、リクエスト発生画面項目オブジェクト、遷移先画面オブジェクト及び遷移先画面項目オブジェクトを含む設計情報オブジェクトを生成する。   In addition, the design information object generation unit 12 generates the screen transition object, request generation screen object, request generation screen item object, transition destination screen object, and transition destination screen item object generated as shown in steps ST3-1 to ST3-3. A design information object including is generated.

ステップST4においては、テスト手順パターン抽出部16は、抽出されたテスト対象処理名に基づいて、テスト手順パターン記憶部13からテスト手順パターン情報を読み出す。その際、設計情報オブジェクトのオブジェクト名を使用する。   In step ST4, the test procedure pattern extraction unit 16 reads the test procedure pattern information from the test procedure pattern storage unit 13 based on the extracted test target process name. At that time, the object name of the design information object is used.

詳しくは、テスト手順パターン抽出部16は、例えば、設計情報オブジェクト内の画面遷移オブジェクトのオブジェクト名(search1)に含まれるシナリオ名の値(search)に一致するテスト手順パターンID(search)を含むテスト手順パターン情報をテスト手順パターン記憶部13から読み出す。   Specifically, the test procedure pattern extraction unit 16 includes a test procedure pattern ID (search) that matches the scenario name value (search) included in the object name (search1) of the screen transition object in the design information object, for example. The procedure pattern information is read from the test procedure pattern storage unit 13.

更に詳しくは、テスト手順パターン情報の抽出は以下のステップST4−1〜ST4−2に示す手順で実行する。   More specifically, the extraction of test procedure pattern information is executed according to the procedure shown in steps ST4-1 to ST4-2 below.

ステップST4−1においては、テスト対象処理が例外処理であるかを、画面遷移設計書データと例外処理設計書データから判定する。画面遷移設計書データのリクエスト発生画面URLと遷移先画面URLの対が、例外処理設計書データの例外発生画面URLと例外発生遷移先画面URLの対と同じであれば、その処理を例外処理と判定する。   In step ST4-1, it is determined from the screen transition design document data and the exception process design document data whether the test target process is an exception process. If the pair of the request generation screen URL and the transition destination screen URL of the screen transition design document data is the same as the pair of the exception generation screen URL and the exception generation transition destination screen URL of the exception processing design document data, the processing is referred to as exception processing. judge.

具体的には、テスト手順パターン抽出部16は、テスト手順パターン情報の読み出しよりも先に、設計情報オブジェクト内の画面遷移オブジェクトのオブジェクト名(search1)に含まれるシナリオ名の値(search)に一致する画面遷移設計書データ内のシナリオ名の値(search)に関連付けられたリクエスト発生画面URLの値及び遷移先画面URLの値と、例外処理設計書データ内の例外発生画面URLの値及び例外発生遷移先画面URLの値とが一致するか否かを判定し、両者が一致する場合には例外処理と判定する。   Specifically, the test procedure pattern extraction unit 16 matches the scenario name value (search) included in the object name (search1) of the screen transition object in the design information object before reading the test procedure pattern information. The request generation screen URL value and the transition destination screen URL value associated with the scenario name value (search) in the screen transition design document data to be executed, the exception generation screen URL value in the exception processing design document data, and the exception generation It is determined whether or not the value of the transition destination screen URL matches, and when both match, it is determined as an exception process.

ステップST4−2においては、両者が一致しない場合(例外処理ではない場合)は、テスト対象処理画面、テスト対象処理の入力項目から、対応するテスト手順パターン情報を抽出する。例えば、同じsearchというテスト対象処理でも、対象画面の入力項目数(HTML要素:textareaを含む画面項目オブジェクト)が複数ある場合は詳細検索のテスト手順パターンID(searchDetail)を含むテスト手順パターン情報を抽出し、入力項目数が1つである場合は検索のテスト手順パターンID(search)を含むテスト手順パターン情報を抽出する。   In step ST4-2, if the two do not match (not the exception process), the corresponding test procedure pattern information is extracted from the test target process screen and the input items of the test target process. For example, even if the test process is the same search, if there are multiple input items (HTML element: screen item object including textarea) on the target screen, test procedure pattern information including test procedure pattern ID (searchDetail) for detailed search is extracted If the number of input items is one, test procedure pattern information including a test procedure pattern ID (search) for search is extracted.

なお、ステップST4−1〜ST4−2で抽出されるテスト手順パターン情報は、以下の例の通りである。   The test procedure pattern information extracted in steps ST4-1 to ST4-2 is as follows.

テスト対象処理名としてのシナリオ名“search”で入力項目数が1つの場合、検索のテスト手順パターン情報(テスト手順パターンID:search)が抽出される。   When the scenario name “search” as the test target process name has one input item, the test procedure pattern information for the search (test procedure pattern ID: search) is extracted.

テスト対象処理名としてのシナリオ名“search”で入力項目数が複数の場合、詳細検索のテスト手順パターン情報(テスト手順パターンID:searchDetail)が抽出される。   When the scenario name “search” as the test target process name has a plurality of input items, test procedure pattern information (test procedure pattern ID: searchDetail) for detailed search is extracted.

テスト対象処理名としてのシナリオ名“search”で例外処理の場合、例外のテスト手順パターン情報(テスト手順パターンID:error)が抽出される。   In the case of an exception process with the scenario name “search” as the test target process name, exception test procedure pattern information (test procedure pattern ID: error) is extracted.

テスト対象処理名としてのシナリオ名“regist”の場合、登録のテスト手順パターン情報(テスト手順パターンID:regist)が抽出される。   In the case of the scenario name “regist” as the test target process name, registered test procedure pattern information (test procedure pattern ID: regist) is extracted.

ステップST5においては、テストコード生成部17は、入力画面G10で選択されたテストコード断片情報の種類から使用するテストコード断片情報を特定する。ここでは、HTMLのコード書式に対応するツールA用のテストコード断片情報の種類から使用するテストコード断片情報が特定される。   In step ST5, the test code generation unit 17 specifies test code fragment information to be used from the type of test code fragment information selected on the input screen G10. Here, the test code fragment information to be used is specified from the type of test code fragment information for tool A corresponding to the HTML code format.

ステップST6においては、テストコード生成部17は、図15に示すように、ステップST4で読み出されたテスト手順パターン情報と、ステップST5で特定された種類のテストコード断片情報とに基づいて、テストコード雛形情報を生成する。   In step ST6, the test code generation unit 17 performs test based on the test procedure pattern information read in step ST4 and the type of test code fragment information specified in step ST5, as shown in FIG. Generate code template information.

詳しくは、ステップST6は、以下のステップST6−1〜ST6−2に示すように実行される。   Specifically, step ST6 is executed as shown in steps ST6-1 to ST6-2 below.

ステップST6−1においては、テストコード生成部17は、ステップST4で読み出されたテスト手順パターン情報内のテスト手順名をテスト順番に沿って読み出し、当該読み出したテスト手順名に一致する操作記憶部14内のテスト手順名に関連付けられたテストコード断片IDを当該操作記憶部14から読み出す。   In step ST6-1, the test code generation unit 17 reads the test procedure name in the test procedure pattern information read in step ST4 in the test order, and an operation storage unit that matches the read test procedure name. The test code fragment ID associated with the test procedure name in 14 is read from the operation storage unit 14.

ステップST6−2においては、テストコード生成部17は、読み出したテストコード断片IDに一致するテストコード断片IDを含むテストコード情報をテストコード断片記憶部15から読み出し、当該読み出したテストコード情報をテスト順番に沿って結合してテストコード雛形情報を作成する。   In step ST6-2, the test code generation unit 17 reads the test code information including the test code fragment ID that matches the read test code fragment ID from the test code fragment storage unit 15, and tests the read test code information. Test code template information is created by combining them in order.

ステップST7においては、図16に示すように、テストコード生成部17は、当該生成したテストコード雛形情報と、設計情報オブジェクト生成部12により生成された設計情報オブジェクトと、テストで使用するデータベース部20の値とに基づいて、テストコードを生成する。   In step ST7, as shown in FIG. 16, the test code generating unit 17 generates the generated test code template information, the design information object generated by the design information object generating unit 12, and the database unit 20 used in the test. Test code is generated based on the value of.

詳しくは、ステップST7は、以下のステップST7−1〜ST7−2に示すように実行される。   Specifically, step ST7 is executed as shown in steps ST7-1 to ST7-2 below.

ステップST7−1においては、テストコード生成部17は、テストコード雛形情報の変数部分に設計情報オブジェクトの情報を当てはめて、テストコードを生成する。テストコード雛形の変数部分とは#で囲んだ部分のことをいう。   In step ST7-1, the test code generation unit 17 applies the information of the design information object to the variable part of the test code template information to generate a test code. The variable part of the test code template is the part enclosed by #.

ステップST7−2においては、テストコード生成部17は、検索結果の確認などでデータベースの値を参照する場合に、データベース部20から期待値を取得する。テストコード生成部17は、アプリケーションの検索キーで使用した値の物理名を設計情報オブジェクトから取得し、設計書に基づいて作成されたテーブルに対してデータベース検索を行う。   In step ST7-2, the test code generation unit 17 acquires an expected value from the database unit 20 when referring to a database value for confirmation of a search result or the like. The test code generation unit 17 acquires the physical name of the value used in the application search key from the design information object, and performs a database search on the table created based on the design document.

具体的には、テストコード生成部17は、テストコード雛形情報内の各々の変数部分のうち、「リクエスト発生画面URLの項目」又は「遷移先画面URLの項目」を示す変数部分(#リクエスト発生画面URL#)を設計情報オブジェクト内で当該変数部分に一致する項目の値(searchIndex.jsp)に置換する。   Specifically, the test code generation unit 17 among the variable parts in the test code template information, a variable part indicating “request generation screen URL item” or “transition destination screen URL item” (# request generation The screen URL #) is replaced with the value (searchIndex.jsp) of the item that matches the variable part in the design information object.

また、テストコード生成部17は、各々の変数部分のうち、「HTML要素の項目がタイトルを示すデフォルト値の値」を示す変数部分(#HTML要素(title).デフォルト値#)を設計情報オブジェクト内で当該変数部分と同一オブジェクト(S1-1オブジェクト)内のデフォルト値の値(検索条件画面)に置換する。   In addition, the test code generation unit 17 assigns a variable portion (#HTML element (title) .default value #) indicating a “default value indicating that the item of the HTML element indicates a title” of each variable portion as a design information object. Is replaced with the default value (search condition screen) in the same object (S1-1 object) as the variable part.

また、テストコード生成部17は、各々の変数部分のうち、「HTML要素の項目がインプットを示すName属性の値」又は「HTML要素の項目がテキストエリアを示すName属性の値」を示す変数部分(「#HTML要素(input).Name属性#」又は「#HTML要素(textarea).Name属性#」)を設計情報オブジェクト内で当該変数部分と同一オブジェクト(S1-3オブジェクト又はS1-2オブジェクト)の値(「検索実行」又は「idFromForSearch」)に置換する。   Also, the test code generation unit 17 includes a variable portion indicating “a value of a Name attribute indicating that an HTML element item indicates an input” or “a value of a Name attribute indicating an text element” of each variable portion. ("#HTML element (input) .Name attribute #" or "#HTML element (textarea) .Name attribute #") is the same object (S1-3 object or S1-2 object) as the variable part in the design information object Replace with the value of “Execute Search” or “idFromForSearch”.

また、テストコード生成部17は、当該「HTML要素の項目がテキストエリアを示すName属性の値」を示す変数部分(#HTML要素(textarea).Name属性#)については更に当該同一オブジェクト(S1-2オブジェクト)内の物理名の値(id)に一致するデータベース内の物理名の値(id)に関連付けられた検索結果の値(1111)を当該置換したName属性の値(idFromForSearch)の次の行(<td><td>)に挿入する。このように、テストコード生成部17は、テストコード雛形情報からテストコードを生成する。   Further, the test code generation unit 17 further adds the same object (S1-S1) to the variable portion (#HTML element (textarea) .Name attribute #) indicating the “value of the Name attribute indicating that the HTML element item is a text area”. Next to the value of the Name attribute (idFromForSearch) that replaced the value (1111) of the search result associated with the physical name value (id) in the database that matches the physical name value (id) in (2 objects) Insert in line (<td> <td>). In this way, the test code generation unit 17 generates a test code from the test code template information.

ステップST8においては、テストコード生成部17は、生成したテストコードを出力する。   In step ST8, the test code generation unit 17 outputs the generated test code.

上述したように第2の実施形態によれば、第1の実施形態の構成において、具体的な設計書データ、テスト手順パターン情報、操作記憶部14の記憶内容及びテストコード断片情報を用いた構成により、第1の実施形態の効果に加え、HTMLのコード書式をもつテストコードを生成することができる。   As described above, according to the second embodiment, in the configuration of the first embodiment, a configuration using specific design document data, test procedure pattern information, storage contents of the operation storage unit 14, and test code fragment information. Thus, in addition to the effects of the first embodiment, a test code having an HTML code format can be generated.

(第3の実施形態)
第3の実施形態は、第1の実施形態に述べた図1の構成及び図2の動作において入出力を具体的に示した例であり、図3乃至図7に示した設計書データを入力し、コード書式がJava(登録商標)のテスト自動化ツール(ツールB)のテストコードを出力する形態となっている。なお、各種の設計書データ、設計情報オブジェクト、テスト手順パターン情報及びステップST1〜ST4までの処理は、第2の実施形態と同一であるので、重複した説明を省略する。
(Third embodiment)
The third embodiment is an example specifically showing input and output in the configuration of FIG. 1 and the operation of FIG. 2 described in the first embodiment, and the design document data shown in FIGS. 3 to 7 is input. The test code of the test automation tool (tool B) whose code format is Java (registered trademark) is output. Note that the various design document data, design information object, test procedure pattern information, and processes from step ST1 to ST4 are the same as those in the second embodiment, and thus redundant description is omitted.

以下では、図2のフローチャートのステップST5から説明する。   Below, it demonstrates from step ST5 of the flowchart of FIG.

ステップST5においては、テストコード生成部17は、入力画面G10で選択されたテストコード断片情報の種類から使用するテストコード断片情報を特定する。ここでは、Javaのコード書式に対応するツールB用のテストコード断片情報の種類から使用するテストコード断片情報が特定される。   In step ST5, the test code generation unit 17 specifies test code fragment information to be used from the type of test code fragment information selected on the input screen G10. Here, the test code fragment information to be used is specified from the type of the test code fragment information for tool B corresponding to the Java code format.

ここで、Java形式のテストコード断片情報の例を図17乃至図20に示す。   Here, examples of Java-format test code fragment information are shown in FIGS.

図17に示したテストコード断片情報は、テストコード断片ID“open”及び変数部分を含んでおり、変数部分としては、リクエスト発生画面URLの項目“#リクエスト発生画面URL#”を含んでいる。同様のテストコード断片情報としては、テストコード断片ID“open”及び変数部分“#遷移先画面URL#を含むテストコード断片情報(図示せず)もテストコード断片記憶部15に記憶されている。   The test code fragment information shown in FIG. 17 includes a test code fragment ID “open” and a variable portion, and the variable portion includes a request generation screen URL item “# request generation screen URL #”. As similar test code fragment information, test code fragment information (not shown) including a test code fragment ID “open” and a variable portion “# transition destination screen URL #” is also stored in the test code fragment storage unit 15.

図18に示したテストコード断片情報は、テストコード断片ID(assertEquals)及び変数部分を含んでおり、変数部分としては、HTML要素の項目がタイトルを示すデフォルト値の値(#HTML要素(title).デフォルト値#)を含んでいる。   The test code fragment information shown in FIG. 18 includes a test code fragment ID (assertEquals) and a variable part. The variable part includes a default value (#HTML element (title)) in which the item of the HTML element indicates a title. Contains the default value #).

図19に示したテストコード断片情報は、テストコード断片ID(type)及び変数部分を含んでおり、変数部分としては、HTML要素の項目がテキストエリアを示すName属性の値及び物理名がidを示す値(#HTML要素(textarea).Name属性#、#物理名(id)#)を含んでいる。   The test code fragment information shown in FIG. 19 includes a test code fragment ID (type) and a variable part. As the variable part, the value of the Name attribute indicating the text area and the physical name are id. The indicated value (#HTML element (textarea) .Name attribute #, #physical name (id) #) is included.

図20に示したテストコード断片情報は、テストコード断片ID(click)及び変数部分を含んでおり、変数部分としては、HTML要素の項目がインプットを示すName属性の値(#HTML要素(input).Name属性#)を含んでいる。   The test code fragment information shown in FIG. 20 includes a test code fragment ID (click) and a variable part. As the variable part, the value of the Name attribute (#HTML element (input)) in which the item of the HTML element indicates the input .Name attribute #).

ステップST6においては、テストコード生成部17は、図21に示すように、ステップST4で読み出されたテスト手順パターン情報と、ステップST5で特定された種類のテストコード断片情報とに基づいて、テストコード雛形情報を生成する。   In step ST6, as shown in FIG. 21, the test code generation unit 17 performs a test based on the test procedure pattern information read in step ST4 and the type of test code fragment information specified in step ST5. Generate code template information.

詳しくは、ステップST6は、以下のステップST6−1〜ST6−2に示すように実行される。   Specifically, step ST6 is executed as shown in steps ST6-1 to ST6-2 below.

ステップST6−1においては、テストコード生成部17は、ステップST4で読み出されたテスト手順パターン情報内のテスト手順名をテスト順番に沿って読み出し、当該読み出したテスト手順名に一致する操作記憶部14内のテスト手順名に関連付けられたテストコード断片IDを当該操作記憶部14から読み出す。   In step ST6-1, the test code generation unit 17 reads the test procedure name in the test procedure pattern information read in step ST4 in the test order, and an operation storage unit that matches the read test procedure name. The test code fragment ID associated with the test procedure name in 14 is read from the operation storage unit 14.

ステップST6−2においては、テストコード生成部17は、読み出したテストコード断片IDに一致するテストコード断片IDを含むテストコード情報をテストコード断片記憶部15から読み出し、当該読み出したテストコード情報をテスト順番に沿って結合してテストコード雛形情報を作成する。   In step ST6-2, the test code generation unit 17 reads the test code information including the test code fragment ID that matches the read test code fragment ID from the test code fragment storage unit 15, and tests the read test code information. Test code template information is created by combining them in order.

ステップST7においては、図22に示すように、テストコード生成部17は、当該生成したテストコード雛形情報と、設計情報オブジェクト生成部12により生成された設計情報オブジェクトと、テストで使用するデータベース部20の値とに基づいて、テストコードを生成する。   In step ST7, as shown in FIG. 22, the test code generation unit 17 generates the generated test code template information, the design information object generated by the design information object generation unit 12, and the database unit 20 used in the test. Test code is generated based on the value of.

具体的には、テストコード生成部17は、テストコード雛形情報内の各々の変数部分のうち、「リクエスト発生画面URLの項目」又は「遷移先画面URLの項目」を示す変数部分(#リクエスト発生画面URL#)を設計情報オブジェクト内で当該変数部分に一致する項目の値(searchIndex.jsp)に置換する。   Specifically, the test code generation unit 17 among the variable parts in the test code template information, a variable part indicating “request generation screen URL item” or “transition destination screen URL item” (# request generation The screen URL #) is replaced with the value (searchIndex.jsp) of the item that matches the variable part in the design information object.

また、テストコード生成部17は、各々の変数部分のうち、「HTML要素の項目がタイトルを示すデフォルト値の値」を示す変数部分(#HTML要素(title).デフォルト値#)を設計情報オブジェクト内で当該変数部分と同一オブジェクト(S1-1オブジェクト)内のデフォルト値の値(検索条件画面)に置換する。   In addition, the test code generation unit 17 assigns a variable portion (#HTML element (title) .default value #) indicating a “default value indicating that the item of the HTML element indicates a title” of each variable portion as a design information object. Is replaced with the default value (search condition screen) in the same object (S1-1 object) as the variable part.

また、テストコード生成部17は、各々の変数部分のうち、「HTML要素の項目がテキストエリアを示すName属性の値及び物理名がidを示す値」を示す変数部分(#HTML要素(textarea).Name属性#、#物理名(id)#)を設計情報オブジェクト内で当該変数部分と同一オブジェクト(S1-2オブジェクト)内のName属性の値(idFromForSearch)及び物理名の値(id)に一致するデータベース内の物理名の値(id)に関連付けられた検索結果の値(1111)にそれぞれ置換する。   In addition, the test code generation unit 17 includes a variable part (#HTML element (textarea) indicating the value of the Name attribute indicating that the HTML element item indicates a text area and the physical name indicating id) among the variable parts. .Name attribute #, # physical name (id) #) match the value of the Name attribute (idFromForSearch) and physical value (id) in the same object (S1-2 object) as the variable part in the design information object To the search result value (1111) associated with the physical name value (id) in the database to be replaced.

また、テストコード生成部17は、各々の変数部分のうち、「HTML要素の項目がインプットを示すName属性の値」を示す変数部分(#HTML要素(input).Name属性#)を設計情報オブジェクト内で当該変数部分と同一オブジェクト(S1-3オブジェクト)内のName属性の値(検索実行)に置換する。このように、テストコード生成部17は、テストコード雛形情報からテストコードを生成する。   In addition, the test code generation unit 17 assigns a variable part (#HTML element (input) .Name attribute #) indicating “value of Name attribute indicating that the HTML element item indicates input” among the variable parts to the design information object. Is replaced with the value of the Name attribute (search execution) in the same object (S1-3 object) as the variable part. In this way, the test code generation unit 17 generates a test code from the test code template information.

ステップST8においては、テストコード生成部17は、生成したテストコードを出力する。   In step ST8, the test code generation unit 17 outputs the generated test code.

上述したように第3の実施形態によれば、第2の実施形態のテスト手順パターン情報、操作記憶部14の記憶内容及びテストコード断片情報に代えて、Java形式に対応したテスト手順パターン情報、操作記憶部14の記憶内容及びテストコード断片情報を用いた構成により、第1の実施形態の効果に加え、Javaのコード書式をもつテストコードを生成することができる。   As described above, according to the third embodiment, instead of the test procedure pattern information of the second embodiment, the storage contents of the operation storage unit 14 and the test code fragment information, the test procedure pattern information corresponding to the Java format, In addition to the effects of the first embodiment, a test code having a Java code format can be generated by the configuration using the storage contents of the operation storage unit 14 and the test code fragment information.

以上で説明した少なくとも一つの実施形態によれば、テスト手順パターン情報とテストコード断片情報に基づいてテストコード雛形情報を生成し、テストコード雛形情報と設計情報オブジェクトとテスト用の値とに基づいてテストコードを生成する構成により、テスト手順を再利用化でき、テスト対象のソフトウェア毎にテスト手順を定義する必要をなくすことができる。   According to at least one embodiment described above, the test code template information is generated based on the test procedure pattern information and the test code fragment information, and based on the test code template information, the design information object, and the test value. With the configuration for generating the test code, the test procedure can be reused, and it is not necessary to define the test procedure for each software to be tested.

なお、上記の各実施形態に記載した手法は、コンピュータに実行させることのできるプログラムとして、磁気ディスク(フロッピー(登録商標)ディスク、ハードディスクなど)、光ディスク(CD−ROM、DVDなど)、光磁気ディスク(MO)、半導体メモリなどの記憶媒体に格納して頒布することもできる。   Note that the methods described in the above embodiments are, as programs that can be executed by a computer, magnetic disks (floppy (registered trademark) disks, hard disks, etc.), optical disks (CD-ROMs, DVDs, etc.), magneto-optical disks. (MO), stored in a storage medium such as a semiconductor memory, and distributed.

この記憶媒体としては、プログラムを記憶でき、かつコンピュータが読み取り可能な記憶媒体であれば、その記憶形式は何れの形態であっても良い。   The storage medium may be in any form as long as it can store a program and can be read by a computer.

また、記憶媒体からコンピュータにインストールされたプログラムの指示に基づきコンピュータ上で稼働しているOS(オペレーティングシステム)や、データベース管理ソフト、ネットワークソフト等のMW(ミドルウェア)等が上記実施形態を実現するための各処理の一部を実行しても良い。   In addition, an OS (operating system) running on a computer based on an instruction of a program installed in the computer from a storage medium, MW (middleware) such as database management software, network software, and the like realize the above-described embodiment. A part of each process may be executed.

さらに、各実施形態における記憶媒体は、コンピュータと独立した媒体に限らず、LANやインターネット等により伝送されたプログラムをダウンロードして記憶または一時記憶した記憶媒体も含まれる。   Furthermore, the storage medium in each embodiment is not limited to a medium independent of a computer, but also includes a storage medium in which a program transmitted via a LAN, the Internet, or the like is downloaded and stored or temporarily stored.

また、記憶媒体は1つに限らず、複数の媒体から上記の各実施形態における処理が実行される場合も本発明における記憶媒体に含まれ、媒体構成は何れの構成であっても良い。   Further, the number of storage media is not limited to one, and the case where the processing in each of the above embodiments is executed from a plurality of media is also included in the storage media in the present invention, and the media configuration may be any configuration.

そして、各実施形態におけるコンピュータは、記憶媒体に記憶されたプログラムに基づき、上記の各実施形態における各処理を実行するものであって、パソコン等の1つからなる装置、複数の装置がネットワーク接続されたシステム等の何れの構成であっても良い。   The computer in each embodiment executes each process in each of the above embodiments based on a program stored in a storage medium, and a single device such as a personal computer or a plurality of devices are connected to a network. Any configuration of the system or the like may be used.

さらに、各実施形態におけるコンピュータとは、パソコンに限らず、情報処理機器に含まれる演算処理装置、マイコン等も含み、プログラムによって本発明の機能を実現することが可能な機器、装置を総称している。   Furthermore, the computer in each embodiment is not limited to a personal computer, and includes a processing device, a microcomputer, and the like included in an information processing device, and is a generic term for devices and devices that can realize the functions of the present invention by a program. Yes.

なお、本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   In addition, although some embodiment of this invention was described, these embodiment is shown as an example and is not intending limiting the range of invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

10…テストコード生成装置、11…設計書読込部、12…設計情報オブジェクト生成部、13…テスト手順パターン記憶部、14…操作記憶部、15…テストコード断片記憶部、16…テスト手順パターン抽出部、17…テストコード生成部、20…データベース部、21…テーブルデータ生成部、30…テスト自動化ツール部。   DESCRIPTION OF SYMBOLS 10 ... Test code production | generation apparatus, 11 ... Design document reading part, 12 ... Design information object production | generation part, 13 ... Test procedure pattern memory | storage part, 14 ... Operation memory part, 15 ... Test code fragment memory | storage part, 16 ... Test procedure pattern extraction Reference numeral 17, Test code generation unit 20, Database unit 21, Table data generation unit 30, Test automation tool unit

Claims (3)

検索対象の物理名の値と検索結果の値とを関連付けて記憶する関連テーブルとしてのデータベース部に接続され、且つテスト手順パターン記憶手段、操作記憶手段及びテストコード断片記憶手段を備えるとともに、Webアプリケーションにおける複数の設計書データからテスト自動化ツールで用いられるテストコードを生成するテストコード生成装置に用いられるテストコード生成プログラムであって、
前期テストコード生成装置を、
前記各設計書データのうちの画面遷移設計書データであって、前記Webアプリケーションの各画面の遷移に関し、画面遷移IDの項目と値、シナリオ名の項目と値、リクエスト発生画面URLの項目と値、及び遷移先画面URLの項目と値、を関連付けて示す前記画面遷移設計書データの入力を受け付ける手段、
前記各設計書データのうちの画面項目設計書データであって、前記Webアプリケーションの各画面の項目に関し、画面項目IDの項目と値、HTML要素の項目と値、デフォルト値の項目と値、Name属性の項目と値、及び関連テーブルの物理名の項目と値のうち、前記画面項目IDのうちの第1画面項目IDの項目と値、前記HTML要素の項目とタイトルを示す値、及び前記デフォルト値の項目と値を関連付けて示し、前記画面項目IDのうちの第2画面項目IDの項目と値、前記HTML要素の項目とテキストエリアを示す値、前記Name属性の項目と検索対象の物理名の値、及び前記関連テーブルの物理名の項目と値、を関連付けて示すと共に、前記画面項目IDのうちの第3画面項目IDの項目と値、前記HTML要素の項目とインプットを示す値、及び前記Name属性の項目と実行を示す値、を関連付けて示す前記画面項目設計書データの入力を受け付ける手段、
前記各設計書データのうちの画面一覧設計書データであって、前記Webアプリケーションの各画面に関し、画面IDの項目と値、及び画面URLの項目と値、を関連付けて示す前記画面一覧設計書データの入力を受け付ける手段、
前記シナリオ名のいずれかの値と同一の文字列からなるテスト手順パターンIDと、テスト順番に沿って配列した複数のテスト手順名とを含むテスト手順パターン情報を前記テスト手順パターン記憶手段に書き込む手段、
前記テスト手順名、操作及びテストコード断片IDを関連付けて前記操作記憶手段に書き込む手段、
前記テストコード断片ID及び変数部分を含んでおり、前記変数部分としては、前記リクエスト発生画面URLの項目、前記遷移先画面URLの項目、前記HTML要素の項目とタイトルを示す値、前記HTML要素の項目とインプットを示す値、又は画面項目値の項目、を個別に含んでいる、複数のテストコード断片情報を前記テストコード断片記憶手段に書き込む手段、
前記入力を受け付けた画面遷移設計書データ内からシナリオ名の項目と値を抽出する手段、
前記抽出したシナリオ名の値を含み、当該シナリオ名の値と同一のシナリオ名の値が他に抽出されている場合には更に識別番号を含むオブジェクト名と、プロパティとを含む画面遷移オブジェクトであって、当該プロパティとしては、当該オブジェクト名内のシナリオ名の値に前記画面遷移設計書データ内で関連付けられたリクエスト発生画面URLの項目と値及び遷移先画面URLの項目と値と、当該リクエスト発生画面URLの値に一致する前記画面一覧設計書内の画面URLの値に関連付けられた画面IDの値からなるリクエスト発生画面IDの値と項目と、当該リクエスト発生画面IDの値をオブジェクト名としたリクエスト発生画面オブジェクトを示すリクエスト発生画面項目と、当該遷移先画面URLの値に一致する前記画面一覧設計書内の画面URLの値に関連付けられた画面IDの値からなる遷移先画面IDと、当該遷移先画面IDの値をオブジェクト名とした遷移先画面オブジェクトを示す遷移先画面項目とを含んでいる、前記画面遷移オブジェクトを生成する画面遷移オブジェクト生成手段、
前記画面遷移オブジェクトのリクエスト発生画面IDの値からなるオブジェクト名と、プロパティとを含むリクエスト発生画面オブジェクトであって、当該プロパティとしては、当該リクエスト発生画面IDの値に中間一致する前記画面項目設計書内の画面項目IDの値からなる画面項目を含んでいる、前記リクエスト発生画面オブジェクトを生成する発生画面オブジェクト生成手段、
前記リクエスト発生画面オブジェクトの画面項目IDの値からなるオブジェクト名と、プロパティとを含むリクエスト発生画面項目オブジェクトであって、当該プロパティとしては、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値及びデフォルト値の項目と値からなる第1発生画面項目と、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値、Name属性の項目と値及び関連テーブルの物理名の項目と値からなる第2発生画面項目と、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値及びName属性の項目と値からなる第3発生画面項目とのうちのいずれかの発生画面項目を含んでいる、前記リクエスト発生画面項目オブジェクトを個別に生成する発生画面項目オブジェクト生成手段、
前記画面遷移オブジェクトの遷移先画面IDの値からなるオブジェクト名と、プロパティとを含む遷移先画面オブジェクトであって、当該プロパティとしては、当該遷移先画面IDの値に中間一致する前記画面項目設計書内の画面項目IDの値からなる画面項目を含んでいる、前記遷移先画面オブジェクトを生成する遷移先画面オブジェクト生成手段、
前記遷移先画面オブジェクトの画面項目IDの値からなるオブジェクト名と、プロパティとを含む遷移先画面項目オブジェクトであって、当該プロパティとしては、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値及びデフォルト値の項目と値からなる第1遷移先画面項目と、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値、Name属性の項目と値及び関連テーブルの物理名の項目と値からなる第2遷移先画面項目と、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値及びName属性の項目と値からなる第3遷移先画面項目とのうちのいずれかの遷移先画面項目を含んでいる、前記遷移先画面項目オブジェクトを個別に生成する遷移先画面項目オブジェクト生成手段、
前記画面遷移オブジェクト、前記リクエスト発生画面オブジェクト、前記リクエスト発生画面項目オブジェクト、前記遷移先画面オブジェクト及び前記遷移先画面項目オブジェクトを含む設計情報オブジェクトを生成する設計情報オブジェクト生成手段、
前記設計情報オブジェクト内の画面遷移オブジェクトのオブジェクト名に含まれるシナリオ名の値に一致するテスト手順パターンIDを含むテスト手順パターン情報を前記テスト手順パターン記憶手段から読み出すテスト手順パターン読出手段、
当該読み出したテスト手順パターン情報内のテスト手順名を前記テスト順番に沿って読み出し、当該読み出したテスト手順名に一致する前記操作記憶手段内のテスト手順名に関連付けられたテストコード断片IDを当該操作記憶手段から読み出す手段、
当該読み出したテストコード断片IDに一致するテストコード断片IDを含むテストコード情報を前記テストコード断片記憶手段から読み出し、当該読み出したテストコード情報を前記テスト順番に沿って結合してテストコード雛形情報を作成する手段、
前記テストコード雛形情報内の各々の変数部分のうち、「前記リクエスト発生画面URLの項目」又は「前記遷移先画面URLの項目」を示す変数部分を前記設計情報オブジェクト内で当該変数部分に一致する項目の値に置換し、前記各々の変数部分のうち、「前記HTML要素の項目がタイトルを示すデフォルト値の値」を示す変数部分を前記設計情報オブジェクト内で当該変数部分と同一オブジェクト内のデフォルト値の値に置換し、前記各々の変数部分のうち、「前記HTML要素の項目がインプットを示すName属性の値」又は「物理名がidを示す値」を示す変数部分を前記設計情報オブジェクト内で当該変数部分と同一オブジェクト内のName属性の値に置換し、当該「前記物理名がidを示す値」を示す変数部分については更に当該同一オブジェクト内の物理名の値に一致する前記データベース内の物理名の値に関連付けられた検索結果の値を当該置換したName属性の値の次の行に挿入することにより、前記テストコード雛形情報から前記テストコードを生成する手段、
として機能させるためのテストコード生成プログラム。
Connected to the database unit as a related table for storing the physical name value to be searched and the search result value in association with each other, and includes a test procedure pattern storage unit, an operation storage unit, a test code fragment storage unit, and a Web application A test code generation program used in a test code generation device for generating a test code used in a test automation tool from a plurality of design document data in
The test code generator for the previous term
Screen transition design document data of the design document data, and screen transition ID items and values, scenario name items and values, and request generation screen URL items and values related to the transition of each screen of the Web application , And means for receiving input of the screen transition design document data indicating the items and values of the transition destination screen URL in association with each other,
Screen item design document data of each of the design document data, regarding items of each screen of the Web application, items and values of screen item IDs, items and values of HTML elements, items and values of default values, Name Of the item and value of the attribute and the physical name item and value of the related table, the item and value of the first screen item ID of the screen item ID, the value indicating the item and title of the HTML element, and the default A value item and a value are shown in association with each other, the item and value of the second screen item ID in the screen item ID, the value of the HTML element item and text area, the item of the Name attribute and the physical name of the search target And the physical name item and value of the association table are shown in association with each other, the third screen item ID item and value of the screen item ID, and the HTML element item and input. The value indicating the door, and means for accepting input of the screen item design document data indicating associating a value, indicating the execution and items of the Name attribute,
Screen list design document data of the design document data, the screen list design document data indicating the screen ID items and values and the screen URL items and values associated with each screen of the Web application. Means to accept input,
Means for writing test procedure pattern information including a test procedure pattern ID consisting of the same character string as any value of the scenario name and a plurality of test procedure names arranged in the test order in the test procedure pattern storage means ,
Means for associating the test procedure name, operation and test code fragment ID in the operation storage means;
The test code fragment ID and the variable part are included, and the variable part includes the request generation screen URL item, the transition destination screen URL item, the HTML element item and the value indicating the title, the HTML element Means for individually writing a plurality of pieces of test code fragment information into the test code fragment storage means, each of which includes an item and a value indicating an input or an item of a screen item value;
Means for extracting the item and value of the scenario name from the screen transition design document data that has received the input;
If the extracted scenario name value includes another scenario name value that is the same as the scenario name value, the screen transition object further includes an object name including an identification number and a property. The properties include the request generation screen URL item and value associated with the scenario name value in the object name in the screen transition design document data, the transition destination screen URL item and value, and the request generation. The request generation screen ID value and the item including the screen ID value associated with the screen URL value in the screen list design document that matches the screen URL value, and the request generation screen ID value as the object name The request generation screen item indicating the request generation screen object and the screen that matches the value of the transition destination screen URL. A transition destination screen ID including a screen ID value associated with a screen URL value in the design document, and a transition destination screen item indicating a transition destination screen object having the transition destination screen ID value as an object name. Screen transition object generating means for generating the screen transition object;
A request generation screen object including an object name consisting of a request generation screen ID value of the screen transition object and a property, and the property includes the screen item design document that matches the request generation screen ID value in the middle Generating screen object generating means for generating the request generating screen object, including a screen item consisting of the value of the screen item ID
A request generation screen item object including an object name consisting of a screen item ID value of the request generation screen object and a property, and the property is associated with the value of the screen item ID in the screen item design document A first generated screen item composed of the items and values of the HTML element and the default value items and values, the HTML element items and values associated with the screen item ID value in the screen item design document, and the Name attribute Of the second generation screen item consisting of the item and value of the item and the physical name of the related table, and the value of the HTML element item and value associated with the value of the screen item ID in the screen item design document. The request generation screen item object including one of the generation screen items of the item and the third generation screen item composed of values. Generating screen item object generation means for generating individual,
A transition destination screen object including an object name including a transition destination screen ID value of the screen transition object and a property, and the property includes the screen item design document that matches the transition destination screen ID value in the middle A transition destination screen object generating means for generating the transition destination screen object, including a screen item consisting of a screen item ID value
A transition destination screen item object including an object name consisting of a screen item ID value of the transition destination screen object and a property, the property being associated with the value of the screen item ID in the screen item design document A first transition destination screen item consisting of the HTML element item and value and the default value item and value, and the HTML element item and value associated with the screen item ID value in the screen item design document, Name A second transition destination screen item composed of the attribute item and value and the physical name item and value of the related table, the HTML element item and value associated with the value of the screen item ID in the screen item design document, and Name The transition destination screen item object including one of the transition destination screen items of the attribute item and the third transition destination screen item composed of values is generated individually. Transition destination screen item object generating means,
Design information object generating means for generating a design information object including the screen transition object, the request generation screen object, the request generation screen item object, the transition destination screen object, and the transition destination screen item object;
A test procedure pattern reading unit that reads test procedure pattern information including a test procedure pattern ID that matches a scenario name value included in the object name of the screen transition object in the design information object from the test procedure pattern storage unit;
The test procedure name in the read test procedure pattern information is read in the test order, and the test code fragment ID associated with the test procedure name in the operation storage means that matches the read test procedure name is Means for reading from the storage means;
Test code information including a test code fragment ID matching the read test code fragment ID is read from the test code fragment storage means, and the read test code information is combined in the test order to obtain test code template information. Means to create,
Among the variable parts in the test code template information, the variable part indicating “the item of the request generation screen URL” or “the item of the transition destination screen URL” matches the variable part in the design information object. The value of the item is replaced with a variable part indicating “the value of the default value indicating that the item of the HTML element indicates a title” among the variable parts, and the default in the same object as the variable part in the design information object. In the design information object, a variable part indicating “value of Name attribute indicating that the item of the HTML element indicates input” or “value indicating a physical name indicating id” is replaced in the design information object. To replace the value with the value of the Name attribute in the same object as the variable part. By inserting the search result value associated with the physical name value in the database that matches the physical name value in the object into the line next to the value of the replaced Name attribute, from the test code template information Means for generating the test code;
Test code generation program to function as
請求項1に記載のテストコード生成プログラムにおいて、
前記テストコード生成装置を、
前記各設計書データのうちの例外処理設計書データであって、前記Webアプリケーションの例外処理に関し、例外発生条件の項目と値、例外発生画面URLの項目と値、例外発生遷移先画面URLの項目と値、及び例外メッセージの項目と値を関連付けて示す前記例外処理設計書データの入力を受け付ける手段、
前記テスト手順パターン読出手段による読み出しよりも先に、前記設計情報オブジェクト内の画面遷移オブジェクトのオブジェクト名に含まれるシナリオ名の値に一致する前記画面遷移設計書データ内のシナリオ名の値に関連付けられたリクエスト発生画面URLの値及び遷移先画面URLの値と、前記例外処理設計書データ内の例外発生画面URLの値及び例外発生遷移先画面URLの値とが一致するか否かを判定する判定手段、
として更に機能させ、
前記テスト手順パターン読出手段は、前記判定手段による判定の結果が一致しない場合には、前記テスト手順パターン情報を読み出すことを特徴とするテストコード生成プログラム。
In the test code generation program according to claim 1,
The test code generation device;
Exception processing design document data among the respective design document data, regarding exception processing of the Web application, items and values of exception occurrence conditions, items and values of exception occurrence screen URLs, items of exception occurrence transition destination screen URLs Means for accepting an input of the exception process design document data indicating the item and value and the item and value of the exception message in association with each other;
Prior to the reading by the test procedure pattern reading means, it is associated with the value of the scenario name in the screen transition design document data that matches the value of the scenario name included in the object name of the screen transition object in the design information object. The determination of whether or not the request generation screen URL value and the transition destination screen URL value match the exception generation screen URL value and the exception generation transition destination screen URL value in the exception processing design data. means,
Further function as
The test procedure pattern reading unit reads the test procedure pattern information when the result of determination by the determination unit does not match.
検索対象の物理名の値と検索結果の値とを関連付けて記憶する関連テーブルとしてのデータベース部に接続され、Webアプリケーションにおける複数の設計書データからテスト自動化ツールで用いられるテストコードを生成するテストコード生成装置であって、
前記各設計書データのうちの画面遷移設計書データであって、前記Webアプリケーションの各画面の遷移に関し、画面遷移IDの項目と値、シナリオ名の項目と値、リクエスト発生画面URLの項目と値、及び遷移先画面URLの項目と値、を関連付けて示す前記画面遷移設計書データの入力を受け付ける手段と、
前記各設計書データのうちの画面項目設計書データであって、前記Webアプリケーションの各画面の項目に関し、画面項目IDの項目と値、HTML要素の項目と値、デフォルト値の項目と値、Name属性の項目と値、及び関連テーブルの物理名の項目と値のうち、前記画面項目IDのうちの第1画面項目IDの項目と値、前記HTML要素の項目とタイトルを示す値、及び前記デフォルト値の項目と値を関連付けて示し、前記画面項目IDのうちの第2画面項目IDの項目と値、前記HTML要素の項目とテキストエリアを示す値、前記Name属性の項目と検索対象の物理名の値、及び前記関連テーブルの物理名の項目と値、を関連付けて示すと共に、前記画面項目IDのうちの第3画面項目IDの項目と値、前記HTML要素の項目とインプットを示す値、及び前記Name属性の項目と実行を示す値、を関連付けて示す前記画面項目設計書データの入力を受け付ける手段と、
前記各設計書データのうちの画面一覧設計書データであって、前記Webアプリケーションの各画面に関し、画面IDの項目と値、及び画面URLの項目と値、を関連付けて示す前記画面一覧設計書データの入力を受け付ける手段と、
前記シナリオ名のいずれかの値と同一の文字列からなるテスト手順パターンIDと、テスト順番に沿って配列した複数のテスト手順名とを含むテスト手順パターン情報を記憶するテスト手順パターン記憶手段と、
前記テスト手順名、操作及びテストコード断片IDを関連付けて記憶する操作記憶手段と、
前記テストコード断片ID及び変数部分を含んでおり、前記変数部分としては、前記リクエスト発生画面URLの項目、前記遷移先画面URLの項目、前記HTML要素の項目とタイトルを示す値、前記HTML要素の項目とインプットを示す値、又は画面項目値の項目、を個別に含んでいる、複数のテストコード断片情報を記憶するテストコード断片記憶手段と、
前記入力を受け付けた画面遷移設計書データ内からシナリオ名の項目と値を抽出する手段と、
前記抽出したシナリオ名の値を含み、当該シナリオ名の値と同一のシナリオ名の値が他に抽出されている場合には更に識別番号を含むオブジェクト名と、プロパティとを含む画面遷移オブジェクトであって、当該プロパティとしては、当該オブジェクト名内のシナリオ名の値に前記画面遷移設計書データ内で関連付けられたリクエスト発生画面URLの項目と値及び遷移先画面URLの項目と値と、当該リクエスト発生画面URLの値に一致する前記画面一覧設計書内の画面URLの値に関連付けられた画面IDの値からなるリクエスト発生画面IDの値と項目と、当該リクエスト発生画面IDの値をオブジェクト名としたリクエスト発生画面オブジェクトを示すリクエスト発生画面項目と、当該遷移先画面URLの値に一致する前記画面一覧設計書内の画面URLの値に関連付けられた画面IDの値からなる遷移先画面IDと、当該遷移先画面IDの値をオブジェクト名とした遷移先画面オブジェクトを示す遷移先画面項目とを含んでいる、前記画面遷移オブジェクトを生成する画面遷移オブジェクト生成手段と、
前記画面遷移オブジェクトのリクエスト発生画面IDの値からなるオブジェクト名と、プロパティとを含むリクエスト発生画面オブジェクトであって、当該プロパティとしては、当該リクエスト発生画面IDの値に中間一致する前記画面項目設計書内の画面項目IDの値からなる画面項目を含んでいる、前記リクエスト発生画面オブジェクトを生成する発生画面オブジェクト生成手段と、
前記リクエスト発生画面オブジェクトの画面項目IDの値からなるオブジェクト名と、プロパティとを含むリクエスト発生画面項目オブジェクトであって、当該プロパティとしては、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値及びデフォルト値の項目と値からなる第1発生画面項目と、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値、Name属性の項目と値及び関連テーブルの物理名の項目と値からなる第2発生画面項目と、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値及びName属性の項目と値からなる第3発生画面項目とのうちのいずれかの発生画面項目を含んでいる、前記リクエスト発生画面項目オブジェクトを個別に生成する発生画面項目オブジェクト生成手段と、
前記画面遷移オブジェクトの遷移先画面IDの値からなるオブジェクト名と、プロパティとを含む遷移先画面オブジェクトであって、当該プロパティとしては、当該遷移先画面IDの値に中間一致する前記画面項目設計書内の画面項目IDの値からなる画面項目を含んでいる、前記遷移先画面オブジェクトを生成する遷移先画面オブジェクト生成手段と、
前記遷移先画面オブジェクトの画面項目IDの値からなるオブジェクト名と、プロパティとを含む遷移先画面項目オブジェクトであって、当該プロパティとしては、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値及びデフォルト値の項目と値からなる第1遷移先画面項目と、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値、Name属性の項目と値及び関連テーブルの物理名の項目と値からなる第2遷移先画面項目と、当該画面項目IDの値に前記画面項目設計書内で関連付けられたHTML要素の項目と値及びName属性の項目と値からなる第3遷移先画面項目とのうちのいずれかの遷移先画面項目を含んでいる、前記遷移先画面項目オブジェクトを個別に生成する遷移先画面項目オブジェクト生成手段と、
前記画面遷移オブジェクト、前記リクエスト発生画面オブジェクト、前記リクエスト発生画面項目オブジェクト、前記遷移先画面オブジェクト及び前記遷移先画面項目オブジェクトを含む設計情報オブジェクトを生成する設計情報オブジェクト生成手段と、
前記設計情報オブジェクト内の画面遷移オブジェクトのオブジェクト名に含まれるシナリオ名の値に一致するテスト手順パターンIDを含むテスト手順パターン情報を前記テスト手順パターン記憶手段から読み出すテスト手順パターン読出手段と、
当該読み出したテスト手順パターン情報内のテスト手順名を前記テスト順番に沿って読み出し、当該読み出したテスト手順名に一致する前記操作記憶手段内のテスト手順名に関連付けられたテストコード断片IDを当該操作記憶手段から読み出す手段と、
当該読み出したテストコード断片IDに一致するテストコード断片IDを含むテストコード情報を前記テストコード断片記憶手段から読み出し、当該読み出したテストコード情報を前記テスト順番に沿って結合してテストコード雛形情報を作成する手段と、
前記テストコード雛形情報内の各々の変数部分のうち、「前記リクエスト発生画面URLの項目」又は「前記遷移先画面URLの項目」を示す変数部分を前記設計情報オブジェクト内で当該変数部分に一致する項目の値に置換し、前記各々の変数部分のうち、「前記HTML要素の項目がタイトルを示すデフォルト値の値」を示す変数部分を前記設計情報オブジェクト内で当該変数部分と同一オブジェクト内のデフォルト値の値に置換し、前記各々の変数部分のうち、「前記HTML要素の項目がインプットを示すName属性の値」又は「物理名がidを示す値」を示す変数部分を前記設計情報オブジェクト内で当該変数部分と同一オブジェクト内のName属性の値に置換し、当該「前記物理名がidを示す値」を示す変数部分については更に当該同一オブジェクト内の物理名の値に一致する前記データベース内の物理名の値に関連付けられた検索結果の値を当該置換したName属性の値の次の行に挿入することにより、前記テストコード雛形情報から前記テストコードを生成する手段と、
を備えたことを特徴とするテストコード生成装置。
Test code that is connected to the database section as a related table that stores the physical name value to be searched and the search result value in association with each other, and generates test code used by the test automation tool from a plurality of design document data in the Web application A generating device,
Screen transition design document data of the design document data, and screen transition ID items and values, scenario name items and values, and request generation screen URL items and values related to the transition of each screen of the Web application And means for receiving input of the screen transition design document data indicating the items and values of the transition destination screen URL in association with each other;
Screen item design document data of each of the design document data, regarding items of each screen of the Web application, items and values of screen item IDs, items and values of HTML elements, items and values of default values, Name Of the item and value of the attribute and the physical name item and value of the related table, the item and value of the first screen item ID of the screen item ID, the value indicating the item and title of the HTML element, and the default A value item and a value are shown in association with each other, the item and value of the second screen item ID in the screen item ID, the value of the HTML element item and text area, the item of the Name attribute and the physical name of the search target And the physical name item and value of the association table are shown in association with each other, the third screen item ID item and value of the screen item ID, and the HTML element item and input. It means for receiving a value indicating the door, and an input of the screen item design document data indicating associating a value, indicating the execution and items of the Name attribute,
Screen list design document data of the design document data, the screen list design document data indicating the screen ID items and values and the screen URL items and values associated with each screen of the Web application. Means for accepting input,
Test procedure pattern storage means for storing test procedure pattern information including a test procedure pattern ID consisting of the same character string as any value of the scenario name and a plurality of test procedure names arranged in the test order;
Operation storage means for storing the test procedure name, operation and test code fragment ID in association with each other;
The test code fragment ID and the variable part are included, and the variable part includes the request generation screen URL item, the transition destination screen URL item, the HTML element item and the value indicating the title, the HTML element Test code fragment storage means for storing a plurality of pieces of test code fragment information, each of which includes an item and a value indicating an input, or an item of a screen item value;
Means for extracting the item and value of the scenario name from the screen transition design document data that has received the input;
If the extracted scenario name value includes another scenario name value that is the same as the scenario name value, the screen transition object further includes an object name including an identification number and a property. The properties include the request generation screen URL item and value associated with the scenario name value in the object name in the screen transition design document data, the transition destination screen URL item and value, and the request generation. The request generation screen ID value and the item including the screen ID value associated with the screen URL value in the screen list design document that matches the screen URL value, and the request generation screen ID value as the object name The request generation screen item indicating the request generation screen object and the screen that matches the value of the transition destination screen URL. A transition destination screen ID including a screen ID value associated with a screen URL value in the design document, and a transition destination screen item indicating a transition destination screen object having the transition destination screen ID value as an object name. Screen transition object generating means for generating the screen transition object;
A request generation screen object including an object name consisting of a request generation screen ID value of the screen transition object and a property, and the property includes the screen item design document that matches the request generation screen ID value in the middle A generation screen object generation means for generating the request generation screen object, including a screen item consisting of the value of the screen item ID
A request generation screen item object including an object name consisting of a screen item ID value of the request generation screen object and a property, and the property is associated with the value of the screen item ID in the screen item design document A first generated screen item composed of the items and values of the HTML element and the default value items and values, the HTML element items and values associated with the screen item ID value in the screen item design document, and the Name attribute Of the second generation screen item consisting of the item and value of the item and the physical name of the related table, and the value of the HTML element item and value associated with the value of the screen item ID in the screen item design document. The request generation screen item object including one of the generation screen items of the item and the third generation screen item composed of values. And generating screen item object generating means for generating separately,
A transition destination screen object including an object name including a transition destination screen ID value of the screen transition object and a property, and the property includes the screen item design document that matches the transition destination screen ID value in the middle A transition destination screen object generating means for generating the transition destination screen object, including a screen item consisting of the value of the screen item ID in
A transition destination screen item object including an object name consisting of a screen item ID value of the transition destination screen object and a property, the property being associated with the value of the screen item ID in the screen item design document A first transition destination screen item consisting of the HTML element item and value and the default value item and value, and the HTML element item and value associated with the screen item ID value in the screen item design document, Name A second transition destination screen item composed of the attribute item and value and the physical name item and value of the related table, the HTML element item and value associated with the value of the screen item ID in the screen item design document, and Name The transition destination screen item object including one of the transition destination screen items of the attribute item and the third transition destination screen item composed of values is generated individually. And the transition destination screen item object generating means,
Design information object generating means for generating a design information object including the screen transition object, the request generation screen object, the request generation screen item object, the transition destination screen object, and the transition destination screen item object;
A test procedure pattern reading unit that reads test procedure pattern information including a test procedure pattern ID that matches a scenario name value included in the object name of the screen transition object in the design information object from the test procedure pattern storage unit;
The test procedure name in the read test procedure pattern information is read in the test order, and the test code fragment ID associated with the test procedure name in the operation storage means that matches the read test procedure name is Means for reading from the storage means;
Test code information including a test code fragment ID matching the read test code fragment ID is read from the test code fragment storage means, and the read test code information is combined in the test order to obtain test code template information. Means to create,
Among the variable parts in the test code template information, the variable part indicating “the item of the request generation screen URL” or “the item of the transition destination screen URL” matches the variable part in the design information object. The value of the item is replaced with a variable part indicating “the value of the default value indicating that the item of the HTML element indicates a title” among the variable parts, and the default in the same object as the variable part in the design information object. In the design information object, a variable part indicating “value of Name attribute indicating that the item of the HTML element indicates input” or “value indicating a physical name indicating id” is replaced in the design information object. To replace the variable part with the value of the Name attribute in the same object, and for the variable part indicating the “value where the physical name indicates id”, By inserting the search result value associated with the physical name value in the database that matches the physical name value in the object into the line next to the value of the replaced Name attribute, from the test code template information Means for generating the test code;
A test code generation device comprising:
JP2010174804A 2010-08-03 2010-08-03 Test code generation program and apparatus Active JP5492006B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010174804A JP5492006B2 (en) 2010-08-03 2010-08-03 Test code generation program and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010174804A JP5492006B2 (en) 2010-08-03 2010-08-03 Test code generation program and apparatus

Publications (2)

Publication Number Publication Date
JP2012037938A JP2012037938A (en) 2012-02-23
JP5492006B2 true JP5492006B2 (en) 2014-05-14

Family

ID=45849914

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010174804A Active JP5492006B2 (en) 2010-08-03 2010-08-03 Test code generation program and apparatus

Country Status (1)

Country Link
JP (1) JP5492006B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6676495B2 (en) * 2016-07-29 2020-04-08 日本電信電話株式会社 Extraction apparatus and extraction method
JP7800875B1 (en) * 2025-06-17 2026-01-16 株式会社Shift Information processing device, method, program and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06195216A (en) * 1992-12-22 1994-07-15 Hitachi Ltd Automatic generation device for verification program
JP2002366387A (en) * 2001-06-13 2002-12-20 Hitachi Ltd Automatic test system for software programs
JP2006260390A (en) * 2005-03-18 2006-09-28 Nomura Research Institute Ltd Test case generation program and method
JP4874010B2 (en) * 2006-06-19 2012-02-08 株式会社リコー Test scenario creation method and system, test scenario creation program and recording medium

Also Published As

Publication number Publication date
JP2012037938A (en) 2012-02-23

Similar Documents

Publication Publication Date Title
JP4396994B2 (en) Resource file translation verification method, apparatus, and program
JP5756386B2 (en) Method, apparatus, and program for supporting generation and management of metadata for correcting problems of dynamic web application
JP5350428B2 (en) Automatic program generation apparatus, method and computer program
JPWO2012014284A1 (en) Test scenario generation method, test scenario generation system, and test scenario generation program
US7865821B2 (en) Electronic document update notification device and electronic document update notifying method
JP5463717B2 (en) Application test generation program, application test generation method, and application test apparatus
JP2014010667A (en) Provide an operation management support apparatus, method and program
JP5492006B2 (en) Test code generation program and apparatus
JP6739599B1 (en) Information processing program, information processing method, and information processing apparatus
JP5758311B2 (en) Test code generation device, test code generation method, test code generation program
CN115129596A (en) Automatic interface testing method, system, device and storage medium
JP2004341623A (en) Security specification creation support device and security specification creation support method
JP5316485B2 (en) Software development support apparatus, software development support method, and software development support program
JP5502696B2 (en) Software development support system, software development support program, software development support method
JP5600826B1 (en) Unstructured data processing system, unstructured data processing method and program
KR102014500B1 (en) Drill-down slide presentation content generation method and apparatus, drill-down slide presentation content distribution method and apparatus, drill-down slide presentation content rendering method and apparatus, and drill-down slide presentation content publication and rendering system
JP6231260B2 (en) Screen control system, screen control program, screen creation support program, and screen control method
JP5351565B2 (en) Information processing apparatus, information processing method, and program
JP7491745B2 (en) Fault countermeasure proposal device, fault countermeasure proposal method, and fault countermeasure proposal program
JP2013161182A (en) Test item generation device and test item generation method
JP2014032447A (en) Degradation test support system, degradation test support method, and degradation test support program
JP2015022356A (en) Test scenario variation generating apparatus, method and program
JP6245005B2 (en) Web page display system and web page display program
JP5097070B2 (en) Property file reading system and method and program
JP2005352861A (en) Electronic data processing method, electronic data processing apparatus, and electronic data processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130312

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131205

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131212

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131219

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20131226

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20140109

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20140116

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140121

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140228

R150 Certificate of patent or registration of utility model

Ref document number: 5492006

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350