samedi 27 août 2016

Is it currently possible to run Arquillian tests on Spring beans?

From what little experience I have of running Arquillian tests with the Arquillian Spring Framework Extension, it seems to me that things are severely broken at the moment.

I've tried running a test even simpler than the Spring Inject example from the arquillian showcase project (i.e. no classes, applicationContext.xml only, and a single test that has assertTrue(true) as its body).

The relevant dependencies are largely the same as those in the Spring Inject example save for version differences.

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jboss.arquillian</groupId>
                <artifactId>arquillian-bom</artifactId>
                <version>1.1.11.Final</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependency>
        <groupId>org.jboss.arquillian.extension</groupId>
        <artifactId>arquillian-service-integration-spring-inject</artifactId>
        <version>1.1.0.Alpha1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.jboss.arquillian.extension</groupId>
        <artifactId>arquillian-service-deployer-spring-3</artifactId>
        <version>1.0.0.Beta3</version>
        <scope>test</scope>
    </dependency>

I even included parts of that project's parent pom just to be sure.

    <dependency>
        <groupId>org.jboss.arquillian.protocol</groupId>
        <artifactId>arquillian-protocol-servlet</artifactId>
        <scope>test</scope>
    </dependency>

However this only resulted in the following error

Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.config.EmbeddedValueResolver from [Module "deployment.e5488c33-14dd-41b6-8996-d616c11cbbb5.war:main" from Service Module Loader]

I've tried using the Shrinkwrap resolver to include the necessary jars, but that error still showed up.

So tell me, is the Arquillian testing of Spring beans and components currently broken?

P.S: The version of Spring I am using is 4.3.2.

Aucun commentaire:

Enregistrer un commentaire