In past I have come across through this issue several times , The core problem is that my tests are showing errors rather than failures in eclipse Junit screen.
RunWith(ArquillianSputnik) class SampleIntegrationArquillianTest extends Specification{ @Deployment def static JavaArchive "create Deployment"() { JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "test.jar") jar.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml") return jar } @Unroll def "Sample Spock Integration Arquillian Test"(def name, def length){ expect: name.size() == length where: name | length 'Zafar' | 5 'Husmukh' | 6 'Aslam' | 5 } }
This is a simple spock test runs inside jboss 7.1 container.
My dependencies:
testCompile 'org.codehaus.groovy:groovy-all:2.1.5' testCompile 'org.spockframework:spock-core:0.7-groovy-2.0' testCompile 'org.jboss.arquillian.spock:arquillian-spock-container:1.0.0.Beta2' testCompile 'org.jboss.as:jboss-as-arquillian-container-managed:7.1.1.Final' testCompile 'org.jboss.arquillian.protocol:arquillian-protocol-servlet:1.0.1.Final' testCompile 'org.jboss.spec:jboss-javaee-6.0:1.0.0.Final' testCompile 'commons-collections:commons-collections:3.2' testCompile 'org.jboss.arquillian:arquillian-bom:1.1.4.Final' testCompile 'sun-jaxb:jaxb-api:2.1.4' testCompile 'org.jboss.arquillian.extension:arquillian-persistence-impl:1.0.0.Alpha6'
When I execute it as a junit test , it shows following screen in eclipse
As you look onto above image, the tests should shows in failures if the condition fails but it showing as errors with this exception
"[Proxied beacuse: Origional exception not serializable, NotSerializableException]"