Android?е???????
???????????? ???????[ 2012/8/30 14:39:48 ] ????????
????????Agile????????????????????????????????????????????????????????????????????в????????????????????????????TDD??????????п????????????????????????????????????????
??????????????
?????????????windows phone 8????????????!
????MDC2012??9??1???????????λ???????????????????iOS/Android/WP????????????!
????QCon????2012??Pragmatic Programmer??????????????????Dave Thomas
????RightScale??????????????Jonathan Siegel???μ?QCon????2012
????Amazon?????????????????????Amr Elssamadisy???μ?QCon????2012
?????????????
????QCon????2012???10??25~27???????????8????????????????!
????Android??????????????????????????????????????????Android??????????????????????????????????????????????????????????Ч?????????
????Android????????????м??????????????(Instrumented Test)?????????????????????????Robotium??????????????Selenium????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????mock??????????????????????????????????????????????????????????д???????????????????????????????????????????????????????????????????????????????????????в???????????????????????????????Delvik?????????????????????????????????????????TDD?????п??????????????????????????
???????????Щ????????????????????????????У????????????????????????Andorid.jar????????????????????????????????????placeholder???????????????????????????????????????stub???????????е??????Android?????????stub???????????????????Android.jar?????????е???????????????java.lang.RuntimeException(“Stub!”)??????????????????????????????Android??????????????????????????????????Android????????????????????????????
????????????????????????POJO???е??????????????Android??????????Mock??????????????????????????????????????????????ζ????????????????????????????mock??stub?????????Android?н?????????????XML?????????????????л??????????????????????£?UI??????????????????????
????????????????????Android?????????(static??????final????????Context??Resources?????)????????????Android?????????в???????????????
????????????????????????????????£??????????????????????????
????????????????????MVP????Robolectric
????Android??????????????????MVP?????п???????MVC???????Android?е?Activity??????????????Controller???????????????????????????????????棬??????????????????????????????????????????????漰????????????????????Activity????????????????±???????????????????и?????????????????????????(Presneter)?????Activity?????MVP????View????????UI??????????????UI?????Presenter?????(Listener???)?????????????Щ???????(????????????Presenter????)??????????
???????????????????????????????????????????????????????????????mock Activity????????????(Presenter?е????)???в????
??????????????????????Android??????????????????Robolectric???????
????Robolectric????????????????У?????????Android SDK??jar???(?????????????stub??)????????????????????????JVM???(???????????????)??????????????????Android ??y??в?????????????Roblectric???????Android?ж?XML????????????View??Layout??????????????????? Android?????????????????????????????У??????????????????????mock??????????????????Android?????????в????
????Robolectric????????????????
????Robolectric?????javassist?????????????Android.jar?????byte code??Robolectric????JVM????Android.jar?????????д????????????Roblectroic??????Щ?????з????(null????0) ??????????? ?????????Щ???????????Shadow Objects?????Android SDK??????Shadow Objects??Robolectric???????????Android.jar??????????е????????????????????????????????????????? assert???????в????????????Robolectric?????????Shadow Objects???????????????????о????????????????? ??
????Robolectric?????
????????Robolectric??????????????????test runner(RobolectricTestRunner)?????У??????????????RobolectricTestRunner?????????????? test runner???????乹???????趨????????AndroidManifest.xml??resource?? ???磺
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11