Closed Veronit closed 3 years ago
Could be same issue as described in https://github.com/robocorp/robotframework-lsp/issues/281
I just took a look at this and it seems to be working correctly (this is how Robot Framework
itself works) -- it's not the same thing as https://github.com/robocorp/robotframework-lsp/issues/281.
i.e.:
By running python -m robot lsp_test.robot
, the __init__.robot
isn't really loaded nor executed (it's only loaded if the folder itself is run in something as python -m robot .
, which isn't currently possible by using those shortcuts, it'll always run either all the tests in the module or a selected test).
So, if the __init__.robot
should actually be executed in this case, Robot Framework
itself should be changed/fixed to support that.
OK. That seems to be the case... I thought that __init__.robot
should be executed in every situation. I have been using Ecipse as an IDE for severeal years and it's RED- plugin (https://github.com/nokia/RED) works that way.
So when developing tests I can run an individual test from the IDE and it executes __init__.robot
. It makes writing and testing tests so much easier. Could this be LSP be modified to work the same way? Or maybe add a setting to select whether to execute __init__.robot
or not.
It seems there's a way to make that run (by creating a suite to execute adding the needed directory along with the test).
I'll change the language server to do that in the shortcuts.
Awesome!! Thank you so much!
Done for 0.17.0
.
Describe the bug Run Suite doesn't use for example Suite Setup set in init.robot file. Same happend with Run link in individual test cases
To Reproduce Steps to reproduce the behavior:
Expected behavior Suite Setup in init.robot is executed similar to when running tests from command prompt
Screenshots
Versions:
Logs and files Attached is an example test and init.robot file. Also attached is the log.html from an execution
attachment_files.zip