Robot Framework Docker Container
Tags: robotframework, docker, testing
Published: 2019-10-12 00:17:33

---
title: Robot Framework Docker Container
published: true
description: Robot Framework in Docker
tags: robotframework, docker, testing
---

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ylx7y4wgpct7h5p14h7h.png)

We've been using [Robot Framework](https://robotframework.org/) at work for awhile with great success. When I initially started doing Robot I just setup Python and pip installed everything on Testers workstations.  At the time I used Python 2.6. This works but Python 2.6 is EOL soon, and maintaining different libraries, webdriver versions, etc became a huge hassle.

Enter Docker!

After searching around there are quite a few Dockerized Robot setups but they all had issues:

* Some were using Xvfb instead of native headless browsers 
* Some were using Chrome but with --no-sandbox option (bad)
* Some were doing a lot more than what I needed - Firefox, Selenium grids, etc.

I decided to take the best bits from all of them and create my own simple Robot Framework container.

It's running Alpine, Python 3, Robot Framework, Chromium (headless!) and that's it. 

I'm also giving a presentation in the near future on Robot Framework at a local Meetup so in addition to building a Docker container you can use to run your own Robot tests I also added some basic Robot Framework test examples if you are just getting started with Robot Framework.

Files are [available on my Github](https://github.com/jimpriest/robotframework-preso)

Make sure to scan the [README.md](https://github.com/jimpriest/robotframework-preso/blob/master/README.md).  

Happy Testing!

```
./robot.sh --suite a-simple
==============================================================================
Robot                                                                         
==============================================================================
Robot.Tests                                                                   
==============================================================================
Robot.Tests.A-Simple                                                          
==============================================================================
Robot.Tests.A-Simple.Test :: A very simple test suite with a single test      
==============================================================================
Open Site                                                             | PASS |
------------------------------------------------------------------------------
Robot.Tests.A-Simple.Test :: A very simple test suite with a singl... | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Robot.Tests.A-Simple                                                  | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Robot.Tests                                                           | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Robot                                                                 | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Output:  /robot/results/output.xml
Log:     /robot/results/log.html
Report:  /robot/results/report.html
jim@jim:/mnt/Files/www/robotframework-preso$ 
```