This hands-on workshop at GR8Conf EU provides a deep dive into Groovy 2.5+ and an opportunity to practice using new features and a variety of testing approaches.
In part 1 of this 2-part workshop, you will be introduced to the latest features in Groovy 2.5 and get a peek at what's planned for Groovy 3.0, including new AST transforms, new macro features, the new Parrot parser, and myriad other miscellaneous features.
The overview of available features will include a number of interesting lab exercises that allow you to try some of them yourself.
In part 2, you will learn how to "Make Your Testing Groovy" as Paul guides you in using the Groovy scripting language as the basis for Agile testing.
Paul will cover tools, libraries, and techniques for unit and behavior-driven development (BDD) testing. You'll look briefly at using Groovy with JUnit, Spock, and libraries for testing in special contexts, e.g., using Geb to test web applications and microservices.
Various testing approaches, such as all-combinations, all-pairs, model-based testing, and property-based testing will also be covered. Finally, you'll get tips for writing testing DSLs.
- Explore new features in upcoming Groovy releases
- Reinforce Groovy knowledge with hands-on practice, so you're all set to start using the new features right away
- Discover testing techniques to try when developing your own applications
- Understand how to write testing DSLs
Although everyone is welcome, this workshop is designed for developers who have some previous exposure to Groovy and want to get up to speed on the latest features or expand their testing repertoire.
We do recommend attendees have at least some previous exposure to Groovy. Prior experience with the Gradle tool is also a plus, but not essential.
- Part 1: Groovy 2.5+ Deep Dive
- AST Macros – write AST transformations and code generation or matching code in a Groovy friendly syntax
- AST Transformations – new transforms and improvements including revamped versions of @Canonical and @Immutable
- New DGM capabilities and library improvements – tap command, miscellaneous improvements
- Improved tool support, including groovysh and Groovy console
- Improvements throughout the libraries – JSON improvements, CliBuilder with annotations
- The Parrot Parser – Java syntax alignment, new features, advanced capabilities
- JDK9: support, limitations and on-going work
- Part 2: Making Your Testing Groovy
- Using Groovy with JUnit and Spock – getting started and some advanced features
- Using HtmlUnit and Geb to test a web application
- Trying some testing techniques – all-combinations, all-pairs, model-based testing, property-based testing
- Tips for writing testing DSLs
The material will be available on a github repository. It is designed to run with a recent JDK 8 version. The labs assume you are using IntelliJ IDEA as your IDE. The free community version is fine if you don’t already have a licensed version. Other IDEs or a text editor and command-line should be sufficient for most labs if you feel comfortable adapting the instructions yourself.
Meet the InstrucTOR
OCI Groovy team member, Paul King, leads ASERT, an organization based in Brisbane, Australia, that provides software development, training, and mentoring services to customers looking to embrace new technologies, harness best practices, and innovate. He has been contributing to open source projects for nearly 20 years and is an active committer on numerous projects, including Groovy.
Paul is a popular speaker at conferences around the globe, publishes in international software magazines and journals, and is co-author of Manning's best-seller, Groovy in Action.
Can't Make it to GR8Conf EU?
Get notified of future Grails training opportunities!