Closed massonal closed 8 months ago
Unfortunately it is not a bug and it works exactly as it should.
RobotCode finds all tests and test suites exactly as Robot Framework does, it uses Robot Framework's algorithm. Files and directories starting with an underscore are ignored, see also the Robot Frameworks documentation https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#suite-directories.
You can edit the files, with completion and syntax highlighting etc. but it is not a valid test suite to check if tests are included.
What exactly do you have in mind? Why do you want underscores in your suite name?
Thanks for the reply. I was not aware of this limitation, as I usually cd
at or below the offending folder when running tests.
The workspace I'm working with has a __INTERNAL_TOOLS__
folder at the root, where we store, well, internal tools. We use Robot to test some of these tools, and I would like to run these tests from inside VSCode.
The point, I guess, is that you can have several "projects" in the same workspace, so recusing makes sense.
I have just tried opening __INTERNAL_TOOLS__/toolA/
as a workspace, and in this situation the robotcode extension behaves as I'd expect. This makes sense given your explanations, but it is counter-intuitive to me... So, I'd like this changed, but I understand if you wouldn't.
There is a setting robotcode.robot.paths
in which you can define the paths in which Robot should search for *.robot
files.
You can specify one path or several. Just like you would do on the console with the robot
command if you specify multiple directories, files.
Maybe it helps if you specify your __INTERNAL_TOOLS__
here. Relative to the root of your working directory should be enough.
e.g. add this to your .vscode/settings.jon
"robotcode.robot.paths": [
"__INTERNAL_TOOLS__"
]
or
"robotcode.robot.paths": [
"__INTERNAL_TOOLS__/toolA",
"__INTERNAL_TOOLS__/toolB"
]
if you want to add only the tools folders where you have robot tests.
If you change the settings via the vscode settings dialog, be sure you have select the workspace
tab
Thanks for the tip! That should be sufficient for my usage.
Describe the bug The extension won't run test files contained in a folder whose name is enclosed in underscores. Typically example:
~/__foldername__/trivial_suite.robot
. Syntax higlighting, autocompletion, documentation pop-up work fine, but there is no "Run Test" button in the margin. The "Run Current File" command from the VSCode commande palette also fails, stating "no test found in this file".To Reproduce Steps to reproduce the behavior:
Expected behavior All the options mentioned in step 3. above should be present and functional.
Desktop (please complete the following information):
Addition Notes Is this behavior actually intentional? Feel free to move this issue to a suggestion for improvement; the current behavior is actually an issue for me in my current workspace.