Various tools exist that can make unit testing less complicated and time-consuming. Diffblue Cover is just one example; this tool automatically creates human-readable Java unit tests, increasing test coverage and helping you find regressions in future code changes. You can try it yourself with Diffblue Cover: Community Edition, a free IntelliJ plugin.

Here is a list of other IntelliJ tools that can make unit testing a simpler process.

About IntelliJ

IntelliJ IDEA is an Integrated Development Environment (IDE) that simplifies the software development process and maximizes productivity by automating repetitive tasks. …


Our DevOps and Testing Report clearly lays out the problems that organizations face when it comes to unit testing. Miscommunication and misunderstandings between different teams (and even teammates) aren’t uncommon, and we’ve got 4 reasons why unit testing can actually combat these problems, and why it should be a regular feature of your software development process:

1. Save time

Manually writing unit tests results in a longer development process, which is often seen as a delay to delivery. …


Spring and Spring Boot are well-known frameworks full of great features that are commonly used when developing Java applications, thanks to their comprehensive nature. Testing your Spring applications is important, and it may be more straightforward than you think.

If you need an introduction to Spring Boot testing in general, check out this talk by Andy Wilkinson, Senior Principal Software Engineer from Pivotal, who speaks of the purpose and importance of testing, as well as some of Spring Boot’s testing features.

Once you’ve got the hang of the basics, you can work through this list of some of the best…


Testing early is a foundational part of embracing DevOps and modernizing your team. This idea has been emphasized recently in Gartner’s new infographic: the Top 10 Technology Trends Impacting DevOps.

We know that testing is imperative when it comes to delivering quality products; however as trends push everything to be more agile, more continuous, and more distributed, testing can feel like a burden when deadlines loom over your teams. And although testing can be burdensome, it is essential to get quality products to market in time to grab your business’s competitive edge.

Along with following the trends that will help…


I have long been an admirer of the Puppet Labs “ State Of DevOps Report “ and it is required annual reading as both a real-world benchmark of DevOps adoption, and for its cogent analysis of inhibitors and accelerators that correlate with DevOps maturity.

The 2020 report came out right before the holidays and has some very interesting data and analysis on the crucial role that testing provides in accelerating DevOps adoption.

There are two headline results from the report:

  1. Incomplete test coverage is the #1 DevOps challenge (page 44)
  2. Ability to test without an integrated environment (i.e., perform unit…

CODEX

Unit regression tests are tests that run early in the development process and find coding errors that break something that used to work (i.e., a regression). A tool like Diffblue Cover can write such unit regression tests automatically.

A very good example of the prevalence of regressions problem in software came this week, when it emerged that the NHS’ COVID-19 app had a bug (now fixed) that led it to fail to notify some people that they should self-isolate.

Originally, the software worked exactly as it should have, but a subsequent software change designed to improve the app broke it-and…


CODEX

In the last year, we’ve surveyed hundreds of developers in the US and the UK about their preferences on topics ranging from DevOps, to testing, to the characteristics they like and dislike in a workplace, and what software quality means to them. On many things, the two groups are in agreement, but attitudes towards automation have jumped out as a point of interest-with a trend among respondents from the US to voice greater demand for automation tools, to report higher adoption of automation tools in their companies, and to have higher overall workplace satisfaction than their counterparts in the UK.


Suppose you have spent the day coding a new feature in your application. You now need to write unit tests for the code you’ve just added. What test cases should you write for your code? Do you write tests so all lines are covered? All branches? How do you ensure the tests you write adequately protect against regressions?

Read on: this blog will show you how to apply two techniques for producing test cases in your unit tests that will minimize regression risk.

Equivalence Partitioning (EP)

This first one is simple-in fact, you’ve probably used this technique without realizing it. The idea is…


Today, we’re going to look at unit testing in general, and then focus on what makes good and bad test inputs. There are two main approaches to unit testing: black-box testing, which focuses on the way the code would be used, and white-box testing, which focuses on the way the code functions internally.

Black-Box Testing

For black-box testing, one can generally work from the specification of the method under test and choose inputs based on this information. There are several complementary strategies to choose such inputs; to illustrate these strategies, let us consider three specifications of methods:

Our goal is to choose…


Most unit tests are organized in 3 sections:

  • Arrange: set up the environment and prepare a bunch of objects to run the unit under test
  • Act: call the unit under test
  • Assert: check that outputs and side effects of the unit under test are as expected

These three sections are often referred to as the ‘arrange’, ‘act’, and ‘assert’ phases of a test. Other names include ‘given/when/then’ or even ‘setup/exercise/verify’. The first two sections exercise the code on some relevant scenario. The assert section ensures that the code behaves as expected.

Assertions replace us humans in checking that the software…

Daniel Kroening

Professor of Computer Science and Co-founder of Diffblue | We’re making developers wildly more productive with AI for Code

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store