为什么cucumber会找到“runTest.java”来运行测试?
当我编写一些cucumber测试时,我从一些文档中发现我需要在src/test/java/somepackage下创建一个runTest.java文件,其中包含配置cucumber的内容,如:为什么cucumber会找到“runTest.java”来运行测试?,java,junit,cucumber,Java,Junit,Cucumber,当我编写一些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(plug
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站点的名称转换,但没有找到任何相关文档。我只是想知道更多关于它的信息。我认为公约是: 测试*.java或 *java或 *TestCase.java 它不是JUnit约定,而是定义它的Maven surefire插件:
参考:我认为公约是: 测试*.java或 *java或 *TestCase.java 它不是JUnit约定,而是定义它的Maven surefire插件: 参考: