LoginSignup
1
0

More than 3 years have passed since last update.

Migrate to AndroidXしたら"No tests found"と言われてハマった

Posted at

Android Studioの“Refactor -> Migrate to AndroidX”を使ってて、何度かハマったパターン。

自動のmigrationが終わって、テスト走らせてみたら

No tests found. This usually means that your test classes are not in the form that your test runner expects (e.g. don’t inherit from TestCase or lack @Test annotations).

とだけ言われて、「@Test annotationちゃんとついてるしなー… build.gradleandroidx.test.runner.AndroidJUnitRunnerも指定してあるし… :frowning2:」としばらくハマる。

...

...

結局

androidTestImplementation 'androidx.test:runner:1.2.0'

の追加忘れ。自動では追加してくれないみたい。

「androidx.test.runner.AndroidJUnitRunnerなんて見つからないよ」とか言ってくれればいいのに :sweat_smile:

1
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
1
0