Index: .classpath
===================================================================
--- .classpath	(revision 15488)
+++ .classpath	(working copy)
@@ -32,6 +32,11 @@
 			<attribute name="test" value="true"/>
 		</attributes>
 	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5">
+		<attributes>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
 	<classpathentry kind="lib" path="test/lib/jfcunit.jar">
 		<attributes>
 			<attribute name="test" value="true"/>
Index: test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
===================================================================
--- test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java	(revision 15488)
+++ test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java	(working copy)
@@ -23,6 +23,9 @@
 import java.util.logging.Handler;
 
 import org.awaitility.Awaitility;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.rules.TemporaryFolder;
 import org.junit.rules.TestRule;
 import org.junit.runner.Description;
@@ -79,7 +82,7 @@
  *
  * @author Michael Zangl
  */
-public class JOSMTestRules implements TestRule {
+public class JOSMTestRules implements TestRule, AfterEachCallback, BeforeEachCallback {
     private int timeout = isDebugMode() ? -1 : 10 * 1000;
     private TemporaryFolder josmHome;
     private boolean usePreferences = false;
@@ -433,6 +436,28 @@
         return statement;
     }
 
+    @Override
+    public void beforeEach(ExtensionContext context) throws Exception {
+        Statement temporaryStatement = new Statement() {
+            @Override
+            public void evaluate() throws Throwable {
+                // do nothing
+            }
+        };
+        try {
+            this.apply(temporaryStatement,
+                    Description.createTestDescription(this.getClass(), "JOSMTestRules JUnit5 Compatibility"))
+                    .evaluate();
+        } catch (Throwable e) {
+            throw new Exception(e);
+        }
+    }
+
+    @Override
+    public void afterEach(ExtensionContext context) throws Exception {
+        // do nothing for now
+    }
+
     /**
      * Set up before running a test
      * @throws InitializationError If an error occurred while creating the required environment.
