Browse Prior Art Database

Java HTTP Automation Tester Framework Disclosure Number: IPCOM000132530D
Original Publication Date: 2005-Dec-20
Included in the Prior Art Database: 2005-Dec-20
Document File: 3 page(s) / 23K

Publishing Venue



Java HTTP Automation Tester (JHAT) framework is designed for testers to easily write test logic and play back HTTP flow with configurable concurrent users against a specified host. To develop a test scenario, a tester only needs to write the logic in Java using the application programming interfaces (API?s) provided by JHAT framework and specify the property files for execution parameters at runtime. The framework supports modular programming and promotes reuse of test logic code in Java bytecode format. Most of the components in JHAT are extensible through Java inheritance. The framework also provides extensible test failure exception handling and statistics logging mechanisms.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 3

Java HTTP Automation Tester Framework

Framework Principles

Web automation testing is to recreate HTTP flow. The core of a test script is defining logic to deduce each request from available information. JHAT provides interfaces for testers to easily access the latest HTML response as well as user-specified historical information and to construct and send HTTP requests. Extracting information from a HTML page is a separate task from HTTP flow itself. If all the URL's are static, a tester doesn't need to process any HTML page to keep the HTTP flow going. However, to make test scripts more adaptable, it is a good practice to extract information from returned HTML pages dynamically. For example, the URL for "Log in" link on the welcome page may change from release to release but the link is always called "Log in." JHAT provides a default utility class to process HTML pages (e.g. find a link in a page), but testers have all the freedom to write their own HTML utility.

Layered Architecture

JHAT has three layers: the HTTP transmission layer, the script layer and the execution layer. The HTTP transmission layer sends HTTP requests and receives responses. The script layer embeds tester-defined logic and uses HTTP transmission API's to perform HTTP transmission. The execution layer references the HTTP transmission layer by a configurable class name and passes the HTTP transmission instance to the script layer. It also creates and drives script instances to perform test cases. The HTTP transmission and the execution layers are usually implemented by tool vendors while the script layer is implemented by users/testers. The same script classes that conform to JHAT interfaces can be executed by different versions of a tool and by tools from different vendors, as long as the tools implement JHAT interfaces. All the usage is in Java bytecode format. JHAT provides default implementation of the execution and the HTTP transmission layers using Apache HTTPClient.

The framework separates HTML processing into an individual class, HTMLManager , which provides convenient static methods to extract information from a given HTML response page and to write HTML pages to the file system. The default implementations of the execution layer use HTMLManager to record test statistics and test failures as HTML files. The default implementation of the HTTP transmission layer also uses HTMLManager to optionally record received pages.


Page 2 of 3

Execution Layer



Script Layer

HTTP Transmission Layer


For basic usage, a tester will extend the script layer to design the test logic. The script class name...