【发布时间】:2020-04-20 11:38:23
【问题描述】:
我有如下方法:
@DisplayName("testCreateExecution")
@ParameterizedTest(name = "testCreateExecution[ testId:{index}, size:{0}, side:{1} ]")
@MethodSource(SINGLE_EXECUTION_DATA_PROVIDER)
public void testCreateExecution(double size, char side) throws TestRunException{
...
}
这个测试由带有感叹号和红色小箭头的junit标记,而不是通常的绿色箭头。 当我尝试运行它时,这个测试用例没有被执行(什么都没有发生),但随后被标记为通过。 当我重命名此方法时,例如。到 testCreateExecutions 一切正常。
我真的很惊讶 - 这个测试方法名称有什么问题? 此方法由 intellij 重命名选项命名,但这是原因吗?旧方法是否缓存在某处并引起任何冲突?
【问题讨论】:
标签: testing intellij-idea methods junit