HEJA coding people, I hope you're well.
CONTENT
Learn how to write parameterized tests in JUnit 5 using @ParameterizedTest and @ValueSource.
In this beginner-friendly Java testing tutorial, I’ll create a JUnit 5 test class for an existing Java class. We’ll first write a regular unit test, then convert the test into a parameterized test that runs multiple times with different input values.
WHAT IN THIS VIDEO
Create a JUnit 5 test class
Write and run a basic unit test
Understand the `@ParameterizedTest` annotation
Supply multiple test inputs with `@ValueSource`
Run the same test with different values
Reduce duplicated test methods
CODE USED IN THIS VIDEO
The Java class under test was created in Coding Session 13:
• Spring Boot Custom Validation with Constra...
TIMESTAMPS
00:00 Introduction | Coding Session 16
00:07 JUnit 5 tutorial overview
00:13 What is `@ParameterizedTest`?
00:20 Review the Java class under test
00:26 Create the JUnit 5 test class
00:46 Write and run the first test
03:30 What is `@ValueSource`?
03:46 Create the parameterized test
05:26 More coding sessions
TOOLS
Intellij IDEA Community Edition
FRAMEWORKS
spring boot, maven, java 17, junit 5
TIPP CODING SESSIONS
class under test, created in this session • Spring Boot Custom Validation with Constra...
FOLLOW along to see what comes next. / @codingwithbibbobbib
MUSIC
licensed with Epidemic Sound
https://www.epidemicsound.com
#codingwithbibbobbib #coding #howto #livecoding #junit #junit5 #springboot #springboottutorial #javatest #test #refactoring #programming #intelliJIDEA #intelliJ #Java
En esta página del sitio puede ver el video en línea JUnit 5 Parameterized Tests with @ValueSource | Coding with BibBobBib de Duración hora minuto segunda en buena calidad , que subió el usuario Coding With BibBobBib 01 febrero 2024, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 25 veces y le gustó 5 a los espectadores. Disfruta viendo!