The Tellurium automated testing framework was created by Jian Fang in June 2007 to test Web applications, and in June 2008 it was a source project to Google code. It publishes the version regularly, the current version number is 0.7.0. The project's core has lasted two years and spawned several subprojects, including UDL, Core, Engine, widget extensions, Maven archetype, Trump, Tellurium IDE, Telluriumworks, and reference projects.
This framework is developed from the selenium framework, but it has different testing concepts. Most Web test frameworks, such as selenium, are primarily dedicated to individual UI elements. Tellurium, on the other hand, sees multiple UI elements as a widget as a whole and calls it UI module.
Take the Google search UI as an example, the interface is represented by Tellurium as follows:
ui.Container(uid: "GoogleSearchModule",clocator: [tag: "td"]){
InputBox(uid: "Input",clocator: [title: "Google Search"])
SubmitButton(uid: "Search",clocator: [name: "btnG",value: "Google
Search"])
SubmitButton(uid: "ImFeelingLucky",clocator: [value: "I'm Feeling
Lucky"])
}
As you can see in the example, the UI module is a set of nested UI elements, tag, and attributes. Tellurium is more descriptive and more intelligent in response to changes after UI module is adopted. It also makes it easy to represent dynamic Web content and is easy to maintain.
This framework consists of the following components:
trump--a Firefox plug-in, full name Tellurium UI module Plugin, that automatically generates UI module after the user selects UI elements on the Web page to be tested.
Tellurium ide--Another Firefox plug-in that can record user actions and generate tellurium test scripts, including the definition of UI module, user actions, and assertions. The test script was written in groovy.
telluriumworks--A separate Java swing application for editing and running tellurium test scripts. An IDE plugin for IntelliJ idea is also being developed.
JavaScript Widget extensions--extends to the popular JavaScript framework, such as Dojo and jquery UI. This allows the user to refer to the published tellurium jar file in the project and, in the UI module definition, to use the UI widget as an ordinary Tellurium object.
Characteristics
Key features include:
The UI module clearly represents the UI to be tested. In the Tellurium test code, the locator (locator) is not used directly. Instead, you use the UID object to refer to the UI elements to be more expressive. Like what:
type "GoogleSearchModule.Input","Tellurium test"
click "GoogleSearchModule.Search"
Describes the UI using UI properties instead of a fixed locator. The actual locator will be generated at run time. If the property changes, the new Run-time locator is automatically regenerated by the framework. Tellurium enables adaptive UI changes on demand.
The Santa algorithm in Tellurium 0.7.0 further improves the intelligence of the test by positioning the entire UI module at once. In addition, the UI module partial matching mechanism is used to adapt to the change of the attribute to some extent.
The Tellurium UI template and the Tellurium UID Description Language (UDL) are used to represent dynamic Web content.
The framework implements the separation of UI module and test code, which facilitates refactoring.
For example, the UI and corresponding test methods are defined in the detached groovy class. In this way, the test code is decoupled from the UI module.
In addition, the framework also:
Encapsulate Web UI elements with abstract UI objects
Enabling Widgets for reusability
Provides a DSL for UI definitions, actions, and tests
Support Group positioning to locate a set of UI components at once
Includes CSS selector support to improve test speed in IE
Provides locator caching and command sets to improve test speed
Support data-driven testing