In this article, we’ll cover how to execute parallel unit tests using JUnit 5.
Search Results for: junit
Using Fail Assertion in JUnit
Explore practical use cases for the fail assertion in JUnit.
JUnit 4 on How to Ignore a Base Test Class
Learn possible solutions to skip running tests from base test classes in JUnit 4
Thanks for Opting in for the JUnit 5 eBook
Welcome and thanks for signing up – you’re all set. Your download will be available in the “Welcome to Baeldung” email you have sitting in your inbox (or coming in 10-15 minutes). Hope you get a lot out of this material – the main reason I wrote this is to help others learn the easy […]
Run JUnit Test Cases From the Command Line
Learn how to run JUnit 5 tests directly from the command line with and without Maven
The java.lang.NoClassDefFoundError in JUnit
In this article, we’ll understand why the java.lang.NoClassDefFoundError occurs in JUnit and how to fix it.
Fixing the NoSuchMethodError JUnit Error
Learn how to fix the NoSuchMethodError and NoClassDefFoundError JUnit errors
Using Cucumber Tags with JUnit 5
Learn how we can use Cucumber tag expressions to manipulate the execution of tests and their relevant setups.
Conditionally Run or Ignore Tests in JUnit 4
Let’s look at how, based on certain conditions, we can run or ignore tests using JUnit.
Junit 5 Migration Guide
The guide will help you migrate your test codebase to the latest JUnit 5 release.
Unit Testing of System.out.println() with JUnit
Learn about approaches for testing System.out.println.
Asserting Log Messages With JUnit
Learn how to test log messages with JUnit
Writing Templates for Test Cases Using JUnit 5
Learn how to create a test template using JUnit 5.
Prevent ApplicationRunner or CommandLineRunner Beans From Executing During Junit Testing
Learn how to prevent ApplicationRunner or CommandLineRunner beans from executing during JUnit tests.
Determine the Execution Time of JUnit Tests
Knowing the time taken by our automated tests can be helpful in pin-pointing issues, or optimising our builds. There are a few ways to view our test execution reports.
Guide to JUnit 4 Rules
Learn how to use the JUnit 4 Rules Model to extend the behavior of JUnit tests
@TestInstance Annotation in JUnit 5
JUnit 5 allows us to customise the lifecycle of our test objects to share resources and state between tests. We investigate the @TestInstance annotation.
The Difference Between Failure and Error in JUnit
Explore the differences between a failure and an error in JUnit tests.
JUnit 5 TestWatcher API
Learn how you can process the results of test method executions using the JUnit TestWatcher.
JUnit Custom Display Name Generator API
Learn how to use JUnit Custom Display Name Generator API to create Test Display Names.