Could not resolve SpecInfo from Sputnik Runner

293 Views Asked by At

I am trying to run Arquillian Tests using spock arquillian container

<dependency>
    <groupId>org.jboss.arquillian.spock</groupId>
    <artifactId>arquillian-spock-container</artifactId>
    <version>1.0.0.Beta3</version>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>org.codehaus.groovy</groupId>
    <artifactId>groovy-all</artifactId>
    <version>2.4.3</version>
    <scope>test</scope>
</dependency>

<dependency>
    <groupId>org.spockframework</groupId>
    <artifactId>spock-core</artifactId>
    <version>0.7-groovy-2.0</version>
    <scope>test</scope>
</dependency>

and I am getting the following error:

Could not resolve SpecInfo from Sputnik Runner

What can cause this problem?

1

There are 1 best solutions below

0
On

You can always build a test jar (with dependencies preferrably):

After that just run your tests like this: java -cp xxx-test-with-dependencies.jar org.junit.runner.JUnitCore full.pkg.of.testSpec It works because Sputnik is a JUnit test runner, so you need to start from there.

Add any options you like, -Xms, -Danything that is needed (for example Geb needs reporting dir to be set). Add additional classpath elements (-cp) it your jar does not contain all dependencies.