Home » Tag Archives: JUnit

Tag Archives: JUnit

JUnit vs TestNG: Which Testing Framework Should You Choose?

junit-logo

JUnit vs TestNG: The testing frameworks showdown Testing is an inseparable part of the software release cycle in well balanced developer teams. And it wasn’t always like that. Unit tests, integration test, system tests and others weren’t always around. Today, we’re lucky to be in a place in time where testing matters and the value is known to most of ...

Read More »

JUnit 5 – Dynamic Tests

junit-logo

When it came to defining tests, JUnit 4 had a tremendous weakness: It had to happen at compile time. Now, JUnit 5 will fix this oversight! Milestone 1 just got released and it comes with the brand-new dynamic tests, which allow the creation of tests at run time. Overview Other posts in this series about JUnit 5: Setup Basics Architecture ...

Read More »

JUnit 5 – Conditions

junit-logo

We recently learned about JUnit’s new extension model and how it allows us to inject customized behavior into the test engine. I left you with the promise to look at conditions. Let’s do that now! Conditions allow us to define flexible criteria when tests should or shouldn’t be executed. Their official name is Conditional Test Execution. Overview Other posts in ...

Read More »

JUnit 5 – Extension Model

junit-logo

We already know quite a lot about the next version of Java’s most ubiquitous testing framework. Let’s now look at the JUnit 5 extension model, which will allow libraries and frameworks to add implement their own additions to JUnit. Overview Setup Basics Architecture Extension Model Conditions Injection … Most of what you will read here and more can be found ...

Read More »

JUnit 5 – Architecture

junit-logo

Now that we know how to set JUnit 5 up and write some tests with it, let’s take a look under the covers. In this post we’ll discuss the JUnit 5 architecture and the reasons why it turned out this way. Overview This post is part of a series about JUnit 5: Setup Basics Architecture Conditions Injection … JUnit 4 ...

Read More »

How to Replace Rules in JUnit 5

junit-logo

The recently published JUnit 5 (aka JUnit Lambda) alpha release caught my interest and while skimming through the documentation I noticed that rules are gone – as well as runners and class rules. According to the documentation, these partially competing concepts have been replaced by a single consistent extension model. Over the years, Frank and I wrote several rules to ...

Read More »

Improve Your JUnit Experience with this Annotation

junit-logo

JUnit is probably part of 90% of all Java projects. And the exciting thing is, we’ll soon have JUnit 5 with Java 8 support. We’ve blogged about an improvement recently. Back in JUnit 4 land, there’s this little trick that I can only recommend you put in all of your unit tests. Just add this little annotation here and you’ll ...

Read More »

JUnit 5 – Basics

junit-logo

Last week we’ve set up JUnit 5 to be able to write tests. So let’s do it! Overview This post is part of a series about JUnit 5: Setup Basics Architecture Conditions Injection … Most of what you will read here and more can be found in the emerging JUnit 5 user guide. Note that it is based on an ...

Read More »

JUnit 5 – A First Look at the Next Generation of JUnit

junit-logo

In the beginning of February, the JUnit 5 (aka JUnit Lambda) team has published an alpha release. Since JUnit 4 is among the most used items in my toolbox I thought it might be worth to have a look at the next major release. I took the latest build for a spin and noted down the changes that I found noteworthy here. ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns