非法论证名称 - 与黄瓜的Arquillian

时间:2017-01-31 17:27:03

标签: java junit cucumber jboss-arquillian cucumber-junit

我正在学习如何使用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

1 个答案:

答案 0 :(得分:0)

更改此部分:

@Features("classpath:br/com/cielo/batcha/features/MSG_MANUTENCAO.feature")

要:

@Features("src/test/java/br/com/cielo/batcha/features/MSG_MANUTENCAO.feature")

解决了我的问题。