I'm working in a project that is new to me, but has been around for a while.
I try running the unit tests from the terminal with mvn clean test
and the unit tests run as expected.
Unfortunately for me, I really could use some debugging help from IntelliJ on some of these unit tests. Any time I try to run a unit test from IntelliJ, I get this output:
Internal Error occurred.
org.junit.platform.commons.JUnitException:
TestEngine with ID 'junit-vintage' failed to discover tests
Caused by:
org.junit.platform.commons.JUnitException: Unsupported version of
junit:junit: 3.8.1. Please upgrade to version 4.12 or later.
According to pom.xml, I'm using JUnit 5.7.0, Mockito 3.7.7, and (since some results I've googled suggest it could be a Spring Boot issue) no sign of Spring Boot. I've also tried including junit-vintage, since it is mentioned in the output, but that seems to make no difference, either.
question from:
https://stackoverflow.com/questions/66055656/junit-is-fine-via-command-line-fails-in-intellij 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…