Spring Testing

Publié le: 26 mars 2024
sur la chaîne: JavaAnatomy
124
3

Why testing?

Ensuring that an application work as you want it to work.
Testing should not be neglected as some developers do
It should be part of the development life cycle

We don’t write tests to increase test coverage, but to ensure the application works as expected.

Spring Boot Testing is built on top of Spring Testing
Spring 6 uses Junit 5
Junit 5 is default in Spring Boot 3

Before Junit 5, was JUnit 4
Junit 4 was a monolith application, one fat jar with everything. No separation of concern but Junit 5 is broken into modules, to have separation of concerns.

Junit 5 Modules
JUnit Platform:
A foundation for launching testing frameworks on the JVM. The engine for running tests.
JUnit Jupiter:
The new library for writing JUnit 5 tests. Think of it as an API. It brings a new programming model and extension model that includes new assertions, new annotations, support for Java 8 Lambda Expressions, etc. It’s called Jupiter because Jupiter is the fifth planet of the solar system, and it also happens to be Junit 5.
JUnit Vintage:
A library providing engines that support execution of JUnit 3 and JUnit 4 tests. This basically allows tests for Junit 3 and 4 to run on Junit 5. Support for backward compatibility.


Sur cette page du site, vous pouvez voir la vidéo en ligne Spring Testing durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur JavaAnatomy 26 mars 2024, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 124 fois et il a aimé 3 téléspectateurs. Bon visionnage!