Special offers now — see discounted courses.
day
:
hour
:
min
:
sec
See special offers
Java: Testing with JUnit

Java: Testing with JUnit

2h 20mIntermediate2021-09-23

Authors

Maaike van Putten

Maaike van Putten

Trainer and Developer for Java, Python, Spring Boot, and More

Course details

Unit testing is of crucial importance in developing stable applications. Java developers need to write unit tests, and JUnit is the main unit testing framework for Java. In this course, trainer and developer Maaike van Putten helps you learn to test your Java code effectively. Maaike explains what unit testing is and the advantages that it offers. She covers JUnit and shows you how to set it up and run your first test. Maaike steps through the process of writing a basic test, including useful tools like JUnit Annotations, JUnit Write, JUnit DisplayName, and more. She goes over more advanced uses of JUnit, such as dependency injection, parameterized tests, and timeouts, to name a few. Maaike finishes up with a quick peek at next steps you can take, like how to make code ready for unit testing, best practices, and a brief overview of Mockito.

Skills covered

JUnitSoftware TestingJavaOracleProgramming LanguagesOpen SourceSoftware DevelopmentDeep Dive (X:Y)

Concepts

0. Introduction

  • 01 - Create proper unit tests in Java
  • 02 - What should you know
  • 03 - Unit testing and other types of testing
  • 04 - TDD - Test-driven development
  • 05 - Advantages of unit testing
  • 06 - What is JUnit

1. Getting Started with JUnit

  • 07 - Quick example of a basic unit test
  • 08 - Setting up JUnit for IntelliJ
  • 09 - Setting up JUnit for VS Code
  • 10 - Setting up JUnit for Eclipse
  • 11 - Your first test - HelloJUnit

2. Writing Basic Tests with JUnit

  • 12 - Annotations
  • 13 - Write and run test classes and methods
  • 14 - DisplayName
  • 15 - Assertions
  • 16 - Assumptions
  • 17 - Test execution order
  • 18 - Nested tests

3. More Advanced Usage of JUnit

  • 19 - Dependency injection in your tests
  • 20 - Repeated tests
  • 21 - Parameterized tests
  • 22 - Timeouts
  • 23 - Parallel execution
  • 24 - Lifecyle control - Before and after
  • 25 - Custom messages and reports
  • 26 - Conditional test execution
  • 27 - Disabling unit tests

4. Quick Peek at Next Steps

  • 28 - How to make code ready for unit testing
  • 29 - Best practices
  • 30 - Mockito

Conclusion

  • 31 - Next steps with JUnit

Related courses

Related learn paths

About us

LyndaKade is a leading learning platform that helps people learn business, software, technology, and creative skills to achieve personal and professional goals.

Phone numberAparat ChannelTelegram SupportTelegram ChannelInstagram Page

All rights to this site belong to LyndaKade.

Terms of Service|Privacy Policy

نماد الکترونیک enamad در صورت اتصال با آی‌پی داخل کشور، نمایش داده خواهد شد.
logo-samandehi - لوگو ساماندهی
zarinpal
zibal