JP2007304778A - Test method for program, program, test device and application development system - Google Patents

Test method for program, program, test device and application development system Download PDF

Info

Publication number
JP2007304778A
JP2007304778A JP2006131458A JP2006131458A JP2007304778A JP 2007304778 A JP2007304778 A JP 2007304778A JP 2006131458 A JP2006131458 A JP 2006131458A JP 2006131458 A JP2006131458 A JP 2006131458A JP 2007304778 A JP2007304778 A JP 2007304778A
Authority
JP
Japan
Prior art keywords
test
program
input
source code
test data
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.)
Pending
Application number
JP2006131458A
Other languages
Japanese (ja)
Inventor
Masakazu Hibi
雅一 日比
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Solution Innovators Ltd
Original Assignee
NEC System Technologies Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC System Technologies Ltd filed Critical NEC System Technologies Ltd
Priority to JP2006131458A priority Critical patent/JP2007304778A/en
Publication of JP2007304778A publication Critical patent/JP2007304778A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the labor of input or selection in test. <P>SOLUTION: The test method of a program is provided to execute prescribed processing according to the data of input items on a display screen, and to generate a source code as a skeleton of software for outputting the result, and to execute the test of a program prepared from the generated source code. In generating the source code, a setting method configuring a program for setting the test data of input items is generated as well as the source code, and before the test, the setting method is called, and test data are set, and during the test, the setting method is called, and the display screen is displayed with the test data set in the input items. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、プログラムのテスト方法、プログラム、テスト装置、及びアプリケーション開発システムに係り、特にアプリケーション開発のもととなるスケルトンとなるソースコードを生成し、生成されたソースコードを用いて作成されたアプリケーションの単体テストを行う機能を有するアプリケーション開発システム(フレームワーク)の単体テスト簡略化機能に関する。   The present invention relates to a program test method, a program, a test apparatus, and an application development system. In particular, the present invention generates a source code that becomes a skeleton that is the basis of application development, and an application that is created by using the generated source code. The present invention relates to a unit test simplification function of an application development system (framework) having a function of performing unit tests.

近年のアプリケーション開発では、インターネットに代表されるネットワーク技術の進歩に伴い、ネットワークを介してサーバとクライアントとの間でHTTP(HyperText Transfer Protocol)プロトコルを使って各種情報のやり取りを行うことで動作する形態の、いわゆるWebアプリケーションの開発が行われている。Webアプリケーションの場合、消費者向けのWebサイトから企業内の基幹システム等多岐にわたって利用されるため、その開発側では、これらニーズに合わせて品質の高い製品をより短期間で開発することが求められている。   In recent application development, with the advancement of network technology represented by the Internet, a mode in which various information is exchanged between the server and the client using the HTTP (HyperText Transfer Protocol) protocol via the network. The so-called Web application is being developed. In the case of Web applications, they are used in a wide variety of ways, from consumer-oriented websites to enterprise backbone systems, so the development side is required to develop high-quality products in a shorter time to meet these needs. ing.

Webアプリケーションを構成するコンポーネントとしては、クライアント側のブラウザで表示される画面のページを構成するHTML(HyperText Markup Language)ファイルやそれに関連付けたイメージファイル・音声ファイル等のほか、動的なページを生成するためのプログラムコード等がある。プログラムコードには、クライアント側で実行されるものや、サーバ側で実行されるものがあり、後者には例えばソースコードとしてJAVA(登録商標。以下省略)コードを使用し、ブラウザからの要求を受け取って必要な処理を行い、その処理結果を返却するサーブレットや、HTML内にJAVAコードを埋め込むことで動的なページを生成するJSP(Java Server Pages)等が含まれる。   As a component constituting the Web application, a dynamic page is generated in addition to an HTML (HyperText Markup Language) file that configures a page of a screen displayed on a client-side browser and an image file / audio file associated therewith. There is a program code for that. Some program codes are executed on the client side and some are executed on the server side. For the latter, for example, JAVA (registered trademark) is used as source code, and a request from the browser is received. Servlets that perform necessary processing and return the processing results, JSPs (Java Server Pages) that generate dynamic pages by embedding JAVA code in HTML, and the like are included.

従来、このようなWebアプリケーションの開発では、ソフトウェアを用いて、スケルトンとなるソースコードを生成し、そのソースコードを利用してアプリケーションを構築する手法が知られている。この手法では、作成したアプリケーションの単体テストを行う工程で、表示画面上の入力データや選択ボタンによる画面遷移のチェックを行っている。   Conventionally, in the development of such a Web application, there is known a method of generating a skeleton source code using software and constructing an application using the source code. In this method, in the process of performing a unit test of the created application, the screen transition is checked by the input data on the display screen and the selection button.

これに関連する先行技術文献としては、特許文献1がある。この特許文献1では、アプリケーションオブジェクトの生成の省力化とプログラム品質の安定化を可能にするアプリケーションオブジェクトジェネレータが記述されている。このアプリケーションオブジェクトジェネレータは、オブジェクトのプロパティを列記したリストと、標準的なソースを記述したスケルトンを入力源とし、それをもとにオブジェクト自身のソースと単体テスト用のソースを出力する。
特開2000−20299号公報
Patent Document 1 is a related art document related to this. In this Patent Document 1, an application object generator is described that enables labor saving of application object generation and stabilization of program quality. This application object generator takes a list listing object properties and a skeleton describing a standard source as input sources, and outputs the source of the object itself and the unit test source based on it.
JP 2000-20299 A

しかしながら、上述した単体テストでの画面遷移のチェックの際に、1画面に多くの入力フォームや選択ボタンがあると、その入力や選択の操作が非常に面倒であり、単体テストに必要なテスト工数が大きくなっていた。また、パターンが異なるだけで、ほぼ同様の入力チェックテストを行う場合、入力データに大差がないにも関わらず、同じだけの作業をパターンごとに行う必要があり、パターン数に比例してテスト工数も増大した。   However, when checking the screen transition in the unit test described above, if there are many input forms and selection buttons on one screen, the input and selection operations are very troublesome, and the test man-hours required for the unit test are large. It was. Also, when performing almost the same input check test with different patterns, it is necessary to perform the same work for each pattern even though there is no large difference in the input data. Also increased.

特に単体テストで手間がかかるのは、入力フォームに入力された入力値の最大桁に関する異常動作を確認する最大桁チェックと、入力フォームに入力された入力値の文字制限に関する異常動作を確認する文字制限チェックとがある。これらのチェックでは、正常にエラー画面が表示されることを確認する。   Particularly troublesome in unit testing is the maximum digit check for checking the abnormal operation related to the maximum digit of the input value entered in the input form and the character restriction for checking the abnormal operation related to character restriction of the input value input in the input form. There is a check. These checks confirm that the error screen is displayed correctly.

このように従来のアプリケーション開発の手法では、複数パターンを有し、入力チェック項目や選択チェック項目が多大にある単体テストを行う場合、同一のテストデータを毎度入力、選択せねばならず、手間で、テスト工数が多く取られる、という問題があった。特許文献1は、このような問題を必ずしも考慮してなされたものではない。   As described above, in the conventional application development technique, when performing a unit test having a plurality of patterns and a large number of input check items and selection check items, the same test data must be input and selected each time, There was a problem that a lot of test man-hours were taken. Patent Document 1 is not necessarily made in consideration of such a problem.

本発明は、以上の問題点を解決し、テストにおける入力や選択の手間を削減できるプログラムのテスト方法、プログラム、テスト装置、及びアプリケーション開発システムを提供することを目的とする。   An object of the present invention is to provide a program test method, a program, a test apparatus, and an application development system that can solve the above-described problems and reduce the input and selection in testing.

上記目的を達成するため、本発明に係るプログラムのテスト方法は、表示画面上の入力項目のデータに応じて所定の処理を実行しその結果を出力するためのアプリケーションのスケルトンとなるソースコードを生成し、生成されたソースコードから作成されたプログラムのテストを実行する方法において、前記ソースコード生成時に、前記ソースコードと共に前記入力項目のテストデータを設定するためのプログラムとなる設定メソッドを生成するステップと、前記テスト実行前に、前記設定メソッドを呼び出して前記テストデータを設定するステップと、前記テスト実行時に、前記設定メソッドを呼び出して前記入力項目内に前記テストデータが設定された状態で前記表示画面を表示するステップとを有することを特徴とする。   In order to achieve the above object, the program testing method according to the present invention generates source code that is a skeleton of an application for executing predetermined processing according to input item data on a display screen and outputting the result. And generating a setting method that is a program for setting test data of the input item together with the source code when the source code is generated in the method for executing a test of a program created from the generated source code. Before the test execution, calling the setting method to set the test data, and at the time of the test execution, calling the setting method and displaying the test data set in the input item And a step of displaying a screen.

前記テストデータを設定するステップは、前記テストデータの最大桁の入力値を設定し、前記表示画面を表示するステップは、前記入力項目に前記テストデータの最大桁の入力値が設定された状態で前記表示画面を表示してもよい。   The step of setting the test data sets an input value of the maximum digit of the test data, and the step of displaying the display screen is a state where the input value of the maximum digit of the test data is set in the input item. The display screen may be displayed.

本発明において、前記ソースコード生成時に、前記ソースコードと共に前記入力項目に入力したテストデータが正常にデータベースに登録、更新、又は削除されたかどうかを判定するためのプログラムとなる判定メソッドを生成するステップと、前記テスト実行時に、前記判定メソッドを呼び出してその判定結果を表示するステップとをさらに有してもよい。   In the present invention, at the time of generating the source code, a step of generating a determination method serving as a program for determining whether the test data input to the input item together with the source code is normally registered, updated, or deleted in the database And a step of calling the determination method and displaying the determination result when the test is executed.

前記ソフトウェアは、Webアプリケーションであってもよい。   The software may be a web application.

本発明に係るプログラムは、表示画面上の入力項目のデータに応じて所定の処理を実行しその結果を出力するためのソフトウェアのスケルトンとなるソースコードを生成し、生成されたソースコードから作成されたプログラムのテストを実行するプログラムにおいて、コンピュータに、前記ソースコード生成時に、前記ソースコードと共に前記入力項目のテストデータを設定するためのプログラムとなる設定メソッドを生成するステップと、前記テスト実行前に、前記設定メソッドを呼び出して前記テストデータを設定するステップと、前記テスト実行時に、前記設定メソッドを呼び出して前記入力項目内に前記テストデータが設定された状態で前記表示画面を表示するステップとを実行させることを特徴とする。   The program according to the present invention generates a source code that is a software skeleton for executing a predetermined process in accordance with input item data on the display screen and outputting the result, and is generated from the generated source code. Generating a setting method to be a program for setting test data of the input items together with the source code at the time of generating the source code in the computer, Calling the setting method to set the test data; and calling the setting method to display the display screen with the test data set in the input item when the test is executed. It is made to perform.

本発明に係るプログラムのテスト装置は、表示画面上の入力項目のデータに応じて所定の処理を実行しその結果を出力するためのソフトウェアのスケルトンとなるソースコードを生成し、生成されたソースコードから作成されたプログラムのテストを実行する装置において、前記ソースコード生成時に、前記ソースコードと共に前記入力項目のテストデータを設定するためのプログラムとなる設定メソッドを生成する生成手段と、前記テスト実行前に、前記設定メソッドを呼び出して前記テストデータを設定する設定手段と、前記テスト実行時に、前記設定メソッドを呼び出して前記入力項目内に前記テストデータが設定された状態で前記表示画面を表示する表示手段とを有することを特徴とする。   The program test apparatus according to the present invention generates a source code that is a software skeleton for executing a predetermined process according to data of an input item on a display screen and outputting the result, and the generated source code In the apparatus for executing the test of the program created from the above, generation means for generating a setting method that becomes a program for setting test data of the input items together with the source code at the time of generating the source code, and before the test execution A setting means for setting the test data by calling the setting method, and a display for displaying the display screen in a state in which the test data is set in the input item by calling the setting method during the test execution. Means.

本発明によれば、設定メソッドをスケルトンとなるソースコードとともに生成し、スケルトンとして生成されるソースコード自体に設定メソッドを用意し、テストデータを設定しているので、そのメソッドを呼び出すだけで、テストが実行でき、これによりテストにおける入力や選択の手間を削減できる。また、一度、テストすべきデータを設定しておけば、複数のパターンで少量の変更のみで同様のデータを使用できるので、テストにおける手間が削減できる。   According to the present invention, the setting method is generated together with the source code to be a skeleton, the setting method is prepared in the source code itself generated as the skeleton, and the test data is set. This can reduce the input and selection in testing. Also, once the data to be tested is set, similar data can be used with only a small amount of change in a plurality of patterns, so that the labor for testing can be reduced.

次に、本発明に係るプログラムのテスト方法、プログラム、テスト装置、及びアプリケーション開発システムを実施するための最良の形態について、図面を参照して詳細に説明する。   Next, a best mode for carrying out a program test method, a program, a test apparatus, and an application development system according to the present invention will be described in detail with reference to the drawings.

図1は、本実施例の要部構成を説明する図である。   FIG. 1 is a diagram for explaining a main configuration of the present embodiment.

本実施例に係るプログラムのテスト方法を用いたアプリケーション開発システムは、コンピュータ機に実装されるソフトウェアから構成され、その機能はコンピュータ機のCPU(Central Processing Unit)がソフトウェアの命令を実行することにより実現される。このアプリケーション開発システムは、例えばネットワークを介してサーバとクライアントとの間でHTTPプロトコルを使って各種情報のやり取りを行うことで動作するWebアプリケーションを構築するもので、好適にはアプリケーション開発環境となるフレームワークとして提供される。本実施例に係るプログラムのテスト方法、プログラム、及びテスト装置は、このフレームワークを構成するソフトウェアの処理により実現されるテスト用の機能、例えば単体テスト簡略化機能として実現可能である。   The application development system using the program test method according to the present embodiment is composed of software installed in a computer, and the function is realized by the CPU (Central Processing Unit) of the computer executing software instructions. Is done. This application development system constructs a Web application that operates by exchanging various kinds of information between a server and a client via a network, for example, using a HTTP protocol, and is preferably a frame serving as an application development environment. Provided as work. The test method, program, and test apparatus for a program according to the present embodiment can be realized as a test function, for example, a unit test simplification function, realized by processing of software constituting this framework.

図1に示すアプリケーション開発システムは、そのソフトウェアの要部構成として、本テスト手法を用いて構成されたソースジェネレータ11を有している。その他、図示しない各種ソフトウェアも含まれる。各種ソフトウェアには、一例として、オペレーティングシステム(OS)と、Webサーバと、サーブレットやJSPを動作させるコンテナ(サーブレットエンジン)と、JAVAプログラム開発環境を提供する各種プログラム、例えばコンパイラ、デバッガ、クラスライブラリ、JAVA仮想マシン(JVM)などを含むJDK(Java Development Kit)と、JAVAプログラムからデータベースにアクセスするJDBC(Java DataBase Connectivity)及びそのJDBCドライバとが含まれる。これら各種ソフトウェアについては、既知構成のものが適用されるため、その詳細を省略する。   The application development system shown in FIG. 1 has a source generator 11 configured using this test method as the main configuration of the software. In addition, various software (not shown) is also included. Examples of various software include an operating system (OS), a Web server, a container (servlet engine) for operating a servlet or JSP, and various programs that provide a JAVA program development environment, such as a compiler, a debugger, a class library, A JDK (Java Development Kit) including a JAVA virtual machine (JVM), a JDBC (Java DataBase Connectivity) for accessing a database from a JAVA program, and a JDBC driver for the JDBC are included. Since these various types of software are applied with known configurations, their details are omitted.

ソースジェネレータ11は、例えばアプリケーション開発のもととなるスケルトンとなるソースコードを自動生成する既知構成のソフトウェアを適用したものである。本実施例のソースジェネレータ11は、予め定められた形式の設定ファイル、例えばXML(eXtensible Markup Language)ファイルからアプリケーション用のスケルトンとなるソースコード、例えばJAVAコードを生成する。生成されるソースコードには、Webアプリケーションを構成する複数のパターン1〜nと、これら各パターン1〜nに応じて生成される設定メソッド1〜nとが含まれる。   The source generator 11 is applied with software having a known configuration that automatically generates source code that becomes a skeleton that is the basis of application development, for example. The source generator 11 according to the present embodiment generates a source code such as a JAVA code as a skeleton for an application from a setting file in a predetermined format, such as an XML (eXtensible Markup Language) file. The generated source code includes a plurality of patterns 1 to n constituting the Web application and setting methods 1 to n generated according to these patterns 1 to n.

図2は、スケルトンとなるソースコードの構成及びその機能を説明するものである。   FIG. 2 is a diagram for explaining the configuration and function of a source code that becomes a skeleton.

図2を参照すると、ソースコードは、テスト対象画面となる入力画面A2を呼び出す画面(以下「入力画面呼び出し画面」と呼ぶ)A1を構成するコードと、その入力画面呼び出し画面A1に呼び出される入力画面A2を構成するコードと、入力画面呼び出し画面A1に呼び出される設定メソッドA3に対応するコードと、入力画面A2に呼び出されるテスト実行結果画面A4を構成するコードとを含む。   Referring to FIG. 2, the source code includes a code constituting a screen (hereinafter referred to as “input screen call screen”) A1 for calling the input screen A2 as a test target screen, and an input screen called by the input screen call screen A1. It includes a code that configures A2, a code that corresponds to the setting method A3 that is called on the input screen call screen A1, and a code that forms the test execution result screen A4 called on the input screen A2.

入力画面呼び出し画面A1を構成するコードは、例えばHTML又はJSPファイルで構成され、画面A1上にリンクやボタンを表示しそのイベント動作に応じた処理を実行するためのコードを含む。この画面A1を構成するコードには、クリック等のイベント発生後、入力画面A2に遷移するため、入力画面A2を構成するコードの場所がそのイベントに対応付けて記憶されている。また、この画面A1を構成するコードには、テストデータを設定する設定メソッドA3を呼び出すため、設定メソッドA3を構成するコードの場所が記憶されている。もしくは、設定メソッドA3に対応するコードそれ自体が含まれている。   The code constituting the input screen call screen A1 is composed of, for example, an HTML or JSP file, and includes a code for displaying a link or button on the screen A1 and executing processing corresponding to the event operation. Since the code constituting the screen A1 transitions to the input screen A2 after an event such as a click occurs, the location of the code constituting the input screen A2 is stored in association with the event. Further, the code constituting the screen A1 stores the location of the code constituting the setting method A3 in order to call the setting method A3 for setting test data. Alternatively, the code itself corresponding to the setting method A3 is included.

入力画面A2を構成するコードは、例えばJSPファイルで構成され、本実施例のテスト対象画面を構成するものであり、多くの入力フォームや選択ボタンに対応するコードを含んでいる。また、入力画面A2を構成するコードには、入力結果を次画面やデータベースに送信するために、画面A2上にリンクやボタンを表示しそのイベント動作に応じた処理を実行するためのコードを含んでいる。   The code constituting the input screen A2 is composed of, for example, a JSP file and constitutes the test target screen of this embodiment, and includes codes corresponding to many input forms and selection buttons. In addition, the code constituting the input screen A2 includes a code for displaying a link or a button on the screen A2 and executing processing corresponding to the event operation in order to transmit the input result to the next screen or database. It is out.

設定メソッドA3に対応するコードは、例えばJSPファイルで構成され、本実施例のアプリケーション開発システム(フレームワーク)によって予め設定されたメソッドであり、テストデータが設定されると、その設定されたテストデータを保持する。この設定メソッドA3が呼び出されると、設定されたテストデータを入力画面A2に送信する。   The code corresponding to the setting method A3 is, for example, a JSP file, and is a method set in advance by the application development system (framework) of this embodiment. When test data is set, the set test data Hold. When this setting method A3 is called, the set test data is transmitted to the input screen A2.

テスト実行結果画面A4を構成するコードは、例えばJSPファイルで構成され、入力画面A2から呼び出され、そのテスト実行結果にエラーの有無があるのか判断する一部となる画面である。   The code constituting the test execution result screen A4 is, for example, a JSP file that is called from the input screen A2 and is a screen that is a part of determining whether or not there is an error in the test execution result.

次に、図3を参照して、本実施例の動作について詳細に説明する。   Next, the operation of this embodiment will be described in detail with reference to FIG.

まず、利用者によりアプリケーションのソースコードを生成するための設定ファイルが作成され(ステップSt1)、ソースジェネレータ11に入力される。すると、ソースジェネレータ11は、その設定ファイルから、ソースコードのスケルトンを生成する(ステップSt2)。このときに生成されるソースコードには、入力画面呼び出し画面A1を構成するコードと、入力画面A2を構成するコードと、テストデータを予め設定する設定メソッドA3に対応するコードとが含まれる。   First, a setting file for generating a source code of an application is created by the user (step St1) and input to the source generator 11. Then, the source generator 11 generates a skeleton of the source code from the setting file (step St2). The source code generated at this time includes a code configuring the input screen call screen A1, a code configuring the input screen A2, and a code corresponding to the setting method A3 for presetting test data.

次いで、生成されたソースコードのスケルトンをベースにして、利用者によりアプリケーションの設計仕様に応じたソースコードの追加や修正が行われる(ステップSt3)。このとき、テスト対象画面である入力画面A2の入力フォームや選択ボタンの変更や追加があれば、それに応じて設定メソッドA3により呼び出されるテストデータの設定項目も、変更や追加を行う。テスト実行前に、利用者により設定メソッドA3にテストデータとして入力すべき値や選択項目が設定される(ステップSt3)。このとき、最も汎用性のあるパターンをベースにして、そこに他の複雑なパターンを網羅できるデータが設定される。   Next, based on the generated skeleton of the source code, the user adds or corrects the source code according to the design specification of the application (step St3). At this time, if there is a change or addition of the input form or selection button of the input screen A2, which is the test target screen, the setting items of the test data called by the setting method A3 are also changed or added accordingly. Before the test is executed, values and selection items to be input as test data are set in the setting method A3 by the user (step St3). At this time, based on the most versatile pattern, data that can cover other complicated patterns is set therein.

次いで、テスト実行時に、入力画面呼び出し画面A1から入力画面A2に遷移する際に、設定メソッドA3が呼び出される。これにより、入力画面A2は、テストデータがすでに設定された状態で表示される。ゆえに、入力画面A2のテストは、入力画面A2からテスト実行結果画面A4に遷移するイベントを行うだけで完了する(ステップSt4)。   Next, when the test is executed, the setting method A3 is called when the input screen call screen A1 transits to the input screen A2. Thereby, the input screen A2 is displayed with the test data already set. Therefore, the test of the input screen A2 is completed only by performing an event for transition from the input screen A2 to the test execution result screen A4 (step St4).

一つのパターンのテストが終了したら、それと異なるパターンのテストを行う必要があるかどうかの判断を利用者に促す(ステップSt5)。その結果、異なるパターンのテストを行う必要がある場合(ステップSt5:YES)、上記ステップSt3に戻り、設定メソッドA3のテストデータを変更、追加する。一方、全てのパターンのテストが終了したら(ステップSt5:NO)、入力画面を呼び出す画面A1から設定メソッドA3を呼び出すメソッドを消去する(ステップSt6)。   When the test for one pattern is completed, the user is prompted to determine whether or not it is necessary to perform a test for a different pattern (step St5). As a result, when it is necessary to perform a test of a different pattern (step St5: YES), the process returns to step St3, and the test data of the setting method A3 is changed and added. On the other hand, when all the patterns have been tested (step St5: NO), the method for calling the setting method A3 is deleted from the screen A1 for calling the input screen (step St6).

次に、図4に示す具体例を用いて、本実施例の動作を説明する。   Next, the operation of this embodiment will be described using a specific example shown in FIG.

まず、設定ファイルで、入力画面A2にテキストボックスB1と選択ラジオボタンB2を有する設定をし、ソースジェネレータ11によりソースコードのスケルトンを生成する。このとき、ソースコードのスケルトンには、設定メソッドA3に対応するコードが生成される(ステップSt11)。そのコードには、テキストボックスB1には空白を入力し、選択ラジオボタンB2には1番最初の項目を選択する設定がされている。このとき、一番汎用的なパターンのテキストボックスB1の文字制限として、半角英数で20文字とする。   First, the setting file is set to have a text box B1 and a selection radio button B2 on the input screen A2, and the source generator 11 generates a skeleton of the source code. At this time, a code corresponding to the setting method A3 is generated in the skeleton of the source code (step St11). In the code, a blank is input in the text box B1, and the selection radio button B2 is set to select the first item. At this time, the character limit of the most general-purpose pattern text box B1 is 20 alphanumeric characters.

次いで、テスト実行前に、設定メソッドA3に対応するコード中のテキストボックスB1の設定項目を”abcdefghijklmnopqrst”に変更し(ステップSt12)、テストデータとする。   Next, before the test is executed, the setting item of the text box B1 in the code corresponding to the setting method A3 is changed to “abcdefghijklmnopqrst” (step St12) to obtain test data.

次いで、テスト実行時に、入力画面呼び出し画面A1から入力画面A2に遷移する際に入力画面A2を構成するコードと共に設定メソッドA3も呼び出され、その入力画面A2が表示される。このとき、入力画面A2のテキストボックスB1には、設定メソッドA3に設定されたテストデータの”abcdefghijklmnopqrst”が表示される(ステップSt13)。   Next, when the test is executed, the setting method A3 is also called together with the code constituting the input screen A2 when the input screen call screen A1 is changed to the input screen A2, and the input screen A2 is displayed. At this time, “abcdefghijklmnopqrst” of the test data set in the setting method A3 is displayed in the text box B1 of the input screen A2 (step St13).

次いで、テキストボックスB1のテストが行われる。このテストの手順としては、まず、入力画面A2のテキストボックスB1に表示されているテストデータの”abcdefghijklmnopqrst”を入力したという状態で、入力画面A2からテスト実行結果画面A4に遷移するイベントを発生させる。これにより、そのデータを入力した場合のテストが実行され、その結果が画面表示される。こうすることで、正常動作確認が行われる(ステップSt14)。   Next, the test of the text box B1 is performed. As a procedure of this test, first, an event that causes a transition from the input screen A2 to the test execution result screen A4 is generated in a state where the test data “abcdefghijklmnopqrst” displayed in the text box B1 of the input screen A2 is input. . Thereby, the test when the data is input is executed, and the result is displayed on the screen. By doing so, normal operation confirmation is performed (step St14).

次に、入力画面A2でテキストボックスB1に”abcdefghijklmnopqrst”と表示されている状態から、末尾に”u”を追加したり、”st”を”あ”に変更し(ステップSt15、St16)、入力画面A2からテスト実行結果画面A4に遷移するイベントを発生させる。これにより、そのデータを入力した場合のテストが実行され、その結果が画面表示される。こうすることで、異常動作確認が行われる(ステップSt17)。   Next, from the state where “abcdefghijklmnopqrst” is displayed in the text box B1 on the input screen A2, “u” is added to the end, or “st” is changed to “A” (steps St15 and St16), and input is performed. An event that causes a transition from the screen A2 to the test execution result screen A4 is generated. Thereby, the test when the data is input is executed, and the result is displayed on the screen. By doing so, the abnormal operation confirmation is performed (step St17).

上記処理にて一通り一つのパターンでテストが終了したら、次にテストを行うパターンの仕様に合わせて、設定メソッドも変更する。例えば、テキストボックスB1の仕様が文字制限として半角英数で25文字とすると、設定メソッドA3における現在のテストデータに設定されている”abcdefghijklmnopqrst”を”abcdefghijklmnopqrstuvwxy”に変更を行う。このテストデータを用いて、前記と同様のテストを行う。   When the test is completed with one pattern in the above process, the setting method is also changed according to the specification of the pattern to be tested next. For example, if the specification of the text box B1 is 25 alphanumeric characters as the character limit, “abcdefghijklmnopqrst” set in the current test data in the setting method A3 is changed to “abcdefghijklmnopqrstuvwxy”. A test similar to the above is performed using this test data.

最後に、テストが終了したら、入力画面呼び出し画面A1を構成するコードから設定メソッドA3を呼び出すメソッドを消去する。   Finally, when the test is completed, the method for calling the setting method A3 is deleted from the code constituting the input screen call screen A1.

次に、図5〜図14を参照して、上記の設定ファイル、入力画面呼び出し画面A1を構成するコード、入力画面A2を構成するコード、設定メソッドA3に対応するコード、及びテスト結果実行画面A4の具体例を説明する。本例では、入力画面A2としてログイン画面を想定している。   Next, referring to FIG. 5 to FIG. 14, the setting file, the code constituting the input screen call screen A1, the code constituting the input screen A2, the code corresponding to the setting method A3, and the test result execution screen A4 A specific example will be described. In this example, a login screen is assumed as the input screen A2.

図5は、本例のWebアプリケーションの構成を示す全体構成図である。図5の例では、Webアプリケーションは、入力画面呼び出し画面A1を表示するためのhtmlファイルと、入力画面A2を表示するためのJSPファイルと、設定メソッドA3に対応するJSPファイルと、テスト実行結果画面A4を表示するためのJSPファイルとを含む。また、画面A2構成コードから呼び出されるサーブレットも含まれる。このサーブレットは、データベース(DB)にアクセスして、受け渡されたテストデータがDBに登録されたデータと一致するかどうかのDB照合を行い、その結果に応じてログインが可能かどうかのメッセージ(図中の例ではログイン可能を表す「Success!」等)を表示するテスト実行結果画面A4を記述するJSPファイルを呼び出す。   FIG. 5 is an overall configuration diagram showing the configuration of the Web application of this example. In the example of FIG. 5, the Web application includes an html file for displaying the input screen call screen A1, a JSP file for displaying the input screen A2, a JSP file corresponding to the setting method A3, and a test execution result screen. JSP file for displaying A4. A servlet called from the screen A2 configuration code is also included. This servlet accesses the database (DB), performs DB collation to check whether the received test data matches the data registered in the DB, and a message (whether login is possible or not depending on the result) In the example in the figure, a JSP file describing a test execution result screen A4 that displays “Success!” Indicating that login is possible is called.

図6は、図5に示すWebアプリケーションのスケルトンとなるソースコードを生成するための設定ファイルの例である。設定ファイルは、XMLファイルで構成される。このXMLファイルには、name属性をA2に設定した<item>タグが記述され、この<item>タグ内には、<input>タグ及び<select>タグが記述される。<input>タグ内には、2つの<elemnt>タグが記述される。一方は、name属性がUserName、type属性がstring、operation属性がcheck、size属性が5に、他方はname属性がUserID、type属性がint、operation属性がcheck、size属性が7にそれぞれ設定されている。<select>タグ内には、1つの<elemnt>タグが記述され、その<elemnt>タグ内には、name属性がDepartment(部門)、type属性がint、operation属性がcheck、size属性が7にそれぞれ設定されている。   FIG. 6 is an example of a setting file for generating source code that is a skeleton of the Web application shown in FIG. The setting file is composed of an XML file. In this XML file, an <item> tag having a name attribute set to A2 is described, and an <input> tag and a <select> tag are described in the <item> tag. Two <elemnt> tags are described in the <input> tag. On the one hand, the name attribute is set to UserName, the type attribute is set to string, the operation attribute is set to check and size attributes, the other is set to the name attribute is UserID, the type attribute is set to int, the operation attribute is set to check and the size attribute is set to 7. Yes. In the <select> tag, one <element> tag is described. In the <element> tag, the name attribute is Department (department), the type attribute is int, the operation attribute is check, and the size attribute is 7. Each is set.

図7は、図6に示す設定ファイルから生成されるスケルトンの構成例を示す。スケルトンには、HTMLファイルからなる画面A1構成コード(html)と、JSPファイル(A2.jsp)からなる画面A2構成コードと、テストデータを設定するためのJSPファイル(A3.jsp)からなる設定メソッドA3とが含まれる。   FIG. 7 shows a configuration example of a skeleton generated from the setting file shown in FIG. In the skeleton, a setting method consisting of a screen A1 configuration code (html) composed of an HTML file, a screen A2 configuration code composed of a JSP file (A2.jsp), and a JSP file (A3.jsp) for setting test data A3 is included.

図8は、画面A1構成コードの例を示す。この画面A1構成コードに対応するHTMLファイルにおいて、<form>タグ内には、method属性にPOSTが、action属性に画面A2構成コードに対応するJSPファイル(A2.jsp)がそれぞれ設定されている。また、<input>タグ内には、type属性にsubmitが、value属性にGoがそれぞれ設定されている。   FIG. 8 shows an example of the screen A1 configuration code. In the HTML file corresponding to the screen A1 configuration code, POST is set as the method attribute and the JSP file (A2.jsp) corresponding to the screen A2 configuration code is set as the action attribute in the <form> tag. In the <input> tag, submit is set in the type attribute, and Go is set in the value attribute.

図9は、図8に示す画面A1構成コードにより表示される入力画面呼び出し画面A1を示す。この画面A1には、Goボタンが表示され、このボタンがクリックされると、そのイベント発生により画面A2構成コードに対応するJSPファイル(A2.jsp)が呼び出される。   FIG. 9 shows an input screen call screen A1 displayed by the screen A1 configuration code shown in FIG. A Go button is displayed on this screen A1, and when this button is clicked, a JSP file (A2.jsp) corresponding to the screen A2 configuration code is called by the occurrence of the event.

図10は、画面A2構成コードの例を示す。この画面A2構成コードに対応するJSPファイルには、設定メソッドA3を読み込む箇所と、HTMLが記述される箇所とが含まれる。HTMLが記述される箇所では、<form>タグ内に、method属性にPOSTが、action属性に設定メソッドA3に対応するJSPファイル(A3.jsp)がそれぞれ設定されている。また、<input>タグ内には、4つの<input>タグが記述される。最初の<input>タグ内には、type属性がtext、name属性がUsernameが設定され、value属性は設定メソッドA3から値を読み込む設定となっている。2番目の<input>タグ内には、type属性がtext、name属性がUserIDが設定され、value属性は設定メソッドA3から値を読み込む設定となっている。3番目の<input>タグ内には、type属性がradio、name属性がDepartment(部門)が設定され、value属性は設定メソッドA3から値を読み込む設定となっている。最後の<input>タグ内には、type属性がsubmit、value属性がGoにそれぞれ設定されている。   FIG. 10 shows an example of the screen A2 configuration code. The JSP file corresponding to the screen A2 configuration code includes a location where the setting method A3 is read and a location where HTML is described. In the place where HTML is described, POST is set in the method attribute and JSP file (A3.jsp) corresponding to the setting method A3 is set in the action attribute in the <form> tag. Also, four <input> tags are described in the <input> tag. In the first <input> tag, the type attribute is set to text, the name attribute is set to Username, and the value attribute is set to read a value from the setting method A3. In the second <input> tag, the type attribute is set to text, the name attribute is set to UserID, and the value attribute is set to read a value from the setting method A3. In the third <input> tag, the type attribute is set to radio, the name attribute is set to Department, and the value attribute is set to read a value from the setting method A3. In the final <input> tag, the type attribute is set to submit and the value attribute is set to Go.

図11は、図10に示す画面A2構成コードにより表示される入力画面A2を示す。この入力画面A2は、設定メソッドA3のテストデータ設定後の表示画面を表している。この入力画面A2には、上記の画面A2構成コードにより、Username及びUserIDの入力項目と、部門(Department)の選択項目(企画部、経理部、人事部、営業)と、Goボタンとが設定されている。このうち、Usernameのテストデータには、半角英数で最大桁5に対応するaiueoが、UserIDのテストデータには、半角英数で最大桁7に対応する1234567が、部門のテストデータには、2番目の選択項目(経理部)がそれぞれ設定されている。この状態で、Goボタンがクリックされると、そのイベント発生により、入力されたテストデータを利用する所定のサーブレット(図5参照)が呼び出され、そのサーブレットの処理により、テストデータとDBの登録データとの間のDB照合が行われ、その照合結果に応じてテスト実行結果画面A4に対応するJSPファイルが呼び出される。   FIG. 11 shows an input screen A2 displayed by the screen A2 configuration code shown in FIG. This input screen A2 represents a display screen after setting the test data of the setting method A3. In the input screen A2, the input items of Username and UserID, the selection items of the department (Department), the planning department, the accounting department, the human resources department, the sales), and the Go button are set by the screen A2 configuration code. ing. Among them, the username test data has an aiueo corresponding to a maximum of 5 single-byte alphanumeric characters, the UserID test data has a single-byte alphanumerical number of 1234567 corresponding to a maximum of 7 and the department test data includes Second selection items (accounting department) are set. In this state, when the Go button is clicked, a predetermined servlet (see FIG. 5) that uses the input test data is called by the occurrence of the event, and the test data and DB registration data are processed by the servlet processing. And the JSP file corresponding to the test execution result screen A4 is called according to the result of the comparison.

図12は、DB照合の結果、テストデータがDBの登録データと一致した場合のテスト実行結果画面A4の表示例を示す。この場合、「ログインできました!」のメッセージが表記されたJSPファイルが呼び出される。   FIG. 12 shows a display example of the test execution result screen A4 when the test data matches the DB registration data as a result of the DB collation. In this case, a JSP file in which the message “Login has been completed!” Is displayed.

図13は、テストデータ設定前の設定メソッドA3の例を示す。この設定メソッドA3に対応するJSPファイルには、Settingクラスに、SettingMethodメソッドが記述され、Username及びUserIDにはそれぞれ空白が入力され、Departmentには最初の選択項目が選択された状態に設定されている。   FIG. 13 shows an example of the setting method A3 before setting test data. In the JSP file corresponding to the setting method A3, the SettingMethod method is described in the Setting class, blanks are entered in Username and UserID, and the first selection item is set in the state of the Department. .

図14は、テストデータ設定後の設定メソッドA3の例を示す。この画面A2構成コードに対応するJSPファイルには、Settingクラスに、SettingMethodメソッドが記述され、Usernameにはaiueoが入力され、UserIDには1234567が入力され、Departmentには2番目の選択項目が選択された状態に設定されている。   FIG. 14 shows an example of the setting method A3 after setting the test data. In the JSP file corresponding to this screen A2 configuration code, the SettingMethod method is described in the Setting class, eieo is entered in Username, 1234567 is entered in UserID, and the second selection item is selected in Department. Is set to

以上説明したように、本実施例によれば、入力画面呼び出し画面A1から入力画面A2へ遷移する際、入力画面呼び出し画面A1を構成するコードに設定メソッドA3を呼び出すメソッドをスケルトンのソースコードとして組み込んでおき、入力画面A2に遷移した時点で、設定メソッドA3で予め設定されたテストデータが、入力、選択されている状態にする。テストが終了したら、手動で入力画面呼び出し画面A1を構成するコードから設定メソッドA3を呼び出すメソッドの消去を行う。   As described above, according to the present embodiment, a method for calling the setting method A3 is incorporated as a skeleton source code in the code constituting the input screen call screen A1 when transitioning from the input screen call screen A1 to the input screen A2. When the screen changes to the input screen A2, the test data set in advance by the setting method A3 is set in the input and selected state. When the test is completed, the method for calling the setting method A3 is manually deleted from the code constituting the input screen call screen A1.

従って、本実施例によれば、単体テストにおける入力チェック、選択チェックでの面倒な入力、選択を手作業でなく、予めスケルトンのソースコードとしてテストデータを設定する設定メソッドを提供し、そのメソッドを呼び出すことで、設定されたテストデータを自動的に入力、選択できる。すなわち、スケルトンとして生成されるソースコード自体に設定メソッドを用意し、テストデータを設定しているので、そのメソッドを呼び出すだけで、テストが実行でき、さらにテストすべきデータを一度設定しておけば、複数のパターンで少量の変更のみで同様のデータを使用できるため、テストにおける入力や選択の手間を大幅に削減できる。   Therefore, according to the present embodiment, a setting method for setting test data as a skeleton source code in advance is provided and the method is called instead of manual input and selection in a unit test, rather than troublesome input and selection in a unit check. Thus, the set test data can be automatically input and selected. In other words, since the setting method is prepared in the source code itself generated as a skeleton and test data is set, the test can be executed simply by calling the method, and once the data to be tested is set. Because similar data can be used with only a small amount of change in multiple patterns, the time and effort required for input and selection can be greatly reduced.

また、本実施例では、設定メソッドで設定され、呼び出される入力値が、入力可能桁最大のものであり、それをもとに末尾桁に追加したり、文字種類を変更したりするテスト手法を念頭に置いた構成を採用している。このため、全ての入力項目で最大桁が入力されている状態で入力値が呼び出され、テスト実行時には、テストしたい入力項目にわずかな変更を加えることで簡単にテストできる。この効果は、テストで手間がかかる入力の最大桁チェックと入力文字の制限チェックとを行う際に最大限に発揮させることができる。   In this example, the input method that is set and called by the setting method is the one with the maximum number of digits that can be entered, and based on this, a test method for adding to the last digit or changing the character type is used. Adopted a configuration in mind. For this reason, the input value is called in a state where the maximum digits are input in all the input items, and at the time of the test execution, it can be easily tested by making a slight change to the input item to be tested. This effect can be exerted to the maximum when performing the maximum input digit check and the input character restriction check, which are troublesome in the test.

次に、本発明の第2の実施例の構成について図面を参照して詳細に説明する。   Next, the configuration of the second embodiment of the present invention will be described in detail with reference to the drawings.

図15を参照すると、本実施例は、第1の実施例と比較して、設定ファイルからソースコードのスケルトンを生成する際に、設定メソッドA3に加え、判定メソッドA5を有する点で異なる。その他の構成については、第1の実施例と同様であるため、その説明を省略する。   Referring to FIG. 15, the present embodiment differs from the first embodiment in that a determination method A5 is included in addition to the setting method A3 when generating a skeleton of the source code from the setting file. Since other configurations are the same as those of the first embodiment, the description thereof is omitted.

判定メソッドA5は、これに対応するコードが例えばJSPファイルで構成され、入力画面A2で入力したテストデータが正常にデータベースに登録、更新、削除が行われたかどうかの結果をコンソール画面A6に示す。この判定メソッドA5は、テスト実行結果画面A4が表示されるタイミングで、テスト実行結果画面A4から呼び出され、入力画面A2で入力したテストデータが、データベースの保持するデータを更新した場合、その変更箇所を自動的に表示する。   In the determination method A5, a code corresponding to the determination method A5 is configured by, for example, a JSP file, and a result of whether or not the test data input on the input screen A2 is normally registered, updated, or deleted in the database is displayed on the console screen A6. This determination method A5 is called from the test execution result screen A4 at the timing when the test execution result screen A4 is displayed, and when the test data input on the input screen A2 updates the data held in the database, the changed portion Is automatically displayed.

図5のステップSt1〜ステップSt6で示される本実施例における動作は、図1に示された第1の実施例のステップSt1〜ステップSt1と同一のため、説明は省略する。ステップSt7で、テスト終了後、第1の実施例と同様に設定メソッドA3の呼び出しメソッドを消去したあと、テスト実行結果画面A4を構成するコードから判定メソッドA5を呼び出すメソッドを消去する(ステップSt7)。   The operations in this embodiment shown in steps St1 to St6 in FIG. 5 are the same as those in steps St1 to St1 in the first embodiment shown in FIG. In step St7, after the test is completed, the calling method of the setting method A3 is deleted as in the first embodiment, and then the method that calls the determination method A5 is deleted from the code constituting the test execution result screen A4 (step St7). .

次に、本実施例の動作について、図面を参照して詳細に説明する。   Next, the operation of the present embodiment will be described in detail with reference to the drawings.

まず、設定ファイルで、入力画面A2に、テキストボックスB1と選択ラジオボタンB2を有する設定をし、ソースジェネレータ11によりソースコードのスケルトンを作成する。このとき、設定メソッドA3と判定メソッドA5に対応するコードが生成される(ステップSt11)。そのコードには、テキストボックスB1には空白を入力、選択ラジオボタンB2は1番最初の項目を選択する設定がされている。このとき、一番汎用的なパターンのテキストボックスB1の文字制限として、半角英数で20文字とする。   First, in the setting file, the input screen A2 is set to have a text box B1 and a selection radio button B2, and the source generator 11 creates a skeleton of the source code. At this time, codes corresponding to the setting method A3 and the determination method A5 are generated (step St11). In the code, a blank is input in the text box B1, and the selection radio button B2 is set to select the first item. At this time, the character limit of the most general-purpose pattern text box B1 is 20 alphanumeric characters.

次いで、テスト実行前に、設定メソッドA3に対応するコード中のテキストボックスB1の設定項目を”abcdefghijklmnopqrst”に変更し(ステップSt12)、テストデータとする。   Next, before the test is executed, the setting item of the text box B1 in the code corresponding to the setting method A3 is changed to “abcdefghijklmnopqrst” (step St12) to obtain test data.

次いで、テスト実行時には、入力画面呼び出し画面A1から入力画面A2に遷移する際に入力画面A2を構成するコードと共に設定メソッドA3も呼び出され、その入力画面が表示される。このとき、入力画面A2のテキストボックスB1には、設定メソッドA3に設定されたテストデータの”abcdefghijklmnopqrst”が表示される(ステップSt13)。   Next, when the test is executed, the setting method A3 is also called together with the code constituting the input screen A2 when the input screen call screen A1 is changed to the input screen A2, and the input screen is displayed. At this time, “abcdefghijklmnopqrst” of the test data set in the setting method A3 is displayed in the text box B1 of the input screen A2 (step St13).

次いで、テキストボックスB1のテスト行われる。この手順としては、まず、入力画面A2のテキストボックスB1表示されているテストデータの”abcdefghijklmnopqrst”を入力したという状態で入力画面A2からテスト実行結果画面A4に遷移するイベントを発生させる。これにより、そのデータを入力した場合のテストが実行され、その結果が画面表示される。こうすることで、正常動作確認が行われる(ステップSt14)。またこのイベントが発生すると、テスト実行結果画面A4の表示とともに、判定メソッドA5が呼び出され、コンソール画面A6にその判定結果が表示される(ステップSt18)。   Next, the text box B1 is tested. As this procedure, first, an event for transition from the input screen A2 to the test execution result screen A4 is generated in a state in which “abcdefghijklmnopqrst” of the test data displayed in the text box B1 of the input screen A2 is input. Thereby, the test when the data is input is executed, and the result is displayed on the screen. By doing so, normal operation confirmation is performed (step St14). When this event occurs, the determination method A5 is called together with the display of the test execution result screen A4, and the determination result is displayed on the console screen A6 (step St18).

次に、入力画面A2でテキストボックスB1に”abcdefghijklmnopqrst”と表示されている状態から末尾に”u”を追加したり、”st”を”あ”に変更し(ステップSt15、St16)、入力画面A2からテスト実行結果画面A4に遷移するイベントを発生させる。これにより、そのデータを入力した場合のテストが実行され、その結果が画面表示される。こうすることで、異常動作確認が行われる(ステップSt17)。またこのイベントが発生すると、ステップSt18と同様に、テスト実行結果画面A4の表示とともに、判定メソッドA5が呼び出され、コンソール画面A6にその判定結果が表示される(ステップSt19)。   Next, “u” is added to the end from the state where “abcdefghijklmnopqrst” is displayed in the text box B1 on the input screen A2, or “st” is changed to “A” (steps St15 and St16). An event that causes a transition from A2 to the test execution result screen A4 is generated. Thereby, the test when the data is input is executed, and the result is displayed on the screen. By doing so, the abnormal operation confirmation is performed (step St17). When this event occurs, the determination method A5 is called together with the display of the test execution result screen A4 as in step St18, and the determination result is displayed on the console screen A6 (step St19).

上記処理にて一通り一つのパターンでテストが終了したら、次にテストを行うパターンの仕様に合わせて、設定メソッドも変更する。例えば、テキストボックスB1の仕様が文字制限として、半角英数で25文字とすると、設定メソッドA3における現在の設定、”abcdefghijklmnopqrst”を”abcdefghijklmnopqrstuvwxy”に変更を行う。このテストデータを用いて、前記と同様のテストを行う。   When the test is completed with one pattern in the above process, the setting method is also changed according to the specification of the pattern to be tested next. For example, if the specification of the text box B1 is limited to 25 characters, the current setting in the setting method A3, “abcdefghijklmnopqrst”, is changed to “abcdefghijklmnopqrstuvwxy”. A test similar to the above is performed using this test data.

最後に、テストが終了したら、入力画面呼び出し画面A1を構成するコードから設定メソッドA3を呼び出すメソッドを消去すると共に、テスト実行結果画面A4を構成するコードから判定メソッドA5を呼び出すメソッドを消去する。   Finally, when the test is completed, the method for calling the setting method A3 from the code constituting the input screen call screen A1 is deleted, and the method for calling the determination method A5 from the code constituting the test execution result screen A4 is deleted.

図18は、上記の判定メソッドA5の具体例を示す。図18に示す判定メソッドA5は、変更前のパスワードの値と、変更後のパスワードの値とを判定し、その判定結果として、「「パスワード」項目が変更前のパスワードの値から変更後のパスワードの値に変更されました。」旨を出力する場合が示されている。   FIG. 18 shows a specific example of the determination method A5. The determination method A5 shown in FIG. 18 determines the value of the password before the change and the value of the password after the change. As a result of the determination, the “password” item is changed from the password value before the change. The value has been changed. "Is output.

図19は、コンソール画面A6の表示例を示す。図19に示すコンソール画面A6は、判定メソッドA5による判定結果として、「「パスワード」項目が1234567(変更前)から0123456(変更後)に変更されました。」旨のメッセージと、「「パスワード」項目が営業部(変更前)から企画部(変更後)に変更されました。」旨のメッセージとが表示される場合を示されている。   FIG. 19 shows a display example of the console screen A6. In the console screen A6 shown in FIG. 19, the “Password” item has been changed from 1234567 (before change) to 0123456 (after change) as a result of determination by determination method A5. "The password" item has been changed from the Sales Department (before change) to the Planning Department (after change). ”Message is displayed.

以上、本発明の各実施例を詳細に説明したが、本発明は、代表的に例示した上述の各実施例に限定されるものではなく、当業者であれば、特許請求の範囲の記載内容に基づき、本発明の要旨を逸脱しない範囲内で種々の態様に変形、変更することができる。これらの変形例や変更例も本発明の権利範囲に属するものである。   As mentioned above, although each Example of this invention was described in detail, this invention is not limited to each said Example illustrated typically, If it is those skilled in the art, description content of a claim Based on the above, various modifications and changes can be made without departing from the scope of the present invention. These modified examples and modified examples also belong to the scope of the right of the present invention.

例えば、上記の各実施例に係るアプリケーション開発システムを構成するプログラムコードは、オペレーティングシステムや他のアプリケーションソフトウェア等と共同して上記機能が実現される場合は、それらのプログラムコードも含まれる。   For example, the program code constituting the application development system according to each of the above embodiments includes those program codes when the above functions are realized in cooperation with an operating system or other application software.

また、前述した各実施例に係るアプリケーション開発システムを構成するプログラムコードを記録する記録媒体も、本発明の範疇に含まれる。記録媒体としては、前述したハードディスクやROMのほか、フレキシブルディスク、光ディスク、光磁気ディスク、CD−ROM、磁気テープ、不揮発性のメモリカード等を用いることができる。   Further, a recording medium that records a program code constituting the application development system according to each of the above-described embodiments is also included in the scope of the present invention. As the recording medium, in addition to the hard disk and ROM described above, a flexible disk, an optical disk, a magneto-optical disk, a CD-ROM, a magnetic tape, a nonvolatile memory card, and the like can be used.

さらに、上記の各実施例に係るアプリケーション開発システムを構成するプログラムコードを実装するコンピュータ機についても、本発明の範疇に含まれる。このコンピュータ機は、プログラム制御で動作するプロセッサと、制御プログラムや制御データ等を格納する記憶領域を有するメモリと、各種入出力装置(例えば、外部記録装置、通信装置、表示装置、入力装置等の各種周辺装置)とを用いて実現することが可能である。この場合、プロセッサ、メモリ、及び各種入出力装置の各構成要素は、本発明の範疇に含まれる。図20は、この場合のハードウェア構成例を示す。   Furthermore, a computer that implements the program code constituting the application development system according to each of the above embodiments is also included in the scope of the present invention. This computer machine includes a processor that operates under program control, a memory that has a storage area for storing control programs and control data, and various input / output devices (for example, an external recording device, a communication device, a display device, an input device, etc. And various peripheral devices). In this case, each component of the processor, the memory, and the various input / output devices is included in the scope of the present invention. FIG. 20 shows a hardware configuration example in this case.

図20の例では、上記プログラムコードを実行するコンピュータ機は、CPU1と、メモリ(ROM/RAM)2と、ハードディスク等の外部記憶装置3と、CRTや液晶ディスプレイ等の表示装置と、キーボードやマウス等の入力装置5と、通信モデムやLANインタフェース等の通信装置6とから構成されている。このコンピュータ機は、スタンドアロン型のものでも、ネットワークに通信可能に接続された複数のコンピュータ機から構成されたものでも、いずれでも適用可能である。   In the example of FIG. 20, the computer that executes the program code includes a CPU 1, a memory (ROM / RAM) 2, an external storage device 3 such as a hard disk, a display device such as a CRT or a liquid crystal display, a keyboard and a mouse. And an input device 5 such as a communication modem 6 and a communication device 6 such as a LAN interface. This computer can be applied to either a stand-alone computer or a computer composed of a plurality of computers that are communicably connected to a network.

本発明によれば、アプリケーション開発のもととなるスケルトンとなるソースコードを自動生成するソフトウェアを作成するという用途に適用できる。   INDUSTRIAL APPLICABILITY According to the present invention, the present invention can be applied to the use of creating software that automatically generates source code that becomes a skeleton that is the basis of application development.

本発明の第1及び第2の実施例に係るプログラムのテスト方法を用いたアプリケーション開発システムの要部構成を示す概略ブロック図である。It is a schematic block diagram which shows the principal part structure of the application development system using the test method of the program which concerns on the 1st and 2nd Example of this invention. 第1の実施例において、作成されたアプリケーションのソースコードの構成及びその機能を説明する図である。In the first embodiment, it is a diagram for explaining the configuration and function of the source code of the created application. 第1の実施例の動作を説明する概略フローチャートである。It is a schematic flowchart explaining operation | movement of a 1st Example. 第1の実施例の具体的な動作例を説明する図である。It is a figure explaining the example of a specific operation | movement of a 1st Example. 第1の実施例において、作成されたWebアプリケーションのソースコードの構成及びその機能を説明する図である。FIG. 3 is a diagram for explaining the configuration and function of a source code of a created Web application in the first embodiment. 第1の実施例において、設定ファイルの具体例を説明する図である。FIG. 6 is a diagram illustrating a specific example of a setting file in the first embodiment. 第1の実施例において、スケルトンとなるソースコードの具体例を説明する図である。FIG. 5 is a diagram illustrating a specific example of source code that becomes a skeleton in the first embodiment. 第1の実施例において、入力画面呼び出し画面を構成するコードの具体例を説明する図である。In a 1st Example, it is a figure explaining the specific example of the code which comprises the input screen call screen. 第1の実施例において、入力画面呼び出し画面の表示例を説明する図である。In a 1st Example, it is a figure explaining the example of a display of an input screen call screen. 第1の実施例において、入力画面を構成するコードを説明する図である。In a 1st Example, it is a figure explaining the code | cord | chord which comprises an input screen. 第1の実施例において、入力画面の表示例を説明する図である。In a 1st Example, it is a figure explaining the example of a display of an input screen. 第1の実施例において、テスト実行結果画面の表示例を説明する図である。FIG. 10 is a diagram illustrating a display example of a test execution result screen in the first embodiment. テストデータ設定前の設定メソッドの具体例を説明する図である。It is a figure explaining the specific example of the setting method before test data setting. テストデータ設定後の設定メソッドの具体例を説明する図である。It is a figure explaining the specific example of the setting method after test data setting. 本発明の第2の実施例において、作成されたアプリケーションのソースコードの構成及びその機能を説明する図である。In the 2nd Example of this invention, it is a figure explaining the structure of the source code of the produced application, and its function. 第2の実施例の動作を説明する概略フローチャートである。It is a schematic flowchart explaining operation | movement of a 2nd Example. 第2の実施例の具体的な動作例を説明する図である。It is a figure explaining the example of a specific operation | movement of a 2nd Example. 第2の実施例において、判定メソッドの具体例を説明する図である。In a 2nd Example, it is a figure explaining the specific example of the determination method. 第2の実施例において、コンソール画面の表示例を説明する図である。In a 2nd Example, it is a figure explaining the example of a display of a console screen. 本発明に係るプログラムのテスト方法を用いたアプリケーション開発システムのハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of the application development system using the test method of the program concerning this invention.

符号の説明Explanation of symbols

11 ソースジェネレータ
A1 入力画面呼び出し画面
A2 入力画面
A3 設定メソッド
A4 テスト結果実行画面
A5 判定メソッド
A6 コンソール画面
B1 テキストボックス
11 Source generator A1 Input screen call screen A2 Input screen A3 Setting method A4 Test result execution screen A5 Judgment method A6 Console screen B1 Text box

Claims (13)

表示画面上の入力項目のデータに応じて所定の処理を実行しその結果を出力するためのソフトウェアのスケルトンとなるソースコードを生成し、生成されたソースコードから作成されたプログラムのテストを実行する方法において、
前記ソースコード生成時に、前記ソースコードと共に前記入力項目のテストデータを設定するためのプログラムとなる設定メソッドを生成するステップと、
前記テスト実行前に、前記設定メソッドを呼び出して前記テストデータを設定するステップと、
前記テスト実行時に、前記設定メソッドを呼び出して前記入力項目内に前記テストデータが設定された状態で前記表示画面を表示するステップとを有することを特徴とするプログラムのテスト方法。
Generates a source code that is a software skeleton for executing predetermined processing and outputting the result according to the input item data on the display screen, and executes a test of the program created from the generated source code In the method
Generating a setting method serving as a program for setting test data of the input items together with the source code when generating the source code;
Before executing the test, calling the setting method to set the test data;
And a step of calling the setting method and displaying the display screen in a state where the test data is set in the input item when the test is executed.
前記テストデータを設定するステップは、前記テストデータの最大桁の入力値を設定し、
前記表示画面を表示するステップは、前記入力項目に前記テストデータの最大桁の入力値が設定された状態で前記表示画面を表示することを特徴とする請求項1記載のプログラムのテスト方法。
The step of setting the test data sets an input value of the maximum digit of the test data,
The method of testing a program according to claim 1, wherein the step of displaying the display screen displays the display screen in a state where an input value of the maximum digit of the test data is set in the input item.
前記ソースコード生成時に、前記ソースコードと共に前記入力項目に入力したテストデータが正常にデータベースに登録、更新、又は削除されたかどうかを判定するためのプログラムとなる判定メソッドを生成するステップと、
前記テスト実行時に、前記判定メソッドを呼び出してその判定結果を表示するステップとをさらに有することを特徴とする請求項1又は2記載のプログラムのテスト方法。
Generating a determination method serving as a program for determining whether the test data input to the input item together with the source code is successfully registered, updated, or deleted in the database when generating the source code;
The program test method according to claim 1, further comprising a step of calling the determination method and displaying the determination result when the test is executed.
前記ソフトウェアは、Webアプリケーションであることを特徴とする請求項1乃至3のいずれか1項に記載のプログラムのテスト方法。   The program testing method according to claim 1, wherein the software is a Web application. 表示画面上の入力項目のデータに応じて所定の処理を実行しその結果を出力するためのソフトウェアのスケルトンとなるソースコードを生成し、生成されたソースコードから作成されたプログラムのテストを実行するプログラムにおいて、
コンピュータに、
前記ソースコード生成時に、前記ソースコードと共に前記入力項目のテストデータを設定するためのプログラムとなる設定メソッドを生成するステップと、
前記テスト実行前に、前記設定メソッドを呼び出して前記テストデータを設定するステップと、
前記テスト実行時に、前記設定メソッドを呼び出して前記入力項目内に前記テストデータが設定された状態で前記表示画面を表示するステップとを実行させることを特徴とするプログラム。
Generates a source code that is a software skeleton for executing predetermined processing and outputting the result according to the input item data on the display screen, and executes a test of the program created from the generated source code In the program
On the computer,
Generating a setting method serving as a program for setting test data of the input items together with the source code when generating the source code;
Before executing the test, calling the setting method to set the test data;
A program that, when executing the test, calls the setting method to display the display screen in a state where the test data is set in the input item.
前記テストデータを設定するステップは、前記テストデータの最大桁の入力値を設定し、
前記表示画面を表示するステップは、前記入力項目に前記テストデータの最大桁の入力値が設定された状態で前記表示画面を表示することを特徴とする請求項5記載のプログラム。
The step of setting the test data sets an input value of the maximum digit of the test data,
6. The program according to claim 5, wherein the step of displaying the display screen displays the display screen in a state where an input value of the maximum digit of the test data is set in the input item.
コンピュータに、
前記ソースコード生成時に、前記ソースコードと共に前記入力項目に入力したテストデータが正常にデータベースに登録、更新、又は削除されたかどうかを判定するためのプログラムとなる判定メソッドを生成するステップと、
前記テスト実行時に、前記判定メソッドを呼び出してその判定結果を表示するステップとをさらに実行させることを特徴とする請求項5又は6記載のプログラム。
On the computer,
Generating a determination method serving as a program for determining whether test data input to the input item together with the source code is normally registered, updated, or deleted in the source code when generating the source code;
The program according to claim 5 or 6, further comprising the step of calling the determination method and displaying the determination result when the test is executed.
前記ソフトウェアは、Webアプリケーションであることを特徴とする請求項5乃至7のいずれか1項に記載のプログラム。   The program according to claim 5, wherein the software is a Web application. 表示画面上の入力項目のデータに応じて所定の処理を実行しその結果を出力するためのソフトウェアのスケルトンとなるソースコードを生成し、生成されたソースコードから作成されたプログラムのテストを実行する装置において、
前記ソースコード生成時に、前記ソースコードと共に前記入力項目のテストデータを設定するためのプログラムとなる設定メソッドを生成する生成手段と、
前記テスト実行前に、前記設定メソッドを呼び出して前記テストデータを設定する設定手段と、
前記テスト実行時に、前記設定メソッドを呼び出して前記入力項目内に前記テストデータが設定された状態で前記表示画面を表示する表示手段とを有することを特徴とするプログラムのテスト装置。
Generates a source code that is a software skeleton for executing predetermined processing and outputting the result according to the input item data on the display screen, and executes a test of the program created from the generated source code In the device
Generating means for generating a setting method serving as a program for setting test data of the input items together with the source code at the time of generating the source code;
Setting means for setting the test data by calling the setting method before the test execution;
And a display unit configured to display the display screen in a state in which the test data is set in the input item by calling the setting method when the test is executed.
前記設定手段は、前記テストデータの最大桁の入力値を設定し、
前記表示手段は、前記入力項目に前記テストデータの最大桁の入力値が設定された状態で前記表示画面を表示することを特徴とする請求項9記載のプログラムのテスト装置。
The setting means sets an input value of the maximum digit of the test data,
10. The program test apparatus according to claim 9, wherein the display means displays the display screen in a state where an input value of the maximum digit of the test data is set in the input item.
前記ソースコード生成時に、前記ソースコードと共に前記入力項目に入力したテストデータが正常にデータベースに登録、更新、又は削除されたかどうかを判定するためのプログラムとなる判定メソッドを生成する手段と、
前記テスト実行時に、前記判定メソッドを呼び出してその判定結果を表示する手段とをさらに有することを特徴とする請求項9又は10記載のプログラムのテスト装置。
Means for generating a determination method serving as a program for determining whether the test data input to the input item together with the source code is normally registered, updated, or deleted in the source code when the source code is generated;
11. The program test apparatus according to claim 9, further comprising means for calling the determination method and displaying the determination result when the test is executed.
前記ソフトウェアは、Webアプリケーションであることを特徴とする請求項9乃至11のいずれか1項に記載のプログラムのテスト装置。   The program test apparatus according to claim 9, wherein the software is a Web application. 請求項9乃至12のいずれか1項に記載のプログラムのテスト装置を備えたことを特徴とするアプリケーション開発システム。   An application development system comprising the test apparatus for a program according to claim 9.
JP2006131458A 2006-05-10 2006-05-10 Test method for program, program, test device and application development system Pending JP2007304778A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006131458A JP2007304778A (en) 2006-05-10 2006-05-10 Test method for program, program, test device and application development system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006131458A JP2007304778A (en) 2006-05-10 2006-05-10 Test method for program, program, test device and application development system

Publications (1)

Publication Number Publication Date
JP2007304778A true JP2007304778A (en) 2007-11-22

Family

ID=38838660

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006131458A Pending JP2007304778A (en) 2006-05-10 2006-05-10 Test method for program, program, test device and application development system

Country Status (1)

Country Link
JP (1) JP2007304778A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016048470A (en) * 2014-08-27 2016-04-07 日本電気株式会社 Application test support apparatus, data processing method thereof, and program
KR20170052668A (en) * 2014-09-08 2017-05-12 아브 이니티오 테크놀로지 엘엘시 Data-driven testing framework

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016048470A (en) * 2014-08-27 2016-04-07 日本電気株式会社 Application test support apparatus, data processing method thereof, and program
KR20170052668A (en) * 2014-09-08 2017-05-12 아브 이니티오 테크놀로지 엘엘시 Data-driven testing framework
KR102356771B1 (en) * 2014-09-08 2022-01-27 아브 이니티오 테크놀로지 엘엘시 Data-driven testing framework

Similar Documents

Publication Publication Date Title
US11366676B2 (en) Embedded user assistance for software applications
JP4344693B2 (en) System and method for browser document editing
US8924934B2 (en) Automated test tool interface
TW413764B (en) Method for generating display control information and computer
US7073126B1 (en) Method and system of deploying server-based applications
US7392510B1 (en) System for tracking and providing access to information about server components invoked during the dynamic generation of web pages
US7451393B1 (en) System and method for a page rendering framework
US20030115572A1 (en) System, method and computer program product for application development using a visual paradigm to combine existing data and applications
US10419568B2 (en) Manipulation of browser DOM on server
US7159209B1 (en) Inter-application validation tool for use in enterprise architecture modeling
US20050267976A1 (en) Data driven test automation of web sites and web services
JP5661617B2 (en) Printer emulation system and method
US8479147B2 (en) Server-page based software architecture enabling use-case oriented evolutionary software prototyping
JP2012168950A (en) Web service for automated cross-browser compatibility checking of web applications
US20140047368A1 (en) Application development tool
US10417317B2 (en) Web page profiler
WO2021249356A1 (en) Form data verification method, system, server, and user terminal
JP5162459B2 (en) Script markup
JP4846832B2 (en) Web page display method, computer system, and program
US8984403B2 (en) Bringing user attention to guidance information presented on a display device
JP2007304778A (en) Test method for program, program, test device and application development system
US10348811B2 (en) Service to invoke companion applications
US20110295946A1 (en) Communication device
JP2006163855A (en) Web application development support device, and development support method
US20230086308A1 (en) Systems and methods for integrating application components in a web application

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080609

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090820

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090901

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091029

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100224