Last updated July 08, 2009 04:12, by johnjianfang
Feedicon  

Tellurium Automated Testing Framework

The Tellurium Automated Testing Framework (Tellurium) is a UI module-based automated testing framework for web applications. The UI module is a collection of UI elements you group together. Usually, the UI module represents a composite UI object in the format of nested basic UI elements. For example, the Google search UI module can be expressed as follows,

ui.Container(uid: "GoogleSearchModule", clocator: [tag: "td"], group: "true"){
   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"])
}

The UI module makes it possible to build UI elements' locators at run time. The framework does Object to Locator Mapping (OLM) automatically at run time so that you can define UI objects simply by their attributes, i.e., Composite Locators denoted by the "clocator". Furthermore, Tellurium uses the Group Locating Concept (GLC) to exploit information inside a collection of UI components to help finding their locators and the GLC is denoted by the "group" attribute in the above UI module.

The Tellurium framework defines a new Domain Specific Language (DSL) for web testing. Still take the above Google search module as an example, you can use the following DSLs to do a Google search,

type "GoogleSearchModule.Input", "Tellurium test"
click "GoogleSearchModule.Search"
waitForPageToLoad 30000

One very powerful feature of Tellurium is that you can use *UI templates* to represent many identical UI elements or dynamic size of different UI elements at runtime, which are extremely useful to test dynamic web such as a data grid. One typical data grid example is as follows,

ui.Table(uid: "table", clocator: [:]){
   InputBox(uid: "row: 1, column: 1", clocator: [:])
   Selector(uid: "row: *, column: 2", clocator: [:])
   UrlLink(uid: "row: 3, column: *", clocator: [:])
   TextBox(uid: "all", clocator: [:])
} 

Data Driven Testing is another important feature of Tellurium. You can define data format in an expressive way. In you data file, you can specify which test you want to run, the input parameters, and expected results. Tellurium automatically binds the input data to variables defined in your test script and run the tests you specified in the input file. The test results will be recorded by a test listener and output in different formats, for example, an XML file.

Tellurium UI Model Plugin (TrUMP) is a Firefox plugin to automatically create UI modules for users. In addition, Tellurium provides you the capability to composite UI objects into a Tellurium widget object. You can pack Tellurium widgets as a jar file and then use a Tellurium widget just like a single tellurium UI object once you include the jar file. As a result, Tellurium is robust, expressive, flexible, and reusable.

 

The Tellurium framework is written in Groovy and Java. The test cases can be written in Java, Groovy, or pure DSL. You do not really need to know Groovy before you use it because the UI module definition and actions on UIs are written in DSLs and the rest could be written in Java syntax. Tellurium also supports JUnit and TestNG. Detailed Introduction, User Guide, Frequent Asked Questions, and illustrative examples are provided. We expect and welcome your contributions.

For a quick start, please read Ten Minutes To Tellurium, Ten Things You Should Know About Tellurium, and Top Ten Cool Features in Tellurium.

Tellurium Subprojects

Tellurium subprojects include Core, Reference projects, Widget extensions, TrUMP, and Engine projects as shown in the following diagram,

How to use Tellurium ?

There are three ways, i.e., use the reference project as a base, use Tellurium Maven archetype, or manually create Tellurium project using tellurium jar and Tellurium configuration file. Alternatively, you could create your own Tellurium Maven project manually using the sample POM file.

Tellurium Maven Repository

Tellurium supports Maven 2 and here is the guide on how to use Maven for Tellurium.

Tellurium snapshots can be found at our Maven snapshot repository and the releases are at our Maven release repository

Tellurium provides two Maven archetypes, tellurium-junit-archetype and tellurium-testng-archetype for Tellurium JUnit and TestNG project, respectively. You can use one Maven command to create a new Tellurium test project.

  

Tellurium Support

If you have any questions or problems with Tellurium, please join our Tellurium user group and then post them there. You will get the response very shortly.

  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close