RoboSpockAndroid 測試框架
RoboSpock 是一個開源的 Android 測試框架。提供簡單的編寫 BDD 行為驅動開發(fā)規(guī)范的方法,使用 Groovy 語音,支持 Google Guice 庫。RoboSpock 合并了 Robolectric 和 Spock 的功能。
示例代碼:
def "should display hello text"() {
given:
def textView = new TextView(Robolectric.application)
and:
def hello = "Hello"
when:
textView.setText(hello)
then:
textView.getText() == hello
}評論
圖片
表情
