?????????????????????android app??????????????????????????????????????????λ??????????

????Android???????????????????鯔?????????????????java?????Activity??View???в?????????????????Instrumentation??

????Instrumentation??Activity??λ??android.app???£???????????????ActivityManagerNative???????App????????????Android?????Activity????????startActivity(Intent intent)???????????????????Instrumentation????Instrumentation??????????ж?Activity???????????????????Instrumentation???????Android SDK??Junit????????????????????AndroidTestCase?????????????????????????ActivityInstrumentationTestCase2??

????????Instrumentation??????????????SDK?е??????????????????

?????о?Android???????????к???????а?????????????????????@hide???????????private????????app????????????????????java????????? java?????????????????????????????

????????????????????????????????robot/" target="_blank" >Robotium?????????????app????apk?????????????????в????

????????Robotium????????????????????WebView???в??????????????WebView?????Android??????????????????????

????????Robotium????API?????????????????????????

??????????????????????????WebView???в????????????????????????TMTS(Taobao Mobile Test Studio)????

????TMTS???????????????????????????Instrumentation?????testapp??app??????????????? ??app crash????testapp???crash??????????????о???Instrumentation??Activity??????????????????о????dalvik????ν???Manifest????????????????????????????????android??????Щ??????????????????????????????

???????????????????? Robotium?в??????actionMethod(View?? arg)??????TMTS?в???getView(id).actionMethod(arg)?????????????java????????TMTS?????????д?????????????View??????View???????action???????????

????TMTS????????????????????????Android????API??????Activity??????View????????????????????View?????????View???Instrumentation????Щ??View???????????????????TmtsView????????

????????????????????????????android.View??????????????????????????????????????????????TmtsView????

???????????????????????View????????????????id???????????????????д??????????app??????????????????????view??id???????????id????????п???д????????????????????????Щ????????SDK?????hierarchyviewer??????view??id;???????????????н???????java????????л??????????????????е????д?id??view?????????????view??????????????????е?view???й???

???????????????getView(id).actionMethod(arg)??????Layout(layout.class).ViewType().view().actionMethod(arg)??????????????????????????????????????