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

Java: Practice Unit Testing

1h 4mIntermediate2023-05-02

Authors

Bethan Palmer

Bethan Palmer

Developer

Course details

The beauty of test-driven development is that it allows you to iterate your codebase one step at a time, testing and reworking individual cases as you go. Not only does this reduce the likelihood of bugs and errors, it also helps you write more effective and more reliable code.

In this course, instructor Bethan Palmer covers the essentials of unit testing in Java to showcase the benefits of test-driven development. Explore practical topics including common assertions, comparing arrays, and testing exceptions as well as some of the more advanced features of JUnit, the Java unit testing framework that lets you run parameterized tests. Along the way, take advantage of the opportunity to practice writing your own unit tests with hands-on, interactive coding exercises in GitHub Codespaces.

Skills covered

Software TestingJavaOracleProgramming LanguagesSoftware DevelopmentOne-Off

Concepts

0. Introduction

  • 01 - Unit testing in Java
  • 02 - What you should know

1. Introduction to Java Unit Testing

  • 03 - What is unit testing
  • 04 - Test-driven development
  • 05 - Follow along with GitHub Codespaces

2. JUnit

  • 06 - Setting up JUnit
  • 07 - Defining a JUnit test
  • 08 - Challenge - JUnit tests
  • 09 - Solution - JUnit tests

3. Assertions in JUnit

  • 10 - Asserting true and false
  • 11 - Comparing arrays
  • 12 - Asserting an exception is thrown
  • 13 - Challenge - Assertions and annotations
  • 14 - Solution - Assertions and annotations

4. Advanced Features

  • 15 - Using assumptions
  • 16 - Testing multiple inputs with parameterized tests
  • 17 - Testing enums with parameterized tests
  • 18 - Challenge - Advanced features
  • 19 - Solution - Advanced features

Conclusion

  • 20 - Next steps

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