JUnit 5 inception

Even though JUnit 4 was the default testing framework for millions of Java developers worldwide, none of the active JUnit maintainers were paid by their employer to do that work. For that reason, and in order to overcome the drawbacks of JUnit 4, in July 2015 Johannes Link and Marc Philipp started the JUnit Lambda crowdfunding campaign (http://junit.org/junit4/junit-lambda-campaign.html) on Indiegogo (an international crowdfunding website):

JUnit Lambda Crowdfunding Campaign

JUnit Lambda was the name given to the project, which was the seed of the current JUnit 5 framework. The inclusion of the word lambda in the project name enforces the idea of using Java 8 from the very beginning of the project. Quoting the JUnit Lambda project site:

The goal is to create an up-to-date foundation for developer-side testing on the JVM. This includes focusing on Java 8 and above, as well as enabling many different styles of testing.

The JUnit Lambda Crowdfunding Campaign ran from July to October 2015. It was a success, raising 53,937 euros from 474 individuals and companies worldwide. From this point, the JUnit 5 kick-off team was created, joining people from Eclipse, Gradle, IntelliJ, or Spring.

The JUnit Lambda project became JUnit 5, and the design principles guiding the development process were the follows:

  • Modularization: As introduced before, JUnit 4 was not modular, and this causes some problems. From its inception, JUnit 5 architecture is much completely modular, allowing developers to use the specific parts of the framework they require.
  • Powerful extension model with focus on composability: Extensibility is a must for modern testing frameworks. Therefore, JUnit 5 should provide seamless integration with third-party frameworks, such as Spring or Mockito, to name a few.
  • API segregation: Decouple test discovery and execution from test definition.
  • Compatibility with older releases: Supporting the execution of legacy Java 3 and Java 4 in the new JUnit 5 platform.
  • Modern programming model for writing tests (Java 8): Nowadays, more and more developers write code with Java 8 new features, such as lambda expressions. JUnit 4 was built on Java 5, but JUnit 5 has been created from scratch using Java 8.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.2.157