JP6514244B2 - Difference detection device and program - Google Patents

Difference detection device and program Download PDF

Info

Publication number
JP6514244B2
JP6514244B2 JP2017006984A JP2017006984A JP6514244B2 JP 6514244 B2 JP6514244 B2 JP 6514244B2 JP 2017006984 A JP2017006984 A JP 2017006984A JP 2017006984 A JP2017006984 A JP 2017006984A JP 6514244 B2 JP6514244 B2 JP 6514244B2
Authority
JP
Japan
Prior art keywords
screen
test
transition
information
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017006984A
Other languages
Japanese (ja)
Other versions
JP2018116496A (en
Inventor
利行 倉林
利行 倉林
宗吉 伊山
宗吉 伊山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2017006984A priority Critical patent/JP6514244B2/en
Publication of JP2018116496A publication Critical patent/JP2018116496A/en
Application granted granted Critical
Publication of JP6514244B2 publication Critical patent/JP6514244B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明は、差異検出装置及びプログラムに関する。   The present invention relates to a difference detection device and program.

近年、ニーズに合ったサービスを迅速に提供するため、サービスを短いサイクルで提供する開発スタイルが増加しており、それに伴いソフトウェアテストの頻度も増加している。このような中、Webアプリケーションにおいて、機能テストにおける画面遷移テストに稼働がかかることが問題となっている。機能テストとはJSTQB(非特許文献1)によると「コンポーネント(独立してテストできるソフトウェアの最小単位)やシステム(コンポーネントのセット)の機能仕様の分析に基づいて実施するテスト」と定義され、コンポーネントレベルの機能を確認するテストから、システムレベルの機能を確認するテストまで存在する。   In recent years, in order to provide services meeting needs quickly, development styles for providing services in a short cycle have been increasing, and the frequency of software testing has been increasing accordingly. Under these circumstances, in Web applications, there is a problem that the screen transition test in the function test takes work. Functional test is defined according to JSTQB (Non-Patent Document 1) as “test performed based on analysis of functional specification of component (minimum unit of software that can be independently tested) or system (set of components)”. There is a test to confirm the level function, and a test to confirm the system level function.

機能テストにおける画面遷移テストは、機能テストの中でも、「クライアントサイドからのインタラクションに対し、クライアントサイドに表示される画面から、仕様通りに実装されているかどうかを確認することができる機能に対するテスト」とここでは定義する。   The screen transition test in the functional test is, among the functional tests, "a test for a function that can confirm whether or not it is implemented as specified from a screen displayed on the client side with respect to interaction from the client side". Here we define it.

機能テストにおける画面遷移テストに稼働がかかるのは、クライアントサイドからのインタラクションとして、画面にあるリンクやボタンをクリックしたり、フォームに適切な値を入力するなどの人間の操作が求められるためである。このような画面遷移テストを自動化し、稼働削減を狙う方法として、テストケースのスクリプト化し、自動実行する手法が広く知られている。   The function of screen transition test in functional test takes place because human interaction such as clicking on a link or button on the screen or entering an appropriate value in a form is required as interaction from the client side. . As a method of automating such screen transition test and aiming at operation reduction, there is widely known a method of scripting test cases and automatically executing them.

テストケースを人手でスクリプト化するには稼働がかかるため、以下の2つのテストスクリプト自動生成技術が存在する。
・Capture and Replay技術を用いたテストスクリプトの自動生成(非特許文献2)
・モデルベーステストによるテストスクリプトの自動生成(非特許文献3)
Manual scripting of test cases takes time, so the following two test script automatic generation techniques exist.
・ Automatic generation of test script using Capture and Replay technology (Non-patent document 2)
・ Automatic generation of test script by model based test (Non-patent document 3)

"JSTQB"、[online]、インターネット<URL:http://jstqb.jp/syllabus.html>"JSTQB", [online], Internet <URL: http://jstqb.jp/syllabus.html> "Selenium IDE"、[online]、インターネット<URL:https://addons.mozilla.org/ja/firefox/addon/selenium-ide/>"Selenium IDE", [online], Internet <URL: https://addons.mozilla.org/ja/firefox/addon/selenium-ide/> "結合テストにおけるテスト項目自動生成手法の提案と評価"、丹野 治門,張 暁晶,星野 隆、電子情報通信学会技術研究報告、Oct 2010"Proposal and Evaluation of Test Item Automatic Generation Method in Bonding Test", T. Tanno, T. Zhang, T. Hoshino, IEICE Technical Report, Oct 2010

Capture and Replay技術では、仕様から人手で作成したテストケースをユーザが実行することで、ユーザの画面に対する操作を記録してテストスクリプトとして出力することができる。しかし、Capture and Replay技術を用いた場合、画面操作を記録するためのツール操作といった追加の稼働が発生するため、一般的に3回以上同等のテストを実施しない場合は、稼働の元が取れないという欠点が存在する。   In the Capture and Replay technology, the user can execute a test case created manually from the specification, thereby recording the operation on the user's screen and outputting it as a test script. However, when using the Capture and Replay technology, additional operations such as tool operations for recording screen operations occur, so if you do not perform equivalent tests three or more times in general, you can not get the source of the operation. There is a drawback of that.

モデルベーステストでは、仕様をマシンが読み取れる形式のモデルで記述することで、読み取った仕様からテストケースを自動生成し、テストスクリプトとして出力することができる。しかし、モデルを記述するための追加の稼働がかかるという欠点が存在する。   In model-based testing, by describing the specifications in a form that can be read by a machine, test cases can be automatically generated from the read specifications and output as test scripts. However, there is a disadvantage that it takes additional work to describe the model.

以上より、既存のテストスクリプト自動生成技術では、テストスクリプトを生成するための追加の稼働が発生することが問題であるということがいえる。   From the above, it can be said that the existing test script automatic generation technology has a problem that an additional operation for generating a test script occurs.

一方で、追加の稼動を削減することでテストスクリプトの自動生成の効率化を図ろうとした場合、テスト対象の仕様として定義されている全ての画面遷移を抽出できているか否かが問題となる。すなわち、仕様として定義されちる画面遷移の抽出に漏れが有る場合、自動生成されたテストスクリプトにおいて一部の画面遷移に関するテストが漏れてしまう可能性が有る。したがって、自動生成されたテストスクリプトでは実現できない画面遷移の検出技術が望まれる。   On the other hand, when attempting to improve the efficiency of automatic generation of test scripts by reducing additional operations, it becomes a problem whether all screen transitions defined as the specifications of the test object can be extracted. That is, when there is a leak in the extraction of the screen transition which has been defined as the specification, there is a possibility that a test related to a part of the screen transition may be leaked in the automatically generated test script. Therefore, a technique for detecting screen transitions that can not be realized by automatically generated test scripts is desired.

本発明は、上記の点に鑑みてなされたものであって、Webアプリケーションに関して自動生成されるテストスクリプトでは実現できない画面遷移の検出を可能とすることを目的とする。   The present invention has been made in view of the above-described point, and an object of the present invention is to enable detection of screen transitions which can not be realized by a test script automatically generated for a Web application.

そこで上記課題を解決するため、差異検出装置は、Webアプリケーションのソースコードから、前記ソースコードにおいて定義された第1の画面遷移の情報を抽出する抽出部と、前記Webアプリケーションに関して表示される画面を自動的に操作する操作部と、自動的な操作によって実現される第2の画面遷移の情報を生成する生成部と、前記第1の画面遷移の情報と前記第2の画面遷移の情報との差異を検出する検出部と、を有する。   Therefore, in order to solve the above problem, the difference detection device extracts an information of the first screen transition defined in the source code from the source code of the Web application, and a screen displayed regarding the Web application. An operation unit that operates automatically, a generation unit that generates information on a second screen transition realized by the automatic operation, and information on the first screen transition and the information on the second screen transition And a detection unit that detects a difference.

Webアプリケーションに関して自動生成されるテストスクリプトでは実現できない画面遷移の検出を可能とすることができる。   It is possible to enable detection of screen transitions that can not be realized by test scripts that are automatically generated for Web applications.

同一URLでも異なる画面としてテストしたい画面の例を示す図である。It is a figure which shows the example of the screen to test as the same screen and a different screen. Tree Edit Distanceの一例を示す図である。It is a figure which shows an example of Tree Edit Distance. 本発明の実施の形態におけるシステム構成例を示す図である。It is a figure showing an example of system configuration in an embodiment of the invention. 本発明の実施の形態におけるクライアント装置10のハードウェア構成例を示す図である。It is a figure which shows the example of a hardware constitutions of the client apparatus 10 in embodiment of this invention. 本発明の実施の形態におけるクライアント装置10の機能構成例を示す図である。It is a figure which shows the function structural example of the client apparatus 10 in embodiment of this invention. クライアント装置10が実行する処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence which the client apparatus 10 performs. 静的解析の一例を示す図である。It is a figure which shows an example of static analysis. 画面遷移図の一例を示す図である。It is a figure which shows an example of a screen transition diagram. 辞書の生成処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of a production | generation process of a dictionary. 画面遷移情報の抽出処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of the extraction process of screen transition information. テストケースの生成及び実行処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of a processing procedure of test case generation and execution processing. フォームの一例を示す図である。It is a figure which shows an example of a form. テスト入力値の生成処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of a production | generation process of a test input value. 遷移先画面の判定処理の処理手順の一例を説明するためのフローチャートである。It is a flow chart for explaining an example of processing procedure of judgment processing of a transition destination screen. DOMツリーの一例を示す図である。It is a figure which shows an example of a DOM tree. 画面遷移図の生成処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of a process sequence of a production | generation process of a screen transition figure. テストスクリプトの出力処理の処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence of the output process of a test script.

以下、図面に基づいて本発明の実施の形態を説明する。本実施の形態では、テスト対象から仕様をリバースし、リバースした仕様に基づいて網羅的なテストケースを自動生成し、テストスクリプトとして出力するといったアプローチを提案する。本アプローチによって、追加の稼働を必要とせずに網羅的なテストスクリプトを自動生成することができる。   Hereinafter, embodiments of the present invention will be described based on the drawings. In the present embodiment, an approach is proposed in which a specification is reversed from a test target, an exhaustive test case is automatically generated based on the reversed specification, and a test script is output as a test script. With this approach, exhaustive test scripts can be generated automatically without the need for additional operations.

本実施の形態では、機能テストにおける画面遷移テストを対象としているため、以下のステップで処理が実行される。
(1)テスト対象を解析し、仕様としてテスト対象を構成する画面と画面間の繋がり、各画面に到達するための手段を抽出する。
(2)(1)で取得した仕様から機能テストにおける画面遷移テストに適した画面遷移図を生成する。
(3)(2)で生成した画面遷移図の各遷移に対応するテストスクリプトを、(1)で抽出した画面に到達するための手段の情報に基づいて、出力したいスクリプト形式に合わせて出力する。
In the present embodiment, since the screen transition test in the function test is targeted, the process is executed in the following steps.
(1) The test object is analyzed, and a screen and a connection between the screens constituting the test object are extracted as specifications, and means for reaching each screen are extracted.
(2) The screen transition diagram suitable for the screen transition test in the function test is generated from the specifications acquired in (1).
(3) Output the test script corresponding to each transition of the screen transition diagram generated in (2) according to the script format to be output based on the information of the means for reaching the screen extracted in (1) .

(1)ではテスト対象を構成する画面とその画面に到達するための手段を抽出する。Webアプリケーションでは、jspファイル等の画面(HTML)の元となるファイルから、クライアントサイドからのリクエストに応じて、動的に画面を生成するケースが一般的である。したがって、テスト対象がどのような画面で構成されていて、それらがどのように繋がっているかの情報は、ソースコードに直接記述されていないため、適切な解析が必要となる(技術課題1:テスト対象から仕様をリバースする方法の検討)。   In (1), the screen that constitutes the test object and the means for reaching that screen are extracted. In Web applications, it is common to dynamically generate screens in response to requests from the client side from files that are the origin of screens (HTML) such as jsp files. Therefore, information on what kind of screen the test object is configured and how they are connected is not directly described in the source code, so appropriate analysis is required (Technical Problem 1: Test) Consider how to reverse the specification from the subject).

また、画面に到達するための手段の抽出においても、Webアプリケーションでは、特定の入力値を与えないと遷移することができない画面遷移が存在する。例えば、電話番号を登録するようなシステムにおいて、11桁の半角数字でないと登録完了画面に遷移できないケースが挙げられる。このような画面遷移に対して、適切な入力値を生成する必要がある(技術課題2:画面遷移を実現するための適切な入力値生成方法の検討)。   Further, also in the extraction of means for reaching the screen, in the Web application, there is a screen transition which can not be transitioned unless a specific input value is given. For example, in a system in which a telephone number is registered, there may be a case where it is not possible to transition to a registration completion screen unless it is an 11-digit half-width number. It is necessary to generate an appropriate input value for such screen transition (Technical Problem 2: Examination of an appropriate input value generation method for realizing screen transition).

(2)では、(1)で取得したテスト対象を構成する画面情報を用いて、機能テストにおける画面遷移テストに適した画面遷移図を生成する。機能テストにおける画面遷移テストでは、機能の粒度で画面を識別する必要がある。一般的に画面はURLで識別されるが、同一URLの画面同士でも、機能テストでは異なる画面と判別されることがある。例えば、検索サイトにおいて、検索結果が無かったときの画面と検索結果が有ったときの画面はURLで見た場合、同一となることがあるが、機能テストの観点では別々の画面としてみなされる。したがって、機能テストの観点に合った、適切な画面識別を行う必要がある(技術課題3:機能テストにおける適切な画面識別方法の検討)。   In (2), the screen transition diagram suitable for the screen transition test in the function test is generated using the screen information constituting the test object acquired in (1). The screen transition test in the function test needs to identify the screen by the function granularity. Generally, screens are identified by URLs, but even screens with the same URL may be determined to be different screens in a functional test. For example, in the search site, the screen when there is no search result and the screen when there is a search result may be the same when viewed by URL, but they are regarded as separate screens from the viewpoint of functional test . Therefore, it is necessary to perform appropriate screen identification in line with the viewpoint of functional test (Technical Problem 3: Examination of an appropriate screen identification method in functional test).

(3)は、出力したいスクリプト形式に合わせてテストスクリプトを生成するステップである。(1)で抽出した画面に到達するための手段(リンクやボタンのクリック、フォームへの入力等)を、出力したいスクリプト形式で記述する。本ステップについては、抽出した手段をそれに対応するメソッドで記述するだけなので技術的課題はないと考えられる。   Step (3) is a step of generating a test script in accordance with a script format desired to be output. Describe the means for reaching the screen extracted in (1) (clicks on links or buttons, input to a form, etc.) in the form of a script to be output. In this step, it is considered that there is no technical problem since only the extracted means is described by the corresponding method.

以上より、本アプローチには以下の3つの技術的課題があると考えられる。
技術課題1:テスト対象から仕様をリバースする方法の検討。
技術課題2:画面遷移を実現するための適切な入力値生成方法の検討。
技術課題3:機能テストにおける適切な画面識別方法の検討。
From the above, this approach is considered to have the following three technical issues.
Technical issue 1: Examination of a method to reverse the specification from the test object.
Technical problem 2: Examination of an appropriate input value generation method to realize screen transition.
Technical Problem 3: Examination of an appropriate screen identification method in functional test.

[技術課題1:テスト対象から仕様をリバースする方法の検討]
<従来技術と問題点>
アプリケーションから仕様をリバースする技術として、静的解析を用いた技術が存在する(例えば、「"Reconstructing Software Architecture for J2EE Web Applications" Minmin Han, Christine Hofmeister, Robert L. Nord,Proceedings of the 10th Working Conference on Reverse Engineering 2003」)。しかし、jspファイルから動的に生成されるHTMLのように、実行しないと生成できない情報を取得することができないため、仕様を完全にリバースすることができない。このような欠点を補うため、静的解析と動的解析を組み合わせた技術も存在する(例えば、「Silva CE, Campos JC. 2013. "Combining Static and Dynamic Analysis for the Reverse Engineering of Web Applications". Proceedings of the 5th Symposium on Engineering Interactive Computing Systems - EICS. :107-112.」)。本技術では静的解析でプログラム中のパスを洗い出し、動的解析でそれらのパスを全て網羅するようなテストケースを生成することでWebアプリケーションの振る舞いの網羅を目指している。しかし、動的解析で通過したパスを取得するためには入力値が通過しうる全ての箇所にログが取得できるようなコードを挿入する必要があり、ユーザは、クライアントサイドからサーバサイドまで、システム構成を正確に把握し、プログラムが通過した場所を表すログを出力するための環境を用意しなくてはならないため、ツール導入のための追加稼働の削減を目指している本実施の形態の目的とは合致しない。また、テスト対象に手を加えることで振る舞いが変わる可能性もあり、そのようなテスト対象から生成したテストケースを実際のテストに用いた場合、想定していたテストシナリオと異なる内容のテストをしてしまうリスクが存在する。
[Technical Problem 1: Examination of Method to Reverse Specifications from Test Target]
<Prior art and problems>
As a technology to reverse the specification from the application, there is a technology using static analysis (for example, "" Reconstructing Software Architecture for J2EE Web Applications ", Minmin Han, Christine Hofmeister, Robert L. Nord, Proceedings of the 10th Working Conference on Reverse Engineering 2003 "). However, the specification can not be completely reversed because it can not acquire information that can not be generated without execution, such as HTML generated dynamically from a jsp file. There are also technologies that combine static analysis and dynamic analysis to compensate for these drawbacks (eg, “Silva CE, Campos JC. 2013.“ Combining Static and Dynamic Analysis for the Reverse Engineering of Web Applications ”. Proceedings of the 5th Symposium on Engineering Interactive Computing Systems-EICS.: 107-112. In this technology, we aim to cover the behavior of Web application by identifying the paths in the program by static analysis and generating test cases that cover all the paths by dynamic analysis. However, in order to acquire a path passed by dynamic analysis, it is necessary to insert code that can acquire a log in all places where an input value can pass, and the user can The purpose of this embodiment is to reduce the additional operation for introducing a tool, because it is necessary to accurately understand the configuration and prepare an environment for outputting a log representing the place where the program has passed. Does not match. In addition, there is a possibility that the behavior may change by modifying the test target, and when a test case generated from such a test target is used for the actual test, the test scenario is different from the expected test scenario. Risk exists.

<本実施の形態における提案:コントローラに着目した静的解析と動的解析を用いた仕様のリバース技術>
本実施の形態では、Webアプリケーションにおいて一般的に用いられているデザインパターンであるMVC(Model View Controller)の構成において、クライアントサイドからのリクエストに対して実行する処理を決定するコントローラに着目する。例えば、サーブレットがコントローラの一例である。コントローラが割り振る遷移を静的解析で全て把握し、その後の動的解析でそれらの遷移を網羅することで、テスト対象を構成する画面と画面間の繋がり、各画面に到達するための手段を漏れなくリバースすることができる。従来手法との違いとして、本実施の形態ではコントローラにのみ着目するため、クライアントサイドの情報からコントローラの示す遷移先をどの程度網羅できたかを推測することができ、ログを取得するための環境を用意する稼働を不要、又は少なくすることができるといった利点が挙げられる。従来のプログラムの実行パスを取得する方法では、実行パスの詳細な情報をクライアントサイドから推測することは不可能である。
<Proposal in this Embodiment: Reverse Technology of Specifications Using Static Analysis and Dynamic Analysis Focusing on Controller>
In the present embodiment, in the configuration of a model view controller (MVC) that is a design pattern generally used in Web applications, attention is focused on a controller that determines processing to be executed for a request from the client side. For example, a servlet is an example of a controller. All the transitions allocated by the controller are grasped by static analysis, and by covering those transitions in the subsequent dynamic analysis, the screens that constitute the test object and the connection between the screens, and the means for reaching each screen are leaked It is possible to reverse without. As a difference from the conventional method, in this embodiment, since only the controller is focused, it is possible to infer the extent to which the transition destination indicated by the controller can be covered from the information on the client side. The advantage is that the operation to be prepared can be eliminated or reduced. In the conventional method of acquiring the execution path of a program, it is impossible to infer detailed information on the execution path from the client side.

[技術課題2:画面遷移を実現するための適切な入力値生成方法の検討]
<従来技術と問題点>
画面遷移を実現するための適切な入力値を生成するための方法として、Concolic Testingという手法が存在する(例えば、"Concolic testing" Koushik Sen. 2007. In Proceedings of the twenty-second IEEE/ACM international conference on Automated software engineering (ASE '07). ACM, New York, NY, USA, 571-572.」)。Concolic Testingでは、入力値を記号と置き、プログラムを実行しながらパスを通るための制約情報(パス式)を入手する。得られたパス式を反転させて生成される新たなパス式を制約ソルバで解くことで、所望のパスを通るために必要なテスト入力値を生成することができる。しかし、Concolic Testingは、入力値を記号と置いて追跡していく手法であるため、記号と置いた入力値がどこでどのような処理がされたのかのログを取得する必要がある。そのような情報を取得するためには、入力値が通過しうる箇所全てにログが取得できるようなコードを挿入する必要があり、ユーザは、クライアントサイドからサーバサイドまで、システム構成を正確に把握し、ログを出力するための環境を用意しなくてはならないため、導入の敷居が高いという欠点が存在する。特に、サーバサイドにおいては、業務用のWebアプリケーションでは、Webサーバ、アプリケーションサーバ、DBサーバなど、様々なシステムから構成されていることが一般的であり、それら全てのシステムに対し、ログを取得するための環境を用意することは多くの稼働がかかるため、ツール導入のための追加稼働の削減を目指している本実施の形態の目的とは合致しない。
[Technical Problem 2: Examination of a suitable input value generation method to realize screen transition]
<Prior art and problems>
As a method for generating appropriate input values to realize screen transition, there is a method called Concolic Testing (eg, "Concolic testing" Koushik Sen. 2007. In Proceedings of the twenty-second IEEE / ACM international conference on Automated software engineering (ASE '07). ACM, New York, NY, USA, 571-572. Concolic Testing puts input values as symbols, and obtains constraint information (path expression) for passing a path while executing a program. By solving a new path expression generated by inverting the obtained path expression using a constraint solver, it is possible to generate a test input value necessary to pass the desired path. However, because Concolic Testing is a method of tracking input values as symbols, it is necessary to obtain a log of where and how the input values are processed. In order to acquire such information, it is necessary to insert a code that can acquire a log in all the places where the input value can pass, and the user accurately grasps the system configuration from the client side to the server side. Since the environment for outputting the log must be prepared, there is a drawback that the threshold of introduction is high. In particular, on the server side, business Web applications are generally composed of various systems such as Web servers, application servers, and DB servers, and logs are acquired for all those systems. Providing a suitable environment requires many operations, which is not consistent with the purpose of the present embodiment, which aims to reduce the additional operation for introducing a tool.

<本実施の形態における提案:クライアントサイドの情報を用いたテスト入力値生成技術>
一般的にWebアプリケーションにおいて、入力値によって画面遷移が決定されるパターンとしては以下の2通りが存在する。
(1)仕様に対して適切な入力値が入力された場合の正常系画面遷移
(2)仕様に対して不適切な入力値が入力された場合の準正常系画面遷移
(2)に対しては、無作為な値を入力、又は入力値を与えないことで実現できるケースが多くを占めることが経験的にわかる。しかし、(1)に対しては適切な入力値を与える必要があるため、無作為なテスト入力値を与えるだけでは画面遷移を実現できない可能性が高い。本実施の形態では、クライアントサイドの情報を用いて、入力フォームに対してどのような種類の入力値が求められているのかを推測し、適切な入力値を与えることで(1)に対するテスト入力値生成を実現する。
<Proposal in the present embodiment: Test input value generation technology using client-side information>
Generally, in Web applications, there are the following two patterns in which screen transition is determined by input values.
(1) Normal system screen transition when an appropriate input value is input for the specification (2) For quasi-normal system screen transition (2) when an inappropriate input value is input for the specification It is empirically understood that there are many cases that can be realized by inputting random values or not giving input values. However, since it is necessary to give an appropriate input value to (1), it is highly likely that screen transition can not be realized only by giving a random test input value. In this embodiment, using client-side information, it is inferred what kind of input value is required for the input form, and the test input for (1) is given by giving an appropriate input value. Implement value generation.

[技術課題3:機能テストにおける適切な画面識別方法の検討]
<従来技術と問題点>
本実施の形態では、機能テストにおける画面遷移テストを、機能テストの中でも、「クライアントサイドからのインタラクションに対し、クライアントサイドに表示される画面から、仕様通りに実装されているかどうかを確認することができる機能に対するテスト」と定義する。一般的に画面はURLで識別されるが、本定義における画面遷移テストでは、同一URLの画面同士でも画面によっては異なる画面としてテストすることが重要である。例えば、検索サイトにおいて、図1のように検索結果が無かったときの画面と検索結果が有ったときの画面はURLで見た場合、同一となることがあるが、機能テストの観点では別々の画面としてみなす。このような場合、URLではなく、表示される画面から識別するべきである。しかし、単純に表示された画面同士を画像として比較すると、確認したい機能部分が同一でも、それ以外の箇所が異なっていた場合、異なる画面と判別されてしまう。したがって、画面全体ではなく、画面を構成する要素の一部を比較する必要がある。画面は主にHTML、DOM(Document Object Model )構造、テキスト、画像、CSS(Cascading Style Sheets)等の要素で構成されている。
[Technical problem 3: Examination of appropriate screen identification method in functional test]
<Prior art and problems>
In the present embodiment, the screen transition test in the function test is also confirmed in the function test whether “the interaction from the client side is implemented according to the specification from the screen displayed on the client side. It defines as "the test for the function which can be done". Generally, screens are identified by URLs, but in the screen transition test in this definition, it is important to test screens of the same URL as different screens depending on the screen. For example, in the search site, the screen when there is no search result as shown in FIG. 1 and the screen when there is a search result may be the same when viewed in URL, but they are different in terms of functional test Consider it as a screen. In such a case, it should be identified from the displayed screen, not the URL. However, when the screens displayed simply are compared as images, even if the functional part to be confirmed is the same, if the other parts are different, it is determined that the screens are different. Therefore, it is necessary to compare some of the elements that make up the screen, not the entire screen. The screen is mainly composed of elements such as HTML, Document Object Model (DOM) structure, text, images, and Cascading Style Sheets (CSS).

試験観点によって着目すべき箇所は異なるが、本実施の形態では機能の違いがHTMLのDOM構造に表れるケースを対象とする。HTMLのDOM構造比較の既存手法として、Tree Edit Distance(以下「TED」という。)を用いた手法が存在する(例えば、「"A survey on tree edit distance and related problems" Philip Bille. 2004. Theoretical Computer Science. Volume 337, Issues 1-3, 9 June 2005, Pages 217-239.」)。   Although the places to be focused differ depending on the test point of view, in the present embodiment, the case where the difference in function appears in the DOM structure of HTML is targeted. There is a method using Tree Edit Distance (hereinafter referred to as "TED") as an existing method for comparing DOM structures of HTML (for example, "A survey on tree edit distance and related problems" Philip Bille. 2004. Theoretical Computer Science. Volume 337, Issues 1-3, 9 June 2005, Pages 217-239.

TEDとは、両DOMツリーが一致するまでノードの削除・挿入を行ったときの削除・挿入の回数となる。例えば、図2においてDOMツリー1とDOMツリー2を一致させるには、DOMツリー2の<p>、<strong>、<U>の3つのノードを削除し、<img>ノードを挿入する必要があるため、TEDの値は4となる。閾値が3以下の場合、DOMツリー1とDOMツリー2の構造は不一致と判断することができ、閾値が4以上の場合、DOMツリー1とDOMツリー2の構造は一致すると判断することができる。   TED is the number of deletions / insertions when deleting / inserting nodes until both DOM trees match. For example, to match DOM tree 1 and DOM tree 2 in FIG. 2, it is necessary to delete three nodes <p>, <strong> and <U> of DOM tree 2 and insert an <img> node. Because there is, TED has a value of 4. When the threshold is 3 or less, the structures of the DOM tree 1 and the DOM tree 2 can be determined to be unmatched, and when the threshold is 4 or more, the structures of the DOM tree 1 and the DOM tree 2 can be determined to match.

TEDを用いた画面の構造比較の欠点として、画面ごとに適切な閾値が異なるため、閾値の設定が困難であるといった点が挙げられる。閾値(TEDに対する許容範囲)を必要とする原因として、以下の2つが考えられる。
原因1:機能テストにおける画面の識別に影響を与えないノードの存在
原因2:並列化されたノードの存在
原因1については、太字タグ<b>など、機能テストにおいて画面の識別に影響を与えないノードが存在することが挙げられる。原因2については、見出しタグなどが挙げられる。例えば、ニュースサイトにおいて、見出しの数が異なっている場合でもニュースを表示するという機能は同一であるため、見出しの数は機能に影響を与えないということがいえる。このように画面の識別に影響を与えないノードが存在し、それらのノードによってTEDの値が増加するため、閾値を設ける必要がある。
As a drawback of the structure comparison of the screen using TED, it is difficult to set the threshold because the appropriate threshold is different for each screen. There are two possible causes for the need for a threshold (acceptable range for TED):
Cause 1: Existence of node that does not affect screen identification in functional test Cause 2: Existence of parallelized node Does not affect screen identification in functional test such as bold tag <b> for cause 1 It can be mentioned that nodes exist. For the cause 2, there are heading tags and the like. For example, in a news site, even if the number of headings is different, the function of displaying news is the same, so it can be said that the number of headings does not affect the function. As such, there are nodes that do not affect the screen identification, and these nodes increase the value of TED, so it is necessary to set a threshold.

<本実施の形態における提案:HTMLのDOM構造の類似度を利用した画面識別技術>
本実施の形態では、原因1に関わるノードを削除し、原因2に関わるノードを集約することでHTMLを抽象化し、抽象化されたHTMLを比較することで、閾値の設定を必要とせずに機能テストにおける適切な画面識別を可能とする。
<Proposal in this Embodiment: Screen Identification Technology Using Similarity of HTML DOM Structure>
In the present embodiment, the function is performed without requiring the setting of the threshold value by abstracting the HTML by deleting the nodes related to the cause 1 and aggregating the nodes related to the cause 2 and comparing the abstracted HTML. Enable appropriate screen identification in the test.

以下、上記を実現するための具体例について説明する。図3は、本発明の実施の形態におけるシステム構成例を示す図である。図3において、サーバ装置20及びクライアント装置10は、例えば、LAN(Local Area Network)又はインターネット等のネットワークを介して接続される。   Hereinafter, specific examples for realizing the above will be described. FIG. 3 is a diagram showing an example of a system configuration in the embodiment of the present invention. In FIG. 3, the server device 20 and the client device 10 are connected via a network such as a LAN (Local Area Network) or the Internet, for example.

サーバ装置20は、Webアプリケーションを含むテスト対象のシステムを含む1以上のコンピュータである。   The server device 20 is one or more computers including a system to be tested including a web application.

クライアント装置10は、サーバ装置20が有するWebアプリケーションについてのテスト(検証)を支援する装置である。   The client device 10 is a device that supports a test (verification) on a Web application that the server device 20 has.

図4は、本発明の実施の形態におけるクライアント装置10のハードウェア構成例を示す図である。図4のクライアント装置10は、それぞれバスBで相互に接続されているドライブ装置100、補助記憶装置102、メモリ装置103、CPU104、インタフェース装置105、表示装置106、及び入力装置107等を有する。   FIG. 4 is a diagram showing an example of the hardware configuration of the client device 10 according to the embodiment of the present invention. The client device 10 of FIG. 4 includes a drive device 100, an auxiliary storage device 102, a memory device 103, a CPU 104, an interface device 105, a display device 106, an input device 107, and the like which are mutually connected by a bus B.

クライアント装置10での処理を実現するプログラムは、CD−ROM等の記録媒体101によって提供される。プログラムを記憶した記録媒体101がドライブ装置100にセットされると、プログラムが記録媒体101からドライブ装置100を介して補助記憶装置102にインストールされる。但し、プログラムのインストールは必ずしも記録媒体101より行う必要はなく、ネットワークを介して他のコンピュータよりダウンロードするようにしてもよい。補助記憶装置102は、インストールされたプログラムを格納すると共に、必要なファイルやデータ等を格納する。   A program for realizing the processing in the client device 10 is provided by a recording medium 101 such as a CD-ROM. When the recording medium 101 storing the program is set in the drive apparatus 100, the program is installed from the recording medium 101 to the auxiliary storage apparatus 102 via the drive apparatus 100. However, the installation of the program does not necessarily have to be performed from the recording medium 101, and may be downloaded from another computer via a network. The auxiliary storage device 102 stores the installed program and also stores necessary files and data.

メモリ装置103は、プログラムの起動指示があった場合に、補助記憶装置102からプログラムを読み出して格納する。CPU104は、メモリ装置103に格納されたプログラムに従ってクライアント装置10に係る機能を実現する。インタフェース装置105は、ネットワークに接続するためのインタフェースとして用いられる。表示装置106はプログラムによるGUI(Graphical User Interface)等を表示する。入力装置107はキーボード及びマウス等で構成され、様々な操作指示を入力させるために用いられる。   The memory device 103 reads out the program from the auxiliary storage device 102 and stores it when there is an instruction to start the program. The CPU 104 implements the function related to the client device 10 in accordance with the program stored in the memory device 103. The interface device 105 is used as an interface for connecting to a network. The display device 106 displays a graphical user interface (GUI) according to a program. The input device 107 includes a keyboard, a mouse, and the like, and is used to input various operation instructions.

図5は、本発明の実施の形態におけるクライアント装置10の機能構成例を示す図である。図5において、クライアント装置10は、画面遷移情報抽出部11、テストシナリオ生成部12、画面自動操作部13、画面評価部14及びテスト資材生成部15等を有する。これら各部は、クライアント装置10にインストールされた1以上のプログラムが、CPU104に実行させる処理により実現される。   FIG. 5 is a diagram showing an example of a functional configuration of the client device 10 according to the embodiment of the present invention. In FIG. 5, the client device 10 includes a screen transition information extraction unit 11, a test scenario generation unit 12, a screen automatic operation unit 13, a screen evaluation unit 14, a test material generation unit 15, and the like. These units are realized by processing that one or more programs installed in the client device 10 cause the CPU 104 to execute.

画面遷移情報抽出部11は、Webアプリケーションのコントローラのソースコードに基づいて、静的解析技術を用いてコントローラを解析し、各リクエストに対する遷移先の数を取得する。   The screen transition information extraction unit 11 analyzes the controller using static analysis technology based on the source code of the controller of the Web application, and acquires the number of transition destinations for each request.

テストシナリオ生成部12は、テストにおいて表示された各画面に対するテストシナリオとテスト入力値とを生成する。或る画面の各フォームに対するテスト入力値は、当該画面に係るHTMLのDOMツリーにおける当該フォームの周辺情報を用いて生成される。当該フォームの周辺情報とは、HTMLにおいて当該フォームに関して定義された情報の一例である。   The test scenario generation unit 12 generates a test scenario and a test input value for each screen displayed in the test. The test input value for each form of a screen is generated using the peripheral information of the form in the HTML DOM tree of the screen. The peripheral information of the form is an example of information defined for the form in HTML.

画面自動操作部13は、生成されたテストシナリオとテスト入力値とをテストケースとして、画面操作を自動的に実行することで、動的解析を実現する。   The screen automatic operation unit 13 implements dynamic analysis by automatically executing screen operations using the generated test scenario and test input value as test cases.

画面評価部14は、画面操作の実行により遷移した画面が既に遷移したことのある画面か否かをURLやHTML等の情報を用いて判定する。画面評価部14は、画面操作の実行により遷移した画面のHTMLデータと、既に遷移したことのある画面のHTMLデータとについて、それぞれを抽象化するための編集処理を行って、編集後のHTMLデータを比較する。   The screen evaluation unit 14 determines whether the screen transitioned by the execution of the screen operation has already been transitioned using information such as a URL and HTML. The screen evaluation unit 14 performs editing processing for abstracting the HTML data of the screen transitioned by the execution of the screen operation and the HTML data of the screen which has already transitioned, and the HTML data after editing Compare

テスト資材生成部15は、静的解析及び動的解析により得られた情報に基づいて、画面遷移図を生成する。テスト資材生成部15は、また、テストシナリオ生成部12によって生成されたテストシナリオとテスト入力値をテストスクリプトの形式で出力する。   The test material generation unit 15 generates a screen transition diagram based on the information obtained by static analysis and dynamic analysis. The test material generation unit 15 also outputs the test scenario and the test input value generated by the test scenario generation unit 12 in the form of a test script.

以下、クライアント装置10が実行する処理手順について説明する。図6は、クライアント装置10が実行する処理手順の一例を説明するためのフローチャートである。   The processing procedure executed by the client device 10 will be described below. FIG. 6 is a flowchart for explaining an example of the processing procedure executed by the client device 10.

ステップS101において、テストシナリオ生成部12は、テスト入力値の生成に利用される辞書を生成する。辞書は、単語ごとに、当該単語の上位語がタグとして付与された構成を有するデータである。本実施の形態では、例えば、予め用意された辞書と、サーバ装置20においてWebアプリケーションがアクセスするDBデータから生成される辞書の2種類とが利用される。ステップS101では後者の辞書が生成される。DBに登録された値をテスト入力値とすることで、検索表示画面等の、DBに登録されたテスト入力値でないと遷移することの出来ない画面への遷移を可能とすることができる。ユーザは、DBデータを入力として与えなくてもテスト入力値を生成することは可能だが、DBデータを入力として与えない場合、DBに登録されたデータが画面遷移の条件に影響を与える場合に、適切な入力値を生成できない可能性がある。   In step S101, the test scenario generation unit 12 generates a dictionary used to generate a test input value. The dictionary is data having a configuration in which the hypernym of the word is attached as a tag for each word. In the present embodiment, for example, two types of dictionaries prepared in advance and a dictionary generated from DB data accessed by the Web application in the server device 20 are used. The latter dictionary is generated in step S101. By using a value registered in the DB as a test input value, it is possible to enable transition to a screen such as a search display screen that can not be transitioned unless the test input value is registered in the DB. The user can generate a test input value without providing DB data as an input, but when DB data is not given as an input, when data registered in the DB affects screen transition conditions, It may not be possible to generate appropriate input values.

続いて、画面遷移情報抽出部11は、静的解析技術を用いてコントローラのソースコードを解析し、画面の遷移先を決定するコントローラの情報から、各リクエストに対する遷移先の数を取得する(S102)。1つのリクエストに対する遷移先の数を示す情報を「画面遷移情報」といい、画面遷移情報のリストを「画面遷移情報リスト」という。   Subsequently, the screen transition information extraction unit 11 analyzes the source code of the controller using static analysis technology, and acquires the number of transition destinations for each request from the information of the controller which determines the transition destination of the screen (S102) ). Information indicating the number of transition destinations for one request is called "screen transition information", and a list of screen transition information is called "screen transition information list".

図7は、静的解析の一例を示す図である。図7には、コントローラのソースコードの一部が示されている。図7において記述d1は、リクエストを示す。記述d2及び記述d3は、当該リクエストに対応した遷移先を示す。ステップS102では、記述d1、d2、及びd3から、「owners/new」というリクエストに対して2つの遷移先が有ることが抽出される。このような抽出が、ソースコードに定義されている全てのリクエストについて実行される。   FIG. 7 is a diagram showing an example of static analysis. FIG. 7 shows a part of source code of the controller. The description d1 in FIG. 7 indicates a request. The description d2 and the description d3 indicate transition destinations corresponding to the request. In step S102, it is extracted from the descriptions d1, d2 and d3 that there are two transition destinations for the request "owners / new". Such extraction is performed for every request defined in the source code.

続いて、画面自動操作部13は、初期URLにアクセスして、初期URLに対応するHTMLデータ等を取得する(S103)。その結果、当該HTMLデータ等に基づく画面が表示装置106に表示される。初期URLは、例えば、ユーザによって入力されてもよいし、補助記憶装置102に予め記憶されていてもよい。   Subsequently, the screen automatic operation unit 13 accesses the initial URL and acquires HTML data and the like corresponding to the initial URL (S103). As a result, a screen based on the HTML data or the like is displayed on the display device 106. The initial URL may be input by the user, for example, or may be stored in advance in the auxiliary storage device 102.

続くステップS104〜S109では、初期URLに対応するHTMLデータ、及び当該HTMLデータに係る画面を起点として遷移可能な全てのHTMLデータに関して、動的解析等が実行される。具体的には、静的解析で取得された各リクエストに対する遷移先を全て網羅するように、動的解析として、初期URLに対応する画面を起点として実際にテスト対象の画面操作が自動的に実施される。動的解析では、各画面上の全てのリンクに対してクリックを実施し、入力フォームとそれに対応するサブミットボタンが有る場合には、サブミットボタンを押したときのリクエストに対して、静的解析で取得したそのリクエストの遷移先の数を満たすまで、テスト入力値が生成され、画面操作が繰り返される。リクエストの遷移先の数を満たしたか否かについては、遷移先の画面について、既に遷移した画面との比較を行い、新規に遷移した画面かどうかの判断を行って、到達画面数をカウントする。以上の動的解析によって遷移先画面の情報(HTML、URL等)と画面間の繋がり、画面に到達するための手段が取得される。また、コントローラを通らない画面遷移が動的解析で発見された場合、その画面遷移の情報も追加される。コントローラを通らない画面遷移とは、例えば、aタグでのリンクがクリックされた場合に発生する画面遷移である。   In the subsequent steps S104 to S109, dynamic analysis or the like is performed on the HTML data corresponding to the initial URL and all HTML data that can be transited from the screen related to the HTML data as a starting point. Specifically, as a dynamic analysis, the screen operation of the test target is automatically implemented automatically from the screen corresponding to the initial URL so as to cover all transition destinations for each request acquired by static analysis. Be done. In dynamic analysis, clicks are performed for all links on each screen, and if there is an input form and a corresponding submit button, static analysis is performed for the request when the submit button is pressed. Test input values are generated and screen operations are repeated until the acquired number of transition destinations of the request is satisfied. As to whether or not the number of transition destinations of the request is satisfied, the screen of the transition destination is compared with the screen that has already transitioned, it is determined whether it is a newly transitioned screen, and the number of arrived screens is counted. Through the above dynamic analysis, information on the transition destination screen (HTML, URL, etc.) and the connection between the screens, and means for reaching the screen are acquired. In addition, when a screen transition not passing through the controller is found by dynamic analysis, information on the screen transition is also added. The screen transition not passing through the controller is, for example, a screen transition that occurs when the link in the a tag is clicked.

以下、ステップS104〜S109の間で処理対象とされているHTMLデータを、「対象HTML」という。   Hereinafter, the HTML data to be processed between steps S104 and S109 will be referred to as "target HTML".

ステップS105において、テストシナリオ生成部12は、対象HTMLに係る画面(以下、「対象画面」という。)に対するテストシナリオを生成する。すなわち、対象画面において画面の遷移を発生させる画面要素(リンクやサブミットボタン等)ごとに、操作及びロケータの組からなるテストシナリオが生成される。操作は、クリック等の操作である。ロケータは、操作の対象とされる画面要素の識別情報である。   In step S105, the test scenario generation unit 12 generates a test scenario for the screen related to the target HTML (hereinafter, referred to as "target screen"). That is, a test scenario including a combination of an operation and a locator is generated for each screen element (link, submit button, etc.) that causes a screen transition in the target screen. The operation is an operation such as a click. The locator is identification information of the screen element to be operated.

続くステップS106〜S108は、ステップS105において生成されたテストシナリオごとに実行される。S106〜S108において処理対象とされているテストシナリオを、以下「対象テストシナリオ」という。   The following steps S106 to S108 are performed for each of the test scenarios generated in step S105. The test scenario to be processed in S106 to S108 is hereinafter referred to as "target test scenario".

ステップS107において、テストシナリオ生成部12が、対象テストシナリオに基づいてテストケースを生成し、画面自動操作部13が、当該テストケースを対象画面に対して実行する。その結果、画面遷移が発生する。なお、対象テストシナリオが、入力値を必要とする場合、ステップS107において、テスト入力値の生成が行われる。   In step S107, the test scenario generation unit 12 generates a test case based on the target test scenario, and the screen automatic operation unit 13 executes the test case on the target screen. As a result, screen transition occurs. When the target test scenario requires an input value, a test input value is generated in step S107.

遷移先の全ての画面(HTML)に対してステップS104〜S109が実行されると、テスト資材生成部15は、画面遷移図を生成する(S110)。具体的には、テスト資材生成部15は、生成された画面遷移情報リストと、ステップS104〜S109において実際に発生した画面遷移とを比較して、テストにおいて発生しなかった画面遷移が有れば当該画面遷移を抽出(検出)し、遷移することのできた画面遷移と遷移することのできなかった画面遷移の情報を合わせた画面遷移図を生成する。遷移することができなかった画面遷移に対しては、テストスクリプトも生成できていないため、人手で作成する等のサポートが行われてもよい。   When steps S104 to S109 are executed on all screens (HTML) of the transition destination, the test material generation unit 15 generates a screen transition diagram (S110). Specifically, the test material generation unit 15 compares the generated screen transition information list with the screen transition actually generated in steps S104 to S109, and if there is a screen transition that has not occurred in the test. The screen transition is extracted (detected), and a screen transition diagram is generated by combining the screen transition which could be transitioned with the information of the screen transition which could not be transitioned. For screen transitions that can not be transitioned, since test scripts can not be generated, support such as manual creation may be performed.

図8は、画面遷移図の一例を示す図である。図8では、画面Aから画面B及び画面Cに遷移し、画面Cから画面Bに遷移することが示されている。また、破線の矩形は、仕様では遷移する予定であるが、テストにおいて遷移が発生しなかった画面を示す。すなわち、ソースコードでは、画面Cから遷移する画面が有ることが定義されているが、動的解析では当該画面への遷移が発生しなかったことを示す。   FIG. 8 is a diagram showing an example of the screen transition diagram. In FIG. 8, transition from screen A to screen B and screen C and transition from screen C to screen B are shown. Also, a dashed rectangle indicates a screen where transition is planned in the specification but no transition occurs in the test. That is, in the source code, it is defined that there is a screen transitioning from the screen C, but the dynamic analysis indicates that the transition to the screen does not occur.

続いて、テスト資材生成部15は、各画面遷移が発生したときのテストシナリオとテスト入力値とをテストスクリプトの形式で出力する(S111)。   Subsequently, the test material generation unit 15 outputs a test scenario and a test input value when each screen transition occurs in the form of a test script (S111).

続いて、ステップS101の詳細について説明する。図9は、辞書の生成処理の処理手順の一例を説明するためのフローチャートである。   Subsequently, the details of step S101 will be described. FIG. 9 is a flowchart for explaining an example of the processing procedure of the dictionary generation processing.

ステップS201において、テストシナリオ生成部12は、サーバ装置20におけるDBデータを読み込む。当該DBデータは、ネットワークを介して取得されてもよい。   In step S201, the test scenario generation unit 12 reads DB data in the server device 20. The DB data may be acquired via a network.

続いて、テストシナリオ生成部12は、DBデータの各カラム(各列)についてステップS202〜S210を実行する。以下、処理対象とされているカラムを「対象カラム」という。   Subsequently, the test scenario generation unit 12 executes steps S202 to S210 for each column (each column) of DB data. Hereinafter, a column to be processed is referred to as a "target column".

続いて、テストシナリオ生成部12は、DBデータの行方向の各レコードの対象カラムの値ごとに、ステップS203〜S205を実行する。ステップS204において、テストシナリオ生成部12は、処理対象の値のカテゴリや型等を分析して、当該値の上位語を抽出する。上位語の抽出は、例えば、WordNet("日本語 WordNet"、http://nlpwww.nict.go.jp/wn-ja/)等の単語のデータベースを用いて行うことができる。例えば、当該値が「電信 太郎」であれば、「名字、名前」といった上位語が抽出される。また、当該値が電話番号であれば、「電話番号」といった上位語が抽出される。   Subsequently, the test scenario generation unit 12 executes steps S203 to S205 for each value of the target column of each record in the row direction of the DB data. In step S204, the test scenario generation unit 12 analyzes the category, type, and the like of the value to be processed, and extracts the broader word of the value. For example, the hypernym extraction can be performed using a word database such as WordNet ("Japanese WordNet", http://nlpwww.nict.go.jp/wn-ja/). For example, if the value is "Telegraph Telegraph", a broader term such as "Last name, Name" is extracted. If the value is a telephone number, a broader term such as "telephone number" is extracted.

全てのレコードについて対象カラムの値の上位語が抽出されると、テストシナリオ生成部12は、対象カラムについて最も多く抽出された上位語を、対象カラムに対するタグとして特定する(S206)。   When the broader term of the value of the target column is extracted for all the records, the test scenario generation unit 12 specifies the broader term extracted most frequently for the target column as a tag for the target column (S206).

続くステップS207〜S209において、テストシナリオ生成部12は、各レコードの対象カラムの値を処理対象として、ステップS208を実行する。ステップS208において、テストシナリオ生成部12は、処理対象の値とステップS206において特定されたタグとをセットとし、当該セットを辞書に追加する。   In the subsequent steps S207 to S209, the test scenario generation unit 12 executes step S208 with the value of the target column of each record as the processing target. In step S208, the test scenario generation unit 12 sets the value to be processed and the tag specified in step S206 as a set, and adds the set to the dictionary.

続いて、図6のステップS102の詳細について説明する。図10は、画面遷移情報の抽出処理の処理手順の一例を説明するためのフローチャートである。   Subsequently, details of step S102 in FIG. 6 will be described. FIG. 10 is a flowchart for explaining an example of the processing procedure of the screen transition information extraction processing.

ステップS301において、画面遷移情報抽出部11は、コントローラのソースコードを読み込む。当該ソースコードは、予め補助記憶装置102に記憶されていてもよい。   In step S301, the screen transition information extraction unit 11 reads the source code of the controller. The source code may be stored in advance in the auxiliary storage device 102.

続いて、画面遷移情報抽出部11は、ソースコードから検出されるリクエストごとにステップS302〜304を実行する。ステップS303において、画面遷移情報抽出部11は、処理対象のリクエストに対する遷移先の数をソースコードを参照して特定し、当該リクエストと当該数との組を、画面遷移情報リストに追加する。したがって、画面遷移情報リストには、ソースコード(仕様)において予定されている全ての画面遷移の情報が登録される。   Subsequently, the screen transition information extraction unit 11 executes steps S302 to S304 for each request detected from the source code. In step S303, the screen transition information extraction unit 11 specifies the number of transition destinations for the processing target request with reference to the source code, and adds a combination of the request and the number to the screen transition information list. Therefore, in the screen transition information list, information on all screen transitions scheduled in the source code (specification) is registered.

続いて、図6のステップS107の詳細について説明する。図11は、テストケースの生成及び実行処理の処理手順の一例を説明するためのフローチャートである。   Subsequently, the details of step S107 in FIG. 6 will be described. FIG. 11 is a flowchart for explaining an example of the processing procedure of test case generation and execution processing.

ステップS401において、テストシナリオ生成部12は、対象テストシナリオの操作にフォームへの入力操作が含まれているか否かを判定する。対象テストシナリオの操作にフォームへの入力操作が含まれていない場合(S401でNo)、テストシナリオ生成部12は、対象テストシナリオをそのままテストケースとする(S402)。続いて、画面自動操作部13は、当該テストケースを対象画面に対して実行する(S403)。当該テストケースの実行により、画面遷移が発生する。続いて、画面評価部14は、テストケースの実行によるリンクのクリックやボタンの押下により発生したリクエストを「リクエストA」として記憶する(S405)。   In step S401, the test scenario generation unit 12 determines whether the operation of the target test scenario includes an input operation to a form. When the operation of the target test scenario does not include the input operation to the form (No in S401), the test scenario generation unit 12 sets the target test scenario as the test case as it is (S402). Subsequently, the screen automatic operation unit 13 executes the test case on the target screen (S403). The execution of the test case generates a screen transition. Subsequently, the screen evaluation unit 14 stores the request generated by the click of the link or the depression of the button by the execution of the test case as the “request A” (S405).

続いて、画面評価部14は、ステップS403で遷移した画面が既に遷移したことのある画面か否かをURLやHTML等の情報を用いて判定する(S405)。この際、ステップS403で遷移した画面が未だ遷移したことのない画面である場合、当該遷移に関する情報が、遷移リストの要素として追加される。遷移リストとは、動的解析において発生した画面間の遷移に関する情報を要素とするリストである。当該要素は、遷移前画面のURL、遷移後画面のURL、リクエストA、遷移後画面のHTML、及びテストケース等を含む。   Subsequently, the screen evaluation unit 14 determines whether the screen transited in step S403 has already been transited using information such as a URL and HTML (S405). At this time, when the screen transitioned in step S403 is a screen which has not been transitioned yet, information on the transition is added as an element of the transition list. The transition list is a list having information on the transition between screens generated in the dynamic analysis as an element. The elements include the URL of the screen before transition, the URL of the screen after transition, request A, the HTML of the screen after transition, and a test case.

一方、対象テストシナリオの操作にフォームへの入力操作が含まれている場合(S401でYes)、テストシナリオ生成部12は、フォームへの入力値(テスト入力値)を生成する(S406)。例えば、対象画面が図12に示される通りであれば、対象テストシナリオには、姓に対応するフォームへの入力操作、名に対応するフォームへの入力操作、メールアドレスに対応するフォームへの入力操作、及び登録ボタンの押下等が含まれている。したがって、この場合、フォームごとにテスト入力値が生成される。1つのフォームに対して複数のテスト入力値が生成される可能性が有る。そこで、続くステップS407〜S412は、各フォームに対するテスト入力値の組み合わせごとに実行される。当該組み合わせは、全通りの組合せであってもよいし、全通りの中から所定数の組み合わせが抽出されたものであってもよい。全通りの組み合わせとは、例えば、姓についてN個のテスト入力値が生成され、名についてM個のテスト入力値が生成され、メールアドレスについてL個のテスト入力値が生成された場合、N×M×L通りの組み合わせをいう。以下、処理対象の組み合わせを、「対象組み合わせ」という。   On the other hand, when the operation of the target test scenario includes an input operation to the form (Yes in S401), the test scenario generation unit 12 generates an input value (test input value) to the form (S406). For example, if the target screen is as shown in FIG. 12, in the target test scenario, the input operation to the form corresponding to the surname, the input operation to the form corresponding to the first name, the input to the form corresponding to the e-mail address The operation and the pressing of the registration button are included. Thus, in this case, test input values are generated for each form. Multiple test input values may be generated for one form. Therefore, the subsequent steps S407 to S412 are executed for each combination of test input values for each form. The combinations may be all combinations, or a predetermined number of combinations may be extracted from all combinations. All combinations are, for example, N test input values for the surname, M test input values for the first name, and L test input values for the email address. M × L combinations are said. Hereinafter, the combination of processing targets is referred to as “target combination”.

ステップS408において、テストシナリオ生成部12は、対象組み合わせに属する各テスト入力値がそれぞれに対応するフォームへの入力対象とされたテストケースを、対象テストシナリオに基づいて生成する。続いて、画面自動操作部13は、当該テストケースを対象画面に対して実行する(S409)。すなわち、対象テストシナリオにおいて値の入力先とされている各フォームに対して対象組み合わせに属するテスト入力値が入力され、対象テストシナリオにおいて押下対象とされているサブミットボタンが押下される。その結果、画面遷移が発生する。   In step S408, the test scenario generation unit 12 generates, based on the target test scenario, a test case in which each test input value belonging to the target combination is to be input to the corresponding form. Subsequently, the screen automatic operation unit 13 executes the test case on the target screen (S409). That is, a test input value belonging to the target combination is input to each form to which a value is input in the target test scenario, and the submit button to be pressed in the target test scenario is pressed. As a result, screen transition occurs.

続いて、画面評価部14は、ボタンの押下により発生したリクエストを「リクエストA」として記憶する(S410)。続いて、画面評価部14は、ステップS405と同様の処理を実行する(S411)。   Subsequently, the screen evaluation unit 14 stores a request generated by pressing the button as “request A” (S410). Subsequently, the screen evaluation unit 14 executes the same process as step S405 (S411).

全ての組み合わせについてステップS407〜S412が実行されると、画面評価部14は、遷移リストにおけるリクエストAに対する遷移後画面のURLの数(すなわち、リクエストAを含む要素の数、以下「動的遷移数」という。)が、画面遷移情報リストにおいてリクエストAに対応する遷移先URLの数(以下、「静的遷移数」という。)に等しいか否かを判定する(S413)。すなわち、ステップS413では、リクエストAに関してソースコードに定義されている全ての遷移が検出されたか否かが判定される。   When steps S407 to S412 are executed for all combinations, the screen evaluation unit 14 determines the number of URLs of the screen after transition for the request A in the transition list (that is, the number of elements including the request A, the number of dynamic transitions below). ) Is equal to the number of transition destination URLs corresponding to request A in the screen transition information list (hereinafter referred to as “the number of static transitions”) (S413). That is, in step S413, it is determined whether all the transitions defined in the source code for the request A have been detected.

動的遷移数が、静的遷移数に等しい場合(S413でYes)、対象テストシナリオについては、図11の処理が終了する。動的遷移数が、静的遷移数に達していない場合(S413でNo)、ステップS406以降が繰り返される。すなわち、対象テストシナリオについて、異なるテスト入力値の組み合わせが生成されてテストケースが実行される。なお、静的遷移数を網羅するテスト入力値を生成できるとは限らない。したがって、ステップS413がNoの場合のループの回数には上限が設けられてもよい。   If the number of dynamic transitions is equal to the number of static transitions (Yes in S413), the process of FIG. 11 ends for the target test scenario. When the number of dynamic transitions has not reached the number of static transitions (No in S413), steps S406 and subsequent steps are repeated. That is, for the target test scenario, different combinations of test input values are generated and the test case is executed. Note that test input values that cover static transition numbers can not always be generated. Therefore, an upper limit may be provided to the number of loops when step S413 is No.

続いて、ステップS406の詳細について説明する。図13は、テスト入力値の生成処理の処理手順の一例を説明するためのフローチャートである。   Subsequently, the details of step S406 will be described. FIG. 13 is a flowchart for describing an example of a processing procedure of test input value generation processing.

ステップS501〜S506は、対象テストシナリオにおいて入力対象とされるフォームごとに実行される。以下、処理対象のフォームを「対象フォーム」という。   Steps S501 to S506 are executed for each form to be input in the target test scenario. Hereinafter, the form to be processed is referred to as "target form".

続くステップS502〜S505では、対象フォームの周辺情報に基づいて、対象フォームに対するテスト入力値が生成される。対象フォームの周辺情報とは、例えば、対象HTMLのDOMツリーにおける対象フォームの周辺要素群である。フォームの周辺要素とは、例えば、フォームのid、name、class、value、テキスト等の付随情報又は属性情報等である。すなわち、1つのフォームに対して周辺要素は複数存在しうる。したがって、ステップS502〜S505は、対象フォームの周辺要素ごとに実行される。以下、処理対象の周辺要素を「対象周辺要素」という。   In the subsequent steps S502 to S505, test input values for the target form are generated based on the peripheral information of the target form. The peripheral information of the target form is, for example, peripheral elements of the target form in the DOM tree of the target HTML. The peripheral elements of the form are, for example, incidental information such as form id, name, class, value, text, etc. or attribute information. That is, there can be a plurality of peripheral elements for one form. Therefore, steps S502 to S505 are performed for each peripheral element of the target form. Hereinafter, the peripheral element to be processed is referred to as “target peripheral element”.

ステップS503において、テストシナリオ生成部12は、対象周辺要素の値の上位語を抽出する。具体的には、テストシナリオ生成部12は、対象フォームの項目名を正規表現マッチング技術等を用いて推測する。例えば、対象周辺要素がidであり、「id=address」であれば、テストシナリオ生成部12は、対象フォームが「住所」を入れるフォームである(対象フォームの項目名が「住所」である)と推測する。この場合「住所」が対象周辺要素の値の上位語として抽出される。   In step S503, the test scenario generation unit 12 extracts the hypernym of the value of the target peripheral element. Specifically, the test scenario generation unit 12 estimates the item name of the target form using a regular expression matching technique or the like. For example, if the target peripheral element is id and “id = address”, the test scenario generation unit 12 is a form in which the target form is “address” (the item name of the target form is “address”) I guess. In this case, "address" is extracted as a broader term of the value of the target peripheral element.

続いて、テストシナリオ生成部12は、抽出された上位語に一致するタグに対応付けられている値を辞書から抽出し、当該値を対象フォームに対するテスト入力値の一つとする(S504)。ステップS502〜S505が対象フォームの各周辺要素について実行されると、対象フォームについて1以上のテスト入力値が生成される。   Subsequently, the test scenario generation unit 12 extracts a value associated with the tag matching the extracted broader term from the dictionary, and sets the value as one of test input values for the target form (S504). When steps S502-S505 are performed for each peripheral element of the target form, one or more test input values are generated for the target form.

続いて、図11のステップS405及びS411の詳細について説明する。図14は、遷移先画面の判定処理の処理手順の一例を説明するためのフローチャートである。   Subsequently, the details of steps S405 and S411 in FIG. 11 will be described. FIG. 14 is a flowchart for describing an example of a processing procedure of determination processing of a transition destination screen.

ステップS601において、画面評価部14は、遷移リストの中のリクエストAを含むいずれかの要素の中に、現在の遷移先画面(すなわち、対象画面)のURLが遷移後画面のURLとして含まれているか否かを判定する。現在の遷移先画面のURLがリクエストAの遷移後画面のURLとして遷移リストに含まれていない場合(S601でNo)、画面評価部14は、リクエストA、遷移前画面のURL、現在の遷移先画面のURL、現在の遷移先画面のHTML(対象HTML)、及び対象テストシナリオに係るテストケースをセットとする要素を遷移リストに追加する(S602)。   In step S601, the screen evaluation unit 14 includes the URL of the current transition destination screen (that is, the target screen) as the URL of the post-transition screen in one of the elements including the request A in the transition list. Determine if there is. When the URL of the current transition destination screen is not included in the transition list as the URL of the post-transition screen of request A (No in S601), the screen evaluation unit 14 displays the request A, the URL of the screen before transition, the current transition destination An element including the screen URL, the current transition target screen HTML (target HTML), and the test case related to the target test scenario is added to the transition list (S602).

一方、現在の遷移先画面のURLがリクエストAの遷移後画面のURLとして遷移リストに含まれている場合(S601でYes)、画面評価部14は、遷移リストにおいてリクエストAを含み、かつ、現在の遷移先画面のURLを遷移後画面のURLとして含む要素の遷移後画面のHTMLデータごとに、ステップS603〜S611を実行する。以下、処理対象とされているHTMLを「対象遷移済みHTML」という。また、現在の遷移先画面のHTMLを、上記において定義した通り「対象HTML」という。   On the other hand, when the URL of the current transition destination screen is included in the transition list as the URL of the post-transition screen of request A (Yes in S601), the screen evaluation unit 14 includes request A in the transition list and is currently Steps S603 to S611 are executed for each HTML data of the screen after transition of an element including the URL of the transition destination screen as the URL of the screen after transition. Hereinafter, the HTML to be processed is referred to as “target transitioned HTML”. Also, the HTML of the current transition destination screen is referred to as "target HTML" as defined above.

続いて、画面評価部14は、対象遷移済みHTML及び対象HTMLのそれぞれについて、ステップS604〜S608を実行する。対象遷移済みHTML及び対象HTMLのうち、処理対象とされているHTMLを、「着目HTML」という。   Subsequently, the screen evaluation unit 14 executes steps S604 to S608 for each of the target transition completed HTML and the target HTML. Of the target transition completed HTML and the target HTML, the HTML to be processed is referred to as “targeted HTML”.

ステップS605において、画面評価部14は、着目HTMLのDOMツリーを生成する。図15にDOMツリーの一例を示す。図15に示されるように、DOMツリーは、各ノード(各画面要素)の階層構造を示す。   In step S605, the screen evaluation unit 14 generates a DOM tree of the HTML of interest. FIG. 15 shows an example of the DOM tree. As shown in FIG. 15, the DOM tree shows the hierarchical structure of each node (each screen element).

続いて、画面評価部14は、画面の役割に影響を与えない(すなわち、画面の識別に影響を与えない)ノードを、DOMツリーから削除する(S606)。画面の役割に影響を与えないノードとは、属性ノード、テキストノード、及び文字の大きさや字体、位置を表すノード(Centerタグ、Uタグなど)等の3種類である。したがって、図15において破線の矩形で示されているノードが削除される。   Subsequently, the screen evaluation unit 14 deletes a node that does not affect the role of the screen (that is, does not affect the identification of the screen) from the DOM tree (S606). There are three types of nodes that do not affect the role of the screen, such as attribute nodes, text nodes, size and font of characters, and nodes representing positions (Center tag, U tag, etc.). Therefore, the node indicated by the dashed rectangle in FIG. 15 is deleted.

続いて、画面評価部14は、DOMツリーにおいて並列関係を有するノード(並列ノード)を1つのノードに集約する(S607)。並列ノードとは、DOMツリーの階層構造において同じ階層に属する同じタグ名の複数のノードをいう。図15では、1点鎖線で囲まれている2つの<h1>タグに対応するノードが並列ノードに該当する。ノードの集約は、並列ノードのうちの1つを残して他を削除することによって実現されてもよいし、各ノードを抽象化した1つのノードによって、並列ノードを置換することによって実現されてもよい。   Subsequently, the screen evaluation unit 14 consolidates nodes (parallel nodes) having a parallel relationship in the DOM tree into one node (S607). A parallel node refers to a plurality of nodes with the same tag name belonging to the same hierarchy in the hierarchical structure of the DOM tree. In FIG. 15, nodes corresponding to two <h1> tags surrounded by an alternate long and short dash line correspond to parallel nodes. The aggregation of nodes may be realized by leaving one of the parallel nodes and deleting the other, or by replacing the parallel nodes by one node abstracting each node. Good.

ステップS604〜S608が対象遷移済みHTML及び対象HTMLのそれぞれについて実行されることにより、それぞれについて抽象化されたDOMツリーが生成される。   By executing steps S604 to S608 for each of the target transitioned HTML and the target HTML, an abstracted DOM tree is generated for each of the target transitioned HTML and the target HTML.

続いて、画面評価部14は、抽象化された2つのDOMツリーのそれぞれをHTMLに変換し、変換結果を比較して、比較結果を出力する(S609)。すなわち、対象遷移済みHTMLに係る画面と、対象HTMLに係る画面との同一性が判定される。比較されたHTMLが一致する場合、「一致」が比較結果として出力される。そうでない場合、「不一致」が比較結果として出力される。なお、比較されたHTMLの一致には、完全一致が要求されなくてもよい。例えば、同一タグの出現順等が異なることが許容されてもよい。   Subsequently, the screen evaluation unit 14 converts each of the two abstracted DOM trees into HTML, compares the conversion results, and outputs the comparison result (S609). That is, the sameness between the screen related to the target transitioned HTML and the screen related to the target HTML is determined. If the compared HTML matches, "match" is output as the comparison result. Otherwise, "mismatch" is output as the comparison result. Note that perfect match may not be required for the matched HTML. For example, the appearance order of the same tag may be allowed to be different.

比較結果が「一致」である場合(S610でYes)、対象遷移済みHTMLに関する処理は終了する。比較結果が「不一致」である場合(S610でNo)、画面評価部14は、ステップS602と同じ処理を実行して(S612)、図14の処理を終了する。   If the comparison result is "match" (Yes in S610), the process regarding the target transitioned HTML ends. When the comparison result is “mismatch” (No in S610), the screen evaluation unit 14 executes the same process as step S602 (S612), and ends the process of FIG.

続いて、図6のステップS110の詳細について説明する。図16は、画面遷移図の生成処理の処理手順の一例を説明するためのフローチャートである。   Subsequently, details of step S110 in FIG. 6 will be described. FIG. 16 is a flowchart for describing an example of a processing procedure of generation processing of the screen transition diagram.

ステップS701〜S703は、遷移リストに含まれている要素(遷移前画面のURL、遷移後画面のURL、リクエスト、遷移後画面のHTML、及びテストケースのセット)ごとに実行される。以下、処理対象の要素を「対象要素」という。   Steps S701 to S703 are executed for each of the elements included in the transition list (URL of screen before transition, URL of screen after transition, request, HTML of screen after transition, and set of test cases). Hereinafter, the element to be processed is referred to as a "target element".

ステップS702において、テスト資材生成部15は、画面遷移図リストに、対象要素のリクエスト、対象要素の遷移前画面のURL、対象要素の遷移後画面のURLを含む要素を追加する。すなわち、画面遷移図リストは、リクエスト、遷移前画面のURL、遷移後画面のURLのセットを一つの要素とするリストである。   In step S702, the test material generation unit 15 adds an element including the request of the target element, the URL of the screen before transition of the target element, and the URL of the screen after transition of the target element to the screen transition diagram list. That is, the screen transition diagram list is a list in which a set of the request, the URL of the screen before transition, and the URL of the screen after transition is one element.

ステップS704〜S709は、画面遷移図リストの要素ごとに実行される。以下、処理対象の要素を「対象要素」という。   Steps S704 to S709 are executed for each element of the screen transition diagram list. Hereinafter, the element to be processed is referred to as a "target element".

ステップS705において、テスト資材生成部15は、画面遷移図リストにおいて、リクエスト及び遷移前画面のURLが対象要素と共通する要素数をカウントする。当該要素数は、動的解析において同じ画面(遷移前画面)から同じリクエストに基づいて遷移した画面の数である。以下、当該要素数を「動的遷移数n」という。   In step S705, the test material generation unit 15 counts, in the screen transition diagram list, the number of elements in which the URL of the request and the screen before transition is common to the target element. The number of elements is the number of screens transitioned from the same screen (screen before transition) in the dynamic analysis based on the same request. Hereinafter, the number of elements is referred to as “dynamic transition number n”.

続いて、テスト資材生成部15は、対象要素のリクエストに対応する遷移先の数を画面遷移情報リストから取得する(S706)。当該遷移先の数は、静的解析においてソースコードから抽出された当該リクエストの遷移先の数である。以下、当該遷移先の数を「静的遷移数m」という。   Subsequently, the test material generation unit 15 acquires the number of transition destinations corresponding to the request of the target element from the screen transition information list (S706). The number of transition destinations is the number of transition destinations of the request extracted from the source code in static analysis. Hereinafter, the number of transition destinations is referred to as “the number of static transitions m”.

続いて、テスト資材生成部15は、動的遷移数nが静的遷移数m以上であるか否かを判定する(S707)。動的遷移数nが静的遷移数m以上である場合(S707でYes)、対象要素に対する処理は終了する。動的遷移数nが静的遷移数m未満である場合(S707でYes)、テスト資材生成部15は、動的な遷移と静的な遷移との差異を検出する。すなわち、動的解析において遷移していない画面の存在が検出される。そこで、テスト資材生成部15は、対象要素のリクエストと対象要素の遷移前画面のURLとを含む要素を、m−nの数だけ画面遷移図リストに追加する(S708)。すなわち、図8の破線の矩形に対応する遷移に係る要素が追加される。   Subsequently, the test material generation unit 15 determines whether the dynamic transition number n is equal to or more than the static transition number m (S707). If the dynamic transition number n is equal to or more than the static transition number m (Yes in S 707), the processing for the target element ends. When the dynamic transition number n is less than the static transition number m (Yes in S 707), the test material generation unit 15 detects the difference between the dynamic transition and the static transition. That is, the presence of a screen not transitioning in the dynamic analysis is detected. Therefore, the test material generation unit 15 adds elements including the request of the target element and the URL of the screen before transition of the target element to the screen transition diagram list by the number of m−n (S708). That is, an element relating to the transition corresponding to the dashed rectangle in FIG. 8 is added.

画面遷移図リストの全ての要素に対してステップS704〜S709が実行されると、テスト資材生成部15は、画面遷移図リストに基づいて、画面遷移図を生成する(S710)。この際、遷移後画面のURLが無い要素については、破線の矩形等、遷移できなかった画面として表現される。なお、生成された画面遷移図は、表示装置106に表示されてもよいし、画面遷移図を示すデータが、補助記憶装置102に保存されてもよい。   When steps S704 to S709 are executed for all elements of the screen transition diagram list, the test material generation unit 15 generates a screen transition diagram based on the screen transition diagram list (S710). Under the present circumstances, about the element without URL of the screen after transition, it is expressed as a screen which could not be changed, such as a rectangle of a dashed line. The generated screen transition diagram may be displayed on the display device 106, or data indicating the screen transition diagram may be stored in the auxiliary storage device 102.

続いて、図6のステップS111の詳細について説明する。図17は、テストスクリプトの出力処理の処理手順の一例を説明するためのフローチャートである。   Subsequently, details of step S111 in FIG. 6 will be described. FIG. 17 is a flowchart for explaining an example of a processing procedure of test script output processing.

ステップS801〜S803において、テスト資材生成部15は、遷移リストの各要素に含まれているテストケースをスクリプトの形式で出力することで、テストスクリプトを出力する。   In steps S801 to S803, the test material generation unit 15 outputs a test script by outputting the test case included in each element of the transition list in the form of a script.

上述したように、本実施の形態によれば、Webアプリケーションの仕様として予定された画面遷移の情報(静的な画面遷移の情報)をソースコードから抽出し、Webアプリケーションに対する操作を自動的に実行して画面遷移を繰り返すことで発生した画面遷移の情報(動的な画面遷移の情報)を自動的に抽出し、静的な画面遷移の情報と動的な画面遷移の情報との差異を検出することができる。その結果、ソースコード上で定義されていながらテストスクリプトでは発生させることができない画面遷移を検出することができる。すなわち、Webアプリケーションに関して自動生成されるテストスクリプトでは実現できない画面遷移の検出を可能とすることができる。したがって、例えば、Webアプリケーションの不具合を市場流出前において検知できる可能性と高めることができ、短期開発をも可能とすることができる。   As described above, according to the present embodiment, information on screen transition scheduled as the specification of the Web application (information on static screen transition) is extracted from the source code, and the operation on the Web application is automatically executed. Automatically extracts screen transition information (dynamic screen transition information) generated by repeating screen transition, and detects differences between static screen transition information and dynamic screen transition information can do. As a result, it is possible to detect screen transitions which are defined on source code but can not be generated by a test script. That is, it is possible to detect a screen transition which can not be realized by a test script automatically generated for a Web application. Therefore, for example, it is possible to enhance the possibility of detecting a failure of the web application before the market outflow, and also enable short-term development.

また、本実施の形態によれば、テスト対象から仕様をリバースし、リバースした仕様に基づいてテストケースを自動生成し、テストスクリプトとして出力することができる。これによりWebアプリケーションにおける網羅的な画面遷移テストのテストスクリプト生成を追加の稼働を必要とせずに自動で行うことができる。その結果、例えば、ソフトウェアテストにかかる費用を削減することができる。   Further, according to the present embodiment, it is possible to reverse the specification from the test target, automatically generate a test case based on the reversed specification, and output it as a test script. As a result, test script generation for comprehensive screen transition test in Web application can be automatically performed without the need for additional operation. As a result, for example, the cost for software testing can be reduced.

また、本実施の形態によれば、技術課題1に関して、テスト対象から自動で、テスト対象を構成する画面と画面間の繋がり、各画面に到達するための手段を漏れなくリバースすることができる。また、静的解析によって、予めリクエストに対する画面遷移数の情報が入手できるため、動的解析中に探索打切りの判断を下しやすくなり、現実的な時間内で処理を行うことができる。本実施の形態ではサーバサイドの情報は必要としないため、ユーザはサーバサイドの情報を取得できるようにする環境を整える必要が無く、ツール導入のための追加稼働を抑えることができる。   Further, according to the present embodiment, regarding the technical subject 1, it is possible to automatically reverse the connection between the screens constituting the test object and the screens and to reach each screen without omission from the test object. In addition, since information on the number of screen transitions for a request can be obtained in advance by static analysis, it is easy to determine the search termination during dynamic analysis, and processing can be performed in a realistic time. In the present embodiment, since server side information is not required, there is no need for the user to prepare an environment for acquiring server side information, and it is possible to suppress additional operation for introducing a tool.

また、本実施の形態によれば、技術課題2に関して、クライアントサイドの情報(HTML)を用いて、画面遷移を実現するための適切なテスト入力値を生成することができる。従来技術と異なり、サーバサイドの情報は必要としないため、ユーザはサーバサイドの情報を取得できるようにする環境を整える必要が無く、ツール導入のための追加稼働を抑えることができる。   Moreover, according to the present embodiment, with regard to the technical problem 2, it is possible to generate an appropriate test input value for realizing the screen transition using the client side information (HTML). Unlike the prior art, since the server side information is not required, the user does not have to prepare an environment for acquiring the server side information, and it is possible to suppress the additional operation for introducing the tool.

更に、本実施の形態によれば、技術課題3に関して、閾値の設定を必要とせずに機能テストにおける適切な画面識別が可能となり、検証パターンの質を向上させることができる。   Furthermore, according to the present embodiment, with regard to the technical problem 3, it is possible to appropriately identify the screen in the functional test without requiring the setting of the threshold, and it is possible to improve the quality of the verification pattern.

なお、本実施の形態において、クライアント装置10は、差異検出装置の一例である。画面遷移情報抽出部11は、抽出部の一例である。画面自動操作部13は、操作部の一例である。画面評価部14は、生成部の一例である。テスト資材生成部15は、検出部の一例である。テストシナリオ生成部12は、生成部の一例である。HTMLデータは、画面の記述情報の一例である。画面遷移情報リストは、第1の画面遷移の情報の一例である。遷移リストは、第2の画面遷移の情報の一例である。HTMLデータは、記述情報の一例である。   In the present embodiment, the client device 10 is an example of the difference detection device. The screen transition information extraction unit 11 is an example of an extraction unit. The screen automatic operation unit 13 is an example of the operation unit. The screen evaluation unit 14 is an example of a generation unit. The test material generation unit 15 is an example of a detection unit. The test scenario generation unit 12 is an example of a generation unit. HTML data is an example of screen description information. The screen transition information list is an example of first screen transition information. The transition list is an example of second screen transition information. HTML data is an example of description information.

以上、本発明の実施例について詳述したが、本発明は斯かる特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。   Although the embodiments of the present invention have been described above in detail, the present invention is not limited to such specific embodiments, and various modifications may be made within the scope of the present invention as set forth in the claims.・ Change is possible.

10 クライアント装置
11 画面遷移情報抽出部
12 テストシナリオ生成部
13 画面自動操作部
14 画面評価部
15 テスト資材生成部
20 サーバ装置
100 ドライブ装置
101 記録媒体
102 補助記憶装置
103 メモリ装置
104 CPU
105 インタフェース装置
106 表示装置
107 入力装置
B バス
DESCRIPTION OF SYMBOLS 10 Client apparatus 11 Screen transition information extraction part 12 Test scenario production | generation part 13 Screen automatic operation part 14 Screen evaluation part 15 Test material production | generation part 20 Server apparatus 100 Drive apparatus 101 Recording medium 102 Auxiliary storage device 103 Memory device 104 CPU
105 interface device 106 display device 107 input device B bus

Claims (6)

Webアプリケーションのソースコードから、前記ソースコードにおいて定義された第1の画面遷移の情報を抽出する抽出部と、
前記Webアプリケーションに関して表示される画面を自動的に操作する操作部と、
自動的な操作によって実現される第2の画面遷移の情報を生成する生成部と、
前記第1の画面遷移の情報と前記第2の画面遷移の情報との差異を検出する検出部と、
を有することを特徴とする差異検出装置。
An extraction unit for extracting information of a first screen transition defined in the source code from a web application source code;
An operation unit that automatically operates a screen displayed regarding the web application;
A generation unit that generates information of a second screen transition that is realized by an automatic operation;
A detection unit that detects a difference between the information of the first screen transition and the information of the second screen transition;
What is claimed is: 1. A difference detection apparatus comprising:
前記生成部は、前記第2の画面遷移の情報に係る第1の画面の記述情報と第2の画面の記述情報とのそれぞれに対して所定の編集を行い、編集後の記述情報を比較して、前記第1の画面と前記第2の画面との同一性を判定する、
ことを特徴とする請求項1記載の差異検出装置。
The generation unit performs predetermined editing on each of the description information of the first screen and the description information of the second screen related to the information of the second screen transition, and compares the description information after the editing. Determining the identity between the first screen and the second screen,
The difference detection device according to claim 1, wherein the difference is detected.
前記所定の編集は、並列関係を有する画面要素を集約することである、
ことを特徴とする請求項2記載の差異検出装置。
The predetermined editing is to combine screen elements having a parallel relationship,
The difference detection apparatus according to claim 2, wherein the difference is detected.
前記所定の編集は、画面の識別に影響を与えない画面要素を削除することである、
ことを特徴とする請求項2記載の差異検出装置。
The predetermined editing is to delete screen elements that do not affect screen identification.
The difference detection apparatus according to claim 2, wherein the difference is detected.
前記Webアプリケーションに関して表示される画面において値の入力先とされる画面要素について、当該画面の記述情報において当該画面要素について定義されている情報に基づいて、入力値を生成する生成部を有し、
前記操作部は、前記生成部によって生成された入力値を入力する、
ことを特徴とする請求項1乃至4いずれか一項記載の差異検出装置。
And a generation unit configured to generate an input value based on the information defined for the screen element in the description information of the screen for the screen element to be the input destination of the value in the screen displayed regarding the Web application,
The operation unit inputs an input value generated by the generation unit.
The difference detection device according to any one of claims 1 to 4, wherein the difference is detected.
Webアプリケーションのソースコードから、前記ソースコードにおいて定義された第1の画面遷移の情報を抽出する抽出部と、
前記Webアプリケーションに関して表示される画面を自動的に操作する操作部と、
自動的な操作によって実現される第2の画面遷移の情報を生成する生成部と、
前記第1の画面遷移の情報と前記第2の画面遷移の情報との差異を検出する検出部と、
としてコンピュータを機能させることを特徴とするプログラム。
An extraction unit for extracting information of a first screen transition defined in the source code from a web application source code;
An operation unit that automatically operates a screen displayed regarding the web application;
A generation unit that generates information of a second screen transition that is realized by an automatic operation;
A detection unit that detects a difference between the information of the first screen transition and the information of the second screen transition;
A program characterized by causing a computer to function.
JP2017006984A 2017-01-18 2017-01-18 Difference detection device and program Active JP6514244B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017006984A JP6514244B2 (en) 2017-01-18 2017-01-18 Difference detection device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017006984A JP6514244B2 (en) 2017-01-18 2017-01-18 Difference detection device and program

Publications (2)

Publication Number Publication Date
JP2018116496A JP2018116496A (en) 2018-07-26
JP6514244B2 true JP6514244B2 (en) 2019-05-15

Family

ID=62983914

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017006984A Active JP6514244B2 (en) 2017-01-18 2017-01-18 Difference detection device and program

Country Status (1)

Country Link
JP (1) JP6514244B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6626946B1 (en) * 2018-09-19 2019-12-25 みずほ情報総研株式会社 Test support system, test support method, and test support program
EP3861437A4 (en) * 2018-10-02 2022-09-28 Functionize, Inc. Software testing
JP7260150B2 (en) * 2019-03-26 2023-04-18 Necソリューションイノベータ株式会社 WEBSITE DESIGN SUPPORT DEVICE, WEBSITE DESIGN SUPPORT METHOD, AND PROGRAM
JP7211228B2 (en) * 2019-04-09 2023-01-24 日本電信電話株式会社 Analysis device, analysis method, and program
JP7127601B2 (en) * 2019-04-10 2022-08-30 日本電信電話株式会社 Similar Transition Identifying Device, Similar Transition Identifying Method, and Program
JPWO2020213371A1 (en) * 2019-04-16 2021-11-04 株式会社ソニー・インタラクティブエンタテインメント Information processing device
CN111221728B (en) * 2019-12-31 2022-08-23 卡斯柯信号有限公司 Self-adaptive test script system and method for rail transit automatic control software
JP7390070B1 (en) * 2022-09-20 2023-12-01 株式会社エーアイセキュリティラボ Systems, methods and programs for inspecting websites

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3008872B2 (en) * 1997-01-08 2000-02-14 日本電気株式会社 GUI system automatic operation device and operation macro execution device
JP2005115582A (en) * 2003-10-07 2005-04-28 Hitachi Ltd System and method for generating test script component automatically
JP4395761B2 (en) * 2005-03-04 2010-01-13 日本電気株式会社 Program test support apparatus and method
JP4846029B2 (en) * 2010-02-05 2011-12-28 株式会社野村総合研究所 Operation verification apparatus, operation verification method, and operation verification program
JP6354457B2 (en) * 2014-08-27 2018-07-11 日本電気株式会社 Application development support apparatus, data processing method thereof, and program
JP6491959B2 (en) * 2015-06-03 2019-03-27 新日鉄住金ソリューションズ株式会社 Information processing apparatus, information processing method, and program

Also Published As

Publication number Publication date
JP2018116496A (en) 2018-07-26

Similar Documents

Publication Publication Date Title
JP6514244B2 (en) Difference detection device and program
US10331758B2 (en) Digital communications platform for webpage overlay
CN107729475B (en) Webpage element acquisition method, device, terminal and computer-readable storage medium
US20190303269A1 (en) Methods and systems for testing visual aspects of a web page
CN107688664B (en) Chart generation method and device, computer equipment and storage medium
US9959257B2 (en) Populating visual designs with web content
CN110688600A (en) Online editing method, device and equipment based on HTML (Hypertext markup language) page and storage medium
JP6535038B2 (en) Screen determination apparatus, screen determination method and program
CN111552633A (en) Interface abnormal call testing method and device, computer equipment and storage medium
US20220342518A1 (en) Card-based information management method and system
WO2020235085A1 (en) Operation log visualization device, operation log visualization method, and operation log visualization program
CN113688288B (en) Data association analysis method, device, computer equipment and storage medium
CN112817817B (en) Buried point information query method, buried point information query device, computer equipment and storage medium
JP6723976B2 (en) Test execution device and program
CN112835579A (en) Method and device for determining interface code, electronic equipment and storage medium
CN110968314A (en) Page generation method and device
US10289613B2 (en) Element identifier generation
CN113656737A (en) Webpage content display method and device, electronic equipment and storage medium
US9824140B2 (en) Method of creating classification pattern, apparatus, and recording medium
US20230401265A1 (en) Cross-application componentized document generation
US20240054174A1 (en) Methods and systems for obtaining and storing web pages
CN111522737B (en) Automatic test verification method and device for front-end interface and storage medium
US11960560B1 (en) Methods for analyzing recurring accessibility issues with dynamic web site behavior and devices thereof
CN104809101A (en) Communication object finding method and equipment
US20220405196A1 (en) Operation pattern generation apparatus, operation pattern generation method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180727

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190328

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190411

R150 Certificate of patent or registration of utility model

Ref document number: 6514244

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150