Cucumber Testing in Spring Batch

Dallas Monson Spring, Spring Batch, Technology Snapshot, Testing Leave a Comment

With the evolution of microservices and the scalable nature of modern distributed architectures, batch processing seems to be falling out of favor. In fact, the term batch processing itself seems to be unfavorably associated with monolithic mainframe applications and thus does not seem to have much appeal.

Unless, of course, you are working on a project that is being designed to replace or modernize one of those mainframe applications. If that is the case, then likely some sort of batch process has come up with a non-functional requirement that needs to be dealt with in the new system.

For this specific concern, a very powerful framework has been provided: Spring Batch. It has many of the same features of a mainframe batch process like restart/recovery, chunk processing, and error handling along with exit codes. This framework allows developers to create powerful batch processing applications in the Spring Framework and enjoy the rich backplane of capabilities that this provides.

Continuing with the modernization thread, you will likely be tasked with providing some assurances to the business that the new, modernized process will produce the same outcome as the one that is being replaced. Here is where testing comes in, and where Cucumber specifically shines.

Cucumber provides behavioral testing support in the Spring universe. This allows developers and business users to collaborate through a common set of conventions and verbiage to validate that the app is behaving how the business intended as well as how the developer coded it.

In this post we will cover the following:
Why use Cucumber with Spring Batch
An overview of Cucumber and an example Cucumber Test
How to start with Cucumber and Spring Batch…



Cucumber

Introducing Cucumber for Java + STANDARD Values

Keith Shakib Agile, Dev Methodologies, Java, Technology Snapshot, Testing 1 Comment

As software developers, we all have our favorite tools for making us successful. Many are perfect for the job when getting started but are soon outgrown. Others require too much setup and training to “dip your toes in the water” just to simply find out if they are the right tool. Cucumber JVM is a testing framework that enhances JUnit …



Cucumber

ATDD: Using Cucumber/Gherkin for API, SPA, and Mobile

Dave Jackson Technology Snapshot, Testing Leave a Comment

I’m a big proponent of Acceptance Test-Driven Development (ATDD). The most successful projects on which I have worked have utilized some variant of Scrum. And, one particular family of ATDD frameworks fits nicely within the Scrum User Story paradigm: Cucumber and Gherkin, its business-friendly Domain Specific Language (DSL). In this blog I will provide an introduction to three effective tools for …