ui.StandardTable(uid: "GT", clocator: [id: "xyz"], ht: "tbody"){
TextBox(uid: "{header: first} as One", clocator: [tag: "th", text: "one"], self:
true)
TextBox(uid: "{header: 2} as Two", clocator: [tag: "th", text: "two"], self: true)
TextBox(uid: "{header: last} as Three", clocator: [tag: "th", text: "three"],
self: true)
TextBox(uid: "{row: 1, column -> One} as A", clocator: [tag: "div", class: "abc"])
Container(uid: "{row: 1, column -> Two} as B"){
InputBox(uid: "Input", clocator: [tag: "input", class: "123"])
Container(uid: "Some", clocator: [tag: "div", class: "someclass"]){
Span(uid: "Span", clocator: [tag: "span", class: "x"])
UrlLink(uid: "Link", clocator: [:])
}
}
TextBox(uid: "{row: 1, column -> Three} as Hello", clocator: [tag: "td"], self:
true)
}
在這個例子中,我們是使用元數據“first”、數字和“last”來指定header的位置。元數據“{row: 1, column -> One} as A”意味著我們例子中的UI元素——一個TextBox,處于第一行,并和header“One”處在同一列。測試代碼很干凈,比如:
getText "GT.A"
keyType "GT.B.Input", input
click "GT.B.Some.Link"
waitForPageToLoad 30000
未來計劃
Tellurium是一個年輕而且創新的項目,它具有許多來自開發團隊和用戶社區的新穎思想。Tellurium希望在以下領域繼續發展:
Tellurium 0.7.0已經實現了一個新的使用jQuery的測試驅動引擎。這個引擎的主要特性包括:UI module組定位、UI module緩存、命令集處理、用jQuery重新實現的Selenium API以及新的Tellurium API。Tellurium會繼續開發這個新引擎直至完備。
Tellurium IDE module插件0.8.0 RC1剛剛發布,它包含了很多新的特性。錄制和生成測試腳本的Tellurium IDE的RC版本也已發布。它們是Tellurium成功的關鍵,因此會得到持續的改進。除了Trump和Tellurium IDE,Tellurium還在計劃改善TelluriumWorks,讓它可以編輯、完成語法檢查,并運行Tellurium DSL測試腳本。
Tellurium作為云測試工具是另外一個非常重要的發展方向。項目團隊正在計劃重新考慮整個架構,使其可以更直接地并行執行測試。通過P2P技術,只需最少的管理,就讓測試服務器在云的環境中具備自組織和自協調的能力,這是件極具挑戰性的工作。
Tellurium框架還希望發展的其他領域包括:
創建可重用的Dojo、ExtJS和jQuery UI Tellurium widget。這樣可以讓其他人只需要在自己的項目中包含對應的jar文件,就可以重用這些widget。
支持行為驅動測試。
Web安全測試
支持其他的語言,比如Ruby
關于作者
方劍畢業于喬治亞理工學院,電子和計算機工程專業博士學位。他的工作是某IT公司的高級軟件工程師,致力于設計和實現企業級應用軟件。他是Tellurium自動化測試框架項目的創建者。
文章來源于領測軟件測試網 http://www.kjueaiud.com/