http://blog.roodo.com/ystuan/archives/6128305.html
搜尋此網誌
2011年10月11日
2011年10月7日
[轉] 利用 WebMatrix 打造低成本高效益的完美網站 (簡報檔下載)
http://blog.miniasp.com/post/2011/05/13/Using-Microsoft-WebMatrix-build-low-cost-high-value-websites.aspx
2011年10月5日
Android CTS run a singple test case / Android CTS 只執行單一或特定 test case
Android CTS 測試案例的階層: PlanName(Plans) -> Package -> TestCaseName(Test cases)
# Plans 的位置
$CTS_ROOT/repository/plans/xxx.xml
# Test name 的位置
$CTS_ROOT/repository/testcases/xxx.xml
# 顯示所有 plans
cts_host > ls --plan
# 顯示所有 Packages
cts_host > ls -p
# 顯示 Performance plan 的 Packages 與子 Packages。與 repository/plans/Performance.xml 對應
cts_host > ls --plan Performance
cts_host > ls -p android.performance
cts_host > ls -p android.performance2
# 執行全部 plans
cts_host > start --plan CTS
# 執行特定 plan, 例如 Java
cts_host > start --plan Java
# 執行特定 plan 中特定的 Package。Package 的資訊可以從 repository/plans/xxx.xml 中取得
cts_host > start --plan Performance -p android.performance4
# 執行特定 plan 中特定的 Package 中特定的 test case。
# -p android.app => 可以從 ls --plan Android 中取得
# -t android.app.cts.AlertDialogTest#testAlertDialog。
# 其中 andorid.app.cts 對應到 testcases 裡面 xxx.xml 裡的 TestSuite name
# 其中 AlertDialogTest 對應到 xxx.xml 裡的 TestCase name
# 其中 testAlertDialog 對應到 xxx.xml 裡的 Test name
cts_host > start --plan Android -p android.app -t android.app.cts.AlertDialogTest#testAlertDialog
# 透過 Instrumentation 方式執行。一樣可對應到 CTS 中 Packet / Test case 的名稱
$ adb shell pm list instrumentation
$ adb shell am instrument -w com.android.cts.app/android.test.InstrumentationCtsTestRunner
$ adb shell am instrument -e class android.app.cts.AlertDialogTest#testAlertDialog -w com.android.cts.app/android.test.InstrumentationCtsTestRunner
# 重跑 NonExecuted case
修改 repository/testResult.xml,將 failed 改成 nonexecuted 重跑 => 尚未驗證
# Plans 的位置
$CTS_ROOT/repository/plans/xxx.xml
# Test name 的位置
$CTS_ROOT/repository/testcases/xxx.xml
# 顯示所有 plans
cts_host > ls --plan
# 顯示所有 Packages
cts_host > ls -p
# 顯示 Performance plan 的 Packages 與子 Packages。與 repository/plans/Performance.xml 對應
cts_host > ls --plan Performance
cts_host > ls -p android.performance
cts_host > ls -p android.performance2
# 執行全部 plans
cts_host > start --plan CTS
# 執行特定 plan, 例如 Java
cts_host > start --plan Java
# 執行特定 plan 中特定的 Package。Package 的資訊可以從 repository/plans/xxx.xml 中取得
cts_host > start --plan Performance -p android.performance4
# 執行特定 plan 中特定的 Package 中特定的 test case。
# -p android.app => 可以從 ls --plan Android 中取得
# -t android.app.cts.AlertDialogTest#testAlertDialog。
# 其中 andorid.app.cts 對應到 testcases 裡面 xxx.xml 裡的 TestSuite name
# 其中 AlertDialogTest 對應到 xxx.xml 裡的 TestCase name
# 其中 testAlertDialog 對應到 xxx.xml 裡的 Test name
cts_host > start --plan Android -p android.app -t android.app.cts.AlertDialogTest#testAlertDialog
# 透過 Instrumentation 方式執行。一樣可對應到 CTS 中 Packet / Test case 的名稱
$ adb shell pm list instrumentation
$ adb shell am instrument -w com.android.cts.app/android.test.InstrumentationCtsTestRunner
$ adb shell am instrument -e class android.app.cts.AlertDialogTest#testAlertDialog -w com.android.cts.app/android.test.InstrumentationCtsTestRunner
# 重跑 NonExecuted case
修改 repository/testResult.xml,將 failed 改成 nonexecuted 重跑 => 尚未驗證
2011年10月4日
Setup Android USB connection on AMD-64bit Ubuntu10.04 / AMD-64bit Ubuntu10.04 設定 Android USB / ADB
照著 Android developer 的設定不成功
同事告訴一個方法,可能只是特例,但是卻成功了
先用
$lsusb => 找出產品的 idVendor (aaaa:bbbb),前面的那組
$cd ~
$cd .android/
$echo "0xaaaa" > adb_usb.ini
$sudo ./adb kill-server
$sudo ./adb devices
真的找到了…怪
然後就發覺每次進去都要用 sudo 去 kill-server & start-server
後來還是把 /etc/udev/rules.d/51-android.rules 補起來,就不用 sudo 了
所以整個流程為:
1. 增加 adb 路徑到 .bashrc 裡面的 PATH
2. 增加 51-android.rules
3. 增加 adb_usb.ini
訂閱:
文章 (Atom)