LoginSignup
0
0

More than 5 years have passed since last update.

AndroidでExpressoによるテストを実行する前にアプリをアンインストールする方法

Last updated at Posted at 2016-05-19

AndroidStudioでのテスト(Expresso)の実行方法
テストを実行する時に普通に実行すると過去ログインの設定がそのまま残ってしまっていて、初回起動時のテストができなかったのでテストを実行する前に毎回アンインストールするという荒技をしました。もっといい方法知っている方がいたらぜひ教えてください。

  • Edit Configurations
  • => + ボタンでAndroidTestsを追加
  • => Moduleをappに
  • => TestでClassを選択
  • => Classで実行したいTestを選択
  • => TargetDeviceをshow choose dialogにする
  • => Before lunch で + ボタンを押す
  • => Gradle-awake Makeを選択
  • => Taskに :app:uninstallAll と設定してOK
  • => あとは設定したものを選択して実行するだけ。
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0