Unit tests terminated in Debug mode

后端 未结 4 1786
轮回少年
轮回少年 2020-12-20 22:25

I\'m using IntelliJ IDEA 15.0.2 (Community Edition) under Windows 7 and Windows 10 Pro, Gradle 2.9, JDK 1.7.0_65. Operating systems installed as guests under VMware Workstat

相关标签:
4条回答
  • 2020-12-20 22:40

    To get rid of unit test problems in debug mode, I deleted all test folders in android studio explorer, then I commented three test implementation lines in build.gradle(module) file. Then I changed the combobox in android studio menu (top of the IDE) from "all in app" to "app".

    https://i.stack.imgur.com/alPrS.png

    0 讨论(0)
  • 2020-12-20 22:50

    In my case the fix was to:

    1. Open Edit Configuration... for All tests (or what ever you renamed it into).
    2. Switch to Debugger tab.
    3. In Debug mode combo, select the Java option:
      • Although we have lots of Native codes, lets try to not debug them while we debug our Integration-tests ;-)

    Note: We use Android-studio 3.2.1 and above might not be required in newer versions.

    0 讨论(0)
  • 2020-12-20 22:54

    Gabor's suggestion seemed to fix this issue for me. On a Mac (and I presume on a Windows machine, but with a different route to get there) go to Preferences:

    From the menu bar at the top Android Studio → Preferences

    or

    Hit ⌘ and , to jump straight to it.

    Then in the menu search box type "instant". Uncheck the box that says "Enable instant run..", which looks like the image below.

    That fixed it for me; didn't even need to restart/kill ADB.

    It seems to be enabled by default, and I use it often to hot-swap changes during development, so I didn't think to turn it off when running Espresso tests.

    0 讨论(0)
  • 2020-12-20 23:00

    In my situation, the problem is solved by setting in the test's run configuration: Shorten command line -> JAR manifest.

    0 讨论(0)
提交回复
热议问题