Problems with Tests or Run & Debug

I have written most of the functions for the Java Project URL parser.
Now I want to apply the self-written tests to my implementations, but I get the error “Cannot find a class with the main method” or “Error: Main method not found in the file, please define the main method as: public static void main(String[] args)”. Is there anything I can do to fix this?
I have not found any forum post that could be helpful for me.I would be very happy if someone can help me.
With kind regards

You are probably trying to run the tests in a wrong way.
It seems like you are trying to execute the project somehow, which is impossible.

Take a look at the project presentation slides and video to see how to execute the tests.

Thank you for your quick reply.
I watched the project presentation video again and noticed that the following symbols are not displayed:
For comparison:
These are the 5 icons that are shown to me in the VM.
In the project presentation video Lucas used the bottom icon of the first image to run through the tests. This shows all the tests that have been implemented.
I have no idea what the problem is. I am looking forward to help.
With kind regards

Let’s see

  • you are actually using the VM
  • you have opened the proper folder (post a full screenshot so that we tutors can see such things immediately without having to ask you to post a full screenshot)
  • your project compiles otherwise?
  • Yes, Im using the VM.

  • I have opened the “project4” folder as shown below:

  • I don’t know if my program compiles because when I try to Run & Debug, VSCode throws the error “Cannot find a main class with the main method”.

And otherwise VSCode does not show me any error.

Hm, interesting. When I open your project, I can run the tests.
Does your extensions tab also look like this:


Apart from that, what happens when you press Ctrl+Shift+P, and type “Run All Tests”, and then select that option?

These are my installed extensions.
When I press the key combination and enter “Run All Tests”, it says “No matching commands”.

I don’t habe Clang-Format and Project Manager for Java.

Edit: I have installed the missing extensions, but the testing extension is still not displayed and therefore I cannot run any tests.

At this point I don’t really know how to solve this either. Perhaps you can come to tomorrow’s office hour so that I can take a closer look at it?

Thank you for your help in advance.
I’ll try to make it to the office hour, but I have an event at 12pm that ends at 1:30pm (hopefully). I’ll come over after that.

The solution was to re-install the VM and explaining how to shut it down properly.