Skip to content

BEF 1.4.1 July 2021 JUnit Test Launcher Rework

Compare
Choose a tag to compare
@plaird plaird released this 16 Jul 04:53

This is a patch release to resolve a couple of long standing issues with launching JUnit tests in Bazel workspaces. This work is a bug fix, but required a redesign of the original feature and so has some user-facing impacts. With this patch release, BEF now uses the standard JUnit infrastructure for launching tests.

This release fixes:

  • When running tests, users were presented with a confusing choice in the Eclipse Run menu of JUnit Test or Bazel JUnit Target. The latter option has been removed with this release.
  • Running tests with the standard JUnit Test option previously resulted in a Class Not Found exception. Only the Bazel JUnit Target option worked.
  • Tests were slow to launch because the test classpath was computed multiple times.

As a result of the redesign, you will notice these differences:

  • Please delete any JUnit launchers you have in your workspace that were created before this release.
  • The first time you run tests in the Eclipse workspace, you will be asked to choose the launcher in the UI. You will need to choose the Bazel JUnit Launcher.
  • Test invocations are quicker.

As with all releases starting with 1.4.0, this new release is supported on Windows in addition to Linux and macOS.

🔥 Note that this release is affected by #293. Your test classpath will be incorrect if you rely on the Bazel implicit classpath (described in #43).