Hello Micronaut

Rik Scarborough Java, Microservices, Testing Leave a Comment

From some of my previous posts, you can get the idea that I promote the idea of developing maintainable code rapidly. So I was pretty excited when I learned that the same group that was responsible for Grails was working on a similar project for Web Services. Hello, Micronaut.

In this post, I provide an introduction to the Micronaut framework and its features to provide a foundation for you to try it out yourself.

Unit Testing Your Architecture With ArchUnit

Cindy Turpin Architecture, Technology Snapshot, Testing Leave a Comment

I am a Spring/Java developer (primarily) and an advocate of unit testing.

There is often a debate over what constitutes a unit test, an integration test, a system test, etc. But, most of us agree that tests keep you from going “off the rails” once a project becomes sufficiently complex.

However, I have found very few discussions on architectural tests. What keeps us from deviating wildly unintentionally from our original, planned architecture? And, after all, how many enterprise projects even keep the same architects from the beginning of the initiative to shelving and replacement?

In this blog, I introduce ArchUnit, a Java architecture test library for specifying and asserting architecture rules in plain Java. We’ll discuss how it works to mitigate architectural risks in developing quality enterprise applications…

What’s New in JUnit 5.2

Billy Korando Effective Automated Testing With Spring Series, Java, Technology Snapshot, Testing Leave a Comment

The JUnit team continues to make great progress in adding new features and enhancements to the JUnit 5 framework. We already have a second significant feature update after just seven months from the initial release of JUnit 5.

In this article, we look at some of the key features and enhancements added in JUnit 5.2 which was released on April 29th. We’ll focus on build tool enhancements that help in the adoption/migration to JUnit 5 for existing test suites and resolve annoyances, as well as what new changes further improve parameterized tests.

Why Am I Writing This Test?

Billy Korando Effective Automated Testing With Spring Series, Series, Technology Snapshot, Testing Leave a Comment

… The highlight of this episode for me was when Dan laid out the three major concerns of automated tests. I hadn’t previously heard all the major purposes for automated testing laid out in such a succinct fashion. They are paraphrased:

Using Tests to Specify the Requirements of the System
Using Tests to Document the System
Using Tests to Build Confidence in the System

With purpose in mind, it is good practice for both developers and automated testers to ask themselves the following questions when writing a test: Why am I writing this test? Am I specifying system requirements? Documenting system behavior? Building confidence in the system? I’m a firm believer that asking the right questions when writing tests can lead to a better design for individual tests, in addition to more coherent and effective automated test suites.

In this article, we look into the three major purposes for writing automated unit tests. We discuss how they should be approached and what developers and automated testers can do right now to establish better, more purposeful, practices. 

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…