19
Presenters: Bryan Lamb- robotframeworktutorial.com Chris Broesamle- saucelabs.com Tool Introduction & Saucelabs.com Integration

Robot Framework Introduction & Sauce Labs Integration

Embed Size (px)

Citation preview

Page 1: Robot Framework Introduction & Sauce Labs Integration

Presenters:

Bryan Lamb- robotframeworktutorial.com Chris Broesamle- saucelabs.com

Tool Introduction & Saucelabs.com Integration

Page 2: Robot Framework Introduction & Sauce Labs Integration

Agenda �  About me �  Demo! �  What is a Test Automation “Framework”? �  Robot Framework Origin & History �  Features & Capabilities (Demo) �  Robot Framework vs. Selenium �  How to Install �  Simple Web Script (Demo) �  Layered/Page Objects Web Script (Demo) �  Saucelabs.com Example (Demo) �  Jenkins/Parallel Execution (Acceleration Demo) �  Where to Find Out More �  Q&A

Page 3: Robot Framework Introduction & Sauce Labs Integration

About Me �  20 Years QA/Development/Leadership � Apple, Macromedia, Yahoo, Experian �  Founder of RobotFrameworkTutorial.com

Page 4: Robot Framework Introduction & Sauce Labs Integration

Robot Framework Demo � Run the tests

�  API �  File Sytem � Website � DB (SQL Server & MySql) �  XML

� Examine the Amazing Results File

Page 5: Robot Framework Introduction & Sauce Labs Integration

What is a Test Automation Framework �  Language �  Scripts �  Reusable page/entity objects �  Supporting libraries (web, API, DB, mobile) �  Abstraction layer for increased readability �  Test runner with selective run capabilities (tags) �  Suite/test setup & teardown (recovery) �  Reports

�  results summary/aggregation �  timestamps �  drill downs �  search �  embedded screenshots

�  Scheduler/CI Integration �  Parallel Execution �  Conventions

Page 6: Robot Framework Introduction & Sauce Labs Integration

Origin & History �  2005

� Developed in Finland �  Ideas shaped in Pekka Klärck's masters thesis �  1.0 developed at Nokia Siemens Networks

�  2008 �  Version 2.0 released as open source

software � Current Version: 2.8.7

Pekka Klärck

Page 7: Robot Framework Introduction & Sauce Labs Integration

Features & Capabilities � Cross-Platform (Win, Mac, Linux) � Keyword-Driven (w/ Data-driven capabilities)

� Natural Language/Business Domain �  Libraries (Demo of RF Website):

Built-In

External (pip install xxxxx)

OperatingSystem

Process

Dialogs String XML

Collections DateTime Screen Shot

Selenium2 Appium FTP SSH

Database Diff Swing Archive

Page 8: Robot Framework Introduction & Sauce Labs Integration

Robot Framework “vs.” Selenium

Built-In Libraries

External Libraries (pip install xxxxx)

OperatingSystem

Process

Dialogs String XML

Collections DateTime Screen Shot

Robot Framework Script (.robot)

Selenium2 Appium FTP SSH

Database Diff Swing Archive

Hint: It “is” Selenium

Page 9: Robot Framework Introduction & Sauce Labs Integration

Robot Framework vs. Selenium

Typical C# Selenium- Steeper learning curve for QA

Page 10: Robot Framework Introduction & Sauce Labs Integration

Robot Framework vs. Selenium

Robot Framework Keywords- Not as intimidating for QA

Page 11: Robot Framework Introduction & Sauce Labs Integration

Robot Framework vs. Cucumber (Gherkin)

Robot Framework can do Gherkin too!

Page 12: Robot Framework Introduction & Sauce Labs Integration

How to Install �  Cross-platform (Win, Mac, Linux) �  Installation is small, light, and fast �  Requires some command line basics �  Steps

�  Install Python & PIP (add to your PATH) ○  Use PIP to install Robot Framework ○  Use PIP to install Selenium2 Library ○  Use PIP to install DB & API Libraries

�  Select & install desired browser versions �  Install Selenium Webdrivers for each browser �  Install the Pycharm IDE & Intellibot plugin

�  Full details at robotframeworktutorial.com

Page 13: Robot Framework Introduction & Sauce Labs Integration

Simple Web Script (Demo from Scratch)

Robot Framework

Selenium Webdriver

Selenium2 Library

Script (.robot)

Page 14: Robot Framework Introduction & Sauce Labs Integration

Layered/Page Objects Example (Demos)

Test Cases (.robot)

User-Defined Keywords (.robot)

Page Object 1 Page Object 2

Selenium Webdrivers

Selenium2Library

Page 15: Robot Framework Introduction & Sauce Labs Integration

Saucelabs.com Example

Robot Framework

Optional -  Sauce Connect -  Multiple Jenkins Slaves

Page 16: Robot Framework Introduction & Sauce Labs Integration

Saucelabs.com Example (Demo) �  2 Steps*

1.  Add remote_url and desired_capabilities to your Open Browser keyword (variables)

2.  Create a custom library which uses API call to report test results back to Saucelabs

� Override the desired capabilities variable from the command line to switch platforms

�  * Course available at robotframeworktutorial.com

Page 17: Robot Framework Introduction & Sauce Labs Integration

Jenkins/Parallel Execution (Demo) �  *Jenkins can be used as a web GUI wrapper

around the Windows command line �  “1 Click” script execution �  Enables scheduling, etc.

�  “Build Flow” plugin enables parallel execution �  Jenkins Robot Framework plugin keeps

results history, graphs, etc. �  * Course available at robotframeworktutorial.com

Page 18: Robot Framework Introduction & Sauce Labs Integration

Where to Find Out More �  robotframework.org has docs & examples �  robotframeworktutorial.com training videos � Groups/Forums

�  Linkedin � Google �  Facebook �  StackOverflow

Page 19: Robot Framework Introduction & Sauce Labs Integration

Q&A � How is development time vs. a Selenium fwk? � CSS or XPath for locators? � Will it work for AngularJS? � Does it support Windows controls/apps? � Can it be used for testing Flash? � Can it be used for testing mobile apps? � How does it compare to Page Object Model? � Can it iterate over datasets/key:value pairs? � How to run pabot on Jenkins & Sauce?