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. 



Without Automated Testing You Are Building Legacy

Billy Korando Agile, Effective Automated Testing With Spring Series, Testing 1 Comment

I have worked with several different organizations in my career on initiatives to rewrite legacy applications. A common theme for each project was that the organization struggled to deliver both maintainable and “agile” applications.

As developers, we’re curious by nature. I needed to understand exactly why this happens. In my contemplation of this common challenge, I discovered Automated Testing and became fascinated by it. I have since worked to include it as a central step as I write and maintain applications.

In this article particularly, I lay out how automated testing, or rather the lack there of, lies at the heart of many of the struggles we face as developers…



Web Development Business

The Executable Code Review

Tim Broyles Programming, Testing Leave a Comment

Testing has a bad rap. The thought of writing unit tests to exercise code with the goal of 100% code coverage can be overwhelming for many projects. The number of man-hours to set up tests, create mocks when needed, test boundary conditions, contrive odd ball test cases can take some steam out of the project. If this is the definition of test, then yes, writing these types of tests can be tedious and feel meaningless.

I am a proponent of writing tests with a narrow focus. The tests I describe here show the completion of a story or the resolution of a bug. With this narrowness in mind, the task is much less daunting. My goal now is not about code coverage, but more about quality code. With this test, I want to be able to demonstrate to myself (and to whoever is reviewing my changes), that I have successfully resolved my task.

In this blog I will talk about my suggestions for writing meaningful tests in the context of a code review.



A Test-Driven Development Introduction to Angular 2 – Part 2

Matthew Brown AngularJS, JavaScript, Single-Page Application, Technology Snapshot, Testing 5 Comments

In this updated blog post, we’ve built an employee directory using Angular 2 with unit tests, gone over some differences between Angular 2 and version 1, and introduced some of the features of TypeScript.

I originally wrote this article/application when Angular 2 was still in beta. Now that it has released officially, I have updated the source code to reflect updates made to the Angular 2 framework for release. My approach to get this working was to start from the new Angular 2 quick-start project, port in the original application source code, and refactor as needed to make things work. Let’s get started…