冒烟测试: adb shell monkey -p <程序的包名> -v <事件的数量> android下单元测试: 在AndroidManifest.xml文件中配置一下信息: 在manifest节点下: <instrumentation android:name="android.test.InstrumentationTestRunner" android:targetPackage="com.itheima28.junittest" /> 在application节点下配置下面信息: <uses-library android:name="android.test.runner" /> 测试时, 定义一个类继承AndroidTestCase 文件存储: this.getFilesDir(); // /data/data/包名/files this.getCacheDir(); // /data/data/包名/cache openFileOutput("aa.txt", 0); /data/data/包名/files/aa.txt 权限相关: 1. 私有文件 2. 可读文件 3. 可写文件 4. 可读可写文件. SharedPreferences存储路径: /data/data/包名/shared_prefs/ |
|