Tellurium自动测试框架是一款针对web应用、基于UI模块的自动测试平台。UI模块是由一组复合的UI对象以嵌套的形式组成,比如,Google的搜索UI模块可以表示成:
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"]) }
Tellurium框架还定义了一套全新的领域特定语言来进行web测试,比如对于Google搜索模块,你可以使用下面的DSL来完成一次搜索测试:
type "GoogleSearchModule.Input", "Tellurium test" click "GoogleSearchModule.Search" waitForPageToLoad 30000