Author Topic: se2017-B1 No support for junit5  (Read 1343 times)


  • Senior Community Member
  • Posts: 260
  • Hero Points: 26
se2017-B1 No support for junit5
« on: August 06, 2017, 08:40:33 pm »
I need SE2017 to support junit-5 unit testing (IntelliJ is looming). 
It currently kinda-sorta works in legacy mode (using a junit-4 runner), albeit with a lot of pain and sacrifice
  • SE doesn't remember which junit jar to use and keeps asking me for it. (junit-platform-suite-api-1.0.0-SNAPSHOT.jar from the attached demo project).  junit-5 is no longer a single jar, so either SE finds them itself, or needs to allow me to configure them.
  • It needs a new test runner
  • Single-test operations from the unit test dialog (right-click run/debug) no longer work
  • Debugging an entire test class quite often doesn't hit the breakpoints, the tests either run to completion without ever stopping, or simply hang on one of the tests.
  • Using the attached demo project, run a junit debug on the SomeTests class and take a look at the output. It looks decidedly unhealthy and messy, especially the .cmd not found errors.
  • The attached sample doesn't show that, but occasionally it wont recognize that a class contains unit tests. I am still trying to come up with a repro test case. I think it is digging that knowledge from the compiled class files and most likely trips over some of the new Java8 bytecodes


  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: se2017-B1 No support for junit5
« Reply #1 on: September 08, 2017, 04:06:48 pm »
We are updating our test harness for JUnit 5 tests in the next beta drop.  Wasn't quite ready for Beta 3, so be on the look out for it the next release.  We currently aren't taking any advantage of the any new JUnit 5 features (like @DisplayName for example), we may be able to do something in the future.

At the minimum it will require the following dependencies:
junit-4.12.jar (for running legacy JUnit 4 tests)

Those are just the dependencies for vsjunit.jar.  Added checks to prompt for those classpaths.  But there are a number of other dependent jar files required that you are going to just have to add manually depending on on if you are running JUnit 4 or JUnit 5 tests (junit-vintage-engine-4.12.0.jar vs junit-jupiter-engine-5.0.0.jar). 

Currently building of the latest snapshot of RC3, so hopefully there aren't a bunch of changes as the progress toward full release.