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

后端 未结 13 2439
深忆病人
深忆病人 2021-02-01 02:26

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 r

13条回答
  •  忘掉有多难
    2021-02-01 02:41

    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.

提交回复
热议问题