[ENHANCEMENT] Multiline interactive console
We need an alternative debugging mode, to co-exist with the current debugger. Similar to Interactive Console in VS Code extension "Robot Framework Language Server". This is important because the mode better supports testing of long and complex tests (e.g. ERP testing) with many issues. It also better supports developing a test, an activity that usually takes the longest.
Key features/benefits over current debugger
- always on once started until separately closed
- multiline console with code completion
- run single tests with a single click, edit and rerun at same session
- run at any order and from any file at same session
- load/reload robot keywords
Possible improvements over "Robot Framework Language Server" implementation in priority order
- Run selected line(s) directly from the code without need to copy paste (this would be a huge improvement, a real game changer for developing UI tests!)
- Run the whole test (suite) file in interactive mode instead of running each test one by one
- Run from the beginning of the file/test up to a specific line
- Configurable single-click startup to include settings, variables, keywords and setups
I'm working on a similar project. Please try running the command: RobotCode: New Robot Framework Notebook via F1
It's still in its early stages, but I plan to add features like code completion and debugging support. Give it a try!
Thanks! I was taking a first look on that "New Robot Framework Notebook" and have tons of questions in the mind.
- How to load Suite Settings, Suite Variables etc. there?
- Is that mainly meant to "sketch" a new test/E2E tests? What is the intended workflow?
- If so, how do you "publish" from there the to actual test file?
- Where console output is visible?
- How variable values, keyword return values etc. can be seen?
- How this mode could help debugging complex already existing test suites?
- Is there a way how this could be extended to run single (usually current) lines? (other than creating new cell for each line which does not sound very practical). I mean mainly a scenario when building new UI test line by line and each new line usually requires some iteration until getting it right and instant feedback would be a really game changer, before moving to next (new) line.
Hi Daniel!
More I think about the Notebook, I doubt it is a good replacement for the interactive console. Which is really excellent for developing and maintaining long E2E tests.
How about taking the good concept from the "Robot Framework Language Server" extension which is about to fade away. And maybe parts of the code could be reused? I believe it is here: https://github.com/robocorp/robotframework-lsp/tree/master/robotframework-interactive
I do not have coder skills to help in the implementation, but I can help in the concept side to design it to support the test automation work even better. Like the be killer feature to execute single line(s) from editor view directly, which would save a lot of copy paste work/faster creating of UI tests, where you often need to iterate the line to interact as intended with the UI. Also I could help in the testing.
Please share your thoughts?
He, sorry for the late reply, but it’s RoboCon time right now and I have a lot to do ;-)
Regarding the Interactive Robot Framework Console, do you know this feature of the Python extension -> https://code.visualstudio.com/docs/python/run?
That’s what I have in mind and how it should look in the end, and there is a VSCode API and also LSP Support for Notebooks.
This Python REPL is based in detail on the notebook features of VSCode and Jupyter; it’s just another representation.
I would like to build RobotCode and the RobotFramework REPL on already existing, standardized technologies and not reinvent the wheel. But that will take a while ;-)
Here’s a little teaser for RoboCon Online. I will briefly introduce the notebooks in my talk there, which might also answer your above questions. Here’s the video for it, but without sound – the sound will be available next week at RoboCon Online. Will you be there?
https://github.com/user-attachments/assets/90cc4cde-aa62-44dd-8cb9-b290b11b62a3
Hi
I will at the RoboCon online yes. Let's get back to this discussion after that or maybe during that if possible. The video answered only couple of my questions and overall I am still skeptical if the Notebook solution can ever be as good the Interactive console for my use cases. I mean that automating long E2E test with 1000+ UI steps that are dependent on previous rows to succeed, that is much different than traditional programming.
This might be difficult to explain/discuss without online meeting or similar. Would that be possible to arrange sometimes after Robocon?
@tkopra Do you have any new insights after our conversation?
Thanks @d-biehl for the tips during Robocon Online, especially that the "normal" debugger is partially multiline. I tried using Robotcode only but eventually went back to RFLS Interactive console because the debugger still felt too limiting to support long E2E test development and tuning at early stages. I would however definitely use it to final stability tuning and simple maintenance cases.
Especially encouraging was to see what you meant with the Python REPL. That kind of tight integration with the normal test editor would be comparable to the Interactive console and has potential to be even better user experience. Key features to make it really handy:
- keyboard shortcut to run current selected line or lines. In a way that full logical lines are executed if selected even partially.
- ability to run whole test
- ability to run whole suite (all tests in a file in order)
- execution should pause at error and not continue to e.g. next test.
- ability to run test suite until specific line
- ability to reload robot keyword implementation (one by one is ok)
Do you see that it is possible to implement all the above mentioned features eventually?
If you could get that implemented sooner than later, I am ready to help you not only in testing it, but also in creating documentation/usage guide for both debugging modes.
I have switched to use Robotcode extension, But these features I still miss daily. @d-biehl can you please give update if this is going forward?