Hello @Gabriel ,
Can you confirm that you have clicked the Testing option on the left => click Enable Java Tests => and select to install JUnit?
I believe that you have followed the document to install the JUnit, then the "hamcrest-core-1.3.jar" and the "junit-4.13.2.jar" should be installed.
If the issue persists, please try to follow/check the following complete steps:
- Install VS Code, Extension Pack for Java, and choose to install JDK after the extension finishes installing.
- Create a new empty folder, create a sub folder in this new folder and name it src. Put the .java files into the src folder.
- Launch VS Code, File, Open Folder, then open that new folder.
- Click to open the GreetTest.java file and wait for the Testing option appears. Once the Testing option appears, click it, click Enable Java Tests, select JUnit, click the button to run the test.
If you follow the above steps, but the error persists, please try to reinstall VS Code, reinstall JDK(uninstall it from Control Panel), and reinstall the extension then test again.
Best Regards,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.