Continuous unit testing with Java & Infinitest

As my awareness around automated testing, and particularly TDD, has risen over the last few years I’ve been keeping my ear to the ground for new ideas and techniques I can experiment with. I was recently at a meetup hosted by Equal Experts and there was a talk by Oliver Shaw on what “Doing TDD” is, and isn’t. The talk provided a great live demo of TDD exploring a fairly simple use-case but showing how natural the TDD process can be.
Read more →

Looking forward to JUnit 5

In this post I explore some of the features I’m looking forward to in the upcoming JUnit 5 release. First, a bit of background… The process to create a new version of JUnit kicked off around the middle of 2015 when a crowdfunding campaign was started. At this point the initiative was referred to as JUnit Lambda. One of the drivers for this was the release of Java 8 that provided a number of language features, such as Streams and Lambdas, offering new ways for the test framework to be implemented and tests to be written.
Read more →

Asynchronous web service using Completable Future

Until recently I’ve not spent a lot time looking into the enhancements provided in java.util.concurrent as part of the Java 8 release. This has been predominantly due to the fact I’ve been using the Akka toolkit to handle any concurrency concerns within the Java app I’ve been working on. The app in question uses the Spring framework and exposes a number of “RESTful” HTTP endpoints implemented using a Spring @RestController and the DeferredResult class.
Read more →

TDD, Sudoku and a mob!

Last week I attended XP Manchester where the meetup was advertised as TDD Sudoku #1. The inspiration for this session was provided by a similar exercise carried out by Ron Jeffries around 10 years ago. The objective was to follow a similar process to create a “Sudoku Solver” with the aim of understanding the possible reasons why Ron’s attempt was ultimately unsuccessful. I’ve never played Sudoku and have only read about Test-driven Development (TDD) via various sources as well as being half way through the GOOS book.
Read more →

A simplistic approach to managing app config

I’ve recently been involved in the transformation of the processes used to deliver change from being heavily manual, time consuming and error prone to fully automated, efficient and reliable. To drive the new automated process without human interaction, other than maybe clicking a single button, we knew that we would need a way of managing application configuration that allowed the process to simply pick up the config values during its execution.
Read more →

Making a mockery of web services

In October 2016 I gave my first public talk at the Manchester Java Community (MJC). The talk took the form of a 15 minute lightning talk and this blog provides the detail of what I discussed to support the slides. Abstract With the help of WireMock we will explore how to create reliable and repeatable end-to-end tests for an application that depends on an external web service or HTTP-based API.
Read more →

JCrete 2016

In late 2015 I arranged for Heinz Kabutz (Java Champion and the man behind javaspecialists.eu) to visit the company I work for and teach his Java Specialist Master course to my team. The training was great but a nice bonus for myself was a personal invite from Heinz to attend the Java focused JCrete Unconference he runs on the Greek island of, you guessed it, Crete. The invite put me into the hat to attend the unconference and I was lucky enough to be one of those picked out to attend.
Read more →

Tomcat access logs in SpringBoot

If you’re running your SpringBoot app using Embedded Tomcat it may be useful to generate the access logs. To do this add the following config to your application.properties file: server.tomcat.accesslog.enabled=true server.tomcat.basedir=tomcat Alternatively, the property values can be passed as command line options. The result will be a new directory called tomcat at the same level as the JAR under which your logs will be created. SpringBoot version: 1.4.0-RELEASE
Read more →