Skip to content

Provide a way to opt out of JUnit Vintage engine deprecation #5030

@TWiStErRob

Description

@TWiStErRob

Steps to reproduce

Run any test suite that includes a Robolectric test on a module with JUnit 6.
This is normal setup, Android library modules usually have

  • Jupiter 5/6 applied for writing unit tests, and
  • Vintage engine applied for discovering Robolectric tests using runner/rules
Image

Context

  • Used versions (Jupiter/Vintage/Platform): 6.0.0
  • Build Tool/IDE: Android Studio Narwhal (2025.1.3)

The Android world is lagging behind, and Jupiter 5+ first party support is practically non-existent and based on these won't be a thing for years to come.

There's some community effort, but it's very experimental.

So I would like to kindly ask for a way to silence this deprecation, so we're not reminded of Google's inaction with a big red warning every day we write tests.

References:

Workarounds

Downgrade to JUnit 5

Of course we could stick with JUnit 5, but I (and hopefully others too) would like to follow improvements and fixes made in JUnit 6.

Increase the log level to warning

I'm not sure how to do it, looked at Discovery issues, but all I can figure out is how to stricten the tests with junit.platform.discovery.issue.severity.critical.

Related Issues

Deliverables

  • An opt-out property.
  • Automatic detection of Robolectric/Android would be ideal.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions