有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

junit cucumber为什么会找到“runTest.java”来运行测试?

当我编写一些cucumber测试时,我从一些文档中发现,我需要在“src/test/java/somepackage”下创建一个“runTest.java”文件,其中包含配置cucumber的内容,比如:

import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty"})
public class runTest {
}

我发现类名“runTest”很有趣,因为如果我将其重命名为任何其他名称,mvn test将无法再找到它

我在junit网站上搜索了有关名称转换的信息,但没有找到任何相关文档。只是想知道更多关于它的信息


共 (0) 个答案