I have a question about running apex tests and why i can't see that "Run Test" under IsTest annotation just like on the first screenshotenter image description here

What i see is something like this enter image description here


2 Answers 2


First update your extension to latest version. As per documentation

If you don’t see this icon, make sure that the project contains an sfdx-project.json file in its root directory.


Be sure Apex Language Server is running, you can check it on Output tab (CTRL + SHIFT + U).
If it is not running, most likely you don't have a valid Java runtime installed. It will work only with Java8 or Java11.
In this case:

  • from Extension tab check for updates.
  • close VS Code.
  • download and install AdoptOpenJDK 11.
  • be sure to set JAVA_HOME variable.
  • restart VS Code.

You may find useful enable Retrieve-test-code-coverage option.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .