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
请先登录再写评论。
Please attach idea.log (Help|Show log). Thanks
Please find attached log from last Debug run
Attachment(s):
idea.log.zip
Should I submit a bug report or this is a well known issue?
Thanks.
It would be helpful to have a sample project to reproduce. Youtrack issue is very welcome!
Thanks
I've updated the original message with sample project.
Thanks
Bug report created: https://youtrack.jetbrains.com/issue/IDEA-150297