Running simple JUnit tests on Android Studio (IntelliJ) when using a Gradle-based configuration

前端 未结 6 1780
死守一世寂寞
死守一世寂寞 2020-12-12 12:39

I am using Android Studio/IntelliJ to build on an existing Android project and would like to add some simple JUnit unit tests. What is

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-12 13:43

    For Android Studio 1.2+ setting up a project for JUnit is pretty simple try to follow along this tutorial:

    This is the simplest part setting up a project for JUnit:

    https://io2015codelabs.appspot.com/codelabs/android-studio-testing#1

    Follow along the past link until "Running your tests"

    Now if you want to integrate with intrumentation test follow along from here:

    https://io2015codelabs.appspot.com/codelabs/android-studio-testing#6

提交回复
热议问题