filmov
tv
JUnit 5 parameterized tests
Показать описание
Get rid of test case duplication with JUnit parametrised tests!
As programmers, we don't want code duplication and unit tests are no exception. However, from time to time we might find ourselves writing tests that have the same logic but differ only in parameters passed to the unit under test. In this video I'll show you how to avoid duplication in such cases by using the ParameterizedTest annotation from JUnit 5. Enjoy!
Drop in from time to time for more such videos!
00:00 Introduction
00:44 Project overview
02:10 Adding dependencies
02:31 Parameterized test with CsvSource
04:45 Using MethodSource
06:37 MethodSource with custom method
07:07 Conclusion
#java #unittesting #json #testing #softwaretesting #javaprogramming #softwareengineering #programming #programmingtutorials #programmingtips #javatutorials #junit
As programmers, we don't want code duplication and unit tests are no exception. However, from time to time we might find ourselves writing tests that have the same logic but differ only in parameters passed to the unit under test. In this video I'll show you how to avoid duplication in such cases by using the ParameterizedTest annotation from JUnit 5. Enjoy!
Drop in from time to time for more such videos!
00:00 Introduction
00:44 Project overview
02:10 Adding dependencies
02:31 Parameterized test with CsvSource
04:45 Using MethodSource
06:37 MethodSource with custom method
07:07 Conclusion
#java #unittesting #json #testing #softwaretesting #javaprogramming #softwareengineering #programming #programmingtutorials #programmingtips #javatutorials #junit