我正在学习如何使用Arquillian框架和Cucumber jvm编写简单的JUnit测试。
代码:
package br.com.cielo.batcha.test;
...
@RunWith(CukeSpace.class)
@Features("classpath:br/com/cielo/batcha/features/MSG_MANUTENCAO.feature")
public class ARunner {
@Deployment
public static JavaArchive createDeployment() {
return ShrinkWrap.create(JavaArchive.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
.addClass(BatchaApplication.class);
}
@Quando("^Sistema de teste estiver conectado ao Banco$")
public void sistema_de_teste_estiver_conectado_ao_Banco() throws Throwable {
Assert.fail("Not yet implemented");
}
}
当我尝试运行上面的测试时,我收到了这条消息:
Tests in error:
ARunner.performInternalCucumberOperations >> IllegalArgument name
任何想法我怎么能解决这个问题? TKS
答案 0 :(得分:0)
更改此部分:
@Features("classpath:br/com/cielo/batcha/features/MSG_MANUTENCAO.feature")
要:
@Features("src/test/java/br/com/cielo/batcha/features/MSG_MANUTENCAO.feature")
解决了我的问题。