This project will demo the use of the testing framework Robotframework. In particular the Selenium Library is used for UI testing as well as the Requests Library is used for API testing.
docker-compose up
This is using the docker image ppodgorsek/robot-framework from docker hub.
To run the test suite locally the following needs to be installed:
- Google Chrome
- Chrome Driver
- Python 3
- pip libraries:
- robotframework
- robotframework-seleniumlibrary
- selenium
- robotframework-requests
After installing all requirements the test suite can be executed with:
robot --outputdir=./output-local --variable HEADLESS_BROWSER_ENABLED:False robot-tests
After the tests have been run the test report can be accessed from the output folder. e.g. output/report.html
The file test-on-k8s.yml contains a definition to run the test suite inside a pod on a kubernetes cluster.
With the command kubectl apply -f test-on-k8s.yml
, this repo will be cloned to an "initContainer" and then executed inside the docker image ppodgorsek/robot-framework.
Here are a couple of helpful resources when working with the Robotframework.