У меня есть модульный тест, написанный с использованием платформы Spock Testing для тестирования моего приложения Spring Boot.
Я объявил следующие тестовые зависимости:
- : 2.3-groovy-4.0
Код: Выделить всё
spock-spring
- : 3.2.4
Код: Выделить всё
spring-boot-starter-test
- : 3.2.2
Код: Выделить всё
surefire plugin version
Когда я запускаю тест mvn, Плагин Surefire не может их выполнить, выдавая ошибку:
Код: Выделить всё
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.2.2:test (default-test) on project myspockspringtest:
[ERROR]
[ERROR] Please refer to C:\data\ myspockspringtest\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
There was an error in the forked process
'java.util.Set org.junit.platform.engine.TestDescriptor.getAncestors()'
Я последовал инструкциям Surefire, просмотрел созданный им файл дампа Surefire и увидел ошибку:
Код: Выделить всё
java.lang.NoSuchMethodError: 'java.util.Set org.junit.platform.engine.TestDescriptor.getAncestors()'
at org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.getTestClassNames(StackTracePruningEngineExecutionListener.java:50)
Код: Выделить всё
org.spockframework
spock-bom
2.3-groovy-4.0
pom
import
Как я могу это исправить и почему это происходит?
Подробнее здесь: https://stackoverflow.com/questions/784 ... ptor-getan