2013-01-14 130 views
1

我想使用新發布的android測試框架uiautomator自動化我的大部分Android應用程序的UI測試用例。我應該如何組織我的Android uiautomator測試用例?

總共有17個測試案例左右。我想知道我應該組織我的測試代碼。或者有沒有最好的做法呢?

uiautomator是使用JUnit 3.但似乎你只能同時運行一個類,如:

adb shell uiautomator runtest myApp-ui-testing.jar -c com.myAndroidApp.test.ui.trial.SearchNearbyUITesting 

我應該轉儲我所有的測試情況下在一個類或把他們在不同的班級並使用shell腳本多次運行上述命令?

任何建議,將不勝感激:d

回答

1
uiautomator runtest myApp-ui-testing.jar -c com.myAndroidApp.test.ui.trial.SearchNearbyUITesting -c com.myAndroidApp.test.ui.trial.SearchNearbyUITesting2 -c com.myAndroidApp.test.ui.trial.SearchNearbyUITesting3 

使用此命令,只要你想,你可以添加許多類和運行它。

這對我有用。

相關問題