JP2014038453A - Testing device and computer program - Google Patents

Testing device and computer program Download PDF

Info

Publication number
JP2014038453A
JP2014038453A JP2012180084A JP2012180084A JP2014038453A JP 2014038453 A JP2014038453 A JP 2014038453A JP 2012180084 A JP2012180084 A JP 2012180084A JP 2012180084 A JP2012180084 A JP 2012180084A JP 2014038453 A JP2014038453 A JP 2014038453A
Authority
JP
Japan
Prior art keywords
web page
test
browser
unit
tablet
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
JP2012180084A
Other languages
Japanese (ja)
Inventor
Kazuki Nakamura
一樹 中村
Mariko Okawa
真梨子 大川
Akira Kamimura
亮 神村
Taiji Miyazawa
泰司 宮澤
Sho Hatanaka
翔 畠中
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.)
Nomura Research Institute Ltd
Original Assignee
Nomura Research Institute 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 Nomura Research Institute Ltd filed Critical Nomura Research Institute Ltd
Priority to JP2012180084A priority Critical patent/JP2014038453A/en
Publication of JP2014038453A publication Critical patent/JP2014038453A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To support operating a web page at proper timing in a web page test.SOLUTION: A tablet PC 12 acquires a web page of a test object from a web server 10, and stores tree structure data in which content of the web page is shown. When a second operation should be executed after executing a first operation for a web page, the tablet PC 12 acquires an element value of the web page on the first operation or the second operation from the tree structure data and determines whether or not the element value is consistent with a predetermined expected value which indicates that the second operation can be executed. The tablet PC 12 executes the second operation for the web page on condition that the element value is consistent with the expected value.

Description

本発明はデータ処理技術に関し、ウェブページを試験するための技術に関する。   The present invention relates to a data processing technique, and to a technique for testing a web page.

ウェブページの試験は、一般的に、そのウェブページを表示するウェブブラウザに対して入力操作を行い、操作結果を確認することにより実施される。本出願人は、複数種類のウェブブラウザ上でウェブページを試験すべき場合に、試験の効率化を実現するための技術を以下の特許文献1において提案している。   The web page test is generally performed by performing an input operation on a web browser that displays the web page and confirming the operation result. The present applicant has proposed a technique for realizing a test efficiency in the following Patent Document 1 when a web page should be tested on a plurality of types of web browsers.

特開2011−164784号公報JP 2011-164784 A

ウェブクライアントがウェブサーバからウェブページを取得することとは非同期に、ウェブページの表示内容を更新する処理がウェブページのコードに実装されることがある。本発明者は、このような非同期処理の実行中にウェブページを操作することは望ましくなく、ウェブページの試験において、ウェブページを操作可能なタイミングであるか否かを確認する必要性があると考えた。   A process of updating the display content of the web page may be implemented in the code of the web page asynchronously with the web client acquiring the web page from the web server. It is not desirable for the present inventor to operate the web page during execution of such asynchronous processing, and it is necessary to confirm whether or not it is time to operate the web page in the web page test. Thought.

本発明は発明者の上記着想にもとづきなされたものであり、その主な目的は、ウェブページの試験においてウェブページを適切なタイミングで操作することを支援する技術を提供することである。   The present invention has been made on the basis of the above-mentioned idea of the inventor, and its main object is to provide a technique for supporting the operation of the web page at an appropriate timing in the web page test.

上記課題を解決するために、本発明のある態様の試験装置は、試験対象のウェブページの内容を示す木構造データを保持するページ管理部と、ウェブページに対する第1の操作を実行後、第2の操作を実行すべき場合に、第1の操作または第2の操作に関するウェブページの要素値を木構造データから取得し、その要素値が、第2の操作を実行可能であることを示す所定の期待値と整合するか否かを判定する判定部と、要素値が期待値と整合することを条件として、ウェブページに対する第2の操作を実行する操作実行部と、を備える。   In order to solve the above problem, a test apparatus according to an aspect of the present invention includes a page management unit that holds tree structure data indicating the content of a web page to be tested, and a first operation on the web page. When the operation 2 is to be executed, the element value of the web page related to the first operation or the second operation is acquired from the tree structure data, and the element value indicates that the second operation can be executed. A determination unit that determines whether or not the value matches a predetermined expected value; and an operation execution unit that executes a second operation on the web page on condition that the element value matches the expected value.

なお、以上の構成要素の任意の組合せ、本発明の表現を方法、システム、プログラム、プログラムを格納した記録媒体などの間で変換したものもまた、本発明の態様として有効である。   It should be noted that any combination of the above-described components, and a representation of the present invention converted between a method, a system, a program, a recording medium storing the program, and the like are also effective as an aspect of the present invention.

本発明によれば、ウェブページの試験においてウェブページを適切なタイミングで操作することを支援できる。   ADVANTAGE OF THE INVENTION According to this invention, it can support operating a web page at an appropriate timing in the test of a web page.

自動試験APのソフトウェアスタックの概念図である。It is a conceptual diagram of the software stack of automatic test AP. 自動試験APによるウェブページ試験の仕組みを説明する図である。It is a figure explaining the mechanism of the web page test by automatic test AP. 実施の形態の試験システムの構成を示す図である。It is a figure which shows the structure of the test system of embodiment. 図3のタブレットPCの機能構成を示すブロック図である。It is a block diagram which shows the function structure of the tablet PC of FIG. 標準ブラウザのウィンドウを示す図である。It is a figure which shows the window of a standard browser. デフォルトの試験用ブラウザのウィンドウを示す図である。It is a figure which shows the window of the default test browser. 試験用ブラウザ用の改変プログラムを示す図である。It is a figure which shows the modification program for test browsers. 改変プログラム適用後の試験用ブラウザのウィンドウを示す図である。It is a figure which shows the window of the test browser after a modification program application. 操作実行部の処理を説明するための概念図である。It is a conceptual diagram for demonstrating the process of the operation execution part. 操作実行部の処理を説明するための概念図である。It is a conceptual diagram for demonstrating the process of the operation execution part. 図3の管理サーバの機能構成を示すブロック図である。It is a block diagram which shows the function structure of the management server of FIG. 自動試験システム動作を示すフローチャートである。It is a flowchart which shows an automatic test system operation | movement. 図12のS10のウェブブラウザ起動処理を詳細に示すフローチャートである。It is a flowchart which shows the web browser starting process of S10 of FIG. 12 in detail. 図12のS12のウェブページ取得処理を詳細に示すフローチャートである。It is a flowchart which shows the web page acquisition process of S12 of FIG. 12 in detail. 図12のS14の画面要素操作処理を詳細に示すフローチャートである。It is a flowchart which shows in detail the screen element operation process of S14 of FIG. 試験対象のウェブページを模式的に示す図である。It is a figure which shows typically the web page of test object. 図16のウェブページのプログラムコードを示す図である。It is a figure which shows the program code of the web page of FIG. 図12のS16の画面キャプチャ処理を詳細に示すフローチャートである。It is a flowchart which shows the screen capture process of S16 of FIG. 12 in detail. 図12のS20のキャプチャ画像提供処理を詳細に示すフローチャートである。It is a flowchart which shows the capture image provision process of S20 of FIG. 12 in detail. 図16のウェブページのプログラムコードを示す図である。It is a figure which shows the program code of the web page of FIG.

本実施の形態では、Android(商標または登録商標)OS(Operating System)が搭載されたタブレットPC上においてウェブページの自動試験を実行するアプリケーション(以下、「自動試験AP」とも呼ぶ。)を提案する。図1は、自動試験AP300のソフトウェアスタックの概念図である。自動試験AP300は、AndroidOSに対応したオープンソースソフトウェアであるSelenium2.0を基盤とする。オープンソース拡張クラス304は、Selenium2.0の機能を修正・追加するクラス群である。例えば、サイドバーの隠蔽や不要なダイアログを非表示とする等の機能を提供する。   In the present embodiment, an application (hereinafter also referred to as “automatic test AP”) that performs an automatic test of a web page on a tablet PC on which an Android (trademark or registered trademark) OS (Operating System) is mounted is proposed. . FIG. 1 is a conceptual diagram of a software stack of the automatic test AP 300. The automatic test AP 300 is based on Selenium 2.0, which is open source software corresponding to Android OS. The open source extension class 304 is a class group for correcting / adding the function of Selenium 2.0. For example, it provides functions such as hiding the sidebar and hiding unnecessary dialogs.

汎用部品306は、画面キャプチャによる画像取得や、ウェブページのロード待ち処理等、ウェブページの自動試験実行時に必要となる汎用的な部品(クラス群)である。画面操作共通部品308は、ウェブページに配置されたボタンやテキストエリア等の各種オブジェクトに対する操作部品(クラス群)である。後述のアクションクラスは、典型的に汎用部品306や画面操作共通部品308(が提供する関数・メソッド)を呼び出す。これらは自動試験ツールとしての資産と言え、Selenium2.0やAndroidOSの更新・発展に応じて拡張される。   The general-purpose component 306 is a general-purpose component (class group) that is required when executing an automatic test of a web page, such as image acquisition by screen capture or web page load waiting processing. The screen operation common component 308 is an operation component (class group) for various objects such as buttons and text areas arranged on the web page. An action class described later typically calls a general-purpose component 306 or a screen operation common component 308 (function / method provided by). These can be said to be assets as automatic test tools, and are expanded according to the update and development of Selenium 2.0 and Android OS.

アクションクラス310は、ウェブページに配置されたボタンやテキストフィールド等の各種オブジェクトへの操作内容を保持するクラス群であり、典型的には画面単位(すなわちウェブページ単位)に作成される。アクションクラス310で規定される他の操作としては、試験対象のウェブページを取得して画面表示させる操作やウェブブラウザ画面(すなわちウェブブラウザのウィンドウに表示されたウェブページ画像)の縦もしくは横のスクロール操作、ウェブブラウザ画面のキャプチャ操作等がある。   The action class 310 is a class group that holds operation contents for various objects such as buttons and text fields arranged on a web page, and is typically created in units of screens (that is, web pages). Other operations specified by the action class 310 include obtaining a test web page and displaying it on the screen, and scrolling the web browser screen (that is, the web page image displayed in the web browser window) vertically or horizontally. Operation, web browser screen capture operation, etc.

データクラス312は、テストケース毎に定められる画面操作情報(例えばボタンに対する押下操作の有無や、テキストフィールドに対する入力文字を示す情報)を保持するクラス群であり、典型的にはテストケース毎に作成される。シナリオクラス314は、アクションクラスとデータクラスとを組み合わせ、これらをテストケースとして保持する。これらは試験スクリプトとしての資産と言え、試験を実施するアプリチームが試験対象の画面(ウェブページ)に応じて適宜開発する。   The data class 312 is a class group that holds screen operation information (for example, information indicating presence / absence of pressing operation on a button or information indicating an input character for a text field) determined for each test case, and is typically created for each test case Is done. The scenario class 314 combines an action class and a data class and holds them as test cases. These can be said to be assets as test scripts, which are appropriately developed by the application team that performs the test according to the screen (web page) to be tested.

実施の形態の自動試験AP300は、図1の自動試験ツールと試験スクリプトを包含するものである。なお図1には不図示であるが、自動試験AP300は、自動試験ツールと試験スクリプトとを連携させ、ウェブページの試験を統括的に制御するクラス群(いわゆる試験実行エンジン)を含む。   The automatic test AP 300 according to the embodiment includes the automatic test tool and the test script shown in FIG. Although not shown in FIG. 1, the automatic test AP 300 includes a class group (a so-called test execution engine) that links an automatic test tool and a test script to comprehensively control web page tests.

またSelenium2.0は、ウェブページの試験に使用するウェブブラウザであるWebView(以下、「試験用ブラウザ」とも呼ぶ。)を内包し、試験対象として指定されたウェブページをその試験用ブラウザに表示させる。またSelenium2.0は、試験用ブラウザに表示させたウェブページを操作するための関数を外部(後述の操作実行部44等)から呼び出し可能に公開する。   In addition, Selenium 2.0 includes WebView (hereinafter also referred to as “test browser”), which is a web browser used for web page testing, and displays the web page specified as the test target on the test browser. . In addition, Selenium 2.0 exposes a function for operating a web page displayed on the test browser so that it can be called from outside (an operation execution unit 44 described later).

例えば、画面操作共通部品308や汎用部品306のクラス群が、Selenium2.0が提供する関数を呼び出すと、Selenium2.0は、呼び出された関数に対応する試験用ブラウザのAPIを呼び出す。これにより、ユーザが指定した操作(典型的にはウェブページに配置された各種オブジェクトに対する入力操作)を、試験用ブラウザを介して試験対象のウェブページに対して実行する。すなわち典型的な関数呼び出し関係は、アクションクラス→画面操作共通部品308や汎用部品306→Selenium2.0の公開関数→試験用ブラウザAPIとなる。   For example, when a class group of the screen operation common component 308 and the general-purpose component 306 calls a function provided by Selenium 2.0, Selenium 2.0 calls an API of a test browser corresponding to the called function. As a result, an operation designated by the user (typically, an input operation for various objects arranged on the web page) is executed on the web page to be tested via the test browser. In other words, a typical function call relationship is: action class → screen operation common component 308 or general-purpose component 306 → public function of Selenium 2.0 → test browser API.

またSelenium2.0は、ウェブページの表示画面(試験用ブラウザに表示されたウェブページの画像)をキャプチャするための関数も公開する。なお、Selenium2.0によるウェブページの操作の一部は、Selenium2.0が、OSが提供する関数をさらに呼び出すことにより実現される。   Selenium 2.0 also discloses a function for capturing a web page display screen (image of a web page displayed on a test browser). A part of the web page operation by Selenium 2.0 is realized by Selenium 2.0 further calling a function provided by the OS.

ここで図2を参照して、自動試験AP300によるウェブページ試験の仕組みを概説する。図2(a)は試験対象のウェブページ110の表示画面を模式的に示し、図2(b)はウェブページ110のHTMLプログラム120を示す。ウェブページ110のテキストフィールド112はHTMLプログラム120のコード122に対応し、ウェブページ110のボタン114はHTMLプログラム120のコード124に対応する。   Here, with reference to FIG. 2, the mechanism of the web page test by the automatic test AP 300 will be outlined. FIG. 2A schematically shows a display screen of the web page 110 to be tested, and FIG. 2B shows the HTML program 120 of the web page 110. The text field 112 of the web page 110 corresponds to the code 122 of the HTML program 120, and the button 114 of the web page 110 corresponds to the code 124 of the HTML program 120.

図2(c)は、ウェブページ110に対する操作種別を定めたアクションクラス130のコードを示す。アクションクラス130は、「(操作対象オブジェクトの識別情報).画面操作共通部品308やアクションクラス310が提供する関数名(入力データ等の引数)」の形式で操作種別を規定する。図2(d)は、ウェブページ110に対する操作での入力内容を定めたデータクラス140を示す。データクラス140は、アクションクラス130での関数呼び出し時の引数を規定している。   FIG. 2C shows the code of the action class 130 that defines the operation type for the web page 110. The action class 130 defines the operation type in the format of “(operation object identification information). Function name provided by the screen operation common part 308 or action class 310 (argument such as input data)”. FIG. 2 (d) shows a data class 140 that defines the input content in the operation on the web page 110. The data class 140 defines an argument at the time of calling a function in the action class 130.

具体的には、図2(c)のコード132は、画面操作共通部品308のsetKey関数を呼び出し、図2(d)のコード142が定める「1234」を、ウェブページ110のテキストフィールド112へ入力する操作を規定している。なお、setKey関数の呼び出しを受け付けた画面操作共通部品308は、setKey関数に対応するSelenium2.0が提供する関数を呼び出す。また図2(c)のコード134は、画面操作共通部品308のclick関数を図2(d)のコード144が定める「ON」を引数として呼び出すことにより、ウェブページ110のボタン114をクリックする操作を規定している。   Specifically, the code 132 in FIG. 2C calls the setKey function of the screen operation common component 308 and inputs “1234” defined by the code 142 in FIG. 2D to the text field 112 of the web page 110. Defines the operations to be performed. The screen operation common component 308 that has received a call to the setKey function calls a function provided by Selenium 2.0 corresponding to the setKey function. The code 134 in FIG. 2C is an operation for clicking the button 114 on the web page 110 by calling the click function of the screen operation common component 308 with “ON” defined by the code 144 in FIG. 2D as an argument. Is stipulated.

実施の形態の自動試験APは、Selenium2.0の機能を拡充してウェブページの試験効率の向上・試験品質の向上を実現する。その主な特徴を3点説明する。
(特徴1)ウェブページに配置された所定のオブジェクト(例えば、テキストフィールドやテキストエリア、プルダウンリスト等、以下「特殊オブジェクト」とも呼ぶ。)に対して試験データを設定すべき場合に、ウェブページのDOM(Document Object Model)ツリーを操作することにより試験データを直接設定する。
The automatic test AP according to the embodiment expands the functions of Selenium 2.0 and realizes improvement of web page test efficiency and test quality. Three main features will be described.
(Characteristic 1) When test data should be set for a predetermined object (for example, a text field, a text area, a pull-down list, etc., hereinafter also referred to as “special object”) arranged on the web page. Test data is set directly by manipulating a DOM (Document Object Model) tree.

Selenium2.0は、これらの特殊オブジェクトを操作するための関数を提供しており、内部的にSelenium2.0はOSが提供する操作関数を呼び出す。しかし、OSの操作関数を利用する方式は試験効率の面で問題があった。すなわち、OSの操作関数を呼び出す方式では、テキストフィールドやテキストエリア等への文字入力の際にソフトウェアキーボードが表示され、ソフトウェアキーボードを介して文字入力がなされるため、文字入力に時間を要してしまう。本来、試験で確認すべきことは文字入力後(さらにボタン押下後)の画面表示の変化(例えば別のウェブページへの遷移)であり、文字入力そのものの成否ではないため、文字入力に長時間を要することは望ましくない。またプルダウンリストの操作時には、選択可能項目のリストを展開表示した際に処理が停止してしまうこともあった。   Selenium 2.0 provides functions for operating these special objects. Internally, Selenium 2.0 calls an operation function provided by the OS. However, the method using the operating function of the OS has a problem in terms of test efficiency. That is, in the method of calling the operating function of the OS, a software keyboard is displayed when characters are input to a text field or text area, and characters are input via the software keyboard. Therefore, it takes time to input characters. End up. Originally, what should be confirmed in the test is a change in the screen display after character input (and after pressing a button) (for example, transition to another web page), and it is not a success or failure of character input itself, so it takes a long time to input characters. It is not desirable to require In addition, when the pull-down list is operated, the processing sometimes stops when the list of selectable items is expanded and displayed.

ここで自動試験APによる試験対象・正常性の確認対象は、あくまでウェブページであり、またウェブページを提供するウェブサーバであり、ソフトウェアキーボードやプルダウンリスト(を用いたデータ入力可否の確認)ではない。したがって、これらの部品を用いたデータ入力処理は経由しなくても、ウェブページやウェブサーバの挙動(例えばデータ入力後のウェブページの表示内容の変化)を確認するという試験目的は達成できる。   Here, the test target / normality check target by the automatic test AP is a web page and a web server that provides the web page, not a software keyboard or a pull-down list (checking whether data can be entered). . Therefore, the test purpose of confirming the behavior of the web page or web server (for example, change in the display content of the web page after data input) can be achieved without going through the data input processing using these components.

そこで自動試験APは、ウェブページの操作対象オブジェクトに対するOSが提供する操作関数であり、データ設定のためのGUIオブジェクトを一旦表示させた上で操作対象オブジェクトにデータを設定する操作関数を呼び出すことを抑制する。この操作関数は、画面や画面内の入力フィールドに対するデータ入力のための、AndroidOSが提供するネイティブ部品であるとも言える。自動試験APは、OSが提供する操作関数を呼び出す代わりに、ウェブページのDOMツリーにおけるオブジェクトの要素値を直接編集し、オブジェクトへ試験データを直接設定する。言い換えれば、タブレットPC12のメモリに展開された操作対象のオブジェクトのデータに対して、入力文字列や選択項目等の試験データを直接設定する。例えば、このようなDOMツリー操作機能が、図2(c)で示したsetKey関数に実装される。これにより、ソフトウェアキーボードを使用することなく文字入力操作を実現し、またプルダウンリストを展開させることなく項目選択操作を実現し、それらの操作に要する時間を短縮することにより試験効率を向上させる。   Therefore, the automatic test AP is an operation function provided by the OS for the operation target object of the web page, and once the GUI object for data setting is displayed, the operation function for setting data in the operation target object is called. Suppress. It can be said that this operation function is a native component provided by Android OS for data input to a screen or an input field in the screen. Instead of calling an operation function provided by the OS, the automatic test AP directly edits the element value of the object in the DOM tree of the web page and directly sets the test data to the object. In other words, test data such as input character strings and selection items are directly set for the data of the operation target object developed in the memory of the tablet PC 12. For example, such a DOM tree operation function is implemented in the setKey function shown in FIG. This realizes a character input operation without using a software keyboard, realizes an item selection operation without expanding a pull-down list, and improves the test efficiency by shortening the time required for those operations.

(特徴2)試験用ブラウザのウィンドウを、タブレットPCの標準ブラウザのウィンドウと同じ構成になるよう調整する。なおウィンドウは、ウェブブラウザ等のアプリケーションの処理結果をディスプレイに表示させるための画面と言え、アプリケーションの処理結果を描画するためにOSが(アプリケーションに)提供するGUI部品、表示領域であるとも言える。   (Feature 2) The test browser window is adjusted to have the same configuration as the standard browser window of the tablet PC. The window can be said to be a screen for displaying the processing result of an application such as a web browser on the display, and can also be said to be a GUI component or display area provided by the OS (to the application) for rendering the processing result of the application.

タブレットPCを使用するエンドユーザは、タブレットPCにおいて通常使用するブラウザ(いわゆる既定のブラウザ)として設定されたウェブブラウザ(以下、「標準ブラウザ」と呼ぶ。)を使用してウェブページを閲覧することが一般的である。標準ブラウザは、AndroidOSがデフォルトで使用するウェブブラウザとも言える。その一方、Selenium2.0に組み込まれた試験用ブラウザは標準ブラウザと異なる。そのため、標準ブラウザのウィンドウの構成と試験用ブラウザのウィンドウのデフォルトの構成は異なる。ウェブページの自動試験では、エビデンスとしてウェブページの表示画面をキャプチャするが、その画面キャプチャ画像が、エンドユーザが実際にウェブページを閲覧する際の画面と異なっていると試験の品質が低下してしまうことがある。   An end user using a tablet PC can browse a web page using a web browser (hereinafter referred to as a “standard browser”) set as a browser normally used in the tablet PC (a so-called default browser). It is common. It can be said that the standard browser is a web browser used by AndroidOS by default. On the other hand, the test browser incorporated in Selenium 2.0 is different from the standard browser. Therefore, the configuration of the standard browser window and the default configuration of the test browser window are different. In web page automatic testing, the web page display screen is captured as evidence, but if the screen capture image is different from the screen when the end user actually browses the web page, the quality of the test will be degraded. May end up.

そこで自動試験APは、試験用ブラウザのウィンドウを標準ブラウザのウィンドウの構成とあわせるように、試験用ブラウザのウィンドウのレイアウトを調整する。例えば、標準ブラウザのウィンドウに表示される一方、試験用ブラウザのウィンドウには表示されないアドレスバーと同じサイズの付加的なオブジェクト(例えばボタンオブジェクト)を試験用ブラウザのウィンドウに表示させる。これにより、試験用ブラウザのウィンドウを、タブレットPCの標準ブラウザのウィンドウと同じ構成とし、ウェブページの表示態様を同じものにできる。この結果、試験のエビデンスとしての画面キャプチャ画像が、エンドユーザが標準ブラウザを使用してウェブページを閲覧する際のウェブページの見え方を反映したものとなり、試験の品質低下を抑制することができる。   Therefore, the automatic test AP adjusts the layout of the test browser window so that the test browser window matches the configuration of the standard browser window. For example, an additional object (for example, a button object) having the same size as the address bar that is displayed in the standard browser window but not displayed in the test browser window is displayed in the test browser window. Thereby, the window of a test browser can be made into the same structure as the window of the standard browser of tablet PC, and the display mode of a web page can be made the same. As a result, the screen capture image as evidence of the test reflects the appearance of the web page when the end user browses the web page using the standard browser, and the degradation of the test quality can be suppressed. .

また、Android端末の種類が異なると、各端末で標準的に用いられるウェブブラウザの種類も異なることがあり、各端末でウェブブラウザ(のウィンドウ)のレイアウトが異なることもある。さらにまた、ウェブページは複数種類のAndroid端末で表示がサポートされる必要もあり、この場合、複数種類のAndroid端末においてウェブページが試験されることもある。このような背景を踏まえ、本発明者は、複数種類のAndroid端末に亘り、各端末で異なるウェブブラウザ(のウィンドウ)のレイアウトを吸収するための仕組みは重要であると考える。   In addition, when the type of Android terminal is different, the type of web browser used as standard in each terminal may be different, and the layout of the web browser (window) may be different in each terminal. Furthermore, the display of the web page needs to be supported by a plurality of types of Android terminals. In this case, the web page may be tested on a plurality of types of Android terminals. Based on such a background, the present inventor considers that a mechanism for absorbing the layout of different web browsers (windows) at each terminal is important across a plurality of types of Android terminals.

(特徴3)アクションクラスにて操作対象として指定されたオブジェクトが、ウェブページにおいて操作可能な状態か否かを確認し、操作可能な状態である場合に、そのオブジェクトに対する操作を実行する。   (Characteristic 3) It is confirmed whether or not the object specified as the operation target in the action class is in an operable state on the web page. If the object is in an operable state, an operation on the object is executed.

本発明者は、ウェブサーバからのウェブページデータの取得自体は完了しても、そのウェブページに配置されたオブジェクトのロードは未完了なことがあることを知見した。例えば、ウェブサーバからのウェブページデータの取得とは非同期の処理がウェブページでなされる場合に、その非同期処理が完了して初めて操作対象オブジェクトの操作が可能になることがある。本来、試験で確認すべきことはオブジェクトに対する操作後の画面表示の変化(例えば別のウェブページへの遷移)であり、オブジェクトに対する操作の成否そのものではなく、オブジェクトのロード未完了に起因するエラーの発生は望ましくない。また、オブジェクトのロード未完了に起因するエラーが発生した場合、本来の試験目的を達成するために試験のやり直しが必要となり、試験効率の低下を招くことがある。   The present inventor has found that even when the acquisition of the web page data from the web server is completed, the loading of the object arranged on the web page may not be completed. For example, when processing asynchronous with acquisition of web page data from a web server is performed on a web page, an operation of the operation target object may be enabled only after the asynchronous processing is completed. Originally, what should be confirmed in the test is a change in the screen display after the operation on the object (for example, transition to another web page), not the success or failure of the operation on the object itself, but the error due to the incomplete loading of the object. Occurrence is undesirable. Further, when an error due to incomplete loading of an object occurs, it is necessary to re-execute the test in order to achieve the original test purpose, which may cause a decrease in test efficiency.

そこで自動試験APは、操作対象として指定されたオブジェクトが操作可能な状態であるか否かをDOMツリーにアクセスして確認し、操作可能な状態であることを条件として、そのオブジェクトを操作する。これにより、オブジェクトのロード未完了に起因するエラーの発生を抑制して試験効率の低下を抑制する。   Therefore, the automatic test AP accesses the DOM tree to check whether or not the object designated as the operation target is operable, and operates the object on the condition that the object is operable. As a result, the occurrence of an error due to the incomplete loading of the object is suppressed, and the decrease in test efficiency is suppressed.

また、自動試験APが操作対象オブジェクトの状態を自動判定し、適切なタイミングで操作することにより、試験担当者は操作対象オブジェクトに対する厳密な操作タイミングを意識することなくアクションクラスを実装できる。例えば、操作対象オブジェクトが操作可能な状態になるまで待機する等のコードを個々のアクションクラスに実装する必要がなく、また、操作対象オブジェクトのロードタイミングにしたがって個々のアクションクラスのコードに修正が発生することを抑制できる。   In addition, since the automatic test AP automatically determines the state of the operation target object and operates it at an appropriate timing, the person in charge of the test can implement an action class without being aware of the exact operation timing for the operation target object. For example, it is not necessary to implement code such as waiting until the operation target object becomes operable in each action class, and the code of each action class is modified according to the load timing of the operation target object. Can be suppressed.

具体例は後述するが、ウェブページのプログラムにおいて、ウェブサーバからウェブページを取得する処理とは非同期に実行される処理(外部との通信処理や描画処理等)が実装されることがある。例えば、ウェブページのリロードを伴わずにサーバとXML形式のデータのやり取りするAjaxコード等である。このような非同期処理が実行される場合、ウェブページのロード自体は完了しても、操作対象オブジェクトのロードが未完了の可能性がある。特徴3によると、オブジェクト操作時に、そのオブジェクトが操作可能な状態か否かを確認するため、ウェブページで非同期処理が実行される場合にも、オブジェクトのロード未完了に起因するエラーの発生を抑制できる。また上述したように、試験担当者は非同期処理における操作対象オブジェクトの状態を意識することなくアクションクラスを実装でき、非同期処理の影響によりアクションクラスのコードに修正が発生することを抑制できる。   Although a specific example will be described later, in a web page program, a process (such as an external communication process or a drawing process) that is executed asynchronously with a process of acquiring a web page from a web server may be implemented. For example, an Ajax code for exchanging XML format data with a server without reloading a web page. When such asynchronous processing is executed, there is a possibility that loading of the operation target object is not completed even when the loading of the web page itself is completed. According to feature 3, when an object is operated, it is checked whether or not the object can be operated. Even when asynchronous processing is executed on a web page, the occurrence of an error due to incomplete loading of the object is suppressed. it can. Further, as described above, the person in charge of the test can implement the action class without being aware of the state of the operation target object in the asynchronous process, and can suppress the correction of the action class code due to the influence of the asynchronous process.

図3は、実施の形態の試験システムの構成を示す。自動試験システム100は、試験対象となるウェブページを提供するウェブサーバ10と、タブレットPC12で総称されるタブレットPC12a、タブレットPC12b、タブレットPC12cと、管理サーバ14を備える。これらの装置は、LAN・WAN・インターネット等を含む通信網16を介して接続される。   FIG. 3 shows the configuration of the test system of the embodiment. The automatic test system 100 includes a web server 10 that provides a web page to be tested, a tablet PC 12a, a tablet PC 12b, a tablet PC 12c, which are collectively referred to as a tablet PC 12, and a management server 14. These devices are connected via a communication network 16 including a LAN, a WAN, the Internet, and the like.

タブレットPC12は、AndroidOSを搭載した携帯型の情報処理装置である。タブレットPC12はウェブページの試験装置として動作し、シナリオクラスの定義にしたがって試験対象となる1以上のウェブページをウェブサーバ10から取得し、各ウェブページに対する操作を実行する。   The tablet PC 12 is a portable information processing apparatus equipped with Android OS. The tablet PC 12 operates as a web page testing device, acquires one or more web pages to be tested from the web server 10 according to the definition of the scenario class, and executes an operation on each web page.

管理サーバ14は、タブレットPC12におけるウェブページ試験を管理する情報処理装置であり、タブレットPC12a〜タブレットPC12cのそれぞれで記録されたウェブページのキャプチャ画像を一括して保持する。また、試験用ブラウザの表示態様を標準ブラウザの表示態様に対応させるためのプログラムであり、タブレットPC12a〜タブレットPC12cそれぞれの標準ブラウザに応じて個々にカスタマイズしたプログラムを各タブレットPC12へ提供する。   The management server 14 is an information processing apparatus that manages a web page test in the tablet PC 12, and collectively holds captured images of web pages recorded in each of the tablet PC 12a to the tablet PC 12c. Moreover, it is a program for making the display mode of the test browser correspond to the display mode of the standard browser, and a program individually customized according to the standard browser of each of the tablet PC 12a to the tablet PC 12c is provided to each tablet PC 12.

図4は、図3のタブレットPC12の機能構成を示すブロック図である。タブレットPC12は、入力装置20と、ディスプレイ21と、OS部22と、アプリケーション部24を備える。   FIG. 4 is a block diagram showing a functional configuration of the tablet PC 12 of FIG. The tablet PC 12 includes an input device 20, a display 21, an OS unit 22, and an application unit 24.

本明細書のブロック図において示される各ブロックは、ハードウェア的には、コンピュータのCPUをはじめとする素子や機械装置で実現でき、ソフトウェア的にはコンピュータプログラム等によって実現されるが、ここでは、それらの連携によって実現される機能ブロックを描いている。したがって、これらの機能ブロックはハードウェア、ソフトウェアの組合せによっていろいろなかたちで実現できることは、当業者には理解されるところである。例えばアプリケーション部24の各機能ブロックは、プログラムモジュールと記録媒体に格納され、タブレットPC12のストレージへインストールされ、タブレットPC12のメインメモリに読み込まれてもよい。そしてCPUにより実行されることで、各機能ブロックの機能が発揮されてもよい。他のブロック図についても同様である。   Each block shown in the block diagram of the present specification can be realized in terms of hardware by an element such as a CPU of a computer or a mechanical device, and in terms of software, it can be realized by a computer program or the like. The functional block realized by those cooperation is drawn. Therefore, those skilled in the art will understand that these functional blocks can be realized in various forms by a combination of hardware and software. For example, each functional block of the application unit 24 may be stored in a program module and a recording medium, installed in the storage of the tablet PC 12, and read into the main memory of the tablet PC 12. And the function of each functional block may be exhibited by being executed by the CPU. The same applies to other block diagrams.

入力装置20は例えばタッチパネルであり、ディスプレイ21は例えば液晶ディスプレイや有機ELディスプレイである。OS部22はAndroidOSの機能を提供し、例えばタブレットPC12の動作を統括的に制御する。またOS部22は、入力装置20やディスプレイ21等のハードウェアとアプリケーション部24との仲介機能も提供する。   The input device 20 is a touch panel, for example, and the display 21 is a liquid crystal display or an organic EL display, for example. The OS unit 22 provides the function of Android OS and controls, for example, the operation of the tablet PC 12 in an integrated manner. The OS unit 22 also provides an intermediary function between hardware such as the input device 20 and the display 21 and the application unit 24.

アプリケーション部24は、タブレットPC12にインストールされたアプリケーションプログラムの機能を提供する。アプリケーション部24は、標準ブラウザ26と自動試験部28を含む。   The application unit 24 provides a function of an application program installed on the tablet PC 12. The application unit 24 includes a standard browser 26 and an automatic test unit 28.

標準ブラウザ26は、タブレットPC12において既定のウェブブラウザとして設定されたウェブブラウザである。例えば、タブレットPC12に当初からインストールされたウェブブラウザ(Webkit系ブラウザ等)であってもよい。また、タブレットPC12のユーザが既定のウェブブラウザとして指定した任意のウェブブラウザであってもよい。標準ブラウザ26は、標準ブラウザのウィンドウをディスプレイ21に表示させる標準ブラウザ表示部としても機能する。   The standard browser 26 is a web browser set as a default web browser in the tablet PC 12. For example, a web browser (Webkit browser or the like) installed from the beginning in the tablet PC 12 may be used. Further, any web browser designated by the user of the tablet PC 12 as the default web browser may be used. The standard browser 26 also functions as a standard browser display unit that displays a standard browser window on the display 21.

図5は、標準ブラウザ26のウィンドウを示す。同図は、標準ブラウザ26のウィンドウをタブレットPC12のディスプレイ21に表示させた状態であり、また検索サイトのURLを指定して、検索サイトのウェブページを表示させた状態を示している。標準ブラウザ26のウィンドウは、ウェブページのタイトルを表示するタイトルバー160と、ウェブページのURLや操作用の各種アイコンを表示するアドレスバー162と、コンテンツ領域164を含む。コンテンツ領域164は、ウェブページのHTMLコードやJAVAスクリプトコード等にもとづくテキストやフォーム等の表示領域である(「JAVAスクリプト」は登録商標)。   FIG. 5 shows a window of the standard browser 26. This figure shows a state in which the window of the standard browser 26 is displayed on the display 21 of the tablet PC 12, and the search site URL is specified and the web page of the search site is displayed. The window of the standard browser 26 includes a title bar 160 for displaying the title of the web page, an address bar 162 for displaying the URL of the web page and various icons for operation, and a content area 164. The content area 164 is a display area for text, forms, etc. based on the HTML code or JAVA script code of the web page (“JAVA script” is a registered trademark).

図5(a)は、初期の表示状態を示している。図5(b)は、図5(a)のウィンドウに対する下スクロール操作が受け付けられたとき、言い換えれば、図5(a)のウェブページを下スクロールさせたときの表示状態を示している。図5(b)で示すように、標準ブラウザ26のウィンドウでは、下スクロール操作に伴って、初期はフルサイズで表示したアドレスバー162を徐々に非表示状態に移行させる。   FIG. 5A shows an initial display state. FIG. 5B shows a display state when a downward scroll operation for the window of FIG. 5A is accepted, in other words, when the web page of FIG. 5A is scrolled down. As shown in FIG. 5B, in the window of the standard browser 26, the address bar 162 initially displayed in the full size is gradually shifted to the non-display state in accordance with the downward scroll operation.

図4に戻り、自動試験部28は上述の自動試験APに対応する。自動試験部28は、標準ブラウザ情報通知部30と、試験用ブラウザ更新部32と、試験支援部34と、試験データ保持部42と、操作実行部44と、キャプチャ画像保持部50と、画面キャプチャ部52と、キャプチャ画像提供部54を含む。試験支援部34はSelenium2.0に対応する機能ブロックである。試験支援部34は、試験用ブラウザ36と、ブラウザ表示部37と、ページ管理部38と、ページ操作仲介部40を含む。   Returning to FIG. 4, the automatic test unit 28 corresponds to the automatic test AP described above. The automatic test unit 28 includes a standard browser information notification unit 30, a test browser update unit 32, a test support unit 34, a test data holding unit 42, an operation execution unit 44, a capture image holding unit 50, and a screen capture. A section 52 and a captured image providing section 54 are included. The test support unit 34 is a functional block corresponding to Selenium 2.0. The test support unit 34 includes a test browser 36, a browser display unit 37, a page management unit 38, and a page operation mediation unit 40.

試験用ブラウザ36は、Selenium2.0がウェブページの試験に使用するために内包するウェブブラウザ(典型的にはWebView)である。試験用ブラウザ36は、アクションクラスで指定された試験対象のウェブページのデータ(HTMLプログラムやJAVAスクリプトプログラム、CSS、画像等)をウェブサーバ10から取得する。ブラウザ表示部37は、試験用ブラウザ36のウィンドウの構成(タイトルバーのレイアウト等)を定めたプログラムにしたがって、試験用ブラウザ36のウィンドウをディスプレイ21に表示させる。試験用ブラウザ36は、そのウィンドウのコンテンツ領域にウェブページを描画する。   The test browser 36 is a web browser (typically WebView) included for use by Selenium 2.0 for testing web pages. The test browser 36 acquires data (HTML program, JAVA script program, CSS, image, etc.) of the test target web page specified by the action class from the web server 10. The browser display unit 37 displays the window of the test browser 36 on the display 21 in accordance with a program that defines the configuration of the window of the test browser 36 (title bar layout, etc.). The test browser 36 draws a web page in the content area of the window.

図6は、デフォルトの試験用ブラウザ36のウィンドウを示す。同図は、デフォルトの試験用ブラウザ36のウィンドウをタブレットPC12のディスプレイ21に表示させた状態であり、また図5と同様に検索サイトのURLを指定して、検索サイトのウェブページを表示させた状態を示している。デフォルトの試験用ブラウザ36のウィンドウは、タイトルバー170とコンテンツ領域172を含むがアドレスバーを含まない。またタイトルバー170の縦サイズは、標準ブラウザのタイトルバー160よりも小さい。   FIG. 6 shows the default test browser 36 window. The figure shows a state in which the window of the default test browser 36 is displayed on the display 21 of the tablet PC 12, and the URL of the search site is specified in the same manner as in FIG. 5 to display the web page of the search site. Indicates the state. The window of the default test browser 36 includes a title bar 170 and a content area 172, but does not include an address bar. The vertical size of the title bar 170 is smaller than the title bar 160 of the standard browser.

図6(a)は初期の表示状態を示している。図6(b)は、図6(a)のウィンドウに対する下スクロール操作が受け付けられたとき、言い換えれば、図6(a)のウェブページを下スクロールさせたときの表示状態を示している。上述したように試験用ブラウザ36のウィンドウにはアドレスバーが表示されないため、図5のコンテンツ領域164と図6のコンテンツ領域172のサイズが異なり、その結果、画面表示されるウェブページの範囲(サイズ)も異なるものとなる。   FIG. 6A shows an initial display state. FIG. 6B shows a display state when a downward scroll operation for the window of FIG. 6A is accepted, in other words, when the web page of FIG. 6A is scrolled down. Since the address bar is not displayed in the window of the test browser 36 as described above, the size of the content area 164 in FIG. 5 and the content area 172 in FIG. 6 are different, and as a result, the range (size) of the web page displayed on the screen. ) Is also different.

図4に戻り、ページ管理部38は、タブレットPC12のメインメモリに展開されたウェブページのデータを、木構造形式で表現したデータ(具体的にはDOMツリー)を保持する。このDOMツリーは、ウェブページに配置されたボタンやテキストフィールド等のオブジェクトを要素として保持し、テキストフィールドやプルダウンリストに対する設定データ(入力文字列や選択項目等)を各要素の値(要素値)として保持する。   Returning to FIG. 4, the page management unit 38 holds data (specifically, a DOM tree) in which the data of the web page expanded in the main memory of the tablet PC 12 is expressed in a tree structure format. This DOM tree holds buttons, text fields, and other objects placed on a web page as elements, and setting data (input character strings, selection items, etc.) for the text field and pull-down list is the value of each element (element value). Hold as.

ページ操作仲介部40は、試験用ブラウザ36を操作するための関数としてSelenium2.0が外部に公開する関数が呼び出された場合、その関数に対応する試験用ブラウザ36のAPIを呼び出すことにより、試験用ブラウザ36を操作する。ページ操作仲介部40は、例えばSelenium2.0が内包するSeleniumWebDriverである。   When a function that is released to the outside by Selenium 2.0 is called as a function for operating the test browser 36, the page operation mediation unit 40 calls the API of the test browser 36 corresponding to the function to perform the test. The browser 36 is operated. The page operation mediation unit 40 is, for example, a Selenium WebDriver included in Selenium 2.0.

標準ブラウザ情報通知部30は、試験用ブラウザ36の起動時に、所定の記憶領域に格納された試験用ブラウザ更新フラグを確認する。そのフラグが試験用ブラウザ36の「未更新」(すなわちデフォルト状態)を示す場合、標準ブラウザ情報通知部30は、標準ブラウザ26のウィンドウの構成を示す情報を標準ブラウザ26から取得する。この情報は、タイトルバー160の縦サイズとアドレスバー162の縦サイズの情報を含む。例えば、標準ブラウザ情報通知部30は、標準ブラウザ26のソースコードの記載内容にしたがって、上記サイズを特定してもよい。標準ブラウザ情報通知部30は、標準ブラウザ26のウィンドウの構成を示す情報を管理サーバ14へ送信する。   The standard browser information notification unit 30 confirms the test browser update flag stored in a predetermined storage area when the test browser 36 is activated. When the flag indicates “not updated” (that is, the default state) of the test browser 36, the standard browser information notification unit 30 acquires information indicating the window configuration of the standard browser 26 from the standard browser 26. This information includes information on the vertical size of the title bar 160 and the vertical size of the address bar 162. For example, the standard browser information notification unit 30 may specify the size according to the description content of the source code of the standard browser 26. The standard browser information notification unit 30 transmits information indicating the window configuration of the standard browser 26 to the management server 14.

後述するように管理サーバ14は、標準ブラウザ26のウィンドウの構成にしたがって試験用ブラウザ用の改変プログラムを生成する。試験用ブラウザ更新部32は、管理サーバ14から試験用ブラウザ用の改変プログラムを取得し、後述の試験用ブラウザ36およびブラウザ表示部37のオリジナルプログラムを改変プログラムにより上書き更新する(置き換える)。そして試験用ブラウザ更新フラグを「更新済」へ変更する。なお、タブレットPC12において標準ブラウザ(すなわち既定のウェブブラウザ)が変更された場合、試験用ブラウザ更新フラグは再度「未更新」へ戻される。   As will be described later, the management server 14 generates a test browser modification program in accordance with the window configuration of the standard browser 26. The test browser update unit 32 acquires a test browser modification program from the management server 14 and overwrites (replaces) the original program of the test browser 36 and the browser display unit 37 described later with the modification program. Then, the test browser update flag is changed to “updated”. When the standard browser (that is, the default web browser) is changed in the tablet PC 12, the test browser update flag is returned to “not updated” again.

図7は、試験用ブラウザ用の改変プログラムを示す。図7(a)は試験用ブラウザ36のオリジナルコードを修正した、試験用ブラウザ36を更新するための改変プログラム180を示している。図7(a)のタイトルバー設定コード182は、試験用ブラウザ36のウィンドウにおけるタイトルバー170の縦サイズを、標準ブラウザ26のウィンドウにおけるタイトルバー160の縦サイズと同じにするよう改変したものである。   FIG. 7 shows a modification program for the test browser. FIG. 7A shows a modification program 180 for updating the test browser 36 in which the original code of the test browser 36 is modified. The title bar setting code 182 in FIG. 7A is modified so that the vertical size of the title bar 170 in the window of the test browser 36 is the same as the vertical size of the title bar 160 in the window of the standard browser 26. .

図7(b)はブラウザ表示部37(具体的にはSelenium2.0におけるブラウザウィンドウのレイアウト定義プログラム)のオリジナルコードを修正した、ブラウザ表示部37を更新するための改変プログラム184を示している。実施の形態の改変プログラム184は、試験用ブラウザ36のウィンドウに、アドレスバーの代替としてボタンオブジェクトを配置するよう改変したものである。このボタンオブジェクトを以下、「擬似アドレスバー」とも呼ぶ。擬似アドレスバー設定コード186では、擬似アドレスバーのサイズを、標準ブラウザ26のウィンドウにおけるアドレスバー162のサイズと同じにするよう設定している。   FIG. 7B shows a modification program 184 for updating the browser display unit 37 in which the original code of the browser display unit 37 (specifically, the browser window layout definition program in Selenium 2.0) is modified. The modification program 184 of the embodiment is modified such that a button object is arranged in the window of the test browser 36 as an alternative to the address bar. Hereinafter, this button object is also referred to as a “pseudo address bar”. In the pseudo address bar setting code 186, the size of the pseudo address bar is set to be the same as the size of the address bar 162 in the window of the standard browser 26.

図8は、改変プログラム適用後の試験用ブラウザ36のウィンドウを示す。同図は、図7の改変プログラム適用後の試験用ブラウザ36およびブラウザ表示部37により表示される試験用ブラウザ36のウィンドウの構成を示している。図8(a)は初期の表示状態を示している。図8(b)は、図8(a)のウィンドウに対する下スクロール操作が受け付けられたとき、言い換えれば、図8(a)のウェブページを下スクロールさせたときの表示状態を示している。   FIG. 8 shows a window of the test browser 36 after the modification program is applied. This figure shows the configuration of the window of the test browser 36 displayed by the test browser 36 and the browser display unit 37 after applying the modification program of FIG. FIG. 8A shows an initial display state. FIG. 8B shows a display state when the downward scroll operation for the window of FIG. 8A is accepted, in other words, when the web page of FIG. 8A is scrolled down.

図5、図6、図8を比較すると、改変プログラム適用後の試験用ブラウザ36のウィンドウでは、タイトルバーのサイズがデフォルト時よりも拡大されて標準ブラウザと同じサイズに調整されている(調整タイトルバー174)。また、標準ブラウザのウィンドウにおけるアドレスバー162と同じサイズの擬似アドレスバー176(ボタンオブジェクト)が付加されている。これにより、試験用ブラウザ36使用時に一時に画面表示されるウェブページの範囲(サイズ)は、標準ブラウザ26使用時と同じになる。   5, 6, and 8, in the window of the test browser 36 after application of the modification program, the title bar is enlarged from the default size and adjusted to the same size as the standard browser (adjusted title) Bar 174). A pseudo address bar 176 (button object) having the same size as the address bar 162 in the standard browser window is added. As a result, the range (size) of the web page displayed at a time when the test browser 36 is used is the same as when the standard browser 26 is used.

図4に戻り、試験データ保持部42は、ウェブページに対する試験内容を定めた試験データ(図1のシナリオクラス314)を保持する。すなわち、ウェブページ単位(画面単位)に作成されたアクションクラス310と、試験パターン単位に作成されたデータクラス312を保持する。   Returning to FIG. 4, the test data holding unit 42 holds test data (scenario class 314 in FIG. 1) that defines the test content for the web page. That is, it holds an action class 310 created in web page units (screen units) and a data class 312 created in test pattern units.

操作実行部44は、自動試験APの試験実行エンジンとしての機能を提供し、また図1の画面操作共通部品308および汎用部品306の機能も提供する。基本的に操作実行部44は、画面操作共通部品308および汎用部品306として提供する関数、すなわちウェブページ(に配置された各種オブジェクト)に対する操作関数がアクションクラスにおいて呼び出されると、その操作関数に対応したページ操作仲介部40(Selenium2.0)が提供する関数を呼び出す。ページ操作仲介部40は、呼び出された関数に応じて試験用ブラウザ36を操作し、またOS部22が提供する関数を適宜呼び出すことにより、ウェブページ(に配置された各種オブジェクト)を操作する。   The operation execution unit 44 provides a function as a test execution engine of the automatic test AP, and also provides functions of the screen operation common part 308 and the general-purpose part 306 in FIG. Basically, when an operation function for a function provided as a screen operation common component 308 and a general-purpose component 306, that is, an operation function for a web page (various objects arranged in it) is called in an action class, the operation execution unit 44 corresponds to the operation function. The function provided by the page operation mediating unit 40 (Selenium 2.0) is called. The page operation mediating unit 40 operates the web page (various objects arranged in the web page) by operating the test browser 36 according to the called function and by appropriately calling the function provided by the OS unit 22.

ここで操作実行部44の特徴的な構成を説明する。図9は、操作実行部44の処理を説明するための概念図である。図9(a)は試験対象のウェブページを示しており、このウェブページはキーワードを入力すべきテキストフィールド190と、キーワード入力後に押下されるべきボタン192を含む。このウェブページの試験内容を規定するアクションクラスでは、(1)テキストフィールド190へのキーワード入力、(2)ボタン192のクリック、(3)画面キャプチャ、が規定されている。この試験の目的は、上記の(1)(2)による画面表示内容の変化が正しいかを確認するものである。   Here, a characteristic configuration of the operation execution unit 44 will be described. FIG. 9 is a conceptual diagram for explaining the processing of the operation execution unit 44. FIG. 9A shows a web page to be tested. This web page includes a text field 190 in which a keyword is to be input and a button 192 to be pressed after the keyword is input. In the action class that defines the test contents of this web page, (1) keyword input into the text field 190, (2) click of the button 192, and (3) screen capture are defined. The purpose of this test is to confirm whether the changes in the screen display contents according to the above (1) and (2) are correct.

ところでSelenium2.0が提供する文字入力関数を利用する場合、Selenium2.0の文字入力関数はOS部22が提供する文字入力関数を呼び出す。OS部22が提供する文字入力関数は、ソフトウェアキーボード194を一旦表示させ、ソフトウェアキーボード194を介してテキストフィールド190へ文字列を入力する。したがって、試験での本来の確認目的でない、ウェブページのオブジェクトへの文字入力が完了するまでに時間を要してしまう。   Incidentally, when the character input function provided by Selenium 2.0 is used, the character input function of Selenium 2.0 calls the character input function provided by the OS unit 22. The character input function provided by the OS unit 22 temporarily displays the software keyboard 194 and inputs a character string to the text field 190 via the software keyboard 194. Therefore, it takes time to complete the character input to the object of the web page, which is not the purpose of the original confirmation in the test.

そこで操作実行部44は、テキストフィールド190への文字列入力関数が呼び出されると、Selenium2.0の文字入力関数(さらにOSの文字列入力関数)を呼び出すことに代えて、ページ管理部38が保持するウェブページのDOMツリーへアクセスする。そして、文字列入力対象のオブジェクトの要素値として入力文字列を直接設定する。図9(b)は、図9(a)のHTMLコードを示している。コード196で示すように、テキストフィールド190の要素「value」の値として、試験で入力すべき文字列を直接設定する。setAttributeメソッドを使用してvalue属性の値を設定してもよい。   Therefore, when the character string input function to the text field 190 is called, the operation execution unit 44 holds the page management unit 38 instead of calling the character input function of Selenium 2.0 (and the character string input function of the OS). Access the DOM tree of the web page Then, the input character string is directly set as the element value of the character string input target object. FIG. 9 (b) shows the HTML code of FIG. 9 (a). As indicated by the code 196, the character string to be input in the test is directly set as the value of the element “value” of the text field 190. The value attribute value may be set using the setAttribute method.

図10も、操作実行部44の処理を説明するための概念図である。図10(a)は試験対象のウェブページを示しており、このウェブページはユーザがプランを選択するべきプルダウンリスト200と、プラン選択後に押下されるべきボタン202を含む。なお、プルダウンリスト200は、プルダウンメニューやドロップダウンリスト、セレクトボックスとも呼ばれる。このウェブページの試験内容を規定するアクションクラスでは、(1)プルダウンリスト200での項目選択、(2)ボタン202のクリック、(3)画面キャプチャ、が規定されている。この試験の目的も、上記の(1)(2)による画面表示内容の変化が正しいかを確認するものである。   FIG. 10 is also a conceptual diagram for explaining the processing of the operation execution unit 44. FIG. 10A shows a web page to be tested, and this web page includes a pull-down list 200 from which the user should select a plan and a button 202 to be pressed after selecting the plan. The pull-down list 200 is also called a pull-down menu, drop-down list, or select box. In the action class that defines the test content of this web page, (1) item selection in the pull-down list 200, (2) click of the button 202, and (3) screen capture are defined. The purpose of this test is also to confirm whether the changes in the screen display contents according to the above (1) and (2) are correct.

ところでSelenium2.0が提供する項目選択関数を利用する場合、Selenium2.0の項目選択関数はOS部22が提供する項目選択関数を呼び出す。OS部22が提供する項目選択関数は、プルダウンリスト200を展開させ、複数の選択候補の中から特定の項目をユーザに選択させるためのリストを表示させる。したがって、試験での本来の確認目的でない、プルダウンリスト200での項目選択が完了するまでに時間を要してしまっていた。また、プルダウンリスト200が展開された際に、以降の操作が停止してしまうこともあった。   By the way, when the item selection function provided by Selenium 2.0 is used, the item selection function of Selenium 2.0 calls the item selection function provided by the OS unit 22. The item selection function provided by the OS unit 22 expands the pull-down list 200 and displays a list for allowing the user to select a specific item from a plurality of selection candidates. Therefore, it takes time to complete the item selection in the pull-down list 200, which is not the original confirmation purpose in the test. Further, when the pull-down list 200 is expanded, the subsequent operation may be stopped.

そこで操作実行部44は、プルダウンリスト200への項目選択関数が呼び出されると、Selenium2.0の項目選択関数(さらにOSの項目選択関数)を呼び出すことに代えて、ページ管理部38が保持するウェブページのDOMツリーへアクセスする。そして、項目選択入力対象のオブジェクトの要素値として選択項目を直接設定する。図10(b)は、図10(a)のHTMLコードを示している。例えば、コード204で示すように、プルダウンリスト200の選択項目「プランB」の属性値として「Selected」を直接設定する。setAttributeメソッドを使用してoptionの属性値を設定してもよい。   Therefore, when the item selection function for the pull-down list 200 is called, the operation execution unit 44 replaces the call of the Selenium 2.0 item selection function (and the OS item selection function) with the web held by the page management unit 38. Access the DOM tree of the page. Then, the selection item is directly set as the element value of the object of the item selection input target. FIG. 10B shows the HTML code of FIG. For example, as indicated by a code 204, “Selected” is directly set as the attribute value of the selection item “plan B” in the pull-down list 200. The attribute value of option may be set using setAttribute method.

例えば、図1の画面操作共通部品308が提供するプルダウンリスト操作関数は、引数1としてプルダウンリストのHTML文書内でのIDを指定し、引数2として選択すべき項目値を指定するものであってよい。このとき、操作実行部44は、ページ管理部38が保持するDOMツリーから、引数1のIDをキーとして要素オブジェクトを取得する。そして、その要素オブジェクトからプルダウンリスト内の選択可能項目を取得して引数2の項目値と比較する。引数2の項目値と一致する選択可能項目が検出された場合、DOMツリーを操作して、その選択可能項目のステータスを選択状態(Selected)に書き換え、プルダウンリストの表示項目をその選択可能項目に書き換える。   For example, the pull-down list operation function provided by the screen operation common component 308 in FIG. 1 specifies an ID in the HTML document of the pull-down list as an argument 1 and specifies an item value to be selected as an argument 2. Good. At this time, the operation execution unit 44 acquires an element object from the DOM tree held by the page management unit 38 using the ID of the argument 1 as a key. Then, a selectable item in the pull-down list is acquired from the element object and compared with the item value of argument 2. When a selectable item that matches the item value of argument 2 is detected, the DOM tree is manipulated, the status of the selectable item is rewritten to the selected state (Selected), and the display item in the pull-down list is changed to the selectable item. rewrite.

また操作実行部44は、ページ取得部46と操作可否判定部48を含む。ページ取得部46は、ページ操作仲介部40を介して、試験用ブラウザ36に試験対象ウェブページをウェブサーバ10から取得して表示させる。ページ取得部46は、ページ管理部38が保持するDOMツリーにアクセスし、取得対象のウェブページ(HTML)の「ReadyState」属性を1回以上取得する。そして、その属性値が完了(Status:complete)を示す場合に、ウェブページの取得(メモリへのロード)処理が完了したと判定する。   The operation execution unit 44 includes a page acquisition unit 46 and an operation availability determination unit 48. The page acquisition unit 46 acquires and displays the test target web page from the web server 10 in the test browser 36 via the page operation mediation unit 40. The page acquisition unit 46 accesses the DOM tree held by the page management unit 38 and acquires the “ReadyState” attribute of the Web page (HTML) to be acquired one or more times. Then, when the attribute value indicates completion (Status: complete), it is determined that the web page acquisition (load to memory) process has been completed.

操作可否判定部48は、アクションクラスにおいて操作対象として指定されたオブジェクトが、操作可能な状態であるか否かを判定する。具体的には、操作可否判定部48は、ページ管理部38が保持するDOMツリーにアクセスし、操作対象オブジェクトに対応する要素がDOMツリーに存在するか否かを判定する。そして当該要素が存在する場合に、オブジェクトが操作可能な状態であると判定する。操作実行部44は、ページ取得部46が、ウェブページの取得処理が完了したと判定し、かつ、操作可否判定部48が、操作対象オブジェクトが操作可能な状態であると判定した場合に、ウェブページに配置された各種オブジェクトへの操作を実行する。   The operation availability determination unit 48 determines whether or not the object specified as the operation target in the action class is in an operable state. Specifically, the operation availability determination unit 48 accesses the DOM tree held by the page management unit 38 and determines whether an element corresponding to the operation target object exists in the DOM tree. When the element exists, it is determined that the object is in an operable state. The operation execution unit 44 determines that the web page acquisition process has been completed and the operation availability determination unit 48 determines that the operation target object is in an operable state. Perform operations on various objects placed on the page.

キャプチャ画像保持部50は、画面キャプチャ部52により取得された画面キャプチャ画像、すなわち、試験用ブラウザ36のウィンドウに表示されたウェブページの画像のデータを保持する記憶領域である。   The capture image holding unit 50 is a storage area that holds the screen capture image acquired by the screen capture unit 52, that is, the image data of the web page displayed in the window of the test browser 36.

画面キャプチャ部52は、試験用ブラウザ36のウィンドウに表示されたウェブページの画像データを取得し、取得した画像データをキャプチャ画像保持部50へ格納する。ここでウェブページが縦スクロールもしくは横スクロール可能な場合、言い換えれば、試験対象のウェブページにおいて画面に非表示の領域が存在する場合、画面キャプチャ部52は、画面キャプチャと画面スクロールを繰り返し、当初非表示となった領域を含むウェブページの全体の画像を取得する。すなわち、1画面に収まりきらないウェブページについては複数枚のキャプチャ画像に分割して、ウェブページの全領域の画像を取得する。この態様によると、1画面に収まりきらないサイズのウェブページであっても、その全領域のキャプチャ画像を記録でき、試験の品質を向上させることができる。   The screen capture unit 52 acquires the image data of the web page displayed in the window of the test browser 36 and stores the acquired image data in the captured image holding unit 50. If the web page can be scrolled vertically or horizontally, in other words, if there is a non-display area on the screen in the web page to be tested, the screen capture unit 52 repeats screen capture and screen scroll, The entire image of the web page including the displayed area is acquired. That is, a web page that does not fit on one screen is divided into a plurality of captured images, and an image of the entire area of the web page is acquired. According to this aspect, even if the web page has a size that does not fit on one screen, the captured image of the entire area can be recorded, and the quality of the test can be improved.

また画面キャプチャ部52は、試験対象のウェブページが、縦もしくは横スクロール可能なエレメントを含む場合、言い換えれば、ウェブページに配置されたエレメントにおいて画面に非表示の領域が存在する場合、そのエレメントを含む画面のキャプチャと、エレメントのスクロールを繰り返し、当初非表示となった領域を含むエレメント全体の画像を取得する。すなわち、1画面に収まりきらないエレメントについては複数枚のキャプチャ画像に分割して、エレメントの全領域の画像を取得する。この態様によると、1画面に収まりきらないサイズのエレメントであっても、その全領域のキャプチャ画像を記録でき、試験の品質を向上させることができる。   In addition, when the web page to be tested includes an element that can be scrolled vertically or horizontally, in other words, when there is a non-display area on the screen in the element arranged on the web page, the screen capture unit 52 selects the element. Capture the screen including the element and scroll the element repeatedly to obtain an image of the entire element including the area that was initially hidden. That is, an element that does not fit on one screen is divided into a plurality of captured images, and an image of the entire area of the element is acquired. According to this aspect, even if the element has a size that does not fit on one screen, the captured image of the entire area can be recorded, and the quality of the test can be improved.

キャプチャ画像提供部54は、ADB(Android Debug Bridge)コマンドを使用して、キャプチャ画像保持部50に格納された1以上の画像データ(すなわちウェブページのキャプチャ画像およびエレメントのキャプチャ画像)を管理サーバ14へ送信する。   The captured image providing unit 54 uses the ADB (Android Debug Bridge) command to manage one or more pieces of image data (that is, a captured image of a web page and a captured image of an element) stored in the captured image holding unit 50. Send to.

図11は、図3の管理サーバ14の機能構成を示すブロック図である。管理サーバ14は、原本プログラム保持部60と、標準ブラウザ情報取得部62と、プログラム改変部64と、改変プログラム提供部66と、キャプチャ画像保持部68と、キャプチャ画像取得部70を含む。   FIG. 11 is a block diagram showing a functional configuration of the management server 14 of FIG. The management server 14 includes an original program storage unit 60, a standard browser information acquisition unit 62, a program modification unit 64, a modification program provision unit 66, a capture image storage unit 68, and a capture image acquisition unit 70.

原本プログラム保持部60は、タブレットPC12(タブレットPC12a〜タブレットPC12c)の試験用ブラウザ36およびブラウザ表示部37のオリジナルのプログラムコードを保持する。これらのプログラムは、タブレットPC12における試験用ブラウザ36のウィンドウの構成を、標準ブラウザ26のウィンドウの構成と同じにするために改変が必要となるプログラムと言える。標準ブラウザ情報取得部62は、タブレットPC12a〜タブレットPC12cそれぞれの標準ブラウザ情報通知部30により通知された標準ブラウザ26のウィンドウの構成を示す情報を取得する。   The original program holding unit 60 holds the original program code of the test browser 36 and the browser display unit 37 of the tablet PC 12 (tablet PC 12a to tablet PC 12c). These programs can be said to be programs that need to be modified in order to make the configuration of the window of the test browser 36 in the tablet PC 12 the same as the configuration of the window of the standard browser 26. The standard browser information acquisition unit 62 acquires information indicating the window configuration of the standard browser 26 notified by the standard browser information notification unit 30 of each of the tablet PC 12a to the tablet PC 12c.

プログラム改変部64は、標準ブラウザ26のウィンドウの構成にしたがって、原本プログラム保持部60が保持するオリジナルプログラムを改変する。具体的には、試験用ブラウザ36のウィンドウにおけるタイトルバーの縦サイズを、標準ブラウザ26のウィンドウにおけるタイトルバーの縦サイズと同じにするよう改変した試験用ブラウザ36のプログラムコード(例えば図7(a))を生成する。またプログラム改変部64は、試験用ブラウザ36のウィンドウに、アドレスバーの代替としてボタンオブジェクトを配置するよう改変したブラウザ表示部37のプログラムコード(例えば図7(b))を生成する。タブレットPC12a〜タブレットPC12cのそれぞれから取得された標準ブラウザの構成が異なる場合、プログラム改変部64はタブレットPC12a〜タブレットPC12cのそれぞれに対して異なる改変プログラムを生成する。   The program modifying unit 64 modifies the original program held by the original program holding unit 60 according to the window configuration of the standard browser 26. Specifically, the program code of the test browser 36 (for example, FIG. 7 (a) modified so that the vertical size of the title bar in the window of the test browser 36 is the same as the vertical size of the title bar in the window of the standard browser 26). )). Further, the program modification unit 64 generates program code (for example, FIG. 7B) of the browser display unit 37 modified to arrange a button object as an alternative to the address bar in the window of the test browser 36. When the configuration of the standard browser acquired from each of the tablet PC 12a to the tablet PC 12c is different, the program modification unit 64 generates a different modification program for each of the tablet PC 12a to the tablet PC 12c.

改変プログラム提供部66は、プログラム改変部64により生成された試験用ブラウザのための改変プログラムをタブレットPC12a〜タブレットPC12cのそれぞれへ送信する。そして、各タブレットPC12が保持する試験用ブラウザ36およびブラウザ表示部37のオリジナルのプログラムを改変プログラムで置き換えさせる。この態様によると、タブレットPC12a〜タブレットPC12cのそれぞれで設定された標準ブラウザの種類に応じた試験用ブラウザの改変プログラムを各タブレットPC12へ提供できる。そして、各タブレットPC12において試験用ブラウザのウィンドウの表示態様が、各タブレットPC12の標準ブラウザのウィンドウと同じになるよう自動設定できる。   The modified program providing unit 66 transmits the modified program for the test browser generated by the program modifying unit 64 to each of the tablet PC 12a to the tablet PC 12c. Then, the original program of the test browser 36 and the browser display unit 37 held by each tablet PC 12 is replaced with a modification program. According to this aspect, it is possible to provide each tablet PC 12 with a test browser modification program corresponding to the type of standard browser set in each of the tablet PC 12a to tablet PC 12c. The display mode of the test browser window in each tablet PC 12 can be automatically set to be the same as the standard browser window of each tablet PC 12.

キャプチャ画像保持部68は、タブレットPC12a〜タブレットPC12cのそれぞれにおけるウェブページの試験で記録された画面キャプチャ画像を一括して保持する記憶領域である。キャプチャ画像保持部68に保持された画面キャプチャ画像は、ウェブページの試験担当者や管理者により適宜参照されてよい。例えば管理サーバ14は、タブレットPC12a〜タブレットPC12cのそれぞれで記録された画面キャプチャ画像を比較可能に表示させるキャプチャ画像表示部をさらに備えてもよい。キャプチャ画像表示部は、同一のテストケースについて各タブレットPC12で記録された画像を並べてディスプレイに表示させてもよい。   The captured image holding unit 68 is a storage area that collectively holds the screen captured images recorded in the web page test in each of the tablet PC 12a to the tablet PC 12c. The screen capture image held in the capture image holding unit 68 may be appropriately referred to by a web page tester or administrator. For example, the management server 14 may further include a captured image display unit that displays a screen capture image recorded on each of the tablet PC 12a to the tablet PC 12c in a comparable manner. The captured image display unit may display the images recorded by the tablet PCs 12 for the same test case side by side on the display.

キャプチャ画像取得部70は、ADBコマンドを使用して、タブレットPC12a〜タブレットPC12cのそれぞれで記録されたウェブページの画面キャプチャ画像を各タブレットPC12から取得し、キャプチャ画像保持部68に格納する。   The captured image acquisition unit 70 acquires a screen capture image of a web page recorded on each of the tablet PC 12 a to the tablet PC 12 c from each tablet PC 12 using the ADB command, and stores it in the captured image holding unit 68.

以上の構成による自動試験システム100の動作を以下説明する。
図12は、自動試験システム100の動作を示すフローチャートである。タブレットPC12は、自動試験AP起動時に試験用ブラウザ36を起動する(S10)。そして、試験対象のウェブページをウェブサーバ10から取得して試験用ブラウザ36のウィンドウに表示させる(S12)。タブレットPC12は、ウェブページに配置された各種オブジェクト(ボタンやテキストエリア等の各種エレメント)に対する操作を実行し(S14)、ウェブページに対する画面キャプチャ処理を実行する(S16)。なお、S12〜S16の処理は、アクションクラスに規定された順序で実行される。管理サーバ14からキャプチャ画像の提供要求を受け付けると(S18のY)、タブレットPC12は記録した画面キャプチャ画像を管理サーバ14へ提供する(S20)。キャプチャ画像の提供要求を受け付けなければ(S18のN)、S20をスキップする。
The operation of the automatic test system 100 having the above configuration will be described below.
FIG. 12 is a flowchart showing the operation of the automatic test system 100. The tablet PC 12 activates the test browser 36 when the automatic test AP is activated (S10). Then, the web page to be tested is acquired from the web server 10 and displayed on the window of the test browser 36 (S12). The tablet PC 12 performs operations on various objects (various elements such as buttons and text areas) arranged on the web page (S14), and executes screen capture processing on the web page (S16). Note that the processing of S12 to S16 is executed in the order defined in the action class. Upon receiving a capture image provision request from the management server 14 (Y in S18), the tablet PC 12 provides the recorded screen capture image to the management server 14 (S20). If a capture image provision request is not accepted (N in S18), S20 is skipped.

図13は、図12のS10のウェブブラウザ起動処理を詳細に示す。試験用ブラウザ更新フラグが未更新を示す場合(S30のN)、タブレットPC12の標準ブラウザ情報通知部30は、標準ブラウザ26のウィンドウの構成を管理サーバ14へ通知する(S32)。管理サーバ14は、標準ブラウザ26のウィンドウの構成に即して試験用ブラウザ36およびブラウザ表示部37の更新プログラムを生成し、タブレットPC12の試験用ブラウザ更新部32は、その更新プログラムを取得する(S34)。そして試験用ブラウザ更新部32は、試験用ブラウザ36およびブラウザ表示部37のオリジナルプログラムを管理サーバ14から取得した更新プログラムで置き換える(S36)。試験用ブラウザ更新フラグが更新済みを示す場合は(S30のY)、S32〜S36をスキップする。ブラウザ表示部37は、標準ブラウザ26のウィンドウの構成と同態様の、試験用ブラウザ36のウィンドウをディスプレイ21に表示させる(S38)。   FIG. 13 shows in detail the web browser activation process of S10 of FIG. When the test browser update flag indicates not updated (N in S30), the standard browser information notification unit 30 of the tablet PC 12 notifies the management server 14 of the window configuration of the standard browser 26 (S32). The management server 14 generates an update program for the test browser 36 and the browser display unit 37 in accordance with the window configuration of the standard browser 26, and the test browser update unit 32 of the tablet PC 12 acquires the update program ( S34). Then, the test browser update unit 32 replaces the original programs of the test browser 36 and the browser display unit 37 with the update program acquired from the management server 14 (S36). When the test browser update flag indicates updated (Y in S30), S32 to S36 are skipped. The browser display unit 37 displays the window of the test browser 36 in the same manner as the window configuration of the standard browser 26 on the display 21 (S38).

図14は、図12のS12のウェブページ取得処理を詳細に示す。アクションクラスにおいてウェブページの取得関数が呼び出された場合、タブレットPC12のページ取得部46は、呼び出し時の引数として指定されたタイムアウト値を取得する。そして、タイムアウト時刻=現在時刻(システム時刻)+タイムアウト値として、タイムアウト時刻を決定する(S40)。ページ取得部46は、ページ操作仲介部40および試験用ブラウザ36を介して、試験対象のウェブページの提供要求をウェブサーバ10へ送信する。現在時刻がタイムアウト時刻に未達であれば(S44のN)、ページ取得部46は、ページ管理部38が保持する試験対象ウェブページのDOMツリーにおけるReadySate値を取得する(S46)。   FIG. 14 shows the web page acquisition process of S12 of FIG. 12 in detail. When the web page acquisition function is called in the action class, the page acquisition unit 46 of the tablet PC 12 acquires a timeout value specified as an argument at the time of the call. Then, the timeout time is determined as timeout time = current time (system time) + timeout value (S40). The page acquisition unit 46 transmits a web page provision request to the web server 10 via the page operation mediation unit 40 and the test browser 36. If the current time has not reached the timeout time (N in S44), the page acquisition unit 46 acquires the ReadySate value in the DOM tree of the test target web page held by the page management unit 38 (S46).

ReadyState値が完了を示す期待値と合致する場合(S48のY)、ページ取得部46は、ウェブページのロード(メモリへの読み込み)が完了したと判定する。そして、アクションクラスにおいて次に定義された試験操作の処理や、ロードされたウェブページに対する操作を定めた別のアクションクラスの処理等の次処理へ移行する(S50)。ReadyState値が完了を示す期待値と不一致の場合(S48のN)、0.1秒待機後にS44へ戻る(S52)。現在時刻がタイムアウト時刻を途過した場合(S44のY)、ページ取得部46は、ウェブページのロードエラーを示すエラーログを所定の記憶領域へ記録し、本試験処理を終了する(S54)。   When the ReadyState value matches the expected value indicating completion (Y in S48), the page acquisition unit 46 determines that the loading of the web page (reading into the memory) has been completed. Then, the processing shifts to the next processing such as processing of the test operation defined next in the action class and processing of another action class that defines the operation on the loaded web page (S50). If the ReadyState value does not match the expected value indicating completion (N in S48), the process returns to S44 after waiting for 0.1 second (S52). If the current time passes the timeout time (Y in S44), the page acquisition unit 46 records an error log indicating a web page load error in a predetermined storage area, and ends the test process (S54).

図15は、図12のS14の画面要素操作処理を詳細に示す。リトライ回数が予め定められた規定回数以下の場合(S60のY)、操作可否判定部48は、アクションクラスで指定された操作対象オブジェクトの要素値を取得する(S62)。例えば、DOMDocumentオブジェクトのgetElementByID(引数はアクションクラスで指定されたID)や、getElementByTagName(引数はアクションクラスで指定されたタグ名)を呼び出すことにより要素値を取得してもよい。要素値が有意な所定値の場合、例えば非nullのオブジェクトとして取得された場合(S64のN)、操作可否判定部48は操作対象のオブジェクトが操作可能な状態になったと判定し、その旨を操作実行部44へ通知する。要素値がnullの場合は(S64のY)、一定時間(0.1秒等)待機した後、リトライ回数をインクリメントしてS60へ戻る(S66)。リトライ回数が規定回数を超過すると(S60のN)、操作可否判定部48は、オブジェクトのロードエラーを示すエラーログを所定の記憶領域へ記録し、本試験処理を終了する(S68)。   FIG. 15 shows in detail the screen element operation processing in S14 of FIG. When the number of retries is equal to or less than a predetermined number of times determined in advance (Y in S60), the operation availability determination unit 48 acquires the element value of the operation target object specified in the action class (S62). For example, the element value may be acquired by calling getElementByID (argument is an ID specified in the action class) or getElementByTagName (argument is a tag name specified in the action class) of the DOMDocument object. When the element value is a significant predetermined value, for example, when it is acquired as a non-null object (N in S64), the operation availability determination unit 48 determines that the operation target object is in an operable state, and notifies that effect. The operation execution unit 44 is notified. If the element value is null (Y in S64), after waiting for a certain time (0.1 second or the like), the number of retries is incremented and the process returns to S60 (S66). When the number of retries exceeds the specified number (N in S60), the operation availability determination unit 48 records an error log indicating an object load error in a predetermined storage area, and ends the test process (S68).

操作実行部44は、操作対象オブジェクトが操作可能な状態と判定され、その操作対象オブジェクトがDOMツリーを直接操作すべき特殊オブジェクトの場合(S70のY)、ページ管理部38が保持するDOMツリーの操作関数を呼び出すことにより、データクラスが規定する試験データをメモリのオブジェクトデータへ直接設定する(S72)。言い換えれば、OSが提供するオブジェクトの操作関数を直接的もしくは間接的に呼び出すことに代えて、DOMツリーを直接操作する。操作対象が特殊オブジェクトでなければ(S70のN)、操作実行部44は、アクションクラスで指定された関数に対応するSelenium2.0の操作関数を呼び出す(S74)。   The operation execution unit 44 determines that the operation target object can be operated, and if the operation target object is a special object that should directly operate the DOM tree (Y in S70), the operation execution unit 44 stores the DOM tree stored in the page management unit 38. By calling the operation function, the test data defined by the data class is directly set in the object data in the memory (S72). In other words, instead of directly or indirectly calling an object operation function provided by the OS, the DOM tree is directly operated. If the operation target is not a special object (N in S70), the operation execution unit 44 calls an operation function of Selenium 2.0 corresponding to the function specified by the action class (S74).

特殊オブジェクトは、OSが提供するオブジェクトの操作関数を呼び出した場合にソフトウェアキーボードが表示される結果、データ設定に長時間を要してしまうテキストフィールドやテキストボックス等である。また、選択可能項目を展開表示させた場合に操作処理が停止することがあり、また項目選択に長時間を要してしまうプルダウンリストやセレクトボックス等である。DOMツリーの操作としては、例えば、DOMDocumentオブジェクトからgetElementByID等によりDOMElemntオブジェクトを取得し、そのオブジェクトに対してsetAttribute(引数は試験データ)を呼び出すことにより、特殊オブジェクトへ試験データを設定してもよい。   The special object is a text field or a text box that requires a long time for data setting as a result of displaying a software keyboard when an operation function of an object provided by the OS is called. In addition, when the selectable item is displayed in an expanded manner, the operation process may stop, and a pull-down list or select box that requires a long time to select an item may be used. As an operation of the DOM tree, for example, a DOMElemnt object may be acquired from a DOMDocument object by getElementByID or the like, and test data may be set to a special object by calling setAttribute (argument is test data) for the object.

図16は、試験対象のウェブページを模式的に示す。図16(a)のウェブページにて展開リンク210がクリックされると、図16(b)で示すように、閉じるリンク214を含む動的表示コンテンツ212が表示される。図17は、図16のウェブページのプログラムコードを示す。図17のアンカータグ220は図16(a)の展開リンク210に対応し、ddタグ222は図16(b)の動的表示コンテンツ212に対応し、アンカータグ224は図16(b)の閉じるリンク214に対応する。この動的表示コンテンツ212の表示処理(すなわちアンカータグ220のクリックをトリガとした非表示状態から表示状態への切替処理)は、ウェブサーバ10からのウェブページの取得処理自体とは非同期の処理として実行される。   FIG. 16 schematically shows a web page to be tested. When the development link 210 is clicked on the web page of FIG. 16A, as shown in FIG. 16B, the dynamic display content 212 including the close link 214 is displayed. FIG. 17 shows the program code of the web page of FIG. The anchor tag 220 in FIG. 17 corresponds to the expanded link 210 in FIG. 16A, the dd tag 222 corresponds to the dynamic display content 212 in FIG. 16B, and the anchor tag 224 closes in FIG. 16B. Corresponds to link 214. The display process of the dynamic display content 212 (that is, the process of switching from the non-display state to the display state triggered by the click of the anchor tag 220) is a process asynchronous with the web page acquisition process from the web server 10 itself. Executed.

ここでアクションクラスにおいて、(第1操作)展開リンク210のクリック、(第2操作)閉じるリンク214のクリック、が規定されることとする。既述したように、動的表示コンテンツ212は、第1操作をトリガに描画されるものであり、その描画処理が完了しないうちは閉じるリンク214のクリックはできず、仮に閉じるリンク214のクリック操作を実行した場合、エラーが発生してしまう。   Here, in the action class, (first operation) click on the expansion link 210 and (second operation) click on the close link 214 are defined. As described above, the dynamic display content 212 is drawn with the first operation as a trigger. The link 214 cannot be clicked before the drawing process is completed, and the click operation of the link 214 is temporarily closed. Will cause an error.

そこで実施の形態の操作可否判定部48は、図15のS62で示したように、操作対象のオブジェクトがDOMツリーに存在するか否か、言い換えれば、操作対象のオブジェクトがウェブページのデータとしてメモリにロード済みか否かを判定する。図16および図17の例では、文字列「閉じる」を要素値とするアンカータグ要素がDOMツリーに存在する(非nullのオブジェクトとして取得される)場合に、閉じるリンク214を操作可能と判定する。これにより、操作対象のオブジェクトのロードが未完了であることに起因するエラーの発生を回避できる。   Therefore, as shown in S62 of FIG. 15, the operation availability determination unit 48 of the embodiment determines whether or not the operation target object exists in the DOM tree, in other words, the operation target object is stored in the memory as web page data. It is determined whether or not it is already loaded. In the example of FIGS. 16 and 17, when an anchor tag element whose element value is the character string “close” exists in the DOM tree (obtained as a non-null object), the close link 214 is determined to be operable. . As a result, it is possible to avoid occurrence of an error due to incomplete loading of the operation target object.

図18は、図12のS16の画面キャプチャ処理を詳細に示す。タブレットPC12の画面キャプチャ部52は、試験対象ウェブページの全体サイズ、すなわち試験用ブラウザ36のウィンドウに表示された領域と非表示の(隠れた)領域の両方を含むサイズを取得する。また画面キャプチャ部52は、試験用ブラウザ36のウィンドウに表示された画面表示サイズ、すなわち試験用ブラウザ36のウィンドウに表示された領域のサイズであり、非表示の(隠れた)領域を含まないサイズを取得する(S80)。画面キャプチャ部52は、これらのサイズをJAVAスクリプトの関数により取得してもよい。例えばウェブページの全体サイズとして、document.documentElement.scrollWidth(横サイズ)・document.documentElement.scrollHeight(縦サイズ)を取得してもよい。またウェブページの画面表示サイズとして、document.documentElement.clientWidth(横サイズ)・document.documentElement.clientHeight(縦サイズ)を取得してもよい。   FIG. 18 shows in detail the screen capture process in S16 of FIG. The screen capture unit 52 of the tablet PC 12 acquires the entire size of the test target web page, that is, the size including both the area displayed in the window of the test browser 36 and the hidden (hidden) area. The screen capture unit 52 is the screen display size displayed in the window of the test browser 36, that is, the size of the area displayed in the window of the test browser 36, and does not include a hidden (hidden) area. Is acquired (S80). The screen capture unit 52 may acquire these sizes using a JAVA script function. For example, document.documentElement.scrollWidth (horizontal size) and document.documentElement.scrollHeight (vertical size) may be acquired as the overall size of the web page. Further, document.documentElement.clientWidth (horizontal size) and document.documentElement.clientHeight (vertical size) may be acquired as the screen display size of the web page.

続いて画面キャプチャ部52は、試験対象ウェブページの全体サイズと画面表示サイズから横スクロール回数および縦スクロール回数を決定する(S82)。具体的には、試験対象ウェブページの全体サイズを画面表示サイズで割り、端数を+1としてカウントする。そして画面キャプチャ部52は、ウェブページを表示した試験用ブラウザ36のウィンドウを画面キャプチャして、その画像データをキャプチャ画像保持部50へ格納する(S84)。スクロール回数に未達であれば(S86のN)、試験用ブラウザ36のウィンドウに対して横スクロール操作もしくは縦スクロール操作を実行し(S88)、S84に戻る。例えば、画面キャプチャ→横スクロール→画面キャプチャ→横スクロール、を繰り返して横スクロールが上限に達すると、横を初期位置に戻すとともに一度縦スクロールさせ、再度、画面キャプチャ→横スクロール→・・・を繰り返し、縦スクロールが上限に達するまで画面キャプチャ画像を取得する。   Subsequently, the screen capture unit 52 determines the number of horizontal scrolls and the number of vertical scrolls from the overall size of the test target web page and the screen display size (S82). Specifically, the entire size of the test target web page is divided by the screen display size, and the fraction is counted as +1. The screen capture unit 52 screen captures the window of the test browser 36 displaying the web page, and stores the image data in the captured image holding unit 50 (S84). If the number of scrolls has not been reached (N in S86), a horizontal scroll operation or a vertical scroll operation is executed on the window of the test browser 36 (S88), and the process returns to S84. For example, if screen capture → horizontal scroll → screen capture → horizontal scroll is repeated and the horizontal scroll reaches the upper limit, the horizontal is returned to the initial position, and the vertical scroll is performed once, and screen capture → horizontal scroll → ... is repeated again. The screen capture image is acquired until the vertical scroll reaches the upper limit.

ウェブページ全体の画面キャプチャ終了後(S86のY)、画面キャプチャ部52は、ウェブページのプログラムコードを参照して、ウェブページにスクロール可能なオブジェクト(例えばテーブルやテキストエリア、スクロールリスト等の要素)が配置されているか否かを特定する(S90)。スクロール可能オブジェクトが配置されている場合、画面キャプチャ部52は、そのオブジェクトの全体サイズ(試験用ブラウザ36のウィンドウに表示された領域と非表示の(隠れた)領域の両方を含むサイズ)と、試験用ブラウザ36のウィンドウに表示された画面表示サイズとを取得する(S92)。ウェブページのサイズの取得と同様に、JAVAスクリプトの関数や属性値、DOMツリーの属性値からこれらのサイズを取得してもよい。   After the screen capture of the entire web page is completed (Y in S86), the screen capture unit 52 refers to the program code of the web page and can scroll to the web page (for example, an element such as a table, text area, scroll list, etc.). Is specified (S90). When the scrollable object is arranged, the screen capture unit 52 displays the entire size of the object (the size including both the area displayed in the window of the test browser 36 and the hidden (hidden) area), The screen display size displayed in the window of the test browser 36 is acquired (S92). Similar to the acquisition of the size of the web page, these sizes may be acquired from the JAVA script function, the attribute value, or the attribute value of the DOM tree.

続いて画面キャプチャ部52は、S82と同様に、スクロール可能オブジェクトの全体サイズと画面表示サイズから、そのオブジェクトの横スクロール回数および縦スクロール回数を決定する(S94)。そして画面キャプチャ部52は、スクロール可能オブジェクトを表示した試験用ブラウザ36のウィンドウを画面キャプチャして、その画像データをキャプチャ画像保持部50へ格納する(S96)。スクロール回数に未達であれば(S98のN)、スクロール可能オブジェクトに対して横スクロール操作もしくは縦スクロール操作を実行し(S100)、S96に戻る。スクロール回数が上限に達すると(S98のY)、本図のフローを終了する。   Subsequently, similarly to S82, the screen capture unit 52 determines the number of horizontal scrolls and the number of vertical scrolls of the object from the overall size of the scrollable object and the screen display size (S94). Then, the screen capture unit 52 screen captures the window of the test browser 36 displaying the scrollable object, and stores the image data in the captured image holding unit 50 (S96). If the number of scrolls has not been reached (N in S98), a horizontal scroll operation or a vertical scroll operation is executed on the scrollable object (S100), and the process returns to S96. When the number of scrolls reaches the upper limit (Y in S98), the flow of FIG.

図19は、図12のS20のキャプチャ画像提供処理を詳細に示す。図19には不図示であるが、管理サーバ14は、現在時刻を取得し、yyyyMMddHHmmssの形式でキャプチャ画像を格納するディレクトリをキャプチャ画像保持部68に作成しておく。なおタブレットPC12a〜タブレットPC12cそれぞれの識別情報をディレクトリ名に付加し、それぞれの端末用のディレクトリを作成してもよい。この場合、タブレットPC12a〜タブレットPC12cのそれぞれから取得した画面キャプチャ画像を、それぞれの端末用のディレクトリに振分けて保持してもよい。   FIG. 19 shows in detail the capture image providing process of S20 of FIG. Although not shown in FIG. 19, the management server 14 acquires the current time and creates a directory for storing the captured image in the format of yyyyMMddHHmmss in the captured image holding unit 68. The identification information of each of the tablet PC 12a to tablet PC 12c may be added to the directory name to create a directory for each terminal. In this case, the screen capture images acquired from each of the tablet PC 12a to the tablet PC 12c may be distributed and held in the directory for each terminal.

タブレットPC12のキャプチャ画像提供部54は、管理サーバ14のキャプチャ画像取得部70からキャプチャ画像提供要求を受け付けると、キャプチャ画像保持部50に保持された転送対象ファイル名の一覧を取得するADBコマンドを作成する(S110)。そして、キャプチャ画像保持部50の画像格納ディレクトリを指定し(S112)、S110で作成したADBコマンドを自動試験APの実行プロセスとは異なる外部プロセスとして実行する(S114)。そして、転送対象となる1以上のファイル名が文字コードMS932(すなわち管理サーバ14における文字コード)で記録されたファイル名一覧をOS部22から取得する(S116)。   Upon receiving a capture image provision request from the capture image acquisition unit 70 of the management server 14, the capture image provision unit 54 of the tablet PC 12 creates an ADB command that acquires a list of transfer target file names held in the capture image holding unit 50. (S110). Then, the image storage directory of the captured image holding unit 50 is designated (S112), and the ADB command created in S110 is executed as an external process different from the execution process of the automatic test AP (S114). Then, a list of file names in which one or more file names to be transferred are recorded with the character code MS932 (that is, the character code in the management server 14) is acquired from the OS unit 22 (S116).

続いてキャプチャ画像提供部54は、S116で取得されたファイル名を指定したコマンドであり、キャプチャ画像保持部50に保持された転送対象ファイルを管理サーバ14へ転送するADBコマンドを作成する(S118)。そして、キャプチャ画像保持部50の画像ディレクトリを指定し(S120)、S118で作成したADBコマンドを自動試験APの実行プロセスとは異なる外部プロセスとして実行する(S122)。そして、MS932の文字コードでファイル名が付与された転送対象ファイルを、OS部22を介して管理サーバ14へ送信させる(S124)。   Subsequently, the captured image providing unit 54 is a command specifying the file name acquired in S116, and creates an ADB command for transferring the transfer target file held in the captured image holding unit 50 to the management server 14 (S118). . Then, the image directory of the captured image holding unit 50 is designated (S120), and the ADB command created in S118 is executed as an external process different from the execution process of the automatic test AP (S122). Then, the transfer target file assigned the file name with the character code of MS932 is transmitted to the management server 14 via the OS unit 22 (S124).

以上、本発明を実施の形態をもとに説明した。この実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。以下変形例を示す。   The present invention has been described based on the embodiments. This embodiment is an exemplification, and it will be understood by those skilled in the art that various modifications can be made to combinations of the respective constituent elements and processing processes, and such modifications are also within the scope of the present invention. is there. A modification is shown below.

第1の変形例を説明する。
上記実施の形態において操作可否判定部48は、ウェブページに配置された操作対象オブジェクトがDOMツリー上に存在するか否かを確認することにより、そのオブジェクトに対する操作が可能な状態か否かを判定することとした。例えば、図16および図17で示したウェブページでは、2番目の操作の対象である閉じるリンク214のタグを指定して、DOMツリーにおけるそのタグの要素オブジェクトが非nullであることを条件として、閉じるリンク214を操作した。変形例として、操作可否判定部48は、アクションクラスにおいて第1操作とそれに続く第2操作が規定されているとき、第1操作に伴うウェブページ内の処理が最後まで完了したか否かを確認することにより、第2操作の対象のオブジェクトに対する操作が可能な状態か否かを判定してもよい。
A first modification will be described.
In the above embodiment, the operation availability determination unit 48 determines whether or not the operation target object arranged on the web page exists on the DOM tree, thereby determining whether or not the operation is possible for the object. It was decided to. For example, in the web page shown in FIG. 16 and FIG. 17, the tag of the close link 214 that is the target of the second operation is specified, and the element object of the tag in the DOM tree is non-null, The close link 214 was operated. As a modified example, when the first operation and the subsequent second operation are defined in the action class, the operation availability determination unit 48 checks whether the processing in the web page associated with the first operation has been completed to the end. By doing so, it may be determined whether or not the operation of the object to be subjected to the second operation is possible.

図20は、図16のウェブページのプログラムコードを示す。同図は、図17のHTMLコードのhead部で定義されたJAVAスクリプトコード(図20(a))と、CSSコード(図20(b))を示している。操作可否判定部48は、HTMLコードのhead部で規定されたJAVAスクリプトファイル、CSSファイル、画像ファイル等を参照する。操作可否判定部48は、試験対象のウェブページに関連するそれらのプログラムコードを参照し、第1の操作に伴い実行される処理をトレースすることにより、第1の操作に伴う処理が最後まで完了した場合のDOMツリー上の要素値(期待値)を特定する。そして、第1の操作を実行後のウェブページの要素値が、その期待値と整合するか否かを判定し、整合する場合に第2の操作が可能な状態と判定する。不整合であれば、図15のS64のY・S66と同様に、ウェブページの要素値と期待値との比較処理をリトライする。   FIG. 20 shows the program code of the web page of FIG. This figure shows the JAVA script code (FIG. 20 (a)) defined in the head part of the HTML code of FIG. 17 and the CSS code (FIG. 20 (b)). The operation determination unit 48 refers to a JAVA script file, a CSS file, an image file, and the like defined in the head part of the HTML code. The operation availability determination unit 48 refers to those program codes related to the web page to be tested and traces the process executed in accordance with the first operation, whereby the process in accordance with the first operation is completed to the end. In this case, the element value (expected value) on the DOM tree is specified. Then, it is determined whether or not the element value of the web page after executing the first operation matches the expected value, and if it matches, it is determined that the second operation is possible. If they do not match, the comparison processing between the element value of the web page and the expected value is retried in the same way as Y · S66 of S64 of FIG.

図16、図17、図20を参照して具体例を示す。なお、図20(a)のJAVAスクリプトは、IDが「outline」となるタグ内のdtタグがクリックされると、「open」というクラス名のCSSを適用することを定めている。また、図20(b)のCSSは、IDが「outline」となるタグ内のdtタグとddタグのCSSを定義しており、「display:none」で非表示、「display:block」で表示と定義している。ここでもアクションクラスにおいて、(第1操作)図16(a)の展開リンク210のクリック、(第2操作)図16(b)の閉じるリンク214のクリック、が規定されることとする。   Specific examples will be described with reference to FIGS. 16, 17, and 20. Note that the JAVA script of FIG. 20A defines that when a dt tag in a tag whose ID is “outline” is clicked, a CSS with a class name of “open” is applied. In addition, the CSS in FIG. 20B defines the dt tag and the CSS of the dd tag in the tag whose ID is “outline”, which is not displayed by “display: none” and displayed by “display: block”. It is defined as Again, in the action class, (first operation) click on the expansion link 210 in FIG. 16A and (second operation) click on the close link 214 in FIG. 16B are defined.

操作可否判定部48は、操作実行部44が第1操作を実行する前に、第1操作に伴うプログラム内の一連の処理を特定する。この例では、第1操作としての図17のアンカータグ220のクリックに伴い、図20(a)のコード230が実行され、続いて図20(b)のコード232が実行されて、最終的に属性「style」の属性値として「display:block」が設定されることを特定する。すなわち、属性「style」の属性値「display:block」を期待値として特定する。操作可否判定部48は、操作実行部44による第1操作の実行後、ページ管理部38が保持するDOMDocumetオブジェクトに対してgetElementByTagName("outline")を呼び出し、さらにDOM.getElementAttribute(outlineタグオブジェクト,"style")を呼び出して、属性「style」の属性値(すなわち上記の要素値)を取得する。操作可否判定部48は、取得した属性値に「display:block」が含まれるか否かを判定し、含まれれば第1操作に伴う一連の処理が完了したと判定し、第2操作を実行可能と判定する。   The operation availability determination unit 48 identifies a series of processes in the program associated with the first operation before the operation execution unit 44 executes the first operation. In this example, when the anchor tag 220 in FIG. 17 is clicked as the first operation, the code 230 in FIG. 20A is executed, and then the code 232 in FIG. 20B is executed. Specify that “display: block” is set as the attribute value of the attribute “style”. That is, the attribute value “display: block” of the attribute “style” is specified as the expected value. After the execution of the first operation by the operation execution unit 44, the operation availability determination unit 48 calls getElementByTagName ("outline") on the DOMDocumet object held by the page management unit 38, and further DOM.getElementAttribute (outline tag object, " Call style ") to get the attribute value of attribute" style "(ie, the element value above). The operation availability determination unit 48 determines whether or not “display: block” is included in the acquired attribute value. If included, the operation determination unit 48 determines that a series of processes associated with the first operation is completed, and executes the second operation. Judge that it is possible.

この変形例によると、試験対象のウェブページに対する第1操作とそれに続く第2操作が規定されているとき、第1操作に伴うウェブページ内の処理が最後まで完了したことを条件として第2操作を実行する。これにより、第2操作対象のオブジェクトのロード未完了に起因するエラーの発生を抑制できる。   According to this modification, when the first operation and the subsequent second operation are specified for the web page to be tested, the second operation is performed on the condition that the processing in the web page accompanying the first operation is completed to the end. Execute. Thereby, it is possible to suppress the occurrence of an error due to the incomplete loading of the second operation target object.

なお操作可否判定部48は、試験対象のウェブページに対する第1操作とそれに続く第2操作が規定されているとき、実施の形態の条件と、第1の変形例の条件の両方が充足されたことを条件として、第2操作対象のオブジェクトに対する操作が可能な状態と判定してもよい。実施の形態の方式では、第2操作対象のオブジェクトのロードは完了したものの、第1操作が完了したことは確定できない。その一方、第1の変形例の方式では、第1操作が完了したことは確定できるものの、第2操作対象のオブジェクトのロードが完了したかは確定できない。したがって、これら2つの方式を組み合わせることにより、第1操作が完了し、かつ、第2操作対象のオブジェクトのロードが完了したことを条件として第2操作を実行することとなり、ウェブページの試験においてウェブページに配置されたオブジェクトの操作可否を一層適切に決定できる。   In addition, when the 1st operation with respect to the web page to be tested and the following 2nd operation are prescribed | regulated, the operation propriety determination part 48 satisfy | filled both the conditions of embodiment and the conditions of a 1st modification. As a condition, it may be determined that the second operation target object can be operated. In the method according to the embodiment, although the loading of the second operation target object is completed, it cannot be determined that the first operation is completed. On the other hand, in the method of the first modified example, it can be determined that the first operation has been completed, but it cannot be determined whether the loading of the second operation target object has been completed. Therefore, by combining these two methods, the second operation is executed on the condition that the first operation is completed and the loading of the second operation target object is completed. It is possible to more appropriately determine whether or not to operate an object placed on the page.

第2の変形例を説明する。
上記実施の形態では、試験用ブラウザのための改変プログラムを管理サーバ14が作成することとした。変形例として、タブレットPC12の内部で改変プログラムを作成してもよい。この場合、タブレットPC12は、実施の形態において管理サーバ14の機能ブロックとして説明した原本プログラム保持部60およびプログラム改変部64をさらに備えてもよい。そして、自動試験部28の内部において標準ブラウザ情報通知部30→プログラム改変部64→試験用ブラウザ更新部32と連携してもよい。
A second modification will be described.
In the above embodiment, the management server 14 creates a modification program for the test browser. As a modification, a modification program may be created inside the tablet PC 12. In this case, the tablet PC 12 may further include an original program holding unit 60 and a program modifying unit 64 described as functional blocks of the management server 14 in the embodiment. In the automatic test unit 28, the standard browser information notification unit 30 → the program modification unit 64 → the test browser update unit 32 may be linked.

第3の変形例を説明する。
上記実施の形態では、ウェブページに配置されたオブジェクトのうち、OSが提供する操作関数を呼び出すことを抑制する特殊オブジェクトの例として、テキストフィールドやテキストエリア、プルダウンリストを示した。しかし、本発明の技術思想はこれらのオブジェクトに限定されるものではない。すなわち、OSが提供する操作関数を呼び出してデータを設定すると試験効率が低下すると想定されるオブジェクトであり、DOMツリーを操作して直接データを設定した方が効率的と想定されるオブジェクト全般に適用可能である。例えば、ラジオボタンやチェックボックス、アラートダイアログに対する試験データの入力や設定に適用されてもよい。
A third modification will be described.
In the above embodiment, a text field, a text area, and a pull-down list are shown as examples of special objects that suppress calling an operation function provided by the OS among objects arranged on a web page. However, the technical idea of the present invention is not limited to these objects. In other words, it is an object that the test efficiency is assumed to decrease when data is set by calling an operation function provided by the OS, and it is applied to all objects that are assumed to be more efficient if the data is set directly by operating the DOM tree. Is possible. For example, the present invention may be applied to input and setting of test data for radio buttons, check boxes, and alert dialogs.

請求項に記載の各構成要件が果たすべき機能は、実施の形態および変形例において示された各構成要素の単体もしくはそれらの連係によって実現されることも当業者には理解されるところである。   It should also be understood by those skilled in the art that the functions to be fulfilled by the constituent elements recited in the claims are realized by the individual constituent elements shown in the embodiments and the modified examples or by their linkage.

12 タブレットPC、 14 管理サーバ、 26 標準ブラウザ、 28 自動試験部、 30 標準ブラウザ情報通知部、 32 試験用ブラウザ更新部、 34 試験支援部、 36 試験用ブラウザ、 37 ブラウザ表示部、 38 ページ管理部、 40 ページ操作仲介部、 44 操作実行部、 46 ページ取得部、 48 操作可否判定部、 52 画面キャプチャ部、 54 キャプチャ画像提供部、 62 標準ブラウザ情報取得部、 64 プログラム改変部、 66 改変プログラム提供部、 70 キャプチャ画像取得部、 100 自動試験システム。   12 Tablet PC, 14 Management Server, 26 Standard Browser, 28 Automatic Test Unit, 30 Standard Browser Information Notification Unit, 32 Test Browser Update Unit, 34 Test Support Unit, 36 Test Browser, 37 Browser Display Unit, 38 Page Management Unit , 40 page operation mediation unit, 44 operation execution unit, 46 page acquisition unit, 48 operation availability determination unit, 52 screen capture unit, 54 captured image providing unit, 62 standard browser information acquisition unit, 64 program modification unit, 66 modification program provision Part 70 captured image acquisition part 100 automatic test system.

Claims (4)

試験対象のウェブページの内容を示す木構造データを保持するページ管理部と、
前記ウェブページに対する第1の操作を実行後、第2の操作を実行すべき場合に、前記第1の操作または前記第2の操作に関する前記ウェブページの要素値を前記木構造データから取得し、その要素値が、前記第2の操作を実行可能であることを示す所定の期待値と整合するか否かを判定する判定部と、
前記要素値が前記期待値と整合することを条件として、前記ウェブページに対する第2の操作を実行する操作実行部と、
を備えることを特徴とする試験装置。
A page management unit that holds tree structure data indicating the content of the web page to be tested;
After executing the first operation on the web page, if the second operation is to be executed, the element value of the web page related to the first operation or the second operation is acquired from the tree structure data, A determination unit that determines whether or not the element value matches a predetermined expected value indicating that the second operation can be executed;
An operation execution unit that executes a second operation on the web page on condition that the element value matches the expected value;
A test apparatus comprising:
前記判定部は、前記第2の操作の対象となる前記ウェブページに配置されたオブジェクトの要素値を取得し、その要素値が、前記木構造データに前記オブジェクトの要素が存在することを示す期待値と整合するか否かを判定することを特徴とする請求項1に記載の試験装置。   The determination unit acquires an element value of an object placed on the web page that is a target of the second operation, and the element value indicates that the element of the object exists in the tree structure data The test apparatus according to claim 1, wherein it is determined whether or not the value matches. 前記判定部は、前記ウェブページのプログラムにもとづいて前記第1の操作に伴い実行される処理を特定することにより、前記第1の操作に伴う処理の完了を示す期待値を特定し、前記第1の操作を実行後の前記ウェブページの要素値が当該期待値と整合するか否かを判定することを特徴とする請求項1に記載の試験装置。   The determination unit identifies an expected value indicating completion of the process associated with the first operation by identifying a process executed along with the first operation based on the program of the web page, and The test apparatus according to claim 1, wherein it is determined whether or not an element value of the web page after the operation of 1 is consistent with the expected value. 試験装置に、
試験対象のウェブページの内容を示す木構造データを保持する機能と、
前記ウェブページに対する第1の操作を実行後、第2の操作を実行すべき場合に、前記第1の操作または前記第2の操作に関する前記ウェブページの要素値を前記木構造データから取得し、その要素値が、前記第2の操作が実行可能であることを示す所定の期待値と整合するか否かを判定する機能と、
前記要素値が前記期待値と整合することを条件として、前記ウェブページに対する第2の操作を実行する機能と、
を実現させるためのコンピュータプログラム。
Test equipment
A function to hold tree structure data indicating the content of the web page to be tested,
After executing the first operation on the web page, if the second operation is to be executed, the element value of the web page related to the first operation or the second operation is acquired from the tree structure data, A function for determining whether or not the element value matches a predetermined expected value indicating that the second operation can be executed;
A function of executing a second operation on the web page on the condition that the element value matches the expected value;
Computer program for realizing.
JP2012180084A 2012-08-15 2012-08-15 Testing device and computer program Pending JP2014038453A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012180084A JP2014038453A (en) 2012-08-15 2012-08-15 Testing device and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012180084A JP2014038453A (en) 2012-08-15 2012-08-15 Testing device and computer program

Publications (1)

Publication Number Publication Date
JP2014038453A true JP2014038453A (en) 2014-02-27

Family

ID=50286555

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012180084A Pending JP2014038453A (en) 2012-08-15 2012-08-15 Testing device and computer program

Country Status (1)

Country Link
JP (1) JP2014038453A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015215765A (en) * 2014-05-10 2015-12-03 コニカミノルタ株式会社 Portable terminal device, image file storage processing method, and storage processing program
JP2022020541A (en) * 2020-06-29 2022-02-01 バイドゥ オンライン ネットワーク テクノロジー(ペキン) カンパニー リミテッド Test method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JPN6014043033; '"Biz∫のWEBアプリケーションのシナリオテストを自動化したい(1)"' [online] , 20100825 *
JPN6014043035; '"selenium web driver - how to use waitFor for AJAX"' [online] , 20120507 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015215765A (en) * 2014-05-10 2015-12-03 コニカミノルタ株式会社 Portable terminal device, image file storage processing method, and storage processing program
JP2022020541A (en) * 2020-06-29 2022-02-01 バイドゥ オンライン ネットワーク テクノロジー(ペキン) カンパニー リミテッド Test method and device
JP7030177B2 (en) 2020-06-29 2022-03-04 バイドゥ オンライン ネットワーク テクノロジー(ペキン) カンパニー リミテッド Test method and equipment

Similar Documents

Publication Publication Date Title
US10382386B2 (en) Functional webpage testing tool
US20200104041A1 (en) System for capturing and replaying screen gestures
US10324828B2 (en) Generating annotated screenshots based on automated tests
US9342237B2 (en) Automated testing of gesture-based applications
US11625528B2 (en) System, method and computer program product to generate a web application using reusable themes
US9003423B1 (en) Dynamic browser compatibility checker
CN110515514B (en) Data processing method, device and storage medium
JP2008276690A (en) Development system, server for development system, and development method
US20130290934A1 (en) Monitoring applications executing on a computer device using programmatic triggers
CN106687946A (en) Generating mobile web browser views for applications
JP5303534B2 (en) Appearance information processing apparatus and method
JP2014038453A (en) Testing device and computer program
JP2014038451A (en) Testing device and computer program
JP5639127B2 (en) Test apparatus, test system, and computer program
JP2007122691A (en) Information processor, information processing method and program
Rogers Developing portable mobile web applications
JP2012173946A (en) Web page display device and focus control method
JP5959535B2 (en) Server, method, and program for causing a computer to function as a server for accessing a mobile terminal from a client via a network
JP4903279B2 (en) Operation verification apparatus, operation verification method, and operation verification program
JP2009009212A (en) Specification creation support system and method
EP2772850A1 (en) Apparatus and method for manufacturing web widget
JP2016091092A (en) Browser, control method of browser, and program
JP7499429B1 (en) Application remote control system, application execution control device, and application execution control method
JP7503685B1 (en) Embedding program, screen display program, and screen display method
JP6741141B2 (en) Information processing apparatus, information processing system, and information processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140228

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141008

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141014

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150303