Spring Testing

Publicado em: 26 Março 2024
no canal de: 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.


Nesta página do site você pode assistir ao vídeo on-line Spring Testing duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário JavaAnatomy 26 Março 2024, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 124 vezes e gostou 3 espectadores. Boa visualização!