Arquillian Persistence Extension 1.0.0.Alpha6 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.Alpha6 release of the Arquillian Persistence Extension component!

Arquillian Persistence Extension is back on the release train and the future plan is stronger than ever. The Alpha6 release brings a lot of improvements and fixes thanks to invaluable feedback from the community.

Big thanks go to Marco Cella, Matti Linnanvuori, Bernard Łabno, Tiago Wanke Marques, Karsten Ohme, Vineet Reynolds, Cyrill Ruettimann, Bryan Saunders, Anton Shaykin, Nicolas-Xavier Vanderlinden and Noah White for their feedback which led us to fix some minor annoyances and shortcomings of APE. We are proud of the vibrant and active community around Arquillian!

Some of the highlights in this release

Transaction support has been replaced with Transaction Extension. By default the JTA implementation is included. The only thing you will need to change in your tests is the import sttement for the @Transactional annotation. From now on it’s under org.jboss.arquillian.transaction.api.annotation.

Support for row ordering when comparing datasets. When using Generated ID’s for instance, such as UUID’s, the rows need to be sorted in order for the DbUnit comparison to pass. If they are not ordered, then the assertion is unreliable.

Improved error reporting, including rows comparision and misconfigured entries.

DTD support for flat XML data sets (DBUnit feature).

Proper support for multiple line SQL scripts with comments (ANSI SQL compliant)

We’ve also extended our test suite by adding Apache Derby to our continuous integration pipeline.

Important change: We re-groupped configuration entries arquillian.xml giving them more qualifiers:
persistence – for all basic settings
persistence-dbunit – for DBUnit specific configuration
persistence-script – for SQL related things
Please refer to our confluence documentation for detailed description.

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 Persistence Extension
Version 1.0.0.Alpha6 view tag
Release date 2013-03-07
Released by Aslak Knutsen
Compiled against

Published artifacts org.jboss.arquillian.extension

  • org.jboss.arquillian.extension » arquillian-persistence-api jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-persistence-impl jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-persistence-integration-tests jar javadoc pom
  • org.jboss.arquillian.extension » arquillian-persistence-integration-tests-testng jar javadoc pom

Release notes and resolved issues 27

Enhancement
  • ARQ-1085 - Unify JPA Cache eviction events with APE
  • ARQ-1215 - Clean slf4j dependency
Feature Request
  • ARQ-1093 - Support for Row Ordering when Comparing Datasets
  • ARQ-1149 - Dataset comparision should collect all differences in the rows instead of failing on the first column
  • ARQ-1157 - Replace Persistence internal Transaction management with Transaction Extension
  • ARQ-1231 - Should observe required object ArquillianDescriptor instead of assuming Lifecycle
  • ARQ-1248 - Add Derby to the testing matrix
  • ARQ-1333 - Should provide more meaningful diagnostic messages
Bug
  • ARQ-1028 - @ShouldMatchDataSet before persist
  • ARQ-1081 - DTD not supported by APE
  • ARQ-1086 - @CleanuUsingScript with phase NONE
  • ARQ-1087 - Wrong dump directory path
  • ARQ-1094 - @ShouldMatchDataSet Not Properly Comparing Datasets
  • ARQ-1100 - Datetime conversion does not work as expected for YAML data sets
  • ARQ-1101 - Exception with nested transaction with MySQL
  • ARQ-1127 - Order of scripts and data sets should be preserved when defined on class level
  • ARQ-1146 - Single statement which spans multiple lines is not handled properly
  • ARQ-1167 - Transactional support from Seam 3 interfere Persistence Extension resulting in ExclusiveTransactionException
  • ARQ-1208 - Multiple line statements are not handled properly
  • ARQ-1299 - Persistence extension throws NPE with empty table DataSets
  • ARQ-1300 - Execute script handler does not properly ignore /* */ and {} ANSI compliant SQL comments
Task
  • ARQ-1342 - Clean up POM
  • ARQ-1343 - Schema creation scripts should be repeatable
Sub-task
  • ARQ-1158 - Extract JTA from APE and replace with Transaction Extension dependency
  • ARQ-1334 - Should inform if table defined for exclusion is not defined in the schema
  • ARQ-1335 - Should inform when non-defined configuration key encountered in arquillian.xml

Thanks to the following list of contributors: Bartosz Majsak, Jakub Narloch, Aslak Knutsen, Vineet Reynolds, Artur Dryomov

ShrinkWrap 1.1.2 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.2 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.2 view tag
Release date 2013-03-07
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-api-nio2 jar javadoc pom
  • org.jboss.shrinkwrap » shrinkwrap-bom pom
  • org.jboss.shrinkwrap » shrinkwrap-depchain pom
  • org.jboss.shrinkwrap » shrinkwrap-depchain-java7 pom
  • org.jboss.shrinkwrap » shrinkwrap-impl-base jar javadoc pom
  • org.jboss.shrinkwrap » shrinkwrap-impl-nio2 jar javadoc pom
  • org.jboss.shrinkwrap » shrinkwrap-spi jar javadoc pom

Release notes and resolved issues 2

Bug
  • SHRINKWRAP-441 - FileStoreTestCase failure
  • SHRINKWRAP-444 - Deploy fail on ZipException("error in opening zip file") when ShrinkWrap.createFromZipFile is used

Thanks to the following list of contributors: Andrew Lee Rubinger, Michal Matloka

Arquillian GWT Testing extension 1.0.0.Alpha1 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.Alpha1 release of the Arquillian GWT Testing extension component!

This is the first release of the Arquillian GWT extension which aims to bring true integration testing to GWT.

Highlighted Features

Run GWT integration tests in Arquillian containers

This means that GWT integration tests can break free and execute in the actual runtime container instead of being tied to GWT’s embedded Jetty server.

Combining client-side and in-container tests

It is possible to combine GWT client-side and standard in-container tests in the same test class. This allows to test features without having to worry about the client-server bridge and should pave the way for future support of Arquillian Warp and Drone in GWT integration tests.

Getting Started

To start using the Arquillian GWT extension just add the following dependency to your project:

pom.xml
<dependency>
    <groupId>org.jboss.arquillian.extension</groupId>
    <artifactId>arquillian-gwt</artifactId>
    <version>1.0.0.Alpha1</version>
</dependency>

Writing Arquillian GWT tests

To run a test method as a GWT integration test either annotate the test class or test method with @RunAsGwtClient and specifiy the GWT module. If you annotate the test class all test methods in that class will run as GWT integration tests.

MyTestClass.java

@RunWith(Arquillian.class)
public class MyTestClass {

  @Test 
  @RunAsGwtClient(moduleName = "org.myapp.MyGwtModule")
  public void myGwtTest() {

  }
}

To help packaging your app for the test deployment Arquillian GWT provides a simple utility called GwtArchive. The next version of Arquillian GWT will automatically enhance the used WebArchive. So, you won’t need to use this utility in the future. Here’s a complete example:

GreeterRpcTest.java

@RunWith(Arquillian.class)
public class GreeterRpcTest extends ArquillianGwtTestCase {

  @Deployment
  public static WebArchive createDeployment() {
    return GwtArchive.get()
      .addClass(Greeter.class)
      .addClass(GreetingService.class)
      .addClass(GreetingServiceImpl.class);
  }

  @Test
  @RunAsGwtClient(moduleName = "org.myapp.MyGwtModule")
  public void testGreetingService() {
    GreetingServiceAsync greetingService = GWT.create(GreetingService.class);
    greetingService.greetServer("Hello!", new AsyncCallback<String>() {
      @Override
      public void onFailure(Throwable caught) {
        Assert.fail("Request failure: " + caught.getMessage());
      }

      @Override
      public void onSuccess(String result) {
        assertEquals("Received invalid response from Server", "Welcome!", result);
        finishTest();
      }
    });
    delayTestFinish(5000);
  }
}

Note that you will only need to extend ArquillianGwtTestCase if you want to inherit GWT’s asynchronous testing methods (finishTest and delayTestFinish).

We look forward to your feedback on 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 GWT Testing extension
Version 1.0.0.Alpha1 view tag
Release date 2013-02-23
Released by Christian Sadilek
Compiled against

Published artifacts org.jboss.arquillian.extension

  • org.jboss.arquillian.extension » arquillian-gwt jar javadoc pom

Release notes and resolved issues 1

Initial prototype release

Thanks to the following list of contributors: Christian Sadilek, Karel Piwko, Aslak Knutsen

Hackfest: DevConf 2013, Czech Republic, Brno

In about a weeks time DevConf 2013 in Brno, Czech Republic will kick of for the 5. year in a row.
This year, as last, we will take part in the HackFest spanning from Saturday 23. to Sunday 24. of February. And for the eager hackers even Monday 25. February.

Introducing the candidates

Without any more fuzz, let’s jump straight into some of the ideas we have for this hackfest. Of course, you’re free to bring your own as well!

Gradle Container Controller

One of the hacks that was started during the Devoxx 2012 Hackergarten: was the Arquillian Gradle integration. The basic idea is to leverage Arquillian’s Container support to control Containers and Deployments within the Gradle build system, much like we do for Maven via the Arquillian Maven Plugin. This in particular is a very interesting integration since it opens up Arquillian to a new type of usage, as a pure Container Controller.

Why would Gradle use Arquillian for this? It’s a simple matter of focus. Gradle care about build systems and don’t have the resources to implement support for all the Containers. Arquillian on the other hand care very much of the Containers and already support much more than Gradle currently do in this area. Perfect combination of two tools with different capabilities.

You can read up on some of the discussions and see look at the early prototype.

The end goal would be to match as much as possible of the Gradle Design docs and have Arquillian be the internal runner.

Arquillian Forge Plugin – Extensions

JBoss Forge is best described by them selves.

A core framework and next-generation shell for tooling and automation at a command line level; with APIs for integration in IDEs, extending built in functionality with plugins, and scripting for automating repetitive tasks, Forge is a tool every open-source developer should be looking at.

A core framework for rapid-application development in a standards-based environment. Plugins / incremental project enhancement for Java EE, and more.

There exists already an Arquillian Plugin for Forge which handles setup of Arquillian Core and Container dependencies, Container configuration and simple TestClass generation.

But the missing bit is set up and support for the Arquillian Extensions. This hack should be able to answer, by using Forge, questions like:

  • How do I setup Drone, Persistence, Transactions?
  • How do I configure Drone?
  • Which configuration options does Persistence support?

Arquillian Warp

Arquillian Warp fills the void between client-side and server-side testing. Using Warp, you can initiate an HTTP request using a client-side testing tool such as WebDriver and, in the same request cycle, execute in-container server-side tests. This powerful combination lets you cover integration across client and server.

SeamTest

Warp leverages any HTTP client (such as httpclient or WebDriver), to produce testable requests and provides server-side hooks which allows you to execute arbitrary logic in any part of the request lifecycle. However the fact that developer needs to provide HTTP request in order to test is limiting – sometimes you need to test using any request type: such as conversations. The goal is designing an API and implementation for testing sequence of requests without providing an HTTP client logic. (This extension should provide a migration layer for SeamTest )

CDI events

Warp plays nicely with IoC principles – your test does not need to tightly couple with container, it will bring all the necessary dependencies to the test. In Java EE, Warp leverages CDI to inject user-defined beans into the test. Warp has the potential to use much more from the concepts brought by CDI: observe CDI events, produce beans or intercept calls to existing beans. The idea is to provide hooks which would make testing of client request interaction with CDI beans as easy as defining Warp’s lifecycle hooks.

Arquillian Google Web Toolkit

The Google Web Toolkit is a development tool for building complex browser-based applications written in pure Java. The new Arquillian GWT extension brings true integration testing to GWT. This means that GWT integration tests can break free and execute in the actual runtime container instead of being tied to GWT’s embedded Jetty server. Further it is now possible to combine GWT client-side and standard in-container tests in the same test class. This allows to test features without having to worry about the client-server bridge and should pave the way for future support of Arquillian Warp and Drone in GWT integration tests.

Remove the need for GwtArchive

Currently the Arquillian GWT extension uses a custom utility (GwtArchive) to enrich WebArchives for GWT deployments. This causes the API for Arquillian GWT tests to deviate from standard Arquillian tests. It should be possible to automatically enhance the deployment archive to include all dependencies and configurations that are relevant to the GWT deployment, possibly by leveraging an Arquillian packaging SPI’s. As a result of this, GWT integration tests will use the same API as all other Arquillian tests.

Leverage Arquillian Warp in GWT integration tests

Warp enables tests to assert on both client-side and server-side logic and is an extremely useful tool for writing compact integration tests. The focus will be on brainstorming to come up with a battle plan for how Warp could be integrated with Arquillian GWT.

Arquillian Distribution Extension

This is probably the hardest and largest of them all. But even more interesting, right?. As Arquillian work today it will allow you to interact with local and remote Containers. But the big assumption with Remote Containers is that the Container is already up and running and we only need to connect to it. As we’re growing out to support more and more advanced use cases we’re starting to see the need for the ability to control and distribute infrastructure. Infrastructure being servers, containers or clouds.

A very brief description of what this extension should do:

  • Install Container A on Server B (copy source and configure)
  • Install Container X on Server Y (copy source and configure)
  • Configure Arquillian to use Container A on Server B
  • Configure Arquillian to use Container X on Server Y

From here on Arquillian Test takes over and run tests as described by the Test Suite. Next steps would be:

  • Uninstall Container X on Server Y
  • Uninstall Container A on Server B

This is particularly useful for the upcoming Performance Extension to allow it to install a full environment, including clients and targets, for performance testing.

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.

When and where are we hacking?

We are going to use the free Hackfest at DevConf 2013 as an opportunity to put our heads together to make progress on these ideas. Here are the details:

Of course, anyone is welcome to hack on these ideas at anytime from anywhere. This is open source!

Who will be there hacking?

Happy hacking!

ShrinkWrap Resolver 2.0.0-beta-2 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-beta-2 release of the ShrinkWrap Resolver component!

What is ShrinkWrap Resolver?

The ShrinkWrap Resolvers project provides a Java API to obtain artifacts from a repository system. This is handy to include third party libraries available in any Maven repository in your test archive. ShrinkWrap Resolvers additionally allow you to reuse all the configuration you've already specified in the Maven build file, making packaging of an application archive much easier job.

Release details

Component ShrinkWrap Resolver
Version 2.0.0-beta-2 view tag
Release date 2013-02-07
Released by Andrew Lee Rubinger
Compiled against
  • JUnit – 4.8.2

Published artifacts org.jboss.shrinkwrap.resolver

  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-bom pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api-maven jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-depchain pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-impl-maven jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-api-maven-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-spi-maven-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-impl-maven-archive jar javadoc pom
  • org.jboss.shrinkwrap.resolver » shrinkwrap-resolver-spi jar javadoc pom

Release notes and resolved issues 2

Bug
  • SHRINKRES-108 - ClasspathWorkspaceReader Ignores Requested Version During Resolution
Task

Thanks to the following list of contributors: Andrew Lee Rubinger, Michal Matloka