2

現在のプロジェクトでいくつかのテスト ケースを自動化するために、Android の UI Automator に取り組んでいます。パッケージ com.myapp.testautomation の下の個々のパブリック クラスとしてこれまでに作成したいくつかのテスト ケースには、デバイスからアプリを起動する ダッシュボード 新規ユーザー登録 ログイン ログアウト これらすべてのケースを一度に実行してテスト スイートを構築するにはどうすればよいですか? 現在、次のコマンドを実行してこれらのケースを個別に実行しています adb shell uiautomator runtest PrjoectXYZ.jar -c com.myapp.testautomation.New User Registration adb shell uiautomator runtest PrjoectXYZ.jar -c com.myapp.testautomation.Login adb shell uiautomator runtest PrjoectXYZ.jar -c com.myapp.testautomation.Logout

4

3 に答える 3

0

複数のテスト ケースを実行する 1 つの方法は、テスト ケースを含むシェル スクリプトを実行することです。例えば

ant build
adb push /Users/xyz/Documents/workspace/ProjectXYZ/bin/ProjectXYZ.jar /data/local/tmp/
adb shell uiautomator runtest PrjoectXYZ.jar -c com.myapp.testautomation.NewUserRegistration 
adb shell uiautomator runtest PrjoectXYZ.jar -c com.myapp.testautomation.Login 
adb shell uiautomator runtest PrjoectXYZ.jar -c com.myapp.testautomation.Logout
于 2013-06-01T17:54:08.433 に答える
0

最も簡単な方法は、.batファイルを作成することです。その中にすべてのコマンドを入れます。これを何度も行っています。これが最も簡単な方法です。例えば:

adb shell uiautomator runtest dialler.jar -c sprd.performance.dialler.Dialler 
adb shell uiautomator runtest contactscroll.jar -c sprd.performance.contactscroll.ContactScroll  

これらは、実行する 2 つのスクリプトです。それらのファイルを作成し、.batファイルをダブルクリックし.batます。

于 2017-02-23T08:58:05.670 に答える