Unit tests terminated in Debug mode

已回答

Hi,

I'm using InteliiJ 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 Workstation 11.1.3

I have created Android Gradle application with single empty activity and wanted to check how unit test support works. There is a single unit test module ApplicationTest.java created by IDE, it contains only constructor. Right-clicking on [java] folder I created 'All in Module' JUnit3 test configuration.

Tests complete successfully when I Run them, however fail if I Debug the configuration. Failure reason says 'Terminated' (see screenshot) which explained in the documentation as 'Test terminated. This status is assigned to tests that were cancelled by clicking the                     Stop button'. Just want to confirm that I didn't click the Stop button.

Logcat for successful run:

I/TestRunner( 3670): started: testAndroidTestCaseSetupProperly(uk.co.pintent.uni
ttestapp.app.ApplicationTest)
I/TestRunner( 3670): finished: testAndroidTestCaseSetupProperly(uk.co.pintent.un
ittestapp.app.ApplicationTest)
I/TestRunner( 3670): passed: testAndroidTestCaseSetupProperly(uk.co.pintent.unit
testapp.app.ApplicationTest)
I/TestRunner( 3670): started: testApplicationTestCaseSetUpProperly(uk.co.pintent
.unittestapp.app.ApplicationTest)
I/TestRunner( 3670): finished: testApplicationTestCaseSetUpProperly(uk.co.pinten
t.unittestapp.app.ApplicationTest)
I/TestRunner( 3670): passed: testApplicationTestCaseSetUpProperly(uk.co.pintent.
unittestapp.app.ApplicationTest)
I/ActivityManager(   77): Force stopping package uk.co.pintent.unittestapp.app u
id=10043


Logcat for failed run:

I/TestRunner( 3730): started: testAndroidTestCaseSetupProperly(uk.co.pintent.uni
ttestapp.app.ApplicationTest)
I/TestRunner( 3730): finished: testAndroidTestCaseSetupProperly(uk.co.pintent.un
ittestapp.app.ApplicationTest)
I/TestRunner( 3730): passed: testAndroidTestCaseSetupProperly(uk.co.pintent.unit
testapp.app.ApplicationTest)
I/TestRunner( 3730): started: testApplicationTestCaseSetUpProperly(uk.co.pintent
.unittestapp.app.ApplicationTest)
I/TestRunner( 3730): finished: testApplicationTestCaseSetUpProperly(uk.co.pinten
t.unittestapp.app.ApplicationTest)
I/TestRunner( 3730): passed: testApplicationTestCaseSetUpProperly(uk.co.pintent.
unittestapp.app.ApplicationTest)
I/ActivityManager(   77): Force stopping package uk.co.pintent.unittestapp.app u
id=10043



Both logs don't report any failures, IDE log reports 2 tests passed too. However problem remains as IntelliJ still reports a termination.

Done some research and found similar questions asked while ago, but no real solution.

Any suggestion of where to start looking for the cause of this issue is appreciated.

Thanks.

Message was edited by: Andriy Svirskyy Added guest OS details and sample project to reproduce



Attachment(s):
terminated.png
unittest.gradle.zip
1

Please attach idea.log (Help|Show log). Thanks

0
Avatar
Permanently deleted user

Please find attached log from last Debug run



Attachment(s):
idea.log.zip
0
Avatar
Permanently deleted user

Should I submit a bug report or this is a well known issue?

Thanks.

0

It would be helpful to have a sample project to reproduce. Youtrack issue is very welcome!
Thanks

0
Avatar
Permanently deleted user

I've updated the original message with sample project.

Thanks

0
Avatar
Permanently deleted user
0

请先登录再写评论。