?????????????????
????Feature
???????????????case?п???????? Feature ??????????calabash?????????????????????????????Feature??apk????ж????????????ζ????????????????á?
????Scenario
??????????????????Feature?е?????Feature?????к???Scenario?????????Scenario?????????????????????????ж?????????
????Hooks
??????feature/support???£???????????????ruby?????
????· app_installation_hooks.rb
????· app_life_cycle_hooks.rb
????· env.rb
????· hooks.rb
??????????????????????hook???????????????? app_life_cycle_hooks.rb ??????
require'calabash-android/management/adb'
require'calabash-android/operations'
Before do|scenario|
start_test_server_in_background
end
After do|scenario|
ifscenario.failed?
screenshot_embed
end
shutdown_test_server
end
??????????????????????????????????app?????????hook???????????????????????? Before ?? After ???????в????????????????????????????????д??????????step?????????2???hook??????????д?? hooks.rb ?У?????????????????????
????require'calabash-android/calabash_steps'
????AfterStep do|scenario|
????sleep 2
????end
???????????????????????????????? cucumber wiki?е?Hooks???? ??
???????
?????????calabash???????е??????????????case?????????????????
????· ??????????????????case?????仯????????????????????????
????· ???????????case???????????????????????calabash????????????д???????????????????
????· ?????????????????????κ??λDEVER?????????????????Mac??????????????????
????· С??Χ??????ó????????е???????????????????Щ??????????????????genymotion?????????????????????case???????
????· Android & iOS?????????
????· ?????????????????????????????????????
????????????Щ??????淨(jìng)???????????????Щ??????д?Щ????case????????????????????????????????????????????С??Χ?????????и???????????????????!