robotcodedev / robotcode

RobotFramework support for Visual Studio Code
https://robotcode.io
Apache License 2.0
168 stars 13 forks source link

[BUG] Right clicking "Run Tests" does not work on files. #243

Open gohierf opened 3 months ago

gohierf commented 3 months ago

Describe the bug In VSCode file explorer, right clicking "Run Tests" works on directories but not on files. It returns "No tests found in the selected file or folder". But it works if I right-click "Run Tests" from the parent folder, or from the green arrows in the file.

To Reproduce Steps to reproduce the behavior:

  1. Go to VSCode file explorer
  2. Right Click on Test Suite file
  3. Select "Run Tests"
  4. See information popup on the bottom right: "No tests found in the selected file or folder"

Expected behavior It should work on test suite file as it works on folders. Tests should be detected.

Screenshots/ Videos image

Desktop (please complete the following information):

Noordsestern commented 2 months ago

I can reproduce the behaviour.

d-biehl commented 2 months ago

This is a weird feature of vscode, why showing these entries if the file or folder does not contain tests. Need to investigate this a little bit more...

gohierf commented 2 months ago

This is a weird feature of vscode, why showing these entries if the file or folder does not contain tests.

The issue is that the file actually contains tests.

d-biehl commented 2 months ago

This also does not work with Python tests and Dotnet tests, running tests in a folder works, but not at file level. There is something wrong with VSCode and not in the RobotCode extension. @gohierf have you also tried with python tests? Maybe we should open an Issue on VSCode?

gohierf commented 2 months ago

Good to know! Unfortunately, I only have Robotframework tests available at hand.