Slides for 1,5 hours workshop about Robot Framework. Presentation includes: (1) introduction to web site testing using Selenium Webdriver for complete beginners, and (2) what impressed me the most in Robocon 2019 conference.
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
Robot Framework for beginners and what is new at 2019
1. @laojala
Robot Framework For
Beginners + What was new
in Robocon 2019
Laura Ojala
Laura.ojala@prove.fi
Twitter, Github, Instagram, LinkedIn: @laojala
2019/02/19
2. @laojala
Agenda
• What is Robot Framework?
• How to install and use it?
• Let’s code: Demo using SeleniumLibrary
• Tips for locating html elements
• Real life demo
• Further resources for individual learning
• What’s new in Robot Framework Community
• Demo with White Library (Ville Runtti)
17-18
18-19
3. @laojala
About me
• Robot Framework user since ~2013 (mainly
Selenium library)
• M.Sc in Technology
• 2006-2010: Medical device start up
• 2010-> Agile tester, consultant (Helsinki&Oulu)
• Current interests: JavaScript
Twitter, Github, Instagram, LinkedIn: @laojala
4. @laojala
What is Robot Framework?
• Generic test automation framework for end-to-end/acceptance testing
• Open source, rich ecosystem and very active community
• Great documentation: https://robotframework.org/
• Clear reports, detailed logs
• Editor support
• Various libraries
Further reading:
https://www.linkedin.com/pulse/common-misconceptions-robot-framework-jani-gr%C
5. @laojala
Only 3 steps
needed for
setup:
(web page testing
with Selenium
library)
1.Install Python (version 3):
https://www.python.org/downloads/
2.then, run these in the command line:
pip install robotframework
pip install robotframework-seleniumlibrary
1.and add chromedriver exe to a folder that is
in the path:
http://chromedriver.chromium.org/
Further reading: Installation instructions
https://github.com/robotframework/robotframework/blob/master/INSTALL.rst
7. @laojala
Running tests
To run all test cases in this forder and it’s
subfolders:
> robot .
Or, to run all test cases where name starts
with ”simpl”:
> robot -t simpl* .
Or, to run all test cases with a tag ”SMOKE”
in a folder webshop:
> robot –i SMOKE webshop
10. @laojala
Locating elements
• Locators point to the html elements in a web page
• CSS locators are recommended over XPATH, as CSS is more widely used among developers (also,
it might be slightly faster)
• If needed, ask that coders add unique id’s (when possible)
• Use browser’s developer tools (console or elements) to locate elements and check if element
exists on a page:
• Resources: xpath and css selectors
• https://www.red-gate.com/simple-talk/dotnet/net-framework/xpath-css-dom-and-selenium-the-roset
13. @laojala
Resouces
• https://robotframework.org/
• If you only read one document, I recommend this one:
How to write good test cases using Robot Framework or same in
slide set
• Everything that is needed in User Guide
• Quick start guide
• Community: Slack, Google groups, Twitter
15. @laojala
Learning 1: Robotic process automation
(RPA)
• RPA is a huge and growing market
• Objective: Make RF the number one open source RPA ecosystem
• Everyone who knows Robot Framework, knows RPA
16. @laojala
Robotic process automation (RPA)
continues:
• Robot Framework major release 3.1 includes support for RPA
• ”Switching label test to task :-D
• San Francisco based start up for open source RPA:
https://robocorptech.com/
• Talk here: https://youtu.be/uv6dvcoxdvU
17. @laojala
Learning 2: Interesting DevOps: Dynamically
scalable test environment on top of
Kubernetes
• Creating scalable, unified browser testing environment in a cloud
• Technologies used:
• Zalenium: https://github.com/zalando/zalenium
• Selenium Grid extension to scale a local grid dynamically with Docker/Kubernetes
containers
• Integrates with a cloud test provider (Sauce Labs, BrowserStack, TestingBot)
• Pabot (paraller execution of Robot Framework testcases):
https://github.com/mkorpela/pabot
• Original talk: https://youtu.be/ivLsjU77Q6c
18. @laojala
Learning 3: test automation is a whole team approach.
Add automation as a living part of your build paths and
make it everyones responsibility
Great talk for anyone
who is working with the
automation (how to
communicate benefits
and make quality a whole
team approach):
https://youtu.be/0q4-
AjqpO9M
20. @laojala
All conference talks online:
https://www.youtube.com/playlist?list=PLSK6YK5OGX1D-
QpVap5C7NlfurQ1dsGbt
There was also many more great presentations such as model based
testing, JupyterLab/Notebook integration, how Robot Framework
boosts testing in different domains, how to maintain test libraries etc.
Thank you!