Introducing 

Prezi AI.

Your new presentation assistant.

Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.

Loading…
Transcript

Session on

Installation and setup

  • Install pyCharm
  • Clone the repo from github
  • pip install requirements.txt
  • Create config.py file as mentioned in config.py.dist

Robot Automation Framework

Run a sample test case

  • cd to your Tests/<suite_name> folder
  • run pybot -d Results <test_script_name>.robot
  • watch the show
  • Refresh Results folder and open reports.html for results

Create your first test script

*** Settings ***

Documentation Suite description

Library Selenium2Library

Test Setup Launch browser and open practo.com

Test Teardown Close Browser Session

*** Test Cases ***

Test title

[Tags] DEMO

Given User is able to see practo.come home page

*** Keywords ***

Launch browser and open practo.com

Open Browser about:blank gc

Go to https://www.practo.com

Close Browser Session

Close browser

User is able to see practo.come home page

Page should contain element xpath=//a[text()="Log in/Register"]

  • Create your first test script under Tests/<suite_name> with .robot extension
  • run pybot -d Results <test_script_name>.robot
  • watch the show
  • Refresh Results folder and open reports.html for results

"You're either the one that creates the automation or you're getting automated"

How do I automate?

Define your keywords with detailed steps

Create page objects and

write selenese actions

Tests/<suite_name>/SampleTest.robot

Keywords/KeywordDefinitions/Home.robot

Keywords/PageKeywords/HomePage.robot

*** Settings ***

Documentation Suite description

Test Setup Launch browser and open practo.com

Test Teardown Close Browser Session

*** Test Cases ***

Test title

[Tags] DEMO

Given User is able to see practo.come home page

*** Settings ***

Resource ../../HomePage.robot

*** Variables ***

*** Keywords ***

Launch browser and open practo.com

HomePage.Launch browser

HomePage.Go to url

Close Browser Session

Close browser

User is able to see practo.come home page

HomePage.Verify element on page

*** Settings ***

Library Selenium2Library

*** Variables ***

${HOME_PAGE_LOGIN_LINK} xpath=//a[text()="Log in/Register"]

*** Keywords ***

Launch browser

Open Browser about:blank gc

Go to url

Go to https://www.practo.com

Verify element on page

Page should contain element ${HOME_PAGE_LOGIN_LINK}

What is Automation?

Thank you!

  • Makes manual testing automatic using a third party tool

Involves:

  • Develop automation scripts
  • Execute automation scripts
  • Compare actual vs expected results
  • Publish execution reports

Robot Framework

Automation Framework

Introduction

How Robot works?

  • Process of structuring and organizing the test scripts to increase the re-usability and readability

Prepare yourself!

Robot framework is coming..

Then it performs the actions on the application

Robot Framework

Keywords

talks to

SeleniumLibrary

Selenium server talks to the browser and launches the application

SeleniumLibrary

converts keywords into actions and sends it to selenium server

Run a sample test case

Installation and setup

Create your test script and write your test case

Define your keyword with detailed steps

Create page objects and write selenese actions

Acceptance Test Driven Development

Python

based

Open

Source

Key-word

driven

Generic

Learn more about creating dynamic, engaging presentations with Prezi