ShrinkWrap 1.1.0-alpha-3 Released

Since we wrote this post we didn't laze around. Check our latest announcement.

The Arquillian team is proud to announce the 1.1.0-alpha-3 release of the ShrinkWrap component!

What is ShrinkWrap?

ShrinkWrap is the simplest way to create archives in Java. Using the fluent and intuitive ShrinkWrap API, developers may assemble JARs, WARs, and EARs to be deployed directly by Arquillian during testing.

Release details

Component ShrinkWrap
Version 1.1.0-alpha-3 view tag
Release date 2012-08-06
Released by Andrew Lee Rubinger
Compiled against
  • JUnit – 4.8.2

Published artifacts org.jboss.shrinkwrap

  • org.jboss.shrinkwrap » shrinkwrap-api jar javadoc pom
  • org.jboss.shrinkwrap » shrinkwrap-bom pom
  • org.jboss.shrinkwrap » shrinkwrap-depchain pom
  • org.jboss.shrinkwrap » shrinkwrap-impl-base jar javadoc pom
  • org.jboss.shrinkwrap » shrinkwrap-spi jar javadoc pom

Release notes and resolved issues 4

Enhancement
  • SHRINKWRAP-411 - API inconsistency - allow to delete Class or Package from the Archive
Feature Request
Bug
  • SHRINKWRAP-377 - ZipExporter.exportTo(java.io.File target) does not fail when target exists.
  • SHRINKWRAP-407 - Archive.toString might throw java.lang.IndexOutOfBoundsException

Thanks to the following list of contributors: Andrew Lee Rubinger, Tommy Tynjä, Ralf Battenfeld, Pedro Kowalski, Marek Goldmann, Ivan Pazmino, Eric Lefevre-ardant, Davide D'alto

ShrinkWrap Descriptors 2.0.0-alpha-4 Released

Since we wrote this post we didn't laze around. Check our latest announcement.

The Arquillian team is proud to announce the 2.0.0-alpha-4 release of the ShrinkWrap Descriptors component!

What is ShrinkWrap Descriptors?

The Shrinkwrap Descriptor project provides an uniformed fluent API for creating and modifying Java EE deployment descriptors on the fly. Starting from the very early JEE 1.3 to the brand new Java EE 7 version, the descriptor project includes almost all official deployment descriptors. Several vendor specific deployment descriptors, mostly JBoss related, are covered as well.

Release details

Component ShrinkWrap Descriptors
Version 2.0.0-alpha-4 view tag
Release date 2012-08-06
Released by Andrew Lee Rubinger
Compiled against
  • JUnit – 4.8.1

Published artifacts org.jboss.shrinkwrap.descriptors

  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-api-base jar javadoc pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-api-javaee jar javadoc pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-api-jboss jar javadoc pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-api-misc jar javadoc pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-ant jar javadoc pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-bom pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-depchain pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-gen jar javadoc pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-impl-base jar javadoc pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-impl-javaee jar javadoc pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-impl-jboss jar javadoc pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-impl-misc jar javadoc pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-spi jar javadoc pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-test jar javadoc pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-test-util jar javadoc pom
  • org.jboss.shrinkwrap.descriptors » shrinkwrap-descriptors-metadata-parser-test jar javadoc pom

Release notes and resolved issues 7

Feature Request
Bug
  • SHRINKDESC-115 - Descriptors 2.0 module creates duplicate <alternatives/> entries (test case attached)
  • SHRINKDESC-121 - WebFragmentDescriptor defaultFileName should be web-fragment.xml
  • SHRINKDESC-128 - Missing attributes
Task
  • SHRINKDESC-105 - Re-enable and expand MetadataParserTestCase
  • SHRINKDESC-118 - Fix Jetty7TestCase So It Doesn't Require Network Connection and Access to www.eclipse.org

Thanks to the following list of contributors: Ralf Battenfeld, Andrew Lee Rubinger

Arquillian Core 1.0.2.Final Released

Since we wrote this post we didn't laze around. Check our latest announcement.

The Arquillian team is proud to announce the 1.0.2.Final release of the Arquillian Core component!

Another little maintenance release in the Arquillian 1.0 series.

The @Deployment can now be defined on private and protected methods. The same package and protected support is applicable to the SPI level for service and observer implementations.

@Deployment
static JavaArchive createDeployment() {
   ...
}

Using environment variables in arquillian.xml is now possible via the property expression ENV.name

<container qualifier="example">
   <property name="jbossHome">${ENV.JBOSS_HOME}</property>
</container>

Ever run into this exception? “UnsupportedOperationException: Multiple WebArchives found in X.ear. Can not determine which to enrich.”
The exception happens when the Servlet Protocol in Arquillian attempts to enrich an EnterpriseArchive for in-container testing, but multiple WebArchives were found in the Deployment, and it can’t determine which you want to test. With the help of Robert Panzer this is now supported. You can give a Protocol a hint to which Archive is under test by using the new Testable.archiveToTest(Archive) method.

@Deployment
static EnterpriseArchive create() {
   return ShrinkWrap.create(EnterpriseArchive.class)
      .addAsModule(...some..war..)
      .addAsModule(
         Testable.archiveToTest(
            ShrinkWrap.create(WebArchive.class)
               .addXYZ(...)
         )
      );
}

What is Arquillian?

Arquillian is open source software that empowers you to test JVM-based applications more effectively. Created to defend the software galaxy from bugs, Arquillian brings your test to the runtime so you can focus on testing your application's behavior rather than managing the runtime. Using Arquillian, you can develop a comprehensive suite of tests from the convenience of your IDE and run them in any IDE, build tool or continuous integration environment.

Release details

Component Arquillian Core
Version 1.0.2.Final view tag
Release date 2012-07-23
Released by Aslak Knutsen
Compiled against

Published artifacts org.jboss.arquillian.core

  • org.jboss.arquillian.core » arquillian-core-api jar javadoc pom
  • org.jboss.arquillian.core » arquillian-core-spi jar javadoc pom
  • org.jboss.arquillian.core » arquillian-core-impl-base jar javadoc pom
  • org.jboss.arquillian.config » arquillian-config-api jar javadoc pom
  • org.jboss.arquillian.config » arquillian-config-spi jar javadoc pom
  • org.jboss.arquillian.config » arquillian-config-impl-base jar javadoc pom
  • org.jboss.arquillian.test » arquillian-test-api jar javadoc pom
  • org.jboss.arquillian.test » arquillian-test-spi jar javadoc pom
  • org.jboss.arquillian.test » arquillian-test-impl-base jar javadoc pom
  • org.jboss.arquillian.container » arquillian-container-spi jar javadoc pom
  • org.jboss.arquillian.container » arquillian-container-impl-base jar javadoc pom
  • org.jboss.arquillian.container » arquillian-container-test-api jar javadoc pom
  • org.jboss.arquillian.container » arquillian-container-test-spi jar javadoc pom
  • org.jboss.arquillian.container » arquillian-container-test-impl-base jar javadoc pom
  • org.jboss.arquillian.junit » arquillian-junit-core jar javadoc pom
  • org.jboss.arquillian.junit » arquillian-junit-standalone jar javadoc pom
  • org.jboss.arquillian.junit » arquillian-junit-container jar javadoc pom
  • org.jboss.arquillian.testng » arquillian-testng-core jar javadoc pom
  • org.jboss.arquillian.testng » arquillian-testng-standalone jar javadoc pom
  • org.jboss.arquillian.testng » arquillian-testng-container jar javadoc pom
  • org.jboss.arquillian.testenricher » arquillian-testenricher-cdi jar javadoc pom
  • org.jboss.arquillian.testenricher » arquillian-testenricher-ejb jar javadoc pom
  • org.jboss.arquillian.testenricher » arquillian-testenricher-resource jar javadoc pom
  • org.jboss.arquillian.testenricher » arquillian-testenricher-initialcontext jar javadoc pom
  • org.jboss.arquillian.protocol » arquillian-protocol-servlet jar javadoc pom
  • org.jboss.arquillian.protocol » arquillian-protocol-jmx jar javadoc pom
  • org.jboss.arquillian » arquillian-bom pom

Release notes and resolved issues 9

Maintenance release + Multi war support

Enhancement
  • ARQ-920 - Support @Deployment on non-public member (method or field)
  • ARQ-921 - Make environment variables available for property replacement in configuration
Feature Request
  • ARQ-990 - Update dependencies to simplify downstream Fedora Packaging
  • ARQ-1024 - Support package private implementation
  • ARQ-1035 - Should support enriching a specific module in a multi module deployment
Bug
  • ARQ-376 - Environment configuration is overridden by arquillian.xml
  • ARQ-620 - arquillian-core-impl-base needs a non-optional dependency on jboss-logmanager
Task
  • ARQ-956 - Remove dependency on jboss-logging in JMX protocol

Thanks to the following list of contributors: Aslak Knutsen, Thomas Diesler, Robert.panzer, Dan Allen

Arquillian TestRunner Spock 1.0.0.Alpha2 Released

Since we wrote this post we didn't laze around. Check our latest announcement.

The Arquillian team is proud to announce the 1.0.0.Alpha2 release of the Arquillian TestRunner Spock component!

Some of the Highlights

This minor release of the intergalactic cooperation between Spock and Arquillian comes with the following updates:

  • Update to the latest stable version of Spock – 0.6
  • Update Arquillian Core to 1.0.1.Final

Smashing bugs has never been easier!

What is Arquillian?

Arquillian is open source software that empowers you to test JVM-based applications more effectively. Created to defend the software galaxy from bugs, Arquillian brings your test to the runtime so you can focus on testing your application's behavior rather than managing the runtime. Using Arquillian, you can develop a comprehensive suite of tests from the convenience of your IDE and run them in any IDE, build tool or continuous integration environment.

Release details

Component Arquillian TestRunner Spock
Version 1.0.0.Alpha2 view tag
Release date 2012-07-23
Released by Aslak Knutsen
Compiled against

Published artifacts org.jboss.arquillian.spock

  • org.jboss.arquillian.spock » arquillian-spock-core jar javadoc pom
  • org.jboss.arquillian.spock » arquillian-spock-standalone jar javadoc pom
  • org.jboss.arquillian.spock » arquillian-spock-container jar javadoc pom

Release notes and resolved issues 4

Enhancement
  • ARQ-1041 - Update Spock to the lastest (0.6) version
Bug
  • ARQ-895 - Arquillian config-impl-base is not a part of spock-standalone
Task
  • ARQ-1039 - Update Spock Test Runner to 1.0.1.Final of Arquillian Core

Thanks to the following list of contributors: Bartosz Majsak, Aslak Knutsen, Dan Allen

Arquillian Spring Framework Extension 1.0.0.Alpha2 Released

Since we wrote this post we didn't laze around. Check our latest announcement.

The Arquillian team is proud to announce the 1.0.0.Alpha2 release of the Arquillian Spring Framework Extension component!

This release contain many improvements on the existing extension, but also some new features.

Some of the highlights in this release

Warp Spring MVC Extension
Spring Embedded Container
Separated the integration capabilities

Testing Spring MVC with Warp

Arquillian Warp is a powerful tool that let you run the functional tests against your web front end and at the same time verify the internal state of your application. With this release we are introducing the Warp extension for testing Spring MVC applications that run in a real servlet container.

Let’s dive into an example of how to test a Spring MVC application using Arquillian Warp. First we need to prepare the application descriptor.

web.xml
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
         version="3.0">

    <servlet>
        <servlet-name>welcome</servlet-name>
        <servlet-class>org.jboss.arquillian.warp.extension.spring.servlet.WarpDispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>welcome</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>

</web-app>

You’ll notice that instead of using Spring’s DispatcherServlet we instead use the WarpDispatcherServlet.

And the testing code:

LoginControllerTestCase.java
@WarpTest
@RunWith(Arquillian.class)
public class LoginControllerTestCase {

    @Drone
    WebDriver browser;

    @ArquillianResource
    URL contextPath;

    @Test
    @RunAsClient
    public void testLoginValidationErrors() {
        browser.navigate().to(contextPath + "login.do");

        Warp.execute(new ClientAction() {

            @Override
            public void action() {

                browser.findElement(By.id("loginForm")).submit();
            }
        }).verify(new LoginControllerValidationErrorsVerification());
    }

    @Test
    @RunAsClient
    public void testLoginSuccess() {
        browser.navigate().to(contextPath + "login.do");
        browser.findElement(By.id("login")).sendKeys("warp");
        browser.findElement(By.id("password")).sendKeys("warp");

        Warp.execute(new ClientAction() {

            @Override
            public void action() {

                browser.findElement(By.id("loginForm")).submit();
            }
        }).verify(new LoginSuccessVerification());
    }

    public static class LoginControllerValidationErrorsVerification extends ServerAssertion {

            private static final long serialVersionUID = 1L;

            @SpringMvcResource
            private ModelAndView modelAndView;

            @SpringMvcResource
            private Errors errors;

            @AfterServlet
            public void testGetLogin() {

                assertEquals("login", modelAndView.getViewName());
                assertNotNull(modelAndView.getModel().get("userCredentials"));
                assertEquals("Two errors were expected.", 2, errors.getAllErrors().size());
                assertTrue("The login hasn't been validated.", errors.hasFieldErrors("login"));
                assertTrue("The password hasn't been validated.", errors.hasFieldErrors("password"));
            }
        }

    public static class LoginSuccessVerification extends ServerAssertion {

        private static final long serialVersionUID = 1L;

        @SpringMvcResource
        private ModelAndView modelAndView;

        @SpringMvcResource
        private Errors errors;

        @AfterServlet
        public void testGetLogin() {

            assertEquals("welcome", modelAndView.getViewName());
            assertFalse(errors.hasErrors());
        }
    }
}

In the above example we are using Arquillian Drone to navigate to the login page of our application and then filling in the login form with our user credentials.

The internal state of the DispatcherServlet is caught in a SpringMvcResult object which can be injected into the ServerAssertion. We can also inject other required objects like the ModelAndView.

Spring Embedded Container

Each development cycle may end in repeatedly re-running the integration tests, each time taking significant amount of time. The embedded container was thought to aid this situation. Running the tests embedded will decrease the execution time from seconds to milliseconds. It will help testing business objects, but since it’s not a full servlet container you won’t be able to use it for testing servlet requests in a web application.

Migrating from 1.0.0.Alpha1

1.0.0.Alpha2 comes with a couple significant changes from the previous version.

  • The Spring integration functionality has been separated out to its own module and is now part of the arquillian-service-integration-spring-inject module, and additional the arquillian-service-integration-spring-inject and the arquillian-service-integration-spring-javaconfig that does not target any specific Spring version, but rather provide functionality like XML or Java-based configuration.
  • The arquillian-service-deployer-spring module’s can still be used for autopackging the Spring artifacts.
  • The @SpringAnnotatedConfiguration has been renamed to @SpringAnnotationConfiguration.

Roadmap

The next release is planned to include Spring transaction support and will introduce even better Warp integration on the client side in order make REST testing even simpler.

We look forward to hearing your feedback about this release in the community forums!

What is Arquillian?

Arquillian is open source software that empowers you to test JVM-based applications more effectively. Created to defend the software galaxy from bugs, Arquillian brings your test to the runtime so you can focus on testing your application's behavior rather than managing the runtime. Using Arquillian, you can develop a comprehensive suite of tests from the convenience of your IDE and run them in any IDE, build tool or continuous integration environment.

Release details

Component Arquillian Spring Framework Extension
Version 1.0.0.Alpha2 view tag
Release date 2012-07-21
Released by Aslak Knutsen
Compiled against

Published artifacts org.jboss.arquillian.extension

  • org.jboss.arquillian.extension » arquillian-service-deployer-spring-common jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-service-deployer-spring-2.5 jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-service-deployer-spring-3 jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-service-integration-spring jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-container-spring jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-service-integration-spring-inject jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-service-integration-spring-javaconfig jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-service-integration-spring-2.5-int-tests jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-service-integration-spring-3-int-tests jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-warp-spring jar javadoc pom

Release notes and resolved issues 5

Spring Embedded Container + Warp

Feature Request
  • ARQ-219 - Implement an embedded Spring container
  • ARQ-945 - Extract Spring Integration out of Spring Deployer
  • ARQ-978 - Provide Warp with extension for testing SpringMVC.
Task
  • ARQ-1019 - Spring Extension: Update the Arquiilian Core to 1.0.1

Thanks to the following list of contributors: Jakub Narloch, Aslak Knutsen