robotcode icon indicating copy to clipboard operation
robotcode copied to clipboard

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

Open gohierf opened this issue 11 months ago • 5 comments

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):

  • VS Code Version 1.87.2
  • RobotCode Version 0.78.4
  • OS: Windows
  • Python Version 3.11.8
  • RobotFramework Version 7.0

gohierf avatar Mar 26 '24 07:03 gohierf

I can reproduce the behaviour.

Noordsestern avatar Apr 16 '24 17:04 Noordsestern

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...

d-biehl avatar Apr 16 '24 20:04 d-biehl

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.

gohierf avatar Apr 22 '24 06:04 gohierf

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?

d-biehl avatar Apr 22 '24 07:04 d-biehl

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

gohierf avatar Apr 22 '24 07:04 gohierf