JP2014232514A - Method and device for automatically operating graphical user interface - Google Patents

Method and device for automatically operating graphical user interface Download PDF

Info

Publication number
JP2014232514A
JP2014232514A JP2013114298A JP2013114298A JP2014232514A JP 2014232514 A JP2014232514 A JP 2014232514A JP 2013114298 A JP2013114298 A JP 2013114298A JP 2013114298 A JP2013114298 A JP 2013114298A JP 2014232514 A JP2014232514 A JP 2014232514A
Authority
JP
Japan
Prior art keywords
state
gui
target
path
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2013114298A
Other languages
Japanese (ja)
Other versions
JP6008372B2 (en
Inventor
中島 一
Hajime Nakajima
中島  一
高橋 郁也
Ikuya Takahashi
郁也 高橋
英毅 小矢
Hideki Koya
英毅 小矢
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2013114298A priority Critical patent/JP6008372B2/en
Publication of JP2014232514A publication Critical patent/JP2014232514A/en
Application granted granted Critical
Publication of JP6008372B2 publication Critical patent/JP6008372B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a technology for a comprehensive automatic operation performed regarding the state of a graphical user interface (GUI), which technology reduces processing time for creating a GUI state transition graph when a large number of terminals running multiple applications to be tested are prepared to automatically and concurrently operate the GUI.SOLUTION: A comprehensive operation control unit 5 extracts a path for reaching from a state of a displayed GUI to a state (target state) of the GUI in which a non-operated GUI element exits. Then, the comprehensive operation control unit 5 determines whether a non-operated GUI element surely exits when the state is changed to the target state. If it is determined that no non-operated GUI element exits, the comprehensive operation control unit 5 extracts a path to another target state, performs such determination processing again, and automatically operates a GUI element along with the extracted path. In this way, the GUI is changed to a state in which a non-operated GUI element exits.

Description

本発明は、グラフィカルユーザインタフェースの動作を表す状態遷移グラフを生成する技術に関する。   The present invention relates to a technique for generating a state transition graph representing an operation of a graphical user interface.

最近のソフトウェアの大部分はグラフィカルユーザインタフェース(以下GUI)を備えており、GUIへの操作によってGUIが期待通りに変化することのテストは、ソフトウェア開発において必須の作業である。GUIの多くはウインドウシステムを採用しており、ウインドウ内のボタンやテキストボックスなどGUI要素を操作することでGUIが変化する。これをGUIの状態遷移と呼ぶ。ここでの操作とは具体的には、マウスクリックやキーボード入力などのことである。もし、このような操作による変化後のGUIが期待どおりの状態ではなかった場合、これをGUIのエラーと言う。   Most of the recent software includes a graphical user interface (hereinafter referred to as GUI), and testing that the GUI changes as expected by operating the GUI is an essential task in software development. Many GUIs employ a window system, and the GUI changes by operating GUI elements such as buttons and text boxes in the window. This is called GUI state transition. Specifically, the operations here are mouse clicks, keyboard inputs, and the like. If the GUI after the change due to such an operation is not in an expected state, this is called a GUI error.

GUIのエラーを発見するためには、GUIに対するあらゆる操作手順を実行し、操作後のGUIを確認する必要がある。しかし、GUIは多くのGUI要素で構成されているため、その操作順番の組み合わせは膨大な数に及ぶ。よってこの確認を人手で行うと、その作業は膨大な工数を必要とする。   In order to find a GUI error, it is necessary to execute all operation procedures for the GUI and check the GUI after the operation. However, since the GUI is composed of many GUI elements, there are a huge number of combinations of the operation order. Therefore, if this confirmation is performed manually, the work requires a huge amount of man-hours.

従来技術として、GUIの要素を自動操作し実際にGUIを遷移させ、さらに遷移したGUIに対して自動操作を再帰的に繰り返す技術が提案されている。このような自動操作の結果、GUI要素の操作に対するGUIの遷移を表現する状態遷移グラフを生成することができる。このような状態遷移グラフを使ってGUIのエラーの検出や、GUIをテストするためのテストケース生成が可能となる。ここでは、それら自動操作の従来技術とその問題点を説明する。   As a conventional technique, a technique has been proposed in which a GUI element is automatically operated to actually change the GUI, and the automatic operation is recursively repeated for the changed GUI. As a result of such an automatic operation, it is possible to generate a state transition graph that represents a transition of the GUI with respect to the operation of the GUI element. Using such a state transition graph, it is possible to detect a GUI error and generate a test case for testing the GUI. Here, the prior art of these automatic operations and their problems will be described.

非特許文献1では、初期のGUIとして表示されている複数のウインドウ内のGUI要素を順次自動的に操作する。GUI要素を操作すると新規にウインドウが表示される(あるいはブラウザ等をベースとしたGUIの場合は、別のGUI要素で構成されるGUIに表示が切り替わる)場合があり、その場合は、新規ウインドウ内のGUI要素に対して同様の処理を再帰的に繰り返す。例えば図1のように初期のGUIが1つのウインドウで構成され、そのウインドウ内のGUI要素として2つのラジオボタンと1つのボタンが存在する場合を考える。ボタンを押すとラジオボタンの選択状態に応じて、GUIが(a)、(b)あるいは(c)へと切り替わる。このようなGUIに対して非特許文献1の技術を適用すると、以下のような手順で自動操作する。   In Non-Patent Document 1, GUI elements in a plurality of windows displayed as initial GUIs are automatically and sequentially operated. When a GUI element is operated, a new window may be displayed (or in the case of a GUI based on a browser or the like, the display is switched to a GUI configured with another GUI element). The same processing is recursively repeated for the GUI element. For example, consider the case where the initial GUI is composed of one window, as shown in FIG. 1, and two radio buttons and one button exist as GUI elements in the window. When the button is pressed, the GUI is switched to (a), (b) or (c) according to the selection state of the radio button. When the technique of Non-Patent Document 1 is applied to such a GUI, automatic operation is performed in the following procedure.

1.ラジオボタン1を操作(ラジオボタン1が選択状態になる)
2.ラジオボタン2を操作(ラジオボタン2が選択状態になる。ラジオボタン1の選択状態は解除される)
3.ボタン1を操作(GUIが(c)に切り替わる)
4.GUI(c)のGUI要素(キャプションがYes,Noのボタン)を操作。
1. Operate radio button 1 (radio button 1 is selected)
2. Operate radio button 2 (radio button 2 is selected. Radio button 1 is deselected)
3. Operate button 1 (GUI switches to (c))
4). Manipulate GUI elements (buttons with captions Yes and No) in GUI (c).

非特許文献1の問題は、自動操作の過程で出現する各GUI要素を1度しか操作しない点である。結果として先ほどの自動操作の手順のように、(a)や(b)のGUIへ遷移することができず、生成される状態遷移グラフも(a)や(b)への遷移が欠けた不完全なものとなる。   The problem of Non-Patent Document 1 is that each GUI element that appears in the process of automatic operation is operated only once. As a result, it is not possible to transition to the GUI of (a) or (b) as in the previous automatic operation procedure, and the generated state transition graph also has a lack of transition to (a) or (b). It will be complete.

このような非特許文献1の問題に対して、非特許文献2のようにGUIの状態に対して網羅的に自動操作することでより精密なGUIの状態遷移グラフを生成する技術が提案されている。GUIの状態とは、GUIとして表示されているGUI要素の構造を表現した情報である。GUI要素はキャプションや活性状態、選択状態等のプロパティとその値の情報を保持している。GUIを構成する要素の状態は、GUI要素名、プロパティ、プロパティの値という組の集合で表現できる。図2に図1の初期のGUIの各要素の状態の例を示す。GUIは複数のウインドウで構成される。よって各ウインドウの状態とはそれらウインドウを構成するGUI要素の状態の集合である。そしてGUIの状態は各ウインドウの状態の集合で表現することができる。   In response to such a problem of Non-Patent Document 1, a technique for generating a more precise GUI state transition graph by comprehensively manipulating the GUI state as in Non-Patent Document 2 has been proposed. Yes. The GUI state is information expressing the structure of the GUI element displayed as the GUI. The GUI element holds properties such as captions, active states, and selection states, and information on their values. The state of the elements constituting the GUI can be expressed by a set of a set of GUI element name, property, and property value. FIG. 2 shows an example of the state of each element of the initial GUI of FIG. The GUI is composed of a plurality of windows. Therefore, the state of each window is a set of states of GUI elements constituting the windows. The GUI state can be expressed by a set of states of each window.

例えば、図1の初期のGUIはラジオボタンの選択に応じて異なる状態として表現することができる。ラジオボタン1とラジオボタン2ともに未選択の場合、ラジオボタン1を選択した場合、ラジオボタン2を選択した場合のGUIの状態を図3に示す。このGUIではウインドウは1つしか存在しないため、それぞれのウインドウの状態をw0,w1,w2とすると、各GUIの状態は{w0},{w1},{w2}となる。 For example, the initial GUI of FIG. 1 can be expressed as different states depending on the radio button selection. FIG. 3 shows the state of the GUI when neither radio button 1 nor radio button 2 is selected, when radio button 1 is selected, or when radio button 2 is selected. Since there is only one window in this GUI, if the state of each window is w 0 , w 1 , w 2 , the state of each GUI is {w 0 }, {w 1 }, {w 2 }. .

非特許文献2では、まずテスト対象のアプリケーションを起動し、初期のGUIを表示させる。初期のGUIからGUIの状態を取得し、操作可能なGUI要素を自動操作する。この処理によって表示されているGUIの状態が変化するため、変化したGUIの状態に対して同様の処理を再帰的に繰り返す。このようにすることで、例えば、図3の各状態においてボタン1を自動操作すれば、図1のGUI(a)(b)(c)へ遷移することが可能になるため、非特許文献1より精密な状態遷移グラフが構築できる。   In Non-Patent Document 2, an application to be tested is first activated to display an initial GUI. The GUI state is acquired from the initial GUI, and the operable GUI elements are automatically operated. Since the GUI state displayed by this process changes, the same process is recursively repeated for the changed GUI state. By doing so, for example, if the button 1 is automatically operated in each state of FIG. 3, it is possible to transition to the GUI (a) (b) (c) of FIG. A more precise state transition graph can be constructed.

このように出現したすべてのGUIの状態に対して網羅的にGUI要素を自動操作するためには、自動操作の過程で出現したGUIの状態と、そのGUIの状態において操作したGUI要素を記憶しておく必要がある。記憶しなかった場合、同じGUIの状態が出現したときに、過去に操作したことのあるGUI要素を繰り返し操作してしまい、無限ループに陥る可能性がある。そこで、非特許文献2では、GUIの状態の集合Sと状態遷移の集合Tに対して、出現したGUIの状態や発生した状態遷移をそれぞれの集合に追加し記憶する。   In order to automatically operate GUI elements comprehensively for all the GUI states that appear in this way, the GUI states that appear during the automatic operation and the GUI elements that are operated in the GUI states are stored. It is necessary to keep. If not stored, when the same GUI state appears, a GUI element that has been operated in the past may be repeatedly operated, resulting in an infinite loop. Therefore, in Non-Patent Document 2, the state of the GUI that appears and the state transition that has occurred are added to and stored in the set of the GUI state S and the state transition set T, respectively.

具体的には、現在表示されているGUIの状態を取得し、そのGUIの状態が過去に出現したことがあるか、すなわちGUI状態の集合Sに現在のGUI状態が含まれるか調べる。もし含まれなければ、そのGUIの状態をGUI状態の集合Sに追加する。さらに現在のGUI状態において可能な状態遷移を状態遷移の集合Tに追加する。状態遷移とは形式的には、操作前の状態、操作するGUI要素、操作後の状態の組で表現できる。   Specifically, the state of the currently displayed GUI is acquired, and it is checked whether the GUI state has appeared in the past, that is, whether the current GUI state is included in the set S of GUI states. If not, the GUI state is added to the GUI state set S. Further, possible state transitions in the current GUI state are added to the state transition set T. State transition can be expressed formally as a set of a state before operation, a GUI element to be operated, and a state after operation.

例えば、図1の初期のGUIに対して、非特許文献2による自動操作を実施した場合を考える。まずディスプレイには初期のGUIが表示されるため、初期GUIの状態s0={w0}を取得する。GUI状態s0は状態の集合Sにまだ登録されていないため、集合SにGUI状態s0を追加する。さらにこのGUI状態ではラジオボタン1、ラジオボタン2、ボタン1が操作可能であるため、状態遷移として(s0,ラジオボタン1,TBD)、(s0,ラジオボタン2,TBD)、(s0,ボタン1,TBD)を集合Tに追加する(図4)。図4の状態遷移の集合Tを示す表の各行が追加した状態遷移に対応する。状態遷移における操作後の状態がTBDであるのは、まだ未操作であるため、操作後の状態が未決定(To Be Determined)であることを意味する。これ以降ではGUIの状態のことを単に状態と呼ぶ。 For example, consider a case where an automatic operation according to Non-Patent Document 2 is performed on the initial GUI of FIG. First, since the initial GUI is displayed on the display, the initial GUI state s 0 = {w 0 } is acquired. Since the GUI state s 0 is not yet registered in the state set S, the GUI state s 0 is added to the set S. Further, since the radio button 1, the radio button 2, and the button 1 can be operated in this GUI state, (s 0 , radio button 1, TBD), (s 0 , radio button 2, TBD), (s 0 , Button 1, TBD) are added to the set T (FIG. 4). Each row of the table indicating the state transition set T in FIG. 4 corresponds to the added state transition. The state after the operation in the state transition is TBD means that the state after the operation is not yet determined, and therefore the state after the operation is not yet determined (To Be Determined). Hereinafter, the state of the GUI is simply referred to as a state.

次に現在の状態s0において未操作である遷移を1つ選択し、そのGUI要素を自動操作する。例えばここでは、図4の集合Tからラジオボタン1を自動操作したとする。その結果、GUIは図5のように変化する。このGUIの状態をs1とすると先ほど選択した状態遷移(s0,ラジオボタン1,TBD)を(s0,ラジオボタン1,s1)に置き換える。以降はこれまでの処理を再帰的に現在の状態s1に対して繰り返す。すなわち状態s1が集合Sに含まれるか調べ、含まれていないため集合Sにs1を追加する。さらに状態s1に対して可能な遷移を集合Tに追加する。そして、状態s1で可能な遷移を1つ選択し、例えばラジオボタン1を自動操作する。このときの状態の集合Sと状態遷移の集合Tを図6に示す。 Next, one transition that has not been operated in the current state s 0 is selected, and the GUI element is automatically operated. For example, here, it is assumed that the radio button 1 is automatically operated from the set T in FIG. As a result, the GUI changes as shown in FIG. If the GUI state is s 1 , the previously selected state transition (s 0 , radio button 1, TBD) is replaced with (s 0 , radio button 1, s 1 ). Thereafter, the processing so far is recursively repeated for the current state s 1 . That is, it is checked whether the state s 1 is included in the set S. Since it is not included, s 1 is added to the set S. Further, a possible transition for the state s 1 is added to the set T. Then, one possible transition is selected in the state s 1 and, for example, the radio button 1 is automatically operated. FIG. 6 shows a state set S and a state transition set T at this time.

このように初期のGUIから自動操作処理を繰り返したときのGUIの状態遷移を図7に示す。GUIの状態はs0,s1,s1,s2,s1,s3,のように遷移し、状態s3において終了ボタン(ボタン2)を押してアプリケーションが終了するまで継続される。この時点でのGUI状態の集合Sと状態遷移の集合Tを図8に示す。アプリケーションが終了してしまった場合、非特許文献2はアプリケーションを再起動し初期のGUIを表示し処理を繰り返す。 FIG. 7 shows the state transition of the GUI when the automatic operation process is repeated from the initial GUI. The state of the GUI changes as s 0 , s 1 , s 1 , s 2 , s 1 , s 3 , and continues until the application is terminated by pressing the end button (button 2) in state s 3 . FIG. 8 shows a set S of GUI states and a set T of state transitions at this time. When the application is terminated, Non-Patent Document 2 restarts the application, displays the initial GUI, and repeats the process.

非特許文献2はこのような自動操作の結果、状態遷移グラフを生成することができる。状態遷移グラフとは形式的には、GUI状態の集合と状態遷移の集合の対<S,T>で表現する。状態遷移グラフを図形式で表現するとき、集合Sに含まれる状態をノードで表現し、状態遷移はノード間の有向エッジとして表現する。すなわち、Tに含まれる遷移において操作前の状態と対応するノードから操作後の状態と対応するノードへエッジを引く。さらにエッジには遷移のGUI要素をラベルとして記述する。図8のGUIの状態集合Sと状態遷移Tの状態遷移グラフの図形式を図9に示す。図中のエッジで先がノードを示していないもの、例えばノードs0のラジオボタン2やボタン1というラベルのエッジは、操作後の状態がTBDである状態遷移を意味している。 Non-Patent Document 2 can generate a state transition graph as a result of such automatic operation. The state transition graph is formally expressed by a pair <S, T> of a set of GUI states and a set of state transitions. When the state transition graph is expressed in a diagram form, the states included in the set S are expressed by nodes, and the state transition is expressed as a directed edge between the nodes. That is, in the transition included in T, an edge is drawn from the node corresponding to the state before the operation to the node corresponding to the state after the operation. Further, a transition GUI element is described as a label in the edge. FIG. 9 shows a diagram format of the state transition graph of the GUI state set S and state transition T in FIG. In the figure, an edge that does not indicate a node, for example, an edge labeled as radio button 2 or button 1 of node s 0 means a state transition in which the state after the operation is TBD.

このように自動操作処理を継続していくと、表示されているGUI状態sにおいて未操作のGUI要素が存在しない場合がある。もしこのとき、他のGUIの状態s’に未操作のGUI要素が存在するならば、自動操作によって状態sから状態s’にGUIを遷移させ、未操作のGUI要素を操作する必要がある。例えば、表示されているGUIの状態がs1だった場合、図9の状態遷移グラフが示すようにs1には未操作の状態遷移が存在しない。よって、例えば未操作の状態遷移が存在する状態s2にGUIを遷移させる必要がある。 If automatic operation processing is continued in this way, there may be no GUI element that has not been operated in the displayed GUI state s. At this time, if there is an unoperated GUI element in the state s ′ of another GUI, it is necessary to change the GUI from the state s to the state s ′ by an automatic operation and operate the unoperated GUI element. For example, when the state of the displayed GUI is s 1 , there is no unoperated state transition in s 1 as shown in the state transition graph of FIG. Therefore, for example, it is necessary to transition the GUI to the state s 2 where there is an unoperated state transition.

非特許文献2では状態sから状態s’にGUIを遷移させるために、実行パスを利用する。実行パスとは、上記処理による一連の自動操作によって発生した状態遷移の有限列のことである。例えば発生した状態遷移がt1,t2,t3,…,tnであるならば、実行パスはt123…tnと表現できる。非特許文献2では、初期のGUI状態から自動操作によってアプリケーションが終了するまでの状態遷移列を1つの実行パスとして保存する(再びアプリケーションが再起動されて自動操作された場合には別の実行パスとして保存する)。このように蓄積された実行パスの集合からパス(部分的な状態遷移列)ti…tjを抽出する。ただし、tiの操作前の状態はsで、tjの操作後の状態はs’でなければならない。さらに、任意の1≦i≦n−1に対して、状態遷移tiの操作後の状態とti+1の操作前の状態が等しい必要がある。例えば、状態s1からs2へのパスは(s1,ラジオボタン2,s2)となる。パスの状態遷移tiからtjまでのGUI要素を順次自動操作することでGUIの状態をs’に遷移させることができる。非特許文献2は前述までの処理により非特許文献1よりも精密な状態遷移グラフを取得することができる。 In Non-Patent Document 2, an execution path is used to transition the GUI from the state s to the state s ′. An execution path is a finite sequence of state transitions generated by a series of automatic operations by the above processing. For example t 1 state transition occurred is, t 2, t 3, ... , if a t n, the execution path can be represented as t 1 t 2 t 3 ... t n. In Non-Patent Document 2, the state transition sequence from the initial GUI state until the application is terminated by automatic operation is saved as one execution path (if the application is restarted again and automatically operated, another execution path is stored). Save as). Paths (partial state transition sequences) t i ... T j are extracted from the set of execution paths accumulated in this way. However, the state before the operation of t i must be s, and the state after the operation of t j must be s ′. Furthermore, for any 1 ≦ i ≦ n−1, the state after the operation of the state transition t i needs to be equal to the state before the operation of t i + 1 . For example, the path from the state s 1 to s 2 is (s 1 , radio button 2, s 2 ). The GUI state can be transitioned to s ′ by automatically automatically manipulating the GUI elements from the path state transitions t i to t j . Non-patent document 2 can acquire a more precise state transition graph than non-patent document 1 by the processing described above.

非特許文献2では、自動操作の過程で出現するGUIの状態に対して、網羅的にGUI要素を操作することで精密な状態遷移グラフを取得する。よって状態遷移グラフを得るまでの処理時間は出現するGUIの状態の数に対して比例増加する。出現しうるGUIの状態数は、GUIを構成するGUI要素の数に対して指数的に増加するため、結果として処理時間はGUI要素の数に対して指数増加し、GUI要素の数が多いアプリケーションに適用するためには対策が必要となる。非特許文献2ではこの処理時間増加への対応として、自動操作処理の並行化が述べられている。図10で自動操作の並行化を説明する。並行化するためには、まずテスト対象アプリケーションが動作する端末を複数用意する。非特許文献2の自動操作装置は、用意された複数の端末からアプリケーションのGUI状態を取得し、それぞれの端末のGUI状態に合わせて未操作のGUI要素を自動操作する。近年のCPUやOSはマルチスレッディングに対応しており複数の端末のGUI状態取得や自動操作を並行処理することが可能である。このようにテスト対象アプリケーションが動作する端末を増加させることで、網羅的な自動操作を並行化し処理時間を短縮化することができる。   In Non-Patent Document 2, a precise state transition graph is acquired by exhaustively manipulating GUI elements with respect to a GUI state appearing in the course of automatic operation. Accordingly, the processing time until the state transition graph is obtained increases in proportion to the number of GUI states that appear. The number of GUI states that can appear exponentially increases with respect to the number of GUI elements that constitute the GUI. As a result, the processing time increases exponentially with respect to the number of GUI elements, and the number of GUI elements increases. Measures are required to apply to the above. Non-Patent Document 2 describes parallelization of automatic operation processing as a response to this increase in processing time. The parallelization of automatic operation will be described with reference to FIG. In order to make parallel, first, a plurality of terminals on which the test target application operates are prepared. The automatic operation device of Non-Patent Document 2 acquires the GUI state of an application from a plurality of prepared terminals, and automatically operates an unoperated GUI element in accordance with the GUI state of each terminal. CPUs and OSs in recent years are compatible with multi-threading, and GUI status acquisition and automatic operation of a plurality of terminals can be performed in parallel. By increasing the number of terminals on which the test target application operates in this way, comprehensive automatic operations can be performed in parallel, and the processing time can be shortened.

A. Memon, I. Banerjee, A. Nagarajan, "GUI Ripping: Reverse Engineering of Graphical User Interfaces for Testing", In proc. of the 10th Working Conference on Reverse Engineering (WCRE 2003), IEEE, pp.260-269, 2003A. Memon, I. Banerjee, A. Nagarajan, "GUI Ripping: Reverse Engineering of Graphical User Interfaces for Testing", In proc. Of the 10th Working Conference on Reverse Engineering (WCRE 2003), IEEE, pp.260-269, 2003 中島、増田、高橋、“網羅的な操作と操作ログ検索によるGUIテストの自動化手法の提案”、信学技法、Vol.112、No.378、電子情報通信学会、pp.13-18、2013Nakajima, Masuda, Takahashi, “Proposal of automated GUI test method by comprehensive operation and operation log search”, IEICE Tech., Vol.112, No.378, IEICE, pp.13-18, 2013

非特許文献2の並行化の問題点は、このような単純な方式の並行化では、端末数の増加に対して、処理時間の短縮が実現できない点である。その原因は前述の表示されているGUI状態sで未操作のGUI要素が存在しない場合の処理にある。非特許文献2では、このとき、状態sから未操作のGUI要素が存在する状態s’へのパスをそれまで蓄積した実行パスから抽出する。例えば、表示されているGUI状態がsである端末が複数ある場合に、マルチスレッディングで単純に自動操作処理を並行化すると、それらの端末に対して同一のパスが抽出されることになる。同一のパスは最終的な目的状態である未操作のGUI要素が存在する状態s’も同じであるため、それぞれの端末のGUIをパスに沿って自動操作すると、それぞれGUIの状態がs’になる。状態s’に未操作のGUI要素が十分存在すれば、それぞれの端末で未操作のGUI要素を操作することが可能である。しかし、もし未操作のGUI要素が十分に存在しなければ、いくつかの端末では未操作のGUI要素を操作することができるが、残りの端末では未操作のGUI要素が存在しなくなってしまい、パスの抽出やパスに沿っての自動操作処理が無駄となってしまう。   The problem with the parallelization of Non-Patent Document 2 is that the processing time cannot be shortened with the increase in the number of terminals by such a simple parallelization. The cause lies in the processing in the case where there is no GUI element not yet operated in the displayed GUI state s. In Non-Patent Document 2, at this time, the path from the state s to the state s ′ where an unoperated GUI element exists is extracted from the execution paths accumulated so far. For example, when there are a plurality of terminals whose GUI state is “s”, if the automatic operation process is simply made parallel by multithreading, the same path is extracted for those terminals. Since the same path has the same state s ′ where there is an unoperated GUI element that is the final target state, when the GUI of each terminal is automatically operated along the path, the GUI state changes to s ′. Become. If there are enough unoperated GUI elements in the state s', it is possible to operate the unoperated GUI elements at each terminal. However, if there are not enough unoperated GUI elements, some terminals can operate the unoperated GUI elements, but the remaining terminals no longer have the unoperated GUI elements, Path extraction and automatic operation processing along the path are wasted.

例えば、図9で具体的に説明する。今、並行化のためにテスト対象アプリケーションが動作する端末が3端末存在し、それぞれの端末のテスト対象アプリケーションが状態s1であると仮定する。このとき、単純に処理をマルチスレッディングで処理すると未操作のGUI要素が存在する状態へのパスとして、それぞれの端末に対してパス(s1,ラジオボタン2,s2)が抽出される。しかし状態s2には図9が示すように2つしか未操作のGUI要素は存在しない。したがって、それぞれの端末でパスに沿って自動操作してGUIを状態s2にしても、2つの端末では未操作のGUI要素を自動操作できるが、残り1つの端末では未操作のGUI要素が存在しないことになってしまい無駄な処理となる。このように端末数を増加させても、未操作のGUI要素を自動操作できない端末が増加してしまい、処理時間が短縮化できない。 For example, this will be specifically described with reference to FIG. Now, assume that there are three terminals on which the test target application operates for parallel processing, and the test target application of each terminal is in the state s 1 . At this time, if the processing is simply performed by multithreading, a path (s 1 , radio button 2, s 2 ) is extracted for each terminal as a path to a state in which an unoperated GUI element exists. However, as shown in FIG. 9, there are only two GUI elements that have not been operated in the state s 2 . Therefore, even if the GUI is in the state s 2 by automatically operating along the path at each terminal, the GUI elements that are not operated can be automatically operated on the two terminals, but there are GUI elements that are not operated on the remaining one terminal. This is a wasteful process. Even if the number of terminals is increased in this way, the number of terminals that cannot automatically operate unoperated GUI elements increases, and the processing time cannot be shortened.

本発明は上記事情に鑑みてなされたものであり、その目的とするところは、GUIの状態に対して網羅的に自動操作する技術において、複数のテスト対象アプリケーションが動作する端末を多数用意して並行的に自動操作する場合の、GUIの状態遷移グラフの生成の処理時間を短縮化することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to prepare a large number of terminals on which a plurality of test target applications operate in a technology for comprehensively automatically operating the GUI state. The purpose is to shorten the processing time for generating a GUI state transition graph in the case of automatic operation in parallel.

上記目的を達成するために、本願発明は、複数の端末上で動作するテスト対象アプリケーションのグラフィカルユーザインタフェース(GUI)の状態を網羅的に自動操作する方法であって、記憶手段に予め記憶した起動ファイルを複数の端末でそれぞれ実行することにより各端末においてテスト対象アプリケーションを起動させる第1のステップを備え、更に、各端末に対してそれぞれ、端末の表示手段に表示されたテスト対象アプリケーションのGUI状態を取得する第2のステップと、表示されたGUIの状態がこれまで取得したことのない場合に該GUI状態において操作可能なすべてのGUI要素を取得する第3のステップと、テスト対象アプリケーションが終了した状態であった場合に、起動ファイルを実行することでテスト対象アプリケーションを再起動し、表示されたGUIの状態に対して再帰的に処理を継続する第4のステップと、表示されたGUIの状態において未操作のGUI要素が存在する場合に、該GUI要素を自動操作してテスト対象アプリケーションのGUIを状態遷移させ、遷移後の状態に対して処理を再帰的に継続する第5のステップと、表示されたGUIの状態において未操作のGUI要素が存在せず且つこれまで取得した他のGUIの状態に未操作のGUI要素が存在する場合に、表示されたGUIの状態から未操作のGUI要素が存在するGUIの状態(目標状態)へ到達するパスを抽出し、該目標状態に状態を遷移させたときに未操作のGUI要素が確実に存在するかを判定し、存在しないと判定しない場合には他の目標状態へパスを抽出して前記判定処理を再度行う第6のステップと、抽出されたパスに沿ってGUI要素を自動操作することでGUIを未操作のGUI要素が存在する状態に変化させ、変化した状態に対して処理を再帰的に継続する第7のステップと、取得したすべてのGUIの状態において未操作のGUI要素が存在しない場合に処理を終了させる第8のステップとを、各端末間で並行して処理することを特徴とする。   In order to achieve the above object, the present invention is a method for comprehensively and automatically operating the state of a graphical user interface (GUI) of a test target application operating on a plurality of terminals, which is stored in advance in a storage means. A first step of starting a test target application in each terminal by executing the file on each of the plurality of terminals; and further, the GUI state of the test target application displayed on the display means of the terminal for each terminal The second step of acquiring the GUI, the third step of acquiring all the GUI elements that can be operated in the GUI state when the displayed GUI state has never been acquired, and the test target application ends. If this is the case, run the startup file to test The fourth step of restarting the application and recursively processing the displayed GUI state, and when there is an unoperated GUI element in the displayed GUI state, A fifth step in which the GUI of the test target application is automatically transitioned and the process is recursively continued with respect to the state after the transition, and there is no GUI element not yet operated in the displayed GUI state In addition, when there is an unoperated GUI element in the other GUI states acquired so far, the path that reaches the GUI state (target state) where the unoperated GUI element exists is extracted from the displayed GUI state. When the state is changed to the target state, it is determined whether an unoperated GUI element is surely present. If it is not determined that there is not, a path to another target state is determined. And the sixth step of performing the determination process again and automatically operating the GUI element along the extracted path to change the GUI to a state in which there is an unoperated GUI element. A seventh step for recursively continuing the process and an eighth step for terminating the process when there is no unoperated GUI element in all the obtained GUI states are processed in parallel between the terminals. It is characterized by doing.

本発明の好適な態様の一例としては、前記第6のステップにおいては、目標状態までのパスを抽出した際に、自処理に係る端末において該目標状態まで状態を遷移させることを示す目標状態管理情報を各並行処理で共有の記憶手段に記憶するとともに、該記憶処理から判定処理までの間は目標状態管理情報の記憶手段への書き込み処理を並行処理間で排他制御することを特徴とするものが挙げられる。   As an example of a preferred aspect of the present invention, in the sixth step, when a path to a target state is extracted, target state management indicating that a state transitions to the target state in a terminal related to its own processing The information is stored in the shared storage means in each parallel process, and the writing process to the storage means of the target state management information is exclusively controlled between the parallel processes during the period from the storage process to the determination process. Is mentioned.

さらに、本発明の好適な態様の一例としては、目標状態管理情報は端末の識別子と目標状態の組からなり、前記第1のステップの後に各端末について端末の識別子と空値の組を目標状態管理情報として記憶手段に記憶し、前記第6のステップにおいては、目標状態までのパスを抽出した際に目標管理情報を自処理に係る端末の識別子と目標状態の組に書き換え、目標管理情報として自処理に係る目標状態と同じ目標状態を持つ端末の識別子の数と、該目標状態における未操作のGUI要素の数とに基づき前記判定処理を行うことを特徴とするものが挙げられる。   Furthermore, as an example of a preferred aspect of the present invention, the target state management information includes a pair of a terminal identifier and a target state, and after the first step, a pair of a terminal identifier and a null value is set for each terminal after the first step. In the sixth step, when the path to the target state is extracted, the target management information is rewritten to the set of the identifier of the terminal related to the self-processing and the target state, as target management information. What is characterized in that the determination process is performed based on the number of identifiers of terminals having the same target state as the target state related to the self-processing and the number of unoperated GUI elements in the target state.

本発明によれば、GUIの状態に対して網羅的に自動操作する技術において、複数のテスト対象アプリケーションが動作する端末を多数用意して並行的に自動操作する場合の、GUIの状態遷移グラフの生成の処理時間を短縮化することができる。   According to the present invention, in the technology for comprehensively automatically operating the GUI state, a GUI state transition graph in the case where a large number of terminals on which a plurality of test target applications operate is prepared and automatically operated in parallel is provided. The generation processing time can be shortened.

GUIの一例An example of GUI 図1の初期のGUIの各要素の状態の例Example of the state of each element of the initial GUI of FIG. GUIの状態遷移の一例Example of GUI state transition GUIの状態遷移の一例Example of GUI state transition GUIの状態遷移の一例Example of GUI state transition GUIの状態遷移の一例Example of GUI state transition GUIの状態遷移の一例Example of GUI state transition GUIの状態遷移の一例Example of GUI state transition 状態遷移グラフの一例Example of state transition graph 自動操作の並行化を説明するシステム構成図System configuration diagram explaining parallelization of automatic operation 本実施の形態に係るグラフィカルユーザインタフェースの状態装置の構成図Configuration diagram of state device of graphical user interface according to the present embodiment 目標状態管理部のデータの一例Example of target state management department data 網羅操作制御部の動作を説明するフローチャートFlow chart for explaining the operation of the comprehensive operation control unit 網羅操作制御部の動作を説明するフローチャートFlow chart for explaining the operation of the comprehensive operation control unit 網羅操作制御部の動作を説明するフローチャートFlow chart for explaining the operation of the comprehensive operation control unit 網羅操作制御部の動作を説明するフローチャートFlow chart for explaining the operation of the comprehensive operation control unit 網羅操作制御部の動作を説明するフローチャートFlow chart for explaining the operation of the comprehensive operation control unit 目標状態管理部のデータの一例Example of target state management department data 実施例に係る自動操作装置のシステム構成例System configuration example of automatic operation apparatus according to embodiment 実施例に係る目標状態管理部のデータの一例An example of data of the target state management unit according to the embodiment 実施例に係る目標状態管理部のデータの一例An example of data of the target state management unit according to the embodiment 実施例に係る目標状態管理部のデータの一例An example of data of the target state management unit according to the embodiment

本発明の一実施の形態に係るグラフィカルユーザインタフェースの網羅的な並行化自動操作方法を実施する自動操作装置について図11を参照して説明する。ここでは周知のコンピュータ上に実現した例を示すもので、図中、1は入力装置、2はコンピュータ本体、3は記憶装置、4は表示装置である。   An automatic operation apparatus that implements an exhaustive parallel automatic operation method for a graphical user interface according to an embodiment of the present invention will be described with reference to FIG. Here, an example realized on a known computer is shown. In the figure, 1 is an input device, 2 is a computer main body, 3 is a storage device, and 4 is a display device.

入力装置1は、キーボード、マウス等からなり、ユーザがコンピュータ本体2に所定の情報、ここでは起動ファイルを入力できる。また入力装置1は、テスト対象アプリケーションが動作する端末の識別子を登録、削除できる。端末の識別子はホスト名やあるいはIPネットワークで接続された端末であればIPアドレス等でよい。この端末の識別子が入力装置から登録された場合は記憶装置3に追加され、入力装置から削除される場合は記憶装置3から削除される。   The input device 1 includes a keyboard, a mouse, and the like, and a user can input predetermined information, here, a startup file to the computer main body 2. The input device 1 can register and delete the identifier of the terminal on which the test target application operates. The terminal identifier may be a host name or an IP address if the terminal is connected via an IP network. When the identifier of this terminal is registered from the input device, it is added to the storage device 3, and when it is deleted from the input device, it is deleted from the storage device 3.

記憶装置3は、入力装置1から入力された端末の識別子のリストと、網羅操作制御部5が実施する図13〜図17の手続きの出力結果であるGUI状態の集合Sと状態遷移の集合T、実行パスの集合Pを記憶保存するとともに、各種処理において必要な情報の一時記憶を行う装置である。なお後述するように、網羅操作制御部5による処理は、テスト対象アプリケーションを実行する端末毎にマルチスレッドで実行される。そして記憶装置3に記憶保存されるGUI状態の集合Sと状態遷移の集合T、実行パスの集合Pは、各スレッドで共有される共有リソースである点に留意されたい。また、各スレッドが該共有リソースのデータを追加・削除・参照する場合には、排他ロックをかけて同時に複数のスレッドが共有リソースに操作できないように制御する点にも留意されたい。   The storage device 3 includes a list of terminal identifiers input from the input device 1, a set of GUI states S and a set of state transitions T that are output results of the procedures of FIGS. 13 to 17 performed by the covering operation control unit 5. The apparatus stores and saves a set P of execution paths, and temporarily stores information necessary for various processes. As will be described later, the processing by the covering operation control unit 5 is executed in multi-threads for each terminal that executes the test target application. It should be noted that the GUI state set S, the state transition set T, and the execution path set P stored and stored in the storage device 3 are shared resources shared by the threads. It should also be noted that when each thread adds, deletes, or refers to the data of the shared resource, an exclusive lock is applied so that a plurality of threads cannot be operated on the shared resource at the same time.

表示装置4は、液晶ディスプレイ、CRT等画像表示装置等からなり、記憶装置3に保存されている端末の識別子のリストやGUI状態の集合Sと状態遷移の集合T、実行パスの集合Pの内容を表示することができる。また状態遷移グラフ<S,T>を図形式で表示することができる。   The display device 4 includes an image display device such as a liquid crystal display and a CRT, and the contents of a list of terminal identifiers, a GUI state set S, a state transition set T, and an execution path set P stored in the storage device 3. Can be displayed. Further, the state transition graph <S, T> can be displayed in a diagram form.

コンピュータ本体2は、各装置を制御するとともに、網羅操作制御部5、GUI状態取得部6、GUI自動操作部7、パス集合探索部8、目標状態管理部9を構成する。なお、コンピュータ本体2の各部は、ハードウェアにより構成してもよいし、コンピュータ本体2にプログラムをインストールすることによって構成してもよい。なお該プログラムは、記録媒体に記録することも、ネットワークを通して提供することも可能である。   The computer main body 2 controls each device and constitutes a comprehensive operation control unit 5, a GUI state acquisition unit 6, a GUI automatic operation unit 7, a path set search unit 8, and a target state management unit 9. Each unit of the computer main body 2 may be configured by hardware, or may be configured by installing a program in the computer main body 2. The program can be recorded on a recording medium or provided through a network.

網羅操作制御部5は、テスト対象アプリケーションの全てのGUIの状態を網羅的に取得する処理を制御するものである。網羅操作制御部5は、入力装置1より与えられた起動ファイルを、ネットワーク等によりコンピュータ本体2と接続された各端末で実行することで該端末においてテスト対象アプリケーションを起動し、GUI状態取得部6によりGUIの状態を取得し、GUI自動操作部7により未操作のGUI要素を自動操作する。この自動操作によってGUI状態が遷移するため、遷移したGUIの状態に対してこれらの処理を再帰的に繰り返す。該網羅操作制御部5による処理は、テスト対象アプリケーションを実行する端末毎にマルチスレッドで実行される。網羅操作制御部5の動作については後述する。   The covering operation control unit 5 controls processing for comprehensively acquiring the states of all GUIs of the test target application. The comprehensive operation control unit 5 executes the activation file given from the input device 1 on each terminal connected to the computer main body 2 via a network or the like, thereby activating the test target application on the terminal, and the GUI state acquisition unit 6 The GUI state is acquired by the above, and the GUI automatic operation unit 7 automatically operates the unoperated GUI element. Since the GUI state transitions by this automatic operation, these processes are recursively repeated for the transitioned GUI state. The processing by the covering operation control unit 5 is executed in multithread for each terminal that executes the test target application. The operation of the covering operation control unit 5 will be described later.

GUI状態取得部6は、ネットワーク等によりコンピュータ本体2と接続された各端末で動作するテスト対象アプリケーションのGUIの状態を取得することができる。GUI状態取得部6は、網羅操作制御部5が図13〜図17の手続きを実施するにあたって、ステップS5、S696、S69954において呼び出される。   The GUI state acquisition unit 6 can acquire the state of the GUI of the test target application that runs on each terminal connected to the computer main body 2 via a network or the like. The GUI status acquisition unit 6 is called in steps S5, S696, and S69954 when the covering operation control unit 5 performs the procedures of FIGS.

GUI自動操作部7は、網羅操作制御部5が指定するGUI要素をネットワーク等によりコンピュータ本体2と接続された各端末で動作するテスト対象アプリケーションのGUIに対して自動操作することができる。GUI自動操作部7は、網羅操作制御部5が図13〜図17の手続きを実施するにあたって、ステップS695、S69953において呼び出される。   The GUI automatic operation unit 7 can automatically operate the GUI element specified by the covering operation control unit 5 on the GUI of the test target application that operates on each terminal connected to the computer main body 2 via a network or the like. The GUI automatic operation unit 7 is called in steps S695 and S69953 when the covering operation control unit 5 performs the procedures of FIGS.

パス集合探索部8は、網羅操作制御部5が指定するGUIの状態から未操作のGUI要素が存在する状態へのパスを探索する。パス集合探索部8は、網羅操作制御部5が図13〜図17の手続きを実施するにあたって、ステップS6991で呼び出される。このステップでは実行パスの集合からパスを探索すると記載しているが、例えば、それまで蓄積した状態遷移グラフ<S,T>上からも同様のパスを探索してもよい。実行パスや状態遷移グラフからのパスの探索方法は公知の技術である。   The path set search unit 8 searches for a path from a GUI state designated by the covering operation control unit 5 to a state where an unoperated GUI element exists. The path set search unit 8 is called in step S6991 when the covering operation control unit 5 performs the procedures of FIGS. In this step, it is described that a path is searched from a set of execution paths. For example, a similar path may be searched from the state transition graph <S, T> accumulated so far. The path search method from the execution path and the state transition graph is a known technique.

目標状態管理部9は、記憶装置3に登録された端末の識別子と目標状態のペアをリスト形式で保持する。目標状態管理部9で保持するリストのデータ構造の一例を図12に示す。図12は、端末の識別子がIPアドレスであり端末数が3のときであり、各端末の目標状態が空値である場合の一例である。網羅操作制御部5が図13〜図17の手続きをコンピュータ本体2と接続された端末ごとにマルチスレッドで実行する際に、各スレッドがステップS6991で発見したパスpの最後の状態遷移の操作後の状態を、ステップS6993にて該当端末の識別子の目標状態として登録する。ここで、目標状態管理部9で保持するリストは、記憶装置3に記憶保存されるGUI状態の集合Sと状態遷移の集合T、実行パスの集合Pと同様に、各スレッドで共有される共有リソースである点に留意されたい。また、各スレッドが該共有リソースのデータを追加・削除・参照する場合には、排他ロックをかけて同時に複数のスレッドが共有リソースに操作できないように制御する点にも留意されたい。   The target state management unit 9 holds a pair of terminal identifiers and target states registered in the storage device 3 in a list format. An example of the data structure of the list held in the target state management unit 9 is shown in FIG. FIG. 12 shows an example when the terminal identifier is an IP address and the number of terminals is 3, and the target state of each terminal is a null value. When the comprehensive operation control unit 5 executes the procedures of FIGS. 13 to 17 in a multi-thread manner for each terminal connected to the computer main body 2, the operation after the last state transition of the path p found by each thread in step S6991 is performed. Is registered as the target state of the identifier of the corresponding terminal in step S6993. Here, the list held by the target state management unit 9 is shared by each thread in the same manner as the GUI state set S, state transition set T, and execution path set P stored and stored in the storage device 3. Note that this is a resource. It should also be noted that when each thread adds, deletes, or refers to the data of the shared resource, an exclusive lock is applied so that a plurality of threads cannot be operated on the shared resource at the same time.

網羅操作制御部5は、図13の手続きを実施する。図13の手続きでは、記憶装置3に登録された各端末に対して、入力装置1より与えられた起動ファイルを実行することで、それぞれの端末でテスト対象アプリケーションを起動し(ステップS1)、初期のGUI画面をそれぞれの端末に表示する。さらにGUIの状態の集合S、状態遷移の集合T、実行パスの集合Pを空集合に設定する(ステップS2)。その後、記憶装置3に登録された端末の識別子と目標状態のペアを目標状態管理部9に登録する。このとき目標状態は空値で登録する。なお前述のように、集合S,T,Pおよび目標状態管理部9に登録される情報(端末の識別子と目標状態のペア)はマルチスレッディングで並行的に自動操作処理を実施する際の共有リソースとなり、それぞれのスレッドから同じ情報にアクセスする。また、これ以降の処理は端末ごとにマルチスレッドで処理されるため、集合S,T,P、目標状態管理部9に登録される情報以外の変数等はスレッドごとに用意され、各スレッドで独自の値が代入されることに注意されたい。また、スレッドが前述の共有リソースにデータを追加・削除・参照する場合には、排他ロックをかけて同時に複数のスレッドが共有リソースに操作できないように制御する。次いで実行パスπに、長さ0の列を意味する定数εを設定する(ステップS4)。GUI状態取得部6を利用して現在表示されているGUIの状態を取得し、これをs0とおく。また現在の状態を表す変数sにs0を代入する(ステップS5)。最後に図14の手続きを実施する(ステップS6)。 The comprehensive operation control unit 5 performs the procedure of FIG. In the procedure of FIG. 13, by executing the activation file given from the input device 1 for each terminal registered in the storage device 3, the test target application is activated on each terminal (step S1), Are displayed on each terminal. Further, the GUI state set S, the state transition set T, and the execution path set P are set as empty sets (step S2). Thereafter, the pair of the identifier of the terminal registered in the storage device 3 and the target state is registered in the target state management unit 9. At this time, the target state is registered as a null value. As described above, the information (a pair of terminal identifier and target state) registered in the sets S, T, and P and the target state management unit 9 becomes a shared resource when performing automatic operation processing in parallel with multithreading. , Access the same information from each thread. In addition, since the subsequent processing is processed in a multi-thread manner for each terminal, variables other than information registered in the sets S, T, P and target state management unit 9 are prepared for each thread, and each thread has its own Note that the value of is assigned. In addition, when a thread adds, deletes, or references data to the above-described shared resource, an exclusive lock is applied so that a plurality of threads cannot operate on the shared resource at the same time. Next, a constant ε representing a zero-length column is set in the execution path π (step S4). The GUI state acquisition unit 6 is used to acquire the currently displayed GUI state, and this is set as s 0 . Further, s 0 is substituted for a variable s representing the current state (step S5). Finally, the procedure of FIG. 14 is performed (step S6).

図14の手続きにおいては、まず、現在の状態sが状態の集合Sに含まれるか調べる(ステップS61)。もし含まれない場合には、現在の状態sを集合Sに追加する(ステップS62)。さらに現在の状態sから操作可能なGUI要素の集合Eを抽出する(ステップS63)。そして集合Eに含まれるGUI要素をeとするとき、すべてのGUI要素に対して、状態遷移(s,e,TBD)を状態遷移の集合Tに追加する(ステップS64,S65,S66)。このような状態遷移の追加処理が完了した場合、あるいは、ステップS61にて現在の状態sが状態の集合Sに含まれている場合は、状態遷移の集合Tに操作後の状態がTBDである状態遷移が存在しないか調べる(ステップS67)。存在しない場合は、網羅的な自動操作が完了したことになるため、それまで蓄積したGUI状態の集合S、状態遷移の集合T、実行パスの集合Pを記憶装置に出力し(ステップS68)、手続きを終了する。ステップS67にてTBDである状態遷移が存在する場合は、図15の手続きを実行する(ステップS69)。   In the procedure of FIG. 14, it is first checked whether or not the current state s is included in the state set S (step S61). If not, the current state s is added to the set S (step S62). Further, a set E of operable GUI elements is extracted from the current state s (step S63). When the GUI element included in the set E is e, state transitions (s, e, TBD) are added to the state transition set T for all GUI elements (steps S64, S65, S66). When such state transition addition processing is completed, or when the current state s is included in the state set S in step S61, the state after operation in the state transition set T is TBD. It is checked whether there is a state transition (step S67). If it does not exist, it means that the comprehensive automatic operation has been completed. Therefore, the accumulated GUI state set S, state transition set T, and execution path set P are output to the storage device (step S68). End the procedure. If there is a state transition that is TBD in step S67, the procedure of FIG. 15 is executed (step S69).

図15の手続きにおいては、まずアプリケーションが終了していて、GUIが何も表示されていないか調べる(ステップS691)。もし終了している場合には、起動ファイルを使ってアプリケーションを再起動する(ステップS692)。さらに、実行パスπを実行パスの集合Pへ追加し、πに長さが0の列を意味する定数εを代入し、現在の状態を示す変数sに初期状態s0を代入する(ステップS693)。そして図14の手続きのステップS61に戻る。もしステップS691でアプリケーションが終了していない場合には、変数sの示す現在の状態において未操作のGUI要素が存在するか調べる。すなわち状態遷移の集合Tの中に操作前の状態がsで、操作後の状態がTBDであるような状態遷移tを探し出す(ステップS694)。状態遷移tのGUI要素をeとすれば、t=(s,e,TBD)と表現することができる。このような状態遷移tが存在する場合、GUI自動操作部7によってtのGUI要素eを自動操作し(ステップS695)、GUIを遷移させる。さらに遷移したGUIの状態をGUI状態取得部6によって取得し、変数s’に代入する(ステップS696)。この処理によって状態遷移tの操作後の状態が決定するため、tを(s,e,s’)で置き換える(ステップS697)。実行パスπの末尾に状態遷移tを追加し、現在の状態を示す変数sをs’に置き換える(ステップS698)。そして図14の手続きのステップS61へ戻る。もし、ステップS694にて、状態遷移tが発見できない場合には、図16の手続きを実施する(ステップS699)。 In the procedure of FIG. 15, it is first checked whether the application is terminated and no GUI is displayed (step S691). If completed, the application is restarted using the startup file (step S692). Further, the execution path π is added to the set P of execution paths, a constant ε meaning a column having a length of 0 is substituted for π, and the initial state s 0 is substituted for the variable s indicating the current state (step S693). ). And it returns to step S61 of the procedure of FIG. If the application has not ended in step S691, it is checked whether there is an unoperated GUI element in the current state indicated by the variable s. That is, a state transition t in which the state before the operation is s and the state after the operation is TBD is searched for in the state transition set T (step S694). If the GUI element of the state transition t is e, it can be expressed as t = (s, e, TBD). When such a state transition t exists, the GUI automatic operation unit 7 automatically operates the GUI element e of t (step S695), and makes the GUI transition. Further, the state of the transitioned GUI is acquired by the GUI state acquisition unit 6 and substituted into the variable s ′ (step S696). Since the state after the operation of the state transition t is determined by this process, t is replaced with (s, e, s ′) (step S697). A state transition t is added to the end of the execution path π, and the variable s indicating the current state is replaced with s ′ (step S698). And it returns to step S61 of the procedure of FIG. If the state transition t cannot be found in step S694, the procedure of FIG. 16 is performed (step S699).

図16の手続きにおいては、パス集合探索部8によって実行パスの集合P∪{π}から同様のパスpを探索する(ステップS6991)。次いでパスpが発見できたか調べる(ステップS6992)。もし発見できなければ、変数sの示す状態(ただし、アプリケーション再起動後の初期状態ではない)から状態s’へGUIを遷移することができない。よってアプリケーションを再起動して手続きを継続するために、図15のステップS692に戻る。もしパスpが発見できた場合には、パスpの最後の状態遷移(sl,el,sl‘)とし、目標状態管理部9で管理されている端末の識別子と目標状態のペアを、当該端末の識別子と状態sl’で書き換える(ステップS6993)。例えば、目標状態管理部9の端末の識別子と目標状態のペアが図12の状態であったときに、今、端末の識別子192.168.1.1の端末に対するスレッドでこの処理が実行された場合、192.168.1.1と空値のペアを、192.168.1.1と状態sl’のペアで書き換え、図18の状態になる。その後、目標状態管理部9の目標状態が状態sl’であるペアの数をN、集合Tの操作前の状態がsl’かつ操作後の状態が定数TBDである状態遷移の数をNTBDとし(ステップS6994)、N≦NTBDを判定する(ステップS6995)。もしN≦NTBDである場合は、パス集合探索部8によって発見したパスを利用して、状態sl’への遷移しようとする端末数(N)が、状態sl’の未操作のGUI要素の数(NTBD)以下であることになる。これは、パスに沿って自動操作して状態sl’へ到達したときに、確実に未操作のGUI要素が存在し、未操作のGUI要素を自動操作することができる。よって図17の手続きに進む。このような処理を実施することで、非特許文献2の問題点を解決することができる。もしN>NTBDである場合は、このまま状態をsl’に変化させても未操作のGUI要素が存在しない場合があるため、ステップS6993で目標状態管理部9に対して書き換えた端末の識別子と状態sl’のペアを、当該端末の識別子と空値とのペアに書き換える(ステップS6996)。そして再度ステップS6991へと戻り、別のパスを探索する。なお前述のステップS6993、S6994、S6995の一連の処理を実施するときは、目標状態管理部9の共有リソースである端末の識別子と目標状態のペアへの排他ロックを個々の処理で解除せず、これらのすべての処理が完了したときに排他ロックを解除する。 In the procedure of FIG. 16, the path set search unit 8 searches for a similar path p from the set of execution paths P∪ {π} (step S6991). Next, it is examined whether or not the path p has been found (step S6992). If it cannot be found, the GUI cannot be changed from the state indicated by the variable s (but not the initial state after the application is restarted) to the state s ′. Therefore, in order to restart the application and continue the procedure, the process returns to step S692 in FIG. If the path p can be found, the last state transition (s l , e l , sl ′) of the path p is set, and the pair of the terminal identifier and the target state managed by the target state management unit 9 is set. rewrites the identifier of the terminal and the state s l '(step S6993). For example, when the pair of the terminal identifier and the target state in the target state management unit 9 is in the state of FIG. 12, this processing is now executed in the thread for the terminal having the terminal identifier 192.168.1.1. In this case, the pair of 192.168.1.1 and the null value is rewritten with the pair of 192.168.1.1 and the state sl ′, and the state shown in FIG. 18 is obtained. Thereafter, the number of pairs whose target state of the target state management unit 9 is the state sl ′ is N, the number of state transitions before the operation of the set T is sl ′ and the state after the operation is a constant TBD is N TBD is set (step S6994), and N ≦ N TBD is determined (step S6995). If N ≦ N TBD , the number of terminals (N) trying to make a transition to the state s l ′ using the path discovered by the path set search unit 8 is an unoperated GUI in the state s l ′. This is less than the number of elements (N TBD ). This is because when there is an automatic operation along the path and the state s l ′ is reached, an unoperated GUI element is surely present, and the unoperated GUI element can be automatically operated. Therefore, the procedure proceeds to the procedure of FIG. By performing such processing, the problems of Non-Patent Document 2 can be solved. If N> N TBD , there is a case where an unoperated GUI element does not exist even if the state is changed to s l 'as it is, so that the terminal identifier rewritten to the target state management unit 9 in step S6993. and a pair of states s l ', rewrites the pair of the identifier and an empty value for the terminal (step S6996). Then, the process returns to step S6991 again to search for another path. When the series of processes of steps S6993, S6994, and S6995 described above is performed, the exclusive lock on the pair of the identifier and the target state, which is the shared resource of the target state management unit 9, is not released by each process. The exclusive lock is released when all these processes are completed.

図17の手続きでは、まずはパスpの長さが0でないか調べる(ステップS69951)。0でなければ、パスpの先頭の状態遷移をt=(st,et,st’)として取り出し(ステップS69952)、GUI自動操作部7がGUI要素etを操作する(ステップS69953)。それによってGUIが遷移するためGUI状態取得部6を利用してGUIの状態を取得し、現在の状態を示す変数sに代入する(ステップS69954)。さらにパスπの末尾に状態遷移(st,et,s)を追加し、状態遷移の集合Tへ状態遷移(st,et,s)を追加する(ステップS69955)。このとき変数sの示す現在の状態がGUI状態の集合Sに含まれている、あるいは、その状態において未操作のGUI要素が存在するか調べる(ステップS69956)。もしこの条件に合致しない場合には、ステップS69951に戻って、パスpの次の先頭を取り出しステップS69951からS69956を実行する。パスpに含まれていたすべての状態遷移に対してステップS69951からS69956を実行し、ステップS69951のステップでパスの長さが0になっていたら、パスpに沿ってGUI要素を自動操作しても、未操作のGUI要素を持つ状態へ到達できないことになる。よって図16のステップS6993で目標状態管理部9に対して書き換えた端末の識別子と状態sl’のペアを、当該端末の識別子と空値とのペアに書き換える(ステップS69957)。そしてテスト対象アプリケーションを再起動し処理を継続するために図16のステップS692へ戻る。 In the procedure of FIG. 17, first, it is checked whether the length of the path p is 0 (step S69951). If nonzero, removed state transition beginning of the path p t = (s t, e t, s t ') as (step S69952), GUI automatic operation unit 7 operates the GUI element e t (step S69953) . Accordingly, since the GUI transitions, the GUI state acquisition unit 6 is used to acquire the GUI state, and is substituted into the variable s indicating the current state (step S69954). Further state transition at the end of the path π (s t, e t, s) by adding a state transition to the set T of the state transition (s t, e t, s ) to add (step S69955). At this time, it is checked whether the current state indicated by the variable s is included in the GUI state set S or whether there is an unoperated GUI element in that state (step S69956). If this condition is not met, the process returns to step S69951, the next head of the path p is taken out, and steps S69951 to S69956 are executed. Steps S69951 to S69956 are executed for all the state transitions included in the path p. If the length of the path is 0 in the step S69951, the GUI element is automatically operated along the path p. However, it is impossible to reach a state having an unoperated GUI element. Therefore rewritten terminal identifier and a pair of states s l 'to the target state management unit 9 in step S6993 of FIG. 16, rewrites the pair of the identifier and an empty value for the terminal (step S69957). Then, the process returns to step S692 in FIG. 16 in order to restart the test target application and continue the processing.

もしパスpの先頭の状態遷移t=(st,et,st’)に対してステップS69951からS69956を実行し、GUI要素etを操作してGUIの状態が集合Sに含まれていない、あるいは、そのGUIの状態において未操作のGUI要素が存在する場合には、図16のステップS6993で目標状態管理部9に対して書き換えた端末の識別子と状態sl’のペアを、当該端末の識別子と空値とのペアに書き換える(ステップS69958)。そして図14のステップS61に戻り、再帰的に未操作のGUI要素を自動操作する。 If the beginning of the state transition t = path p (s t, e t, s t ') perform the steps S69951 S69956 respect, by operating the GUI element e t GUI state is included in the set S no, or if the non-operation GUI element is present in the state of the GUI is rewritten pairs terminal identifier and state s l 'to the target state management unit 9 in step S6993 of FIG. 16, the The terminal identifier is rewritten to a null value pair (step S69958). Then, the process returns to step S61 in FIG. 14 to automatically operate the GUI element that has not been operated recursively.

このように本発明により、GUIの状態に対して網羅的に自動操作する技術において、複数のテスト対象アプリケーションが動作する端末を用意して並行的に自動操作するときに、それぞれの端末で未操作のGUI要素を確実に自動操作させることができ、端末数の増加に応じてGUIの状態遷移グラフ生成の処理時間を短縮させることが可能になる。   As described above, according to the present invention, in the technology for comprehensively automatically operating the GUI state, when preparing a terminal on which a plurality of test target applications operate and performing automatic operation in parallel, no operation is performed on each terminal. The GUI element can be automatically operated reliably, and the processing time for generating the GUI state transition graph can be shortened as the number of terminals increases.

なお、上述した実施形態では、網羅操作制御部5、GUI状態取得部6、GUI自動操作部7、パス集合探索部8、目標状態管理部9をコンピュータ本体2上で実現した例を示したが、ハードウェアで実現してもよい。またこれら各装置が、適切な通信路で相互に接続された複数のハードウェア上に分散して存在し、相互に通信し合いながら実行することもできる。さらに、テスト対象アプリケーションを動作させる複数の端末はそれぞれ別個のハードウェアとして用意してもよいし、仮想端末や仮想OS等を利用して複数の端末を1つ又は複数のハードウェア上に仮想的に用意するようにしてもよいし、さらには本発明の自動操作装置と同一のハードウェア上に実装するようにしてもよい。すなわち、本発明の要旨の範囲内においては実装形態は不問である。   In the above-described embodiment, an example is shown in which the comprehensive operation control unit 5, the GUI state acquisition unit 6, the GUI automatic operation unit 7, the path set search unit 8, and the target state management unit 9 are realized on the computer main body 2. It may be realized by hardware. Each of these devices exists in a distributed manner on a plurality of pieces of hardware connected to each other via an appropriate communication path, and can be executed while communicating with each other. Furthermore, a plurality of terminals that operate the test target application may be prepared as separate hardware, or a plurality of terminals may be virtually installed on one or a plurality of hardware using a virtual terminal, a virtual OS, or the like. Or may be mounted on the same hardware as the automatic operation device of the present invention. That is, the mounting form is not required within the scope of the present invention.

本発明による網羅的なGUIの自動操作の実施例を示す。ここでのテスト対象アプリケーションは図1のように画面遷移するものとする。また本実施例では、図19に示すように、並行的に操作する端末数を3とし、各端末は自動操作装置としてのコンピュータ本体2とIPネットワークで接続されている。各端末のIPアドレスは、それぞれ192.168.1.1、192.168.1.2、192.168.1.3とする。   2 illustrates an example of comprehensive GUI automatic operation according to the present invention. Here, it is assumed that the screen of the test target application changes as shown in FIG. In this embodiment, as shown in FIG. 19, the number of terminals operated in parallel is set to 3, and each terminal is connected to a computer main body 2 as an automatic operation device by an IP network. The IP address of each terminal is 192.168.1.1, 192.168.1.2, and 192.168.1.3, respectively.

本発明では、まず入力装置1から図1のテスト対象アプリケーションを起動するファイル(スクリプト、バッチファイル)と各端末の識別子として192.168.1.1、192.168.1.2、192.168.1.3が入力され、記憶装置3に端末の識別子が追加される。   In the present invention, first, a file (script, batch file) for starting the application to be tested of FIG. 1 from the input device 1 and identifiers of each terminal as 192.168.1.1, 192.168.1.2, 192.168. .1.3 is input, and the identifier of the terminal is added to the storage device 3.

本発明では、網羅操作制御部5が図13〜図17の手続きを実施する。まず図13のステップS1にて起動ファイルを実行し各端末上でテストアプリケーションを起動する。次いでステップS2でGUI状態の集合S、状態遷移の集合T、実行パスの集合を空集合で初期化する。ステップS3では、目標状態管理部9に記憶装置3に記憶された各端末の識別子と空値のペアを登録する。その登録内容を図12に示す。これ以降の手続きは、端末ごとにマルチスレッディングによって並行的に実行される。   In the present invention, the covering operation control unit 5 performs the procedures of FIGS. First, in step S1 in FIG. 13, the activation file is executed to activate the test application on each terminal. In step S2, the GUI state set S, the state transition set T, and the execution path set are initialized as empty sets. In step S <b> 3, the identifier / empty value pair of each terminal stored in the storage device 3 is registered in the target state management unit 9. The registered contents are shown in FIG. Subsequent procedures are executed in parallel by multithreading for each terminal.

本実施例では、網羅操作制御部5が図13〜図17の手続きを各端末で並行的に実施した結果、集合S、Tそれぞれが図8の状態であると仮定する。また、各端末のテストアプリケーションの表示されているGUIの状態が各々s1であると仮定する。このとき、図8が示すように集合Tの操作前の状態がs1である状態遷移で遷移後の状態がTBDであるもの、すなわち未操作のGUI要素が存在しない。したがって、それぞれの端末に対するスレッドは、図16のステップS6991に進み、状態s1から未操作のGUI要素を持つ状態へのパスを探索する。各スレッドは同じアルゴリズムでパスを探索するため、ここでは各スレッド同じパスが取得でき、ここではそのパスを(s1,ラジオボタン2,s2)とする。 In the present embodiment, it is assumed that the sets S and T are in the state of FIG. 8 as a result of the cover operation control unit 5 performing the procedures of FIGS. 13 to 17 in parallel at each terminal. Further, it is assumed that the GUI state of the displayed test application of each terminal is s 1 . At this time, as shown in FIG. 8, the state before the operation of the set T is s 1 and the state after the transition is TBD, that is, there is no GUI element that has not been operated. Accordingly, the thread for each terminal proceeds to step S6991 in FIG. 16, and searches for a path from the state s 1 to a state having an unoperated GUI element. Since each thread searches for a path with the same algorithm, the same path can be acquired here for each thread, and here the path is (s 1 , radio button 2, s 2 ).

もし、このまま各スレッドが図18のステップS69951へと進み、このパスに沿って自動操作を実施すると、表示されるGUIの状態が3端末ともs2になる。図8の状態遷移の集合Tが示すように操作前の状態がs2であり、操作後の状態がTBDであるような遷移は2つしか存在しない。よって、例えば192.168.1.1と192.168.1.2の端末のGUI状態が192.168.1.3の端末より先にs2へと変化した場合、192.168.1.1と192.168.1.2の端末は未操作のGUI要素であるラジオボタン2とボタン1を操作できるが、192.168.1.3の端末がs2において未操作のGUI要素を自動操作しようとしても、該当のGUI要素が存在ないため、パスに沿って自動操作した処理が無駄になる。 If each thread proceeds to step S69951 in FIG. 18 as it is and automatic operation is performed along this path, the displayed GUI status is s 2 for all three terminals. As shown by the state transition set T in FIG. 8, there are only two transitions in which the state before the operation is s 2 and the state after the operation is TBD. Thus, for example, when the GUI state of the 192.168.1.1 and 192.168.1.2 terminals changes to s 2 before the 192.168.1.3 terminal, 192.168.1. 1 and 192.168.1.2 terminals can operate radio button 2 and button 1 which are non-operated GUI elements, but 192.168.1.3 terminals automatically operate unoperated GUI elements at s 2 Even if an attempt is made to perform an operation, since the corresponding GUI element does not exist, processing automatically operated along the path is wasted.

そこで本発明では、パスに沿って自動操作する前に、図16のステップS6993を実行する。すなわちパス(s1,ラジオボタン2,s2)の最後の状態遷移の操作後の状態s2を、端末の識別子とのペアとして目標状態管理部に登録する。マルチスレッディング処理は各スレッドの処理を同時に実施するわけでなく、厳密には逐次的に処理する。よって192.168.1.1に対するスレッドが最初にステップS6993を実行すると、目標状態管理部9の端末の識別子と目標状態のペアのリストは図20になる。目標状態管理部9の端末の識別子と目標状態のペアへの排他ロックは解除しないため、他のスレッドはステップS6993を実行できずに待機することになる。よって192.168.1.1に対するスレッドは、さらにステップS6994を実行する。目標状態管理部9の目標状態が状態s2であるペアの数N=1,状態s2の未操作のGUI要素の数NTBD=2なので、この場合ステップS6995においてN≦NTBDの判定を満たし、図17のステップS69951のステップへと進む。結果としてパスに沿って自動操作することで、未操作のGUI要素を自動操作することができる。192.168.1.1のスレッドが図17のステップS69951へと進んだ時点で、目標状態管理部9の端末の識別子と目標状態のペアへの排他ロックが解除される。 Therefore, in the present invention, step S6993 in FIG. 16 is executed before the automatic operation along the path. That is, the state s 2 after the operation of the last state transition of the path (s 1 , radio button 2, s 2 ) is registered in the target state management unit as a pair with the terminal identifier. In the multithreading process, the processing of each thread is not performed at the same time, but strictly, it is performed sequentially. Therefore, when the thread for 192.168.1.1 executes step S6993 for the first time, the list of terminal identifier / target state pairs in the target state management unit 9 is shown in FIG. Since the exclusive lock on the pair of the identifier of the terminal and the target state in the target state management unit 9 is not released, other threads cannot wait for step S6993 and wait. Therefore, the thread for 192.168.1.1 further executes step S6994. Since the number N of pairs whose target state is the state s 2 of the target state management unit 9 and the number N TBD of unoperated GUI elements in the state s 2 are N TBD = 2, in this case, N ≦ N TBD is determined in step S6995. Satisfies and proceeds to step S69951 in FIG. As a result, unoperated GUI elements can be automatically operated by automatically operating along the path. When the thread of 192.168.1.1 proceeds to step S69951 in FIG. 17, the exclusive lock on the pair of the terminal identifier and the target state in the target state management unit 9 is released.

次に192.168.1.2のスレッドがステップS6993を実行すると目標状態管理部9の端末の識別子と目標状態のペアのリストは図21(a)もしくは(b)になる。(a)は192.168.1.1のスレッドが状態s2において未操作のGUI要素をまだ操作していない状態の場合である。もし192.168.1.1のスレッドが状態s2において未操作のGUI要素を操作していれば、(b)となる。(a)の場合は、192.168.1.2のスレッドはステップS6994にて目標状態管理部9の目標状態が状態s2であるペアの数N=2,状態s2の未操作のGUI要素の数NTBD=2となるため、ステップS6995においてN≦NTBDの判定を満たし、図17のステップS69951へと進む。結果としてパスに沿って自動操作することで、未操作のGUI要素を自動操作することができる。また(b)の場合でも、ステップS6994にて目標状態管理部9の目標状態が状態s2であるペアの数N=1,192.168.1.1のスレッドが状態s2において未操作のGUI要素を操作しているので状態s2の未操作のGUI要素の数NTBD=1となり、ステップS6995においてN≦NTBDの判定を満たし、図17のステップS69951へと進む。結果として、結果としてパスに沿って自動操作することで、192.168.1.2のスレッドも未操作のGUI要素を自動操作することができる。192.168.1.2のスレッドが図17のステップS69951へと進んだ時点で、目標状態管理部9の端末の識別子と目標状態のペアへの排他ロックが解除される。 Next, when the thread of 192.168.1.2 executes step S6993, the list of terminal identifier / target state pairs in the target state management unit 9 is as shown in FIG. 21 (a) or (b). (A) shows a case of a state where the thread 192.168.1.1 has not yet operated the GUI elements unmanipulated in state s 2. If the 192.168.1.1 thread is operating an unoperated GUI element in state s 2 , (b) is obtained. The case of (a), the number N = 2, GUI unmanipulated state s 2 pairs thread 192.168.1.2 target state of the target state management section 9 in step S6994 is in the state s 2 Since the number of elements N TBD = 2, the determination of N ≦ N TBD is satisfied in step S6995, and the process proceeds to step S69951 in FIG. As a result, unoperated GUI elements can be automatically operated by automatically operating along the path. Even In the case of (b), the target state of the target state management section 9 at step S6994 the number N = 1,192.168.1.1 thread pair is a state s 2 has not been operated in the state s 2 Since the GUI element is operated, the number N TBD of unoperated GUI elements in the state s 2 becomes N TBD = 1, and the determination of N ≦ N TBD is satisfied in step S6995, and the process proceeds to step S69951 in FIG. As a result, by automatically operating along the path, the 192.168.1.2 thread can also automatically operate the GUI element that has not been operated. When the 192.168.1.2 thread proceeds to step S69951 in FIG. 17, the exclusive lock on the pair of the terminal identifier and the target state in the target state management unit 9 is released.

最後に192.168.1.3のスレッドがステップS6993を実行すると目標状態管理部9の端末の識別子と目標状態のペアのリストは図22になる。ただし、192.168.1.1、192.168.1.2のスレッドはまだ状態s2で未操作のGUI要素を操作していないものとする。192.168.1.3のスレッドはステップS6994にて目標状態管理部9の目標状態が状態s2であるペアの数N=3,状態s2の未操作のGUI要素の数NTBD=2となるため、ステップS6995においてN≦NTBDの判定を満たさない。よって、ステップS6996へと進んで、目標状態管理部9の自身の端末の識別子192.168.1.3と目標状態s2のペアを192.168.1.3と空値のペアに書き換える。このときの目標状態管理部9が管理する端末の識別子と目標状態のペアは図21の(a)となる。そしてステップS6991へと戻り、別の未操作のGUI要素を持つ状態へのパスを再度探索する。 Finally, when the thread of 192.168.1.3 executes step S6993, a list of terminal identifier / target state pairs in the target state management unit 9 is shown in FIG. However, it is assumed that the threads of 192.168.1.1 and 192.168.1.2 have not yet operated an unoperated GUI element in the state s 2 . In step S6994, the thread of 192.168.1.3 sets the number N of pairs whose target state of the target state management unit 9 is the state s 2 N = 3, the number of unoperated GUI elements in the state s 2 N TBD = 2. Therefore, the determination of N ≦ N TBD is not satisfied in step S6995. Therefore, the routine proceeds to step S6996, and rewrites the target state management unit 9 own terminal identifier 192.168.1.3 and target state s 2 pairs to a pair of 192.168.1.3 and null. The pair of the terminal identifier and the target state managed by the target state management unit 9 at this time is shown in FIG. Then, the process returns to step S6991 to search again for a path to a state having another unoperated GUI element.

このように192.168.1.3の端末に対するスレッドは、未操作のGUI要素が存在しない可能性がある状態s2へテスト対象アプリケーションのGUIを遷移させることなく、確実に未操作のGUI要素が存在する状態へ遷移することが可能となる。結果として、網羅的な自動操作による状態遷移グラフの生成時間を短縮化できる。 As described above, the thread for the terminal of 192.168.1.3 is surely set to an unoperated GUI element without causing the GUI of the application to be tested to transition to a state s 2 in which an unoperated GUI element may not exist. It is possible to make a transition to a state where there exists. As a result, it is possible to shorten the time for generating the state transition graph by comprehensive automatic operation.

1…入力装置、2…コンピュータ本体、3…記憶装置、4…表示装置、5…網羅操作制御部、6…GUI状態取得部、7…GUI自動操作部、8…パス集合探索部、9…目標状態管理部。   DESCRIPTION OF SYMBOLS 1 ... Input device, 2 ... Computer main body, 3 ... Memory | storage device, 4 ... Display apparatus, 5 ... Coverage operation control part, 6 ... GUI state acquisition part, 7 ... GUI automatic operation part, 8 ... Path set search part, 9 ... Target state management department.

Claims (6)

複数の端末上で動作するテスト対象アプリケーションのグラフィカルユーザインタフェース(GUI)の状態を網羅的に自動操作する方法であって、
記憶手段に予め記憶した起動ファイルを複数の端末でそれぞれ実行することにより各端末においてテスト対象アプリケーションを起動させる第1のステップを備え、
更に、各端末に対してそれぞれ、
端末の表示手段に表示されたテスト対象アプリケーションのGUI状態を取得する第2のステップと、
表示されたGUIの状態がこれまで取得したことのない場合に該GUI状態において操作可能なすべてのGUI要素を取得する第3のステップと、
テスト対象アプリケーションが終了した状態であった場合に、起動ファイルを実行することでテスト対象アプリケーションを再起動し、表示されたGUIの状態に対して再帰的に処理を継続する第4のステップと、
表示されたGUIの状態において未操作のGUI要素が存在する場合に、該GUI要素を自動操作してテスト対象アプリケーションのGUIを状態遷移させ、遷移後の状態に対して処理を再帰的に継続する第5のステップと、
表示されたGUIの状態において未操作のGUI要素が存在せず且つこれまで取得した他のGUIの状態に未操作のGUI要素が存在する場合に、表示されたGUIの状態から未操作のGUI要素が存在するGUIの状態(目標状態)へ到達するパスを抽出し、該目標状態に状態を遷移させたときに未操作のGUI要素が確実に存在するかを判定し、存在しないと判定しない場合には他の目標状態へパスを抽出して前記判定処理を再度行う第6のステップと、
抽出されたパスに沿ってGUI要素を自動操作することでGUIを未操作のGUI要素が存在する状態に変化させ、変化した状態に対して処理を再帰的に継続する第7のステップと、
取得したすべてのGUIの状態において未操作のGUI要素が存在しない場合に処理を終了させる第8のステップとを、
各端末間で並行して処理する
ことを特徴とするグラフィカルユーザインタフェースの自動操作方法。
A method of comprehensively and automatically operating the state of a graphical user interface (GUI) of a test target application operating on a plurality of terminals,
A first step of starting a test target application in each terminal by executing a startup file stored in advance in a storage unit on each of the plurality of terminals;
Furthermore, for each terminal,
A second step of acquiring the GUI state of the test target application displayed on the display means of the terminal;
A third step of obtaining all GUI elements operable in the GUI state when the displayed GUI state has never been obtained;
A fourth step of restarting the test target application by executing the startup file and continuing the processing recursively with respect to the displayed GUI state when the test target application is in a finished state;
When there is a GUI element that has not been operated in the displayed GUI state, the GUI element of the test target application is automatically transitioned by automatically operating the GUI element, and processing is recursively continued for the state after the transition. A fifth step;
When there is no GUI element that has not been operated in the displayed GUI state and there is an GUI element that has not been operated in the other GUI states acquired so far, the GUI element that has not been operated from the displayed GUI state. When a path that reaches the state (target state) of the GUI in which is present is extracted, it is determined whether there is a GUI element that is not yet operated when the state is transitioned to the target state, and it is not determined that it does not exist A sixth step of extracting a path to another target state and performing the determination process again;
A seventh step of automatically changing the GUI element along the extracted path to change the GUI to a state in which an unoperated GUI element exists, and continuing the processing recursively for the changed state;
An eighth step of ending the process when there is no unoperated GUI element in all the obtained GUI states;
A graphical user interface automatic operation method characterized by processing in parallel between terminals.
前記第6のステップにおいては、目標状態までのパスを抽出した際に、自処理に係る端末において該目標状態まで状態を遷移させることを示す目標状態管理情報を各並行処理で共有の記憶手段に記憶するとともに、該記憶処理から判定処理までの間は目標状態管理情報の記憶手段への書き込み処理を並行処理間で排他制御する
ことを特徴とする請求項1記載のグラフィカルユーザインタフェースの自動操作方法。
In the sixth step, when a path to the target state is extracted, target state management information indicating that the state is changed to the target state in the terminal related to the self-process is stored in a shared storage unit in each parallel process. 2. The method for automatically operating a graphical user interface according to claim 1, wherein during the period from the storage process to the determination process, exclusive writing control of the target state management information to the storage means is performed between the parallel processes. .
目標状態管理情報は端末の識別子と目標状態の組からなり、
前記第1のステップの後に各端末について端末の識別子と空値の組を目標状態管理情報として記憶手段に記憶し、
前記第6のステップにおいては、目標状態までのパスを抽出した際に目標管理情報を自処理に係る端末の識別子と目標状態の組に書き換え、目標管理情報として自処理に係る目標状態と同じ目標状態を持つ端末の識別子の数と、該目標状態における未操作のGUI要素の数とに基づき前記判定処理を行う
ことを特徴とする請求項2記載のグラフィカルユーザインタフェースの自動操作方法。
Target state management information consists of a set of terminal identifier and target state,
After the first step, a pair of terminal identifier and null value is stored in the storage means as target state management information for each terminal,
In the sixth step, when the path to the target state is extracted, the target management information is rewritten to a set of the identifier of the terminal related to the self-processing and the target state, and the same target as the target state related to the self-processing as the target management information The automatic operation method for a graphical user interface according to claim 2, wherein the determination processing is performed based on the number of identifiers of terminals having a state and the number of unoperated GUI elements in the target state.
前記第6のステップにおいては、これまでの処理で実行した状態遷移の列である実行パスの集合に基づき目標状態へのパスを抽出する
ことを特徴とする請求項1乃至3何れか1項記載のグラフィカルユーザインタフェースの自動操作方法。
The path to the target state is extracted based on a set of execution paths, which is a sequence of state transitions executed in the processing so far, in the sixth step. Automatic operation method of graphical user interface.
前記第6のステップにおいては、これまでの処理で取得したGUIの状態の遷移を表す状態遷移グラフに基づき目標状態へのパスを抽出する
ことを特徴とする請求項1乃至3何れか1項記載のグラフィカルユーザインタフェースの自動操作方法。
The path to the target state is extracted based on the state transition graph representing the transition of the GUI state acquired in the previous processing in the sixth step. Automatic operation method of graphical user interface.
複数の端末上で動作するテスト対象アプリケーションのグラフィカルユーザインタフェース(GUI)の状態を網羅的に自動操作する装置であって、
端末の表示手段に表示されているGUIからGUIの状態を取得するGUI状態取得手段と、
GUI要素を操作してGUIの状態を遷移させるGUI自動操作手段と、
GUIの第1の状態から第2の状態へのパスを抽出するパス集合探索手段と、
記憶手段に予め記憶した起動ファイルを複数の端末でそれぞれ実行することにより各端末においてテスト対象アプリケーションを起動させ、更に、各端末に対してそれぞれ、端末の表示手段に表示されたテスト対象アプリケーションのGUI状態をGUI取得手段により取得し、表示されたGUIの状態がこれまで取得したことのない場合に該GUI状態において操作可能なすべてのGUI要素を取得し、テスト対象アプリケーションが終了した状態であった場合に、起動ファイルを実行することでテスト対象アプリケーションを再起動し、表示されたGUIの状態に対して再帰的に処理を継続し、表示されたGUIの状態において未操作のGUI要素が存在する場合に、該GUI要素をGUI自動操作手段により自動操作してテスト対象アプリケーションのGUIを状態遷移させ、遷移後の状態に対して処理を再帰的に継続し、表示されたGUIの状態において未操作のGUI要素が存在せず且つこれまで取得した他のGUIの状態に未操作のGUI要素が存在する場合に、表示されたGUIの状態から未操作のGUI要素が存在するGUIの状態(目標状態)へ到達するパスをパス集合探索手段により抽出し、該目標状態に状態を遷移させたときに未操作のGUI要素が確実に存在するかを判定し、存在しないと判定しない場合には他の目標状態へのパスをパス集合探索手段により抽出して前記判定処理を再度行い、抽出されたパスに沿ってGUI要素をGUI自動操作手段により自動操作することでGUIを未操作のGUI要素が存在する状態に変化させ、変化した状態に対して処理を再帰的に継続し、取得したすべてのGUIの状態において未操作のGUI要素が存在しない場合に処理を終了させる処理を各端末間で並行して実行する網羅操作制御手段とを備えた
ことを特徴とするグラフィカルユーザインタフェースの自動操作装置。
An apparatus that comprehensively and automatically operates the state of a graphical user interface (GUI) of a test target application that runs on a plurality of terminals,
GUI status acquisition means for acquiring the GUI status from the GUI displayed on the display means of the terminal;
GUI automatic operation means for operating the GUI element to change the state of the GUI,
Path set search means for extracting a path from the first state of the GUI to the second state;
The test target application is started in each terminal by executing the startup file stored in advance in the storage means on each of the plurality of terminals, and the GUI of the test target application displayed on the display means of the terminal for each terminal. The state is acquired by the GUI acquisition unit, and when the displayed GUI state has not been acquired so far, all GUI elements that can be operated in the GUI state are acquired, and the test target application has ended. In this case, the test target application is restarted by executing the startup file, and the process continues recursively with respect to the displayed GUI state, and there is an unoperated GUI element in the displayed GUI state. In this case, the GUI element is automatically operated by the GUI automatic operation means to test the target object. The state of the application GUI is changed, the process is recursively continued for the state after the transition, and there is no GUI element not yet operated in the displayed GUI state and the state of the other GUI acquired so far When there is an unoperated GUI element, the path reaching the GUI state (target state) where the unoperated GUI element exists from the displayed GUI state is extracted by the path set search means, and the target state is obtained. It is determined whether there is an unoperated GUI element when the state is changed, and if it is not determined that it does not exist, a path to another target state is extracted by the path set search means and the determination process is performed. The GUI element is automatically operated by the GUI automatic operation means along the extracted path to change the GUI to a state in which there is an unoperated GUI element. And a comprehensive operation control means for executing a process for terminating the process in parallel between terminals when there is no GUI element not yet operated in all the obtained GUI states. A graphical user interface automatic operation device characterized by that.
JP2013114298A 2013-05-30 2013-05-30 Method and apparatus for automatic operation of graphical user interface Active JP6008372B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013114298A JP6008372B2 (en) 2013-05-30 2013-05-30 Method and apparatus for automatic operation of graphical user interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013114298A JP6008372B2 (en) 2013-05-30 2013-05-30 Method and apparatus for automatic operation of graphical user interface

Publications (2)

Publication Number Publication Date
JP2014232514A true JP2014232514A (en) 2014-12-11
JP6008372B2 JP6008372B2 (en) 2016-10-19

Family

ID=52125828

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013114298A Active JP6008372B2 (en) 2013-05-30 2013-05-30 Method and apparatus for automatic operation of graphical user interface

Country Status (1)

Country Link
JP (1) JP6008372B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965791A (en) * 2015-07-20 2015-10-07 上海斐讯数据通信技术有限公司 Method for testing Android application

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10198586A (en) * 1997-01-08 1998-07-31 Nec Corp Automatic gui system operating device and operation macro-executing device
JP2012248097A (en) * 2011-05-30 2012-12-13 Nippon Telegr & Teleph Corp <Ntt> Automatic generation method for screen transition graph, and device therefor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10198586A (en) * 1997-01-08 1998-07-31 Nec Corp Automatic gui system operating device and operation macro-executing device
JP2012248097A (en) * 2011-05-30 2012-12-13 Nippon Telegr & Teleph Corp <Ntt> Automatic generation method for screen transition graph, and device therefor

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JPN6016015113; 中島 一: '網羅的な操作と操作ログ検索によるGUIテストの自動化手法の提案' 電子情報通信学会技術研究報告 Vol.112 No.379, 201301, pp.13-18, 一般社団法人電子情報通信学会 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965791A (en) * 2015-07-20 2015-10-07 上海斐讯数据通信技术有限公司 Method for testing Android application

Also Published As

Publication number Publication date
JP6008372B2 (en) 2016-10-19

Similar Documents

Publication Publication Date Title
US20220046076A1 (en) Method And System For Real-Time Modeling Of Communication, Virtualization And Transaction Execution Related Topological Aspects Of Monitored Software Applications And Hardware Entities
US9372782B1 (en) Dynamic tracing framework for debugging in virtualized environments
US9990209B2 (en) Digital assistance device for facilitating multi-stage setup
US7930636B2 (en) Systems, methods and computer products to automatically complete a GUI task
Scheuner et al. Cloud work bench--infrastructure-as-code based cloud benchmarking
US8359584B2 (en) Debugging from a call graph
US9223592B2 (en) Configuring a system with various system components utilizing a configuration profile
CN111984476B (en) Test method and device
JP5633904B2 (en) Method and apparatus for automatically generating screen transition graph
CN104679519A (en) Method and device for acquiring functions of graphic user interface software
RU2568294C2 (en) Method for automatic installation of application without human participation
CN110888818A (en) Test case configuration system and method, automatic test system and method
CN107967207B (en) Method and device for testing user interface interaction function
US10915624B2 (en) Method and apparatus for determining behavior information corresponding to a dangerous file
CN110955604B (en) Information display method, device, server and storage medium
US9037994B2 (en) Navigation to a data definition in a diff context
JP5713359B2 (en) Comprehensive automatic operation method and apparatus for graphical user interface
US20220229767A1 (en) Test script generation apparatus, test script generation method and program
JP6723976B2 (en) Test execution device and program
JP6008372B2 (en) Method and apparatus for automatic operation of graphical user interface
CN107038117B (en) Web automatic testing method based on definition-reference between event processing functions
US11055205B1 (en) Regression testing using automation technologies
CN112558968A (en) Resource tree view generation method, device, equipment and storage medium
JP2017146729A (en) Information processing device, operation support method, and operation support program
US20160259716A1 (en) Rebuilding an execution flow from an execution grid

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150710

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160420

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160427

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160603

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160907

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160907

R150 Certificate of patent or registration of utility model

Ref document number: 6008372

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150