Skip navigation links
JUnit 5
  • Overview
  • Module
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help

Deprecated API

Contents

  • Classes
  • Exceptions
  • Annotation Interfaces
  • Fields
  • Methods
  • Constructors
  • Annotation Interface Elements
  • Deprecated Classes
    Class
    Description
    org.junit.jupiter.api.MethodOrderer.Alphanumeric
    as of JUnit Jupiter 5.7 in favor of MethodOrderer.MethodName; to be removed in 6.0
    org.junit.platform.commons.util.BlacklistedExceptions
    Use UnrecoverableExceptions instead.
    org.junit.platform.engine.support.filter.ClasspathScanningSupport
    Please use EngineDiscoveryRequestResolver instead.
    org.junit.platform.engine.support.hierarchical.SingleTestExecutor
    Please use ThrowableCollector.execute(org.junit.platform.engine.support.hierarchical.ThrowableCollector.Executable) and ThrowableCollector.toTestExecutionResult() instead.
    org.junit.platform.launcher.listeners.LegacyReportingUtils
    Use LegacyReportingUtils instead.
    org.junit.platform.runner.JUnitPlatform
    since 1.8, in favor of the @Suite support provided by the junit-platform-suite-engine module; to be removed in JUnit Platform 2.0
  • Deprecated Exceptions
    Exceptions
    Description
    org.junit.platform.commons.util.PreconditionViolationException
    Use PreconditionViolationException instead.
  • Deprecated Annotation Interfaces
    Annotation Interface
    Description
    org.junit.platform.suite.api.UseTechnicalNames
    since 1.8, in favor of the @Suite support provided by the junit-platform-suite-engine module; to be removed in JUnit Platform 2.0
  • Deprecated Fields
    Field
    Description
    org.junit.jupiter.api.io.TempDir.SCOPE_PROPERTY_NAME
    org.junit.jupiter.engine.Constants.TEMP_DIR_SCOPE_PROPERTY_NAME
  • Deprecated Methods
    Method
    Description
    org.junit.jupiter.api.extension.InvocationInterceptor.interceptDynamicTest(InvocationInterceptor.Invocation<Void>, ExtensionContext)
    use InvocationInterceptor.interceptDynamicTest(Invocation, DynamicTestInvocationContext, ExtensionContext) instead
    org.junit.platform.commons.support.ReflectionSupport.loadClass(String)
    Please use ReflectionSupport.tryToLoadClass(String) instead.
    org.junit.platform.commons.util.BlacklistedExceptions.rethrowIfBlacklisted(Throwable)
    Use UnrecoverableExceptions.rethrowIfUnrecoverable(java.lang.Throwable) instead.
    org.junit.platform.commons.util.ReflectionUtils.getOutermostInstance(Object, Class<?>)
    Please discontinue use of this method since it relies on internal implementation details of the JDK that may not work in the future.
    org.junit.platform.commons.util.ReflectionUtils.loadClass(String)
    Please use ReflectionUtils.tryToLoadClass(String) instead.
    org.junit.platform.commons.util.ReflectionUtils.loadClass(String, ClassLoader)
    Please use ReflectionUtils.tryToLoadClass(String, ClassLoader) instead.
    org.junit.platform.commons.util.ReflectionUtils.readFieldValue(Class<T>, String, T)
    Please use ReflectionUtils.tryToReadFieldValue(Class, String, Object) instead.
    org.junit.platform.commons.util.ReflectionUtils.readFieldValue(Field)
    Please use ReflectionUtils.tryToReadFieldValue(Field) instead.
    org.junit.platform.commons.util.ReflectionUtils.readFieldValue(Field, Object)
    Please use ReflectionUtils.tryToReadFieldValue(Field, Object) instead.
    org.junit.platform.engine.ConfigurationParameters.size()
    as of JUnit Platform 1.9 in favor of ConfigurationParameters.keySet()
    org.junit.platform.engine.support.filter.ClasspathScanningSupport.buildClassFilter(EngineDiscoveryRequest, Predicate<Class<?>>)
    Please use EngineDiscoveryRequestResolver instead.
    org.junit.platform.engine.support.filter.ClasspathScanningSupport.buildClassNamePredicate(EngineDiscoveryRequest)
    Please use EngineDiscoveryRequestResolver instead.
    org.junit.platform.launcher.TestPlan.add(TestIdentifier)
    Calling this method is no longer supported and will throw an exception.
    org.junit.platform.testkit.engine.EngineTestKit.Builder.filters(DiscoveryFilter<?>...)
    Please use EngineTestKit.Builder.filters(Filter...) instead.
    org.junit.platform.testkit.engine.EngineTestKit.execute(String, EngineDiscoveryRequest)
    Please use EngineTestKit.execute(String, LauncherDiscoveryRequest) instead.
    org.junit.platform.testkit.engine.EngineTestKit.execute(TestEngine, EngineDiscoveryRequest)
    Please use EngineTestKit.execute(TestEngine, LauncherDiscoveryRequest) instead.
  • Deprecated Constructors
    Constructor
    Description
    org.junit.platform.engine.reporting.ReportEntry()
    Use ReportEntry.from(String, String) or ReportEntry.from(Map)
    org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder()
    Use LauncherDiscoveryRequestBuilder.request()
  • Deprecated Annotation Interface Elements
    Annotation Interface Element
    Description
    org.junit.jupiter.api.io.TempDir.SCOPE_PROPERTY_NAME