JUnit 5 Tutorial - Crash Course

preview_player
Показать описание
Ever looked for a comprehensive intro to JUnit 5 that is fun and entertaining at the same time? Then have a look at this brand-new episode of "Marco Codes": JUnit 5 Tutorial [Crash Course].

In this video, you'll learn how to use JUnit 5 like a professional. Understand what Maven/Gradle dependencies you'll need, how to write tests, how to use other assertion libraries like AssertJ and asserting JSON & XML, and explore new JUnit 5 features like @ParameterizedTests, @TestFactorys, and @ExtendWith. By the end of the tutorial, there won't be many questions left when it comes to JUnit 5.

► References

► Table Of Contents
00:00 Intro
00:17 Project Skeleton Overview
00:35 Maven/Gradle Dependencies
01:52 Project Overview - Classes
02:11 First Test Class & Fixture
03:02 @Test methods
04:59 First Test Run
05:23 Mvn + Junit5 Issues
07:12 JUnit Assertions
08:35 AssertJ - assertThat
13:40 @DisplayName
14:41 JSON Unit - Asserting JSON
17:34 XML Unit - Asserting XML
20:29 Lifecycle Intro
21:10 @BeforeEach
21:29 @AfterEach
22:15 @BeforeAll / @AfterAll
23:13 @ParameterizedTest
24:12 @ParameterizedTest - @ValueSource
25:22 @ParameterizedTest - @CSV Sources
26:47 @ParameterizedTest - @EnumSource
27:12 @TestFactory - Creating Dynamic Tests
31:34 @Tag
32:51 @ExtendWith - 3rd Party Integrations
35:24 Outro

► FOLLOW ME
Рекомендации по теме
Комментарии
Автор

► Timestamps
00:00 Intro
00:17 Project Skeleton Overview
00:35 Maven/Gradle Dependencies
01:52 Project Overview - Classes
02:11 First Test Class & Fixture
03:02 @Test methods
04:59 First Test Run
05:23 Mvn + Junit5 Issues
07:12 JUnit Assertions
08:35 AssertJ - assertThat
13:40 @DisplayName
14:41 JSON Unit - Asserting JSON
17:34 XML Unit - Asserting XML
20:29 Lifecycle Intro
21:10 @BeforeEach
21:29 @AfterEach
22:15 @BeforeAll / @AfterAll
23:13 @ParameterizedTest
24:12 @ParameterizedTest - @ValueSource
25:22 @ParameterizedTest - @CSV Sources
26:47 @ParameterizedTest - @EnumSource
27:12 @TestFactory - Creating Dynamic Tests
31:34 @Tag
32:51 @ExtendWith - 3rd Party Integrations
35:24 Outro

marcobehler
Автор

i like the way you said "and thats all for the boring tasks", thank you for the amazing course by the way🔥

renaldywijayaputra
Автор

You explain the concepts very well, I hope you will continue to create more tutorials on topics like these

valeriotrinca
Автор

i like your way of explaination...just to the point...nothing else and not too much empty talking..thank u and good luck

slimandahra
Автор

Fantastic presentation - rare to see a white screen demo these days which to me works better for demos

MattThomasLondon
Автор

So glad I found your channel, high quality content, compared to other channels I've seen it has so much depth. Thank you!!!

jeremiahsprague
Автор

I've started being confident with Unit Tests, thanks!

RobsonCassianoSoftware
Автор

Hey, Marco! Thank you for the great content! Your explanations are clear and quite sufficient. Plus you demonstrate all things using modern IDE and library versions. Super cool! I would really like to see your video about testing in general: unit vs integration tests, what is a test case, edge case, how many tests to write, what to cover with tests and what not to cover... maybe some short insight into CI/CD - how to run tests, see results, coverage... There are almost no good videos on youtube summarizing all these.

honsu
Автор

a video about integration tests would be amazing :) and as an extra an integration test from api endpoint, consuming from kafka and saving in a db :)))

asterixcode
Автор

I learned a lot of things from you Mr. Marco Behler! I also follow your other channel, which also has some very good tutorials! Thank you! I wish you a lot of subscribers and likes because you're doing a great job!

andreialexandru
Автор

I'm visibly confused on what to test rather than how to test lol, anyway, can't wait to see the upcomming unit/integration test videos!

enfieldli
Автор

"If you want to be passive aggressive, you can do this..." this line cracks me up, LMAO

enfieldli
Автор

Content is so qualified. Love to see more on testing 🙂

badripaudel
Автор

Marco you are really explain all topics so clearly. Good luck we all love your articles and videos ;) <3

rasulrzaeeff
Автор

What is the amazing content! I find your videos extremely useful. Why? You give a nice look around. For example, during learning Spring JDBC Template library, I got to know about what is connection pooling. And I really appreciate your video content.
Thnx, Marco!

БогданЗараник
Автор

8:28 expected should be the first parameter of the assertEquals method. I often make the same error. 😀

feici
Автор

First to comment for the first time in my life. I have now completed one of my life goals 🚀

Kevin-grrs
Автор

Beautiful content. Google has just suggested me your Gradle video. I was looking for it for several days. Let me go watching!
PS: Marco, could you also make video about Mockito? It would be niiiice.)

БогданЗараник
Автор

Very impatient to see a Quarkus tutorial from you.

ecrxnkx
Автор

1:51 Strangely, IDEA did not add <scope>test</scope> even though you told it the scope you wanted in the dependency manager.

sidremey