?????????????????????????????????????????????appium??macaca?????????????????????UI???????????????????????????ó?????????????????Щ????case???飬??????????????????????????????????????appium??????????????????????????????д????£??????????????case?????仯?????????????????????????????????????case????????仯???????????????????У????????????????case???????仯?????仹?????????????????????Ρ?
???????????Android DEVER????????????????????????????AS2.2?汾?????????Espresso??????????????дUT?????ɡ?????????????????????????????????????????????????á??????????app????????λ?????????????????????м??????? allOf ????λ???????????е???????????????????????????2??????????appium????д???????????????????????
???????????е?????????????????????дtest case????????????????????Android & iOS?????????????????? ???????? ??
???????????????? Calabash ??
????Calabash????
???????????????????????? ???????????????????????????д???????? ??????????????TDD????calabash??BDD????????е??????棬??????????????????
???????????????д??????????case???????case????????????
Feature: xxx????????
Scenario: ????????
ThenI see"????"
WhenI press"????"
ThenI press"???"
WhenI press viewwithid"city"
ThenI see"????"
WhenI press"????"
AndI press viewwithid"start_search"
WhenI enter"????"into input field number1
ThenI press list item number1
ThenI see"????"
WhenI press"???"
ThenI see"???"
ThenI go back
WhenI see"????"
ThenI press"????"
ThenI see"????"
ThenI go back
ThenI press viewwithid"title_image"
ThenIwaitfor5seconds
ThenI press webviewtext"?????"
ThenIwaitfor5seconds
ThenI go back
ThenI go back
WhenI scroll down recyclerviewwithid"main_listview"count5
ThenI see"???????"
ThenI press viewwithid"root_rl"number1
ThenIwaitfor10seconds
????????д???????????????????????????????????????????д???????????÷?????????????Mac??С?????????????????????ruby???????gem????calabash???????????? ???calabash-android ????????calabash-ios???????????????calabash?? github organization ???????????repo?????????????Android?????
?????????????????calabash gen??????????????е????????????????????????????????? features ????
???????????????????
????· step????+?????
????· ????hooks??support???
????· ???д?????????????????? .feature ??β
?????????????????case?????д?????????????????????????????calabash????ruby?????????????????????????????????????????case??????????????????????????????????????ruby??????????Щ?????step??hooks??????????????????????????????????????ruby??????????????????????????Google??????????
????????calabash run?????????????????????apk????ipa?????????????????github???????????
???????????????????????????????????????????????????????????calabash?????
???????????
????????????λ???
??????????Android?????????????澭???????id???????????????????????????ζ?λ????????Android??????????sdk tools???μ? uiautomatorviewer ????????????λ??????????calabash console???ж?λ????????????????????????????????????webview????calabash????????????????css????????????????ж?λ??????text?????????????
??????????????????????о????????
???????λ????????У????????Щ?????step???????????????????????step????????????????????????????step??
Then /^I press webview text "([^"]*)"$/do|text|
touch("android.webkit.WebView css:'a' {textContent CONTAINS[c] '#{text}'}")
end
Then /^I press view with id "([^"]*)"number (d+)$/do|id?? number|
tap_when_element_exists("* id:'#{id}' index:#{number}")
end
When /^I scroll down recyclerview with id "([^"]*)"count (d+)$/do|id?? count|
foriin0..Integer(count)
scroll("android.support.v7.widget.RecyclerView id:'#{id}'"??:down)
end
end
??????ruby?????????????????calabash??api??????????£??????????????????????????????????step??????????????step?????????case?ж????????