Skip to content

amochin/rf-training

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robot Framework training template repository

This is a workspace template for coding examples during Robot Framework trainings.
It can be used locally in VS Code and in Gitpod.

The workspace contains some VS Code configuration

  • 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)

Local usage

Please open the folder in VS Code and install the recommended extensions, listed in .vscode/extensions.json

Usage in Gitpod

What is Gitpod?

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.

How to start

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.

Installing Robot Framework and libraries

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.

Check your workspace is set up successfully

Use the test suites in the 0_check_installation folder - depending on installed libraries.

Gitpod workspace configuration

The .gitpod.yml file contains some configuration which is used by Gitpod when creating a workspace from the repository.

Desktop interaction

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.

The VNC client runs in the browser

  • 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.

Opening Robot Framework logs

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.

About

Robot Framework training template repository

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published