Why can't groovy's unit tests run in IDEA?

Answered

I have a very simple unit test file, which works well by using the groovy command directly, but this problem occurs when running in the IntelliJ IDEA.

class ListTest extends GroovyTestCase {
void testListSize() {
def lst = [1, 2]
assertEquals "ArrayList size must be 2", 2, lst.size()
}
}
org.junit.platform.launcher.core.DefaultLauncher handleThrowable
WARNING: TestEngine with ID 'junit-vintage' failed to discover tests
org.junit.platform.commons.JUnitException: Failed to parse version of junit:junit: 4.13.1

That project was just created without any additional configuration and restarting IntelliJ IDEA did not have any effect.

What should I do?

1
2 comments
Avatar
Permanently deleted user

Using the RunAnything plugin, it was able to run simply, but temporarily solved the problem of running.

0

please try the following Junit version:
<junit.jupiter.version>5.7.0</junit.jupiter.version>

 

You can find the additional information here: https://youtrack.jetbrains.com/issue/IDEA-257728

0

Please sign in to leave a comment.