正在运行的测试显示已通过,但Gradle测试执行器显示STANDARD_ERROR。
>>./gradlew --stop
Stopping Daemon(s)
1 Daemon stopped
>>./gradlew test --tests com.tudu.task.TaskListTests.tasksAddedSequentiallyWithDescendingDueDateAreSortedByAscendingDueDate
Starting a Gradle Daemon, 8 stopped Daemons could not be reused, use --status for details
> Task :test
Gradle Test Executor 1 STANDARD_ERROR
Mar 11, 2021 4:53:00 PM org.junit.platform.launcher.core.EngineDiscoveryOrchestrator lambda$logTestDescriptorExclusionReasons$7
INFO: 0 containers and 1 tests were Method or class mismatch
TaskListTests > tasks added sequentially with descending due date are sorted by ascending due date PASSED
当我运行完整的测试文件时,没有出现此错误。
>>./gradlew test --tests com.tudu.task.TaskListTests
> Task :test
TaskListTests > tasks added sequentially with descending due date are sorted by ascending due date PASSED
TaskListTests > tasks added sequentially with random due date are sorted by ascending due date PASSED
"方法或类不匹配"是什么意思?什么导致STANDARD_ERROR?
1条答案
按热度按时间lmvvr0a81#
STANDARD_ERROR
是当前JUnit 5的行为:https://github.com/junit-team/junit5/issues/1774您可以使用下面的
*.properties
示例尝试解决方法:https://github.com/junit-team/junit5/issues/1774#issuecomment-463662553