Version 2

    I would gladly like to inform you that S-RAMP Container Adapter for Arquillian was just released. The project consist of S-RAMP remote container adapter implementation for Arquillian, which enables users to deploy artifacts to S-RAMP Repository before running their tests written in Arquillian framework. This might become handy when developing e.g. custom artifact deriver for S-RAMP (or other form of inter-product integration) and would like to test it.

    Main features

    Main purpose of this extension is to deploy ShrinkWrap archive to S-RAMP repository (for the complete list of supported archives see: About · sbunciak/arquillian-sramp-remote Wiki · GitHub). To accomplish this, it leverages s-ramp-client (Java library which encapsulates REST calls) to interact with S-RAMP server. All necessary configuration is loaded from arquillian.xml, including S-RAMP user credentials, and server URL. However, this extension does not control the server, it just expects one to be running at configured location. There is a plan to implement also managed type of arquillian container adapter, so it will be able to start/stop S-RAMP servers.

     

    One of the other features is capability of injecting SrampAtomApiClient, SrampConfiguration and the deployed archive instances as @ArquillianResource. Sample usage at https://github.com/sbunciak/arquillian-sramp-remote/blob/master/src/test/java/org/jboss/qa/arquillian/container/sramp/DeploymentTest.java#L31-L38.

     

    At the end of the tests, all artifacts created during the deployment phase are cleaned up, and a check for the number of artifacts so no artifacts are left behind is also made.

     

    How to use it

     

    1. Add maven profile:

    Latest version (v1.1.0) has been already pushed to JBoss Nexus Maven repository.

    Note: you need to have JBoss.org Maven repository configured in your Maven settings.xml file. See: https://community.jboss.org/wiki/MavenGettingStarted-Users

     

    <profiles>
    ...
      <profile>
           <id>arquillian-sramp-remote</id>
           <dependencies>
                <dependency>
                     <groupId>org.jboss.qa.arquillian.container</groupId>
                     <artifactId>arquillian-sramp-remote</artifactId>
                     <version>${version.arquillian_sramp_remote}</version>
                     <scope>test</scope>
                </dependency>
           </dependencies>
           <activation>
                <activeByDefault>false</activeByDefault>
           </activation>
      </profile>
    ...
    </profiles>
    
    
    
    
    

    2. Configure connection properties in arquillian.xml (optional)

     

    <container qualifier="sramp" default="true">
      <configuration>
           <property name="srampHost">localhost</property>
           <property name="srampPort">8080</property>
           <property name="srampUsername">admin</property>
           <property name="srampPassword">overlord</property>
      </configuration>
    </container>

     

    3. Implement & run your tests!

     

    Contact

    If you have any questions or ideas for improvement, please do not hesitate and send me an email: sbunciak@redhat.com

     

    Github

    sbunciak/arquillian-sramp-remote · GitHub