robotcodedev / robotcode

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

Why I am not able to configure the suite name with snakecase in VSCODE #313

Closed rephila closed 1 week ago

rephila commented 2 weeks ago

Discussed in https://github.com/robotcodedev/robotcode/discussions/312

Originally posted by **rephila** September 23, 2024 Why I am not able to configure the suite name with **snake_case** in VSCODE: `{ "python.analysis.typeCheckingMode": "basic", "[python]": { "editor.defaultFormatter": "ms-python.black-formatter", "editor.formatOnSave": true }, "black-formatter.args": ["--line-length", "120"], "[robotframework]": { "editor.defaultFormatter": "ms-python.black-formatter" }, "robotcode.robot.pythonPath": [ "./configs", "./resources" ], "robotcode.robot.args": [ "-e", "WIP", "-V", "./configs/settings.yaml", "--outputdir", "./test_results", "--consolecolors", "on", "--suite", "filename", ] } ` Here there is a problem it is "**filename**" for --suite because if I use **snake_case** folder hierarchy the code will fail due to /usr/bin/env /bin/python3 ...username/.vscode/extensions/d-biehl.robotcode-0.90.0/bundled/tool/robotcode --default-path . debug --no-debug --tcp 54855 -- -P ./configs -P ./resources -e WIP -V ./configs/settings.yaml --outputdir ./test_results --consolecolors on --parse-include test_suit/pre_analysis/triaging.robot --name Frpa-Tools **--suite Frpa-Tools.Test\ Suit.Pre\ Analysis.Triaging --by-longname Frpa-Tools.Test\ Suit.Pre\ Analysis.Triaging.Test\ Diagnostic\ Connection** And my folder structure was : **frpa_tools/test_suit/pre_analysis/triaging.robot** But it failed because every folder was called a test execution going 5 test exec like sub-test execution. But My Configuration for launch.json is correct : For Example `{ "version": "0.2.0", "configurations": [ { "name": "RobotCode: Run Current", "type": "robotcode", "request": "launch", "cwd": "${workspaceFolder}", "target": "${file}", "attachPython": true, } ], "robotcode.robot.args": [ "-e", "WIP", "-V", "./configs/settings.yaml", "--outputdir", "./test_results", "--consolecolors", "on" ], } ` And it is executing like this : /usr/bin/env PYTHONPATH=/lhome/username/.vscode/extensions/ms-python.debugpy-2024.10.0-linux-x64/bundled/libs /bin/python3 /lhome/alperdo/.vscode/extensions/d-biehl.robotcode-0.90.0/bundled/tool/robotcode debug --debugpy -- -P ./configs -P ./resources -e WIP -V ./configs/settings.yaml --outputdir ./test_results --consolecolors on --suite ...username/Works/Projects/frpa-tools/test_suit/pre_analysis/triaging.robot This is the correct way of calling the suite!!! ` --suite ...username/Works/Projects/frpa-tools/test_suit/pre_analysis/triaging.robot ` This is not the correct way of calling the suite!!!! --suite Frpa-Tools.Test\ Suit.Pre\ Analysis.Triaging --by-longname Frpa-Tools.Test\ Suit.Pre\ Analysis.Triaging.Test\ Diagnostic\ Connection How can I call it this way with settings.json or into robotcode extension or into the vscode?
d-biehl commented 1 week ago

I wrote an answer here: https://github.com/robotcodedev/robotcode/discussions/312#discussioncomment-10735600

let's discuss it there, so I close this issue. If we found a bug/enhancement or whatever, we can open an issue