Testing Asynchronous Applications with Java and Awaitility

Writing tests for asynchronous applications has never been much fun as we’re always struggling with the problem how to determine state changes, handle process terminations, dealing with timeouts or failures and stuff like this. Awaitility eases this process for us offering a nice DSL, rich support for languages like Scala or Groovy and an easy-to-use syntax that’s even more fun when using it with Java 8′s lambda expressions. In the following short introduction I’d like to demonstrate writing some tests different scenarios. ...

August 23, 2015 · 6 min · 1143 words · Micha Kops

Business Process Modeling with Activiti and BPMN 2.0

Having tried a bunch of workflow engines and business processing management platforms I now have given the Activiti framework a try. I immediately liked the good test support using annotations and jUnit test rules, a straight API and the good Eclipse IDE integration as well as I liked the Activiti Explorer and the Activiti REST Application and the feeling to achieve quick results with less effort when using this framework. ...

September 15, 2013 · 16 min · 3261 words · Micha Kops

Testing RESTful Web Services made easy using the REST-assured Framework

Figure 1. REST-assured Integration Test Tutorial Logo There are many frameworks out there to facilitate testing RESTful webservices but there is one framework I’d like to acquaint you with is my favourite framework named REST-assured. REST-assured offers a bunch of nice features like a DSL-like syntax, XPath-Validation, Specification Reuse, easy file uploads and those features we’re going to explore in the following article. With a few lines of code and Jersey I have written a RESTful web service that allows us to explore the features of the REST-assured framework and to run tests against this service. ...

October 23, 2011 · 9 min · 1742 words · Micha Kops

Integrating Groovy in your Maven builds using GMaven

Often ant tasks are used in Maven builds but wouldn’t it be more attractive to integrate the Groovy language into our build process? GMaven is the answers to this problem and brings together Maven and Groovy. It allows us to execute Groovy scripts inline from our Maven configuration, from a local script or even from a remote location. In the following short examples I am going to show how to configure Maven to execute Groovy scripts from different locations. ...

July 12, 2011 · 4 min · 655 words · Micha Kops

Dependency management in Grails 1.2

Sometimes I get the impression that there are many Maven haters in the Groovy/Grails community – now with version 1.2 of the Grails framework they are able to abandon the evil satanic Grails Maven Plugin and embrace the neverending joys of a slim, nice, sexy dependency resolution dsl .. here we go .. lets define some dependencies wheee … Our dependency configuration is defined in grails-app/config/BuildConfig.groovy as a property named grails.project.dependency.resolution: grails.project.dependency.resolution = { // here will be some dependencies } ...

May 23, 2010 · 2 min · 336 words · Micha Kops

Named Queries in Grails 1.2

They built a nice new feature in Grails 1.2 called “named queries“. Named queries can be defined in a domain class as static properties and support the criteria builder syntax. Examples package testapp class User { String name int iq int age static namedQueries = { dumbUsers { int referenceIq = 60 lt 'iq' , referenceIq } nameStartsWith { letter -> like 'name', '${letter}%' } midAges { between('age', 20, 40) } } } // count dumb users println User.dumbUsers.count() // print amount of users, usernames starting with an 'a' User.nameStartsWith('a').count() ...

April 6, 2010 · 1 min · 111 words · Micha Kops