This is a workspace template for coding examples during Robot Framework trainings.
It can be used locally in VS Code and in Gitpod.
- List of recommended extensions
- Some common RF and Python and settings
- Launch config for RF Language Server extension for VS Code
- It works after clicking on one of the code lense buttons Run or Debug above the test case name in .robot files
- It enables saving all RF output files in the logs folder
- It also sets the RF log level to DEBUG (with INFO as visible by default)
Please open the folder in VS Code and install the recommended extensions, listed in .vscode/extensions.json
Gitpod is an IDE in the cloud.
- It opens VS Code in the browser without any local installation.
- You'll need only a GitHub account (free) which you can use to login to Gitpod.
- Gitpod is free for individual usage up to 50h per month - see pricing.
For this repository, you can use the prepared link:
Open the workspace in Gitpod
Or you can create a Gitpod workspace from any GitHub repository just pasting it's link in the New Workspace window.
Initially, the workspace has some common prerequisites installed, including Python, Node.js, Java and Docker. See the full list in the Gitpod docs.
However, the workspace contains neither Robot Framework nor any libraries or Python modules installed. You can install them as usual, e.g. for Robot Framework:
pip install robotframework
The Browser library was tested - it gets installed and initialized without troubles and works fine.
Use the test suites in the 0_check_installation folder - depending on installed libraries.
The .gitpod.yml file contains some configuration which is used by Gitpod when creating a workspace from the repository.
- VS Code extensions to install
- Image selection and port configuration for desktop interaction
- Starting a web server and port configuration for Opening Robot Framework logs
In case of GUI test automation (e.g. a web app with the Browser Library), it might be helpful to access the GUI / Desktop. In Gitpod workspace, you should use VNC for this.
The preconfigured image contains a VNC service running in the background on the port 6080
.
- When the workspace was started, you'll see a Simple Browser tab in VS Code with the VNC connection open.
- You can also open the VNC connection in an external browser window
- It's your browser, the same one where you have the Gitpod workspace VS Code running.
Robot Framework log and report output are HTML files, so they require a browser to be opened.
For whatever reason, the included browser of Gitpod workspace throws an error.
As a workaround, the workspace launches a simple web server running on the port 8080
, serving the entire workspace directory.
So when you see a notification from VS Code, telling the port is open, click Open Browser - it opens a new browser window with all the files listed.
Simply navigate to the required folder (e.g. logs) and open the RF output files as usual.
- It's your browser, the same one where you have the Gitpod workspace VS Code running.
- You can also use a Simple Browser in VS Code for viewing RF logs, but you can't have two tabs of it - so either VNC or logs.