0

I'm learning how to code a simple JUnit test with Arquillian framework and Cucumber jvm.

Code:

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");
}

}

When I try to run this test above, I received this message:

Tests in error:
    ARunner.performInternalCucumberOperations >> IllegalArgument name

Any ideas how could I solve this problem? tks

Stankevix
  • 45
  • 4

1 Answers1

0

Changing this part :

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

To:

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

Solved my problem.

Stankevix
  • 45
  • 4
  • Normally any non-java files reside below `src/test/resources`, thats why the `classpath:`-path didn't work. – FibreFoX Feb 24 '17 at 19:09