ここに従って、JUnit4でもSpek実行できるようにすると、逆にJUnitで書いてあったテストが
Android Studio上で Empty test suite.
と出て実行できなくなる。
./gradlew test
では実行できる。
調べてみると、
Spekが実行できる状態のログ.txt
〜/mockable-android-27.v3.jar" com.intellij.rt.execution.application.AppMainV2 com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 -junit5 <テストクラス>
Spekが実行できない場合のログ.txt
〜/mockable-android-27.v3.jar" com.intellij.rt.execution.application.AppMainV2 com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 <テストクラス>
と、Spekが実行できる場合にコマンドのオプションで -junit5
というのがついている。
どうやら、JUnit5上でテストを実行しているようなので、 公式 を参考に、JUnit5上でJUnit4形式のテストを動かすエンジンを入れたらテストの実行は出来た
ToDo
他に確認しといたほうがいいこと
- Robolectricがちゃんと動くのか?
- espressoがちゃんと動くのか?