March 19th, 2018

Supporting JUnit 5 in Visual Studio Code

Xiaokai He
Senior Program Manager

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

Author

Xiaokai He
Senior Program Manager

Xiaokai is the program manager working on Java developer tools and services at Microsoft. He’s currently focusing on making Visual Studio Code great for Java developers, as well as supporting Java in various of cloud services in Azure.

0 comments

Discussion are closed.

'; block.insertAdjacentElement('beforebegin', codeheader); let button = codeheader.querySelector('.copy-button'); button.addEventListener("click", async () => { let blockToCopy = block; await copyCode(blockToCopy, button); }); } }); async function copyCode(blockToCopy, button) { let code = blockToCopy.querySelector("code"); let text = ''; if (code) { text = code.innerText; } else { text = blockToCopy.innerText; } try { await navigator.clipboard.writeText(text); } catch (err) { console.error('Failed to copy:', err); } button.innerText = "Copied"; setTimeout(() => { button.innerHTML = '' + svgCodeIcon + ' Copy'; }, 1400); }