Why does Intellij IDEA suddenly not recognize tests in test folder anymore?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







18















I'm using JUnit since I started this project and everything works just fine. I have a couple of hundreds tests, and of course, here and there I start them all. Right click on root test folder, run (or debug) with JUnit.
But since yesterday, when I do that, the result is:



Process finished with exit code 0


without starting any of tests. Same thing is with any folder in folder tree. I can still run a single test class, but I really need an option to start them all.
If any of you have any ideas, please drop them here.



Here is what is logged when I try to run tests:



2012-10-31 15:16:55,693 [2727217]  ERROR - ij.psi.impl.source.PsiFileImpl - IntelliJ IDEA 11.1.2  Build #IU-117.418 
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - JDK: 1.6.0_31
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - VM: Java HotSpot(TM) Client VM
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - Vendor: Sun Microsystems Inc.
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - OS: Windows 7
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - Last Action: RunClass
2012-10-31 15:16:55,693 [2727217] ERROR - m.intellij.util.ExecutorsQuery - com.intellij.psi.tree.IFileElementType cannot be cast to com.intellij.psi.tree.IStubFileElementType
java.lang.ClassCastException: com.intellij.psi.tree.IFileElementType cannot be cast to com.intellij.psi.tree.IStubFileElementType
at com.intellij.psi.impl.source.PsiFileImpl.calcStubTree(PsiFileImpl.java:976)
at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:239)
at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:220)
at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:60)
at com.intellij.psi.stubs.StubIndexImpl.process(StubIndexImpl.java:220)
at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:194)
at com.intellij.psi.stubs.AbstractStubIndex.get(AbstractStubIndex.java:33)
at com.intellij.psi.impl.java.stubs.index.JavaAnnotationIndex.get(JavaAnnotationIndex.java:47)
at com.intellij.psi.impl.search.AnnotatedElementsSearcher.a(AnnotatedElementsSearcher.java:93)
at com.intellij.psi.impl.search.AnnotatedElementsSearcher.execute(AnnotatedElementsSearcher.java:44)
at com.intellij.psi.impl.search.AnnotatedElementsSearcher.execute(AnnotatedElementsSearcher.java:28)
at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:42)
at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:67)
at com.intellij.util.InstanceofQuery.forEach(InstanceofQuery.java:54)
at com.intellij.execution.ConfigurationUtil.addAnnotatedMethodsAnSubclasses(ConfigurationUtil.java:97)
at com.intellij.execution.ConfigurationUtil.findAllTestClasses(ConfigurationUtil.java:77)
at com.intellij.execution.junit.TestPackage$MySearchForTestsTask.run(TestPackage.java:397)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:469)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:218)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:169)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:378)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:434)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:145)









share|improve this question

























  • Is your test folder still set for test (green color)? Have you disabled maven or made some changes with it?

    – m3th0dman
    Oct 31 '12 at 12:24











  • It is still green and every subfolders icon has a small green point on it. I made no changes with maven. Also, since yesterday, every time I restart IDEA, atlassian connector loose current configuration, and I need to add it again.

    – Djordje Ivanovic
    Oct 31 '12 at 13:04













  • I fix problem with atlassian connector, but still can't run tests from folder...

    – Djordje Ivanovic
    Oct 31 '12 at 13:54











  • Check idea.log for exceptions (Help | Reveal Log in ...). Try running IDEA with the default settings (rename its directories: devnet.jetbrains.net/docs/DOC-181).

    – CrazyCoder
    Oct 31 '12 at 14:14











  • I added error log into the question.

    – Djordje Ivanovic
    Oct 31 '12 at 14:20


















18















I'm using JUnit since I started this project and everything works just fine. I have a couple of hundreds tests, and of course, here and there I start them all. Right click on root test folder, run (or debug) with JUnit.
But since yesterday, when I do that, the result is:



Process finished with exit code 0


without starting any of tests. Same thing is with any folder in folder tree. I can still run a single test class, but I really need an option to start them all.
If any of you have any ideas, please drop them here.



Here is what is logged when I try to run tests:



2012-10-31 15:16:55,693 [2727217]  ERROR - ij.psi.impl.source.PsiFileImpl - IntelliJ IDEA 11.1.2  Build #IU-117.418 
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - JDK: 1.6.0_31
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - VM: Java HotSpot(TM) Client VM
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - Vendor: Sun Microsystems Inc.
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - OS: Windows 7
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - Last Action: RunClass
2012-10-31 15:16:55,693 [2727217] ERROR - m.intellij.util.ExecutorsQuery - com.intellij.psi.tree.IFileElementType cannot be cast to com.intellij.psi.tree.IStubFileElementType
java.lang.ClassCastException: com.intellij.psi.tree.IFileElementType cannot be cast to com.intellij.psi.tree.IStubFileElementType
at com.intellij.psi.impl.source.PsiFileImpl.calcStubTree(PsiFileImpl.java:976)
at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:239)
at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:220)
at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:60)
at com.intellij.psi.stubs.StubIndexImpl.process(StubIndexImpl.java:220)
at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:194)
at com.intellij.psi.stubs.AbstractStubIndex.get(AbstractStubIndex.java:33)
at com.intellij.psi.impl.java.stubs.index.JavaAnnotationIndex.get(JavaAnnotationIndex.java:47)
at com.intellij.psi.impl.search.AnnotatedElementsSearcher.a(AnnotatedElementsSearcher.java:93)
at com.intellij.psi.impl.search.AnnotatedElementsSearcher.execute(AnnotatedElementsSearcher.java:44)
at com.intellij.psi.impl.search.AnnotatedElementsSearcher.execute(AnnotatedElementsSearcher.java:28)
at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:42)
at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:67)
at com.intellij.util.InstanceofQuery.forEach(InstanceofQuery.java:54)
at com.intellij.execution.ConfigurationUtil.addAnnotatedMethodsAnSubclasses(ConfigurationUtil.java:97)
at com.intellij.execution.ConfigurationUtil.findAllTestClasses(ConfigurationUtil.java:77)
at com.intellij.execution.junit.TestPackage$MySearchForTestsTask.run(TestPackage.java:397)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:469)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:218)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:169)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:378)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:434)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:145)









share|improve this question

























  • Is your test folder still set for test (green color)? Have you disabled maven or made some changes with it?

    – m3th0dman
    Oct 31 '12 at 12:24











  • It is still green and every subfolders icon has a small green point on it. I made no changes with maven. Also, since yesterday, every time I restart IDEA, atlassian connector loose current configuration, and I need to add it again.

    – Djordje Ivanovic
    Oct 31 '12 at 13:04













  • I fix problem with atlassian connector, but still can't run tests from folder...

    – Djordje Ivanovic
    Oct 31 '12 at 13:54











  • Check idea.log for exceptions (Help | Reveal Log in ...). Try running IDEA with the default settings (rename its directories: devnet.jetbrains.net/docs/DOC-181).

    – CrazyCoder
    Oct 31 '12 at 14:14











  • I added error log into the question.

    – Djordje Ivanovic
    Oct 31 '12 at 14:20














18












18








18


6






I'm using JUnit since I started this project and everything works just fine. I have a couple of hundreds tests, and of course, here and there I start them all. Right click on root test folder, run (or debug) with JUnit.
But since yesterday, when I do that, the result is:



Process finished with exit code 0


without starting any of tests. Same thing is with any folder in folder tree. I can still run a single test class, but I really need an option to start them all.
If any of you have any ideas, please drop them here.



Here is what is logged when I try to run tests:



2012-10-31 15:16:55,693 [2727217]  ERROR - ij.psi.impl.source.PsiFileImpl - IntelliJ IDEA 11.1.2  Build #IU-117.418 
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - JDK: 1.6.0_31
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - VM: Java HotSpot(TM) Client VM
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - Vendor: Sun Microsystems Inc.
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - OS: Windows 7
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - Last Action: RunClass
2012-10-31 15:16:55,693 [2727217] ERROR - m.intellij.util.ExecutorsQuery - com.intellij.psi.tree.IFileElementType cannot be cast to com.intellij.psi.tree.IStubFileElementType
java.lang.ClassCastException: com.intellij.psi.tree.IFileElementType cannot be cast to com.intellij.psi.tree.IStubFileElementType
at com.intellij.psi.impl.source.PsiFileImpl.calcStubTree(PsiFileImpl.java:976)
at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:239)
at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:220)
at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:60)
at com.intellij.psi.stubs.StubIndexImpl.process(StubIndexImpl.java:220)
at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:194)
at com.intellij.psi.stubs.AbstractStubIndex.get(AbstractStubIndex.java:33)
at com.intellij.psi.impl.java.stubs.index.JavaAnnotationIndex.get(JavaAnnotationIndex.java:47)
at com.intellij.psi.impl.search.AnnotatedElementsSearcher.a(AnnotatedElementsSearcher.java:93)
at com.intellij.psi.impl.search.AnnotatedElementsSearcher.execute(AnnotatedElementsSearcher.java:44)
at com.intellij.psi.impl.search.AnnotatedElementsSearcher.execute(AnnotatedElementsSearcher.java:28)
at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:42)
at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:67)
at com.intellij.util.InstanceofQuery.forEach(InstanceofQuery.java:54)
at com.intellij.execution.ConfigurationUtil.addAnnotatedMethodsAnSubclasses(ConfigurationUtil.java:97)
at com.intellij.execution.ConfigurationUtil.findAllTestClasses(ConfigurationUtil.java:77)
at com.intellij.execution.junit.TestPackage$MySearchForTestsTask.run(TestPackage.java:397)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:469)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:218)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:169)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:378)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:434)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:145)









share|improve this question
















I'm using JUnit since I started this project and everything works just fine. I have a couple of hundreds tests, and of course, here and there I start them all. Right click on root test folder, run (or debug) with JUnit.
But since yesterday, when I do that, the result is:



Process finished with exit code 0


without starting any of tests. Same thing is with any folder in folder tree. I can still run a single test class, but I really need an option to start them all.
If any of you have any ideas, please drop them here.



Here is what is logged when I try to run tests:



2012-10-31 15:16:55,693 [2727217]  ERROR - ij.psi.impl.source.PsiFileImpl - IntelliJ IDEA 11.1.2  Build #IU-117.418 
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - JDK: 1.6.0_31
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - VM: Java HotSpot(TM) Client VM
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - Vendor: Sun Microsystems Inc.
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - OS: Windows 7
2012-10-31 15:16:55,693 [2727217] ERROR - ij.psi.impl.source.PsiFileImpl - Last Action: RunClass
2012-10-31 15:16:55,693 [2727217] ERROR - m.intellij.util.ExecutorsQuery - com.intellij.psi.tree.IFileElementType cannot be cast to com.intellij.psi.tree.IStubFileElementType
java.lang.ClassCastException: com.intellij.psi.tree.IFileElementType cannot be cast to com.intellij.psi.tree.IStubFileElementType
at com.intellij.psi.impl.source.PsiFileImpl.calcStubTree(PsiFileImpl.java:976)
at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:239)
at com.intellij.psi.stubs.StubIndexImpl$1.perform(StubIndexImpl.java:220)
at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:60)
at com.intellij.psi.stubs.StubIndexImpl.process(StubIndexImpl.java:220)
at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:194)
at com.intellij.psi.stubs.AbstractStubIndex.get(AbstractStubIndex.java:33)
at com.intellij.psi.impl.java.stubs.index.JavaAnnotationIndex.get(JavaAnnotationIndex.java:47)
at com.intellij.psi.impl.search.AnnotatedElementsSearcher.a(AnnotatedElementsSearcher.java:93)
at com.intellij.psi.impl.search.AnnotatedElementsSearcher.execute(AnnotatedElementsSearcher.java:44)
at com.intellij.psi.impl.search.AnnotatedElementsSearcher.execute(AnnotatedElementsSearcher.java:28)
at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:42)
at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:67)
at com.intellij.util.InstanceofQuery.forEach(InstanceofQuery.java:54)
at com.intellij.execution.ConfigurationUtil.addAnnotatedMethodsAnSubclasses(ConfigurationUtil.java:97)
at com.intellij.execution.ConfigurationUtil.findAllTestClasses(ConfigurationUtil.java:77)
at com.intellij.execution.junit.TestPackage$MySearchForTestsTask.run(TestPackage.java:397)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:469)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:218)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:169)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:378)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:434)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:145)






java junit intellij-idea






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 10 '18 at 11:41









030

3,94043875




3,94043875










asked Oct 31 '12 at 12:19









Djordje IvanovicDjordje Ivanovic

2,06621636




2,06621636













  • Is your test folder still set for test (green color)? Have you disabled maven or made some changes with it?

    – m3th0dman
    Oct 31 '12 at 12:24











  • It is still green and every subfolders icon has a small green point on it. I made no changes with maven. Also, since yesterday, every time I restart IDEA, atlassian connector loose current configuration, and I need to add it again.

    – Djordje Ivanovic
    Oct 31 '12 at 13:04













  • I fix problem with atlassian connector, but still can't run tests from folder...

    – Djordje Ivanovic
    Oct 31 '12 at 13:54











  • Check idea.log for exceptions (Help | Reveal Log in ...). Try running IDEA with the default settings (rename its directories: devnet.jetbrains.net/docs/DOC-181).

    – CrazyCoder
    Oct 31 '12 at 14:14











  • I added error log into the question.

    – Djordje Ivanovic
    Oct 31 '12 at 14:20



















  • Is your test folder still set for test (green color)? Have you disabled maven or made some changes with it?

    – m3th0dman
    Oct 31 '12 at 12:24











  • It is still green and every subfolders icon has a small green point on it. I made no changes with maven. Also, since yesterday, every time I restart IDEA, atlassian connector loose current configuration, and I need to add it again.

    – Djordje Ivanovic
    Oct 31 '12 at 13:04













  • I fix problem with atlassian connector, but still can't run tests from folder...

    – Djordje Ivanovic
    Oct 31 '12 at 13:54











  • Check idea.log for exceptions (Help | Reveal Log in ...). Try running IDEA with the default settings (rename its directories: devnet.jetbrains.net/docs/DOC-181).

    – CrazyCoder
    Oct 31 '12 at 14:14











  • I added error log into the question.

    – Djordje Ivanovic
    Oct 31 '12 at 14:20

















Is your test folder still set for test (green color)? Have you disabled maven or made some changes with it?

– m3th0dman
Oct 31 '12 at 12:24





Is your test folder still set for test (green color)? Have you disabled maven or made some changes with it?

– m3th0dman
Oct 31 '12 at 12:24













It is still green and every subfolders icon has a small green point on it. I made no changes with maven. Also, since yesterday, every time I restart IDEA, atlassian connector loose current configuration, and I need to add it again.

– Djordje Ivanovic
Oct 31 '12 at 13:04







It is still green and every subfolders icon has a small green point on it. I made no changes with maven. Also, since yesterday, every time I restart IDEA, atlassian connector loose current configuration, and I need to add it again.

– Djordje Ivanovic
Oct 31 '12 at 13:04















I fix problem with atlassian connector, but still can't run tests from folder...

– Djordje Ivanovic
Oct 31 '12 at 13:54





I fix problem with atlassian connector, but still can't run tests from folder...

– Djordje Ivanovic
Oct 31 '12 at 13:54













Check idea.log for exceptions (Help | Reveal Log in ...). Try running IDEA with the default settings (rename its directories: devnet.jetbrains.net/docs/DOC-181).

– CrazyCoder
Oct 31 '12 at 14:14





Check idea.log for exceptions (Help | Reveal Log in ...). Try running IDEA with the default settings (rename its directories: devnet.jetbrains.net/docs/DOC-181).

– CrazyCoder
Oct 31 '12 at 14:14













I added error log into the question.

– Djordje Ivanovic
Oct 31 '12 at 14:20





I added error log into the question.

– Djordje Ivanovic
Oct 31 '12 at 14:20












6 Answers
6






active

oldest

votes


















28














OK, I fixed it.



In menu, under File, there is an invalidate cache option. That fixed it!






share|improve this answer





















  • 2





    This cache option is quite unpredictable workaround. hope IDEA developers will fix cases or automate them for us :)

    – Eugen Martynov
    Nov 2 '12 at 9:35











  • This is not working for me. :( is there any other solution ?

    – OverrockSTAR
    Mar 30 '17 at 23:49






  • 11





    2018.1 here and this continues happening...

    – Fran Marzoa
    Mar 23 '18 at 18:42






  • 1





    2019.1 here and this still continues to happen...

    – user3155701
    Apr 2 at 18:21



















18














On the latest IDE (as of Community Edition 2016.1) this option is more simplified.



right click on the folder you want to be recognized as a source folder:



Mark Directory As -> Sources Root



enter image description here






share|improve this answer



















  • 1





    but if you have multimodule project, it's really pita to set it everywhere manually :(

    – chipiik
    Feb 20 '17 at 15:31











  • It should be a Test Sources root, otherwise your project will compile the tests and the test libraries also for a release.

    – Fran Marzoa
    Mar 23 '18 at 18:23











  • I only have "excluded" there.

    – Line
    Mar 7 at 16:18



















4














Just to add a different scenario, which happened to me and some of my coworkers:



Alt+enter in the class -> create test: IJ (2017.1.1) proposes Arquillian Junit as first option of testing library and by going with it the test class and methods are created without the 'public' identifier. Then if one decides to change the testing library to JUnit, it is easy to forget about the absence of the 'public' identifier, which causes the tests not to be recognised by IJ. Of course, the solution is to place the 'public' identifiers.



Although this is not what happened to you it has the same consequence, therefore this answer may help others experiencing the same symptoms.






share|improve this answer































    1














    Fixed this a few times by... open file --> project structure. There, look on the left side menu as last entry there is "problem" count(if more then zero). click on those and then for for each problem highlighted in red in intellij in modules/libraries, remove them (minus button). They will be given module names like "test1..23" since intellij cant make out the structure. After deleting all marked red, close + restart intellij. Dont run maven refresh at this stage, since it will reintroduce the same error again. By restarting intellij will trigger a new scan of the project enter image description herestructure again.






    share|improve this answer

































      0














      In my case I had to:




      • close the project

      • open the build.gradle file

      • overwrite existing project? Yes

      • right click on project


        • Mark directory as > Resources Root








      share|improve this answer































        0














        If you are using IntelliJ for test execution and debugging, but not for editing. Your other editor/IDE may be battling with IntelliJ for control over generated files (*.class) -- resulting in IntelliJ reporting that No tests were found (and maybe spurious build errors too).



        In my case, Visual Studio Code seem to be having this effect (after recent updates to both tools).



        The solution that I have found is to close Visual Studio Code and then clean rebuild the project with IntelliJ or from the command-line. In otherwords, my dual-IDE workflow no longer works -- so I have to edit in IntelliJ.






        share|improve this answer
























          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f13157815%2fwhy-does-intellij-idea-suddenly-not-recognize-tests-in-test-folder-anymore%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          6 Answers
          6






          active

          oldest

          votes








          6 Answers
          6






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          28














          OK, I fixed it.



          In menu, under File, there is an invalidate cache option. That fixed it!






          share|improve this answer





















          • 2





            This cache option is quite unpredictable workaround. hope IDEA developers will fix cases or automate them for us :)

            – Eugen Martynov
            Nov 2 '12 at 9:35











          • This is not working for me. :( is there any other solution ?

            – OverrockSTAR
            Mar 30 '17 at 23:49






          • 11





            2018.1 here and this continues happening...

            – Fran Marzoa
            Mar 23 '18 at 18:42






          • 1





            2019.1 here and this still continues to happen...

            – user3155701
            Apr 2 at 18:21
















          28














          OK, I fixed it.



          In menu, under File, there is an invalidate cache option. That fixed it!






          share|improve this answer





















          • 2





            This cache option is quite unpredictable workaround. hope IDEA developers will fix cases or automate them for us :)

            – Eugen Martynov
            Nov 2 '12 at 9:35











          • This is not working for me. :( is there any other solution ?

            – OverrockSTAR
            Mar 30 '17 at 23:49






          • 11





            2018.1 here and this continues happening...

            – Fran Marzoa
            Mar 23 '18 at 18:42






          • 1





            2019.1 here and this still continues to happen...

            – user3155701
            Apr 2 at 18:21














          28












          28








          28







          OK, I fixed it.



          In menu, under File, there is an invalidate cache option. That fixed it!






          share|improve this answer















          OK, I fixed it.



          In menu, under File, there is an invalidate cache option. That fixed it!







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jun 18 '15 at 16:01









          ROMANIA_engineer

          34.9k20158146




          34.9k20158146










          answered Oct 31 '12 at 14:27









          Djordje IvanovicDjordje Ivanovic

          2,06621636




          2,06621636








          • 2





            This cache option is quite unpredictable workaround. hope IDEA developers will fix cases or automate them for us :)

            – Eugen Martynov
            Nov 2 '12 at 9:35











          • This is not working for me. :( is there any other solution ?

            – OverrockSTAR
            Mar 30 '17 at 23:49






          • 11





            2018.1 here and this continues happening...

            – Fran Marzoa
            Mar 23 '18 at 18:42






          • 1





            2019.1 here and this still continues to happen...

            – user3155701
            Apr 2 at 18:21














          • 2





            This cache option is quite unpredictable workaround. hope IDEA developers will fix cases or automate them for us :)

            – Eugen Martynov
            Nov 2 '12 at 9:35











          • This is not working for me. :( is there any other solution ?

            – OverrockSTAR
            Mar 30 '17 at 23:49






          • 11





            2018.1 here and this continues happening...

            – Fran Marzoa
            Mar 23 '18 at 18:42






          • 1





            2019.1 here and this still continues to happen...

            – user3155701
            Apr 2 at 18:21








          2




          2





          This cache option is quite unpredictable workaround. hope IDEA developers will fix cases or automate them for us :)

          – Eugen Martynov
          Nov 2 '12 at 9:35





          This cache option is quite unpredictable workaround. hope IDEA developers will fix cases or automate them for us :)

          – Eugen Martynov
          Nov 2 '12 at 9:35













          This is not working for me. :( is there any other solution ?

          – OverrockSTAR
          Mar 30 '17 at 23:49





          This is not working for me. :( is there any other solution ?

          – OverrockSTAR
          Mar 30 '17 at 23:49




          11




          11





          2018.1 here and this continues happening...

          – Fran Marzoa
          Mar 23 '18 at 18:42





          2018.1 here and this continues happening...

          – Fran Marzoa
          Mar 23 '18 at 18:42




          1




          1





          2019.1 here and this still continues to happen...

          – user3155701
          Apr 2 at 18:21





          2019.1 here and this still continues to happen...

          – user3155701
          Apr 2 at 18:21













          18














          On the latest IDE (as of Community Edition 2016.1) this option is more simplified.



          right click on the folder you want to be recognized as a source folder:



          Mark Directory As -> Sources Root



          enter image description here






          share|improve this answer



















          • 1





            but if you have multimodule project, it's really pita to set it everywhere manually :(

            – chipiik
            Feb 20 '17 at 15:31











          • It should be a Test Sources root, otherwise your project will compile the tests and the test libraries also for a release.

            – Fran Marzoa
            Mar 23 '18 at 18:23











          • I only have "excluded" there.

            – Line
            Mar 7 at 16:18
















          18














          On the latest IDE (as of Community Edition 2016.1) this option is more simplified.



          right click on the folder you want to be recognized as a source folder:



          Mark Directory As -> Sources Root



          enter image description here






          share|improve this answer



















          • 1





            but if you have multimodule project, it's really pita to set it everywhere manually :(

            – chipiik
            Feb 20 '17 at 15:31











          • It should be a Test Sources root, otherwise your project will compile the tests and the test libraries also for a release.

            – Fran Marzoa
            Mar 23 '18 at 18:23











          • I only have "excluded" there.

            – Line
            Mar 7 at 16:18














          18












          18








          18







          On the latest IDE (as of Community Edition 2016.1) this option is more simplified.



          right click on the folder you want to be recognized as a source folder:



          Mark Directory As -> Sources Root



          enter image description here






          share|improve this answer













          On the latest IDE (as of Community Edition 2016.1) this option is more simplified.



          right click on the folder you want to be recognized as a source folder:



          Mark Directory As -> Sources Root



          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 23 '16 at 15:27









          LeTexLeTex

          770625




          770625








          • 1





            but if you have multimodule project, it's really pita to set it everywhere manually :(

            – chipiik
            Feb 20 '17 at 15:31











          • It should be a Test Sources root, otherwise your project will compile the tests and the test libraries also for a release.

            – Fran Marzoa
            Mar 23 '18 at 18:23











          • I only have "excluded" there.

            – Line
            Mar 7 at 16:18














          • 1





            but if you have multimodule project, it's really pita to set it everywhere manually :(

            – chipiik
            Feb 20 '17 at 15:31











          • It should be a Test Sources root, otherwise your project will compile the tests and the test libraries also for a release.

            – Fran Marzoa
            Mar 23 '18 at 18:23











          • I only have "excluded" there.

            – Line
            Mar 7 at 16:18








          1




          1





          but if you have multimodule project, it's really pita to set it everywhere manually :(

          – chipiik
          Feb 20 '17 at 15:31





          but if you have multimodule project, it's really pita to set it everywhere manually :(

          – chipiik
          Feb 20 '17 at 15:31













          It should be a Test Sources root, otherwise your project will compile the tests and the test libraries also for a release.

          – Fran Marzoa
          Mar 23 '18 at 18:23





          It should be a Test Sources root, otherwise your project will compile the tests and the test libraries also for a release.

          – Fran Marzoa
          Mar 23 '18 at 18:23













          I only have "excluded" there.

          – Line
          Mar 7 at 16:18





          I only have "excluded" there.

          – Line
          Mar 7 at 16:18











          4














          Just to add a different scenario, which happened to me and some of my coworkers:



          Alt+enter in the class -> create test: IJ (2017.1.1) proposes Arquillian Junit as first option of testing library and by going with it the test class and methods are created without the 'public' identifier. Then if one decides to change the testing library to JUnit, it is easy to forget about the absence of the 'public' identifier, which causes the tests not to be recognised by IJ. Of course, the solution is to place the 'public' identifiers.



          Although this is not what happened to you it has the same consequence, therefore this answer may help others experiencing the same symptoms.






          share|improve this answer




























            4














            Just to add a different scenario, which happened to me and some of my coworkers:



            Alt+enter in the class -> create test: IJ (2017.1.1) proposes Arquillian Junit as first option of testing library and by going with it the test class and methods are created without the 'public' identifier. Then if one decides to change the testing library to JUnit, it is easy to forget about the absence of the 'public' identifier, which causes the tests not to be recognised by IJ. Of course, the solution is to place the 'public' identifiers.



            Although this is not what happened to you it has the same consequence, therefore this answer may help others experiencing the same symptoms.






            share|improve this answer


























              4












              4








              4







              Just to add a different scenario, which happened to me and some of my coworkers:



              Alt+enter in the class -> create test: IJ (2017.1.1) proposes Arquillian Junit as first option of testing library and by going with it the test class and methods are created without the 'public' identifier. Then if one decides to change the testing library to JUnit, it is easy to forget about the absence of the 'public' identifier, which causes the tests not to be recognised by IJ. Of course, the solution is to place the 'public' identifiers.



              Although this is not what happened to you it has the same consequence, therefore this answer may help others experiencing the same symptoms.






              share|improve this answer













              Just to add a different scenario, which happened to me and some of my coworkers:



              Alt+enter in the class -> create test: IJ (2017.1.1) proposes Arquillian Junit as first option of testing library and by going with it the test class and methods are created without the 'public' identifier. Then if one decides to change the testing library to JUnit, it is easy to forget about the absence of the 'public' identifier, which causes the tests not to be recognised by IJ. Of course, the solution is to place the 'public' identifiers.



              Although this is not what happened to you it has the same consequence, therefore this answer may help others experiencing the same symptoms.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Apr 27 '17 at 9:04









              João MatosJoão Matos

              1,0581827




              1,0581827























                  1














                  Fixed this a few times by... open file --> project structure. There, look on the left side menu as last entry there is "problem" count(if more then zero). click on those and then for for each problem highlighted in red in intellij in modules/libraries, remove them (minus button). They will be given module names like "test1..23" since intellij cant make out the structure. After deleting all marked red, close + restart intellij. Dont run maven refresh at this stage, since it will reintroduce the same error again. By restarting intellij will trigger a new scan of the project enter image description herestructure again.






                  share|improve this answer






























                    1














                    Fixed this a few times by... open file --> project structure. There, look on the left side menu as last entry there is "problem" count(if more then zero). click on those and then for for each problem highlighted in red in intellij in modules/libraries, remove them (minus button). They will be given module names like "test1..23" since intellij cant make out the structure. After deleting all marked red, close + restart intellij. Dont run maven refresh at this stage, since it will reintroduce the same error again. By restarting intellij will trigger a new scan of the project enter image description herestructure again.






                    share|improve this answer




























                      1












                      1








                      1







                      Fixed this a few times by... open file --> project structure. There, look on the left side menu as last entry there is "problem" count(if more then zero). click on those and then for for each problem highlighted in red in intellij in modules/libraries, remove them (minus button). They will be given module names like "test1..23" since intellij cant make out the structure. After deleting all marked red, close + restart intellij. Dont run maven refresh at this stage, since it will reintroduce the same error again. By restarting intellij will trigger a new scan of the project enter image description herestructure again.






                      share|improve this answer















                      Fixed this a few times by... open file --> project structure. There, look on the left side menu as last entry there is "problem" count(if more then zero). click on those and then for for each problem highlighted in red in intellij in modules/libraries, remove them (minus button). They will be given module names like "test1..23" since intellij cant make out the structure. After deleting all marked red, close + restart intellij. Dont run maven refresh at this stage, since it will reintroduce the same error again. By restarting intellij will trigger a new scan of the project enter image description herestructure again.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Nov 28 '18 at 10:33

























                      answered Nov 26 '18 at 22:30









                      user7023213user7023213

                      42956




                      42956























                          0














                          In my case I had to:




                          • close the project

                          • open the build.gradle file

                          • overwrite existing project? Yes

                          • right click on project


                            • Mark directory as > Resources Root








                          share|improve this answer




























                            0














                            In my case I had to:




                            • close the project

                            • open the build.gradle file

                            • overwrite existing project? Yes

                            • right click on project


                              • Mark directory as > Resources Root








                            share|improve this answer


























                              0












                              0








                              0







                              In my case I had to:




                              • close the project

                              • open the build.gradle file

                              • overwrite existing project? Yes

                              • right click on project


                                • Mark directory as > Resources Root








                              share|improve this answer













                              In my case I had to:




                              • close the project

                              • open the build.gradle file

                              • overwrite existing project? Yes

                              • right click on project


                                • Mark directory as > Resources Root









                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered May 10 '18 at 11:40









                              030030

                              3,94043875




                              3,94043875























                                  0














                                  If you are using IntelliJ for test execution and debugging, but not for editing. Your other editor/IDE may be battling with IntelliJ for control over generated files (*.class) -- resulting in IntelliJ reporting that No tests were found (and maybe spurious build errors too).



                                  In my case, Visual Studio Code seem to be having this effect (after recent updates to both tools).



                                  The solution that I have found is to close Visual Studio Code and then clean rebuild the project with IntelliJ or from the command-line. In otherwords, my dual-IDE workflow no longer works -- so I have to edit in IntelliJ.






                                  share|improve this answer




























                                    0














                                    If you are using IntelliJ for test execution and debugging, but not for editing. Your other editor/IDE may be battling with IntelliJ for control over generated files (*.class) -- resulting in IntelliJ reporting that No tests were found (and maybe spurious build errors too).



                                    In my case, Visual Studio Code seem to be having this effect (after recent updates to both tools).



                                    The solution that I have found is to close Visual Studio Code and then clean rebuild the project with IntelliJ or from the command-line. In otherwords, my dual-IDE workflow no longer works -- so I have to edit in IntelliJ.






                                    share|improve this answer


























                                      0












                                      0








                                      0







                                      If you are using IntelliJ for test execution and debugging, but not for editing. Your other editor/IDE may be battling with IntelliJ for control over generated files (*.class) -- resulting in IntelliJ reporting that No tests were found (and maybe spurious build errors too).



                                      In my case, Visual Studio Code seem to be having this effect (after recent updates to both tools).



                                      The solution that I have found is to close Visual Studio Code and then clean rebuild the project with IntelliJ or from the command-line. In otherwords, my dual-IDE workflow no longer works -- so I have to edit in IntelliJ.






                                      share|improve this answer













                                      If you are using IntelliJ for test execution and debugging, but not for editing. Your other editor/IDE may be battling with IntelliJ for control over generated files (*.class) -- resulting in IntelliJ reporting that No tests were found (and maybe spurious build errors too).



                                      In my case, Visual Studio Code seem to be having this effect (after recent updates to both tools).



                                      The solution that I have found is to close Visual Studio Code and then clean rebuild the project with IntelliJ or from the command-line. In otherwords, my dual-IDE workflow no longer works -- so I have to edit in IntelliJ.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Oct 14 '18 at 22:51









                                      nobarnobar

                                      27.3k1087100




                                      27.3k1087100






























                                          draft saved

                                          draft discarded




















































                                          Thanks for contributing an answer to Stack Overflow!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f13157815%2fwhy-does-intellij-idea-suddenly-not-recognize-tests-in-test-folder-anymore%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          Tonle Sap (See)

                                          I get strange results when I access the Sqlitedatabase with Unity C# via XAMPP

                                          Guatemaltekische Davis-Cup-Mannschaft