Supporting JUnit 5 in Visual Studio Code

Xiaokai He

After supporting the widely adopted JUnit 4 with the Java Test Runner extension for Visual Studio Code, we’ve received suggestions to add additional test frameworks, like JUnit 5 and TestNG. We’ve added initial support for JUnit 5, including running, debugging test cases as well as test report. Please give us a try and let us know your feedback.

JUnit 5 in Visual Studio Code

Expression Evaluation based Conditional Break Point

After introducing expression evaluation in our January release for the Java debugger extension, we are bringing the functionality to conditional break points. Now, you can set your breakpoint to break when an expression evaluates to true. We believe this could be a very useful feature when debugging your Java application using Visual Studio Code.

Conditional Break Point

Other Updates

We’ve also added new features to our Java on Visual Studio Code extension lineup, including:

Java Test Runner

  • Trigger tests from test explorer on different levels
  • Add command to open log file
  • Add setting to specify the position of test report

Tomcat

  • Add several context commands in Tomcat Explorer
  • Add support for JVM customization and Tomcat server configuration
  • Add command palette entries for user input

Maven

  • Add support for auto-update maven project explorer when pom.xml is updated

Try it out

Please don’t hesitate to try Visual Studio Code for your Java development, and let us know your thoughts! Install the Java Extension Pack which includes Language Support for Java by Red Hat, Debugger for Java, Maven, and the Java Test Runner.

Additional resources

0 comments

Discussion is closed.

Feedback usabilla icon