JetBrains LogoIntelliJ IDEA Guide
All TipsTutorialsPlaylistsTechnologiesTopicsAbout

Get IntelliJ IDEA

Up to Writing JUnit 5 Tests
Writing JUnit 5 Tests

IntroductionSetting up Gradle for JUnit 5Creating and running a testOptional ConfigurationDisabling or Ignoring TestsHelpful Test Names for DisplayLive Templates TipMultiple AssertionsTest AssumptionsData Driven TestsChecking ExceptionsGrouping TestsShortcuts
Next

Introduction

Introduction to writing JUnit 5 Tests

In this tutorial we’re going to look at features of JUnit 5 that can make it easier for us to write effective and readable automated tests.

Other Resources

  • JUnit docs
  • Migrating from JUnit 4 to JUnit 5 – blog, with embedded video
  • Unit Testing and Coverage in IntelliJ IDEA (video)
  • Editor Tips & Tricks (blog and video)
  • Top 15 IntelliJ IDEA Shortcuts Blog (blog and video)
  • Code used in blog, video and guide
Setting up Gradle for JUnit 5

Published

  • 2021-01-01
    by:
    Helen Scott

Tutorial Steps

  • 1

    Introduction

  • 2

    Setting up Gradle for JUnit 5

  • 3

    Creating and running a test

  • 4

    Optional Configuration

  • 5

    Disabling or Ignoring Tests

  • 6

    Helpful Test Names for Display

  • 7

    Live Templates Tip

  • 8

    Multiple Assertions

  • 9

    Test Assumptions

  • 10

    Data Driven Tests

  • 11

    Checking Exceptions

  • 12

    Grouping Tests

  • 13

    Shortcuts

Copyright © 2000–2023 JetBrains s.r.o.