Commit 5a1b9348 authored by Paul Merrill's avatar Paul Merrill
Browse files

More 2019 Nov changes.

parent 293b3935
No preview for this file type
......@@ -7,3 +7,4 @@ output.xml
.idea
*.pyc
*.db
.DS_Store
# ROBOT FRAMEWORK TRAINING
The goal of this training is to teach the basics of RobotFramework for the purpose of developing automated tests.
## TABLE OF CONTENTS
- [Exercise 02: Project Setup](exercise-02/README.md)
- [Exercise 03: An Introduction To RobotFramework](exercise-03/README.md)
- [Exercise 04: Where Do Keywords Come From?](exercise-04/README.md)
- [Exercise 05: Test Cases](exercise-05/README.md)
- [Exercise 06: Basics of Keywords](exercise-06/README.md)
- [Exercise 07: Test Suite Setup](exercise-07/README.md)
- [Exercise 08: Test Suite Teardown](exercise-08/README.md)
- [Exercise 09: Variables](exercise-09/README.md)
- [Exercise 10: Externalized Variables](exercise-10/README.md)
- [Exercise 11: Introduction to HTML](exercise-11/README.md)
- [Exercise 15: Clicking Elements](exercise-15/README.md)
- [Exercise 16: Introduction to Assertions](exercise-16/README.md)
- [Exercise 17: Entering Text](exercise-17/README.md)
- [Exercise 18: Selecting Dropdown Values](exercise-18/README.md)
- [Exercise 19: Form Submission](exercise-19/README.md)
- [Exercise 20: Revisiting Assertions](exercise-20/README.md)
- [Exercise 21: Revisiting Teardown](exercise-21/README.md)
- [Exercise 22: Conditionals](exercise-22/README.md)
- [Exercise 23: XPath](exercise-23/README.md)
- [Exercise 24: Looping](exercise-24/README.md)
- [Exercise 25: Screenshots](exercise-25/README.md)
- [Exercise 26: Reporting and Logging](exercise-26/README.md)
- [Exercise 27: Negative Use Case](exercise-27/README.md)
- [Exercise 28: Test Templates](exercise-28/README.md)
- [Exercise 29: Gherkin](exercise-29/REAME.md)
- [Exercise 30: API Testing with RobotFramework](exercise-30/README.md)
- [Exercise 31: Screenshots - Standard Library](exercise-31/README.md)
- [Exercise 32: Externalizing Keywords](exercise-32/README.md)
- [Exercise 33: Documentation](exercise-33/README.md)
- [Exercise 34: RobotFramework Hub](exercise-34/README.md)
### PYTHON
- [Exercise 35: Importing Local Libraries](exercise-35/README.md)
- [Exercise 36: Communicating with RobotFramework from Python](exercise-36/README.md)
- [Exercise 37: Using Custom Defined Keywords in Library](exercise-37/README.md)
- [Exercise 38: Test Data Management](exercise-38/README.md)
- [Exercise 39: SOAP Testing](exercise-39/README.md)
- [Exercise 40: Database Testing](exercise-40/README.md)
Copyright Beaufort Fairmont, LLC 2019. All rights reserved.
# Robot Framework Training Resources
Created by Beaufort Fairmont 2018 to aid in Training Clients in RobotFramework for Blue Cross Blue Shield of Western New York.
## What's here
This repository includes a set of exercises designed to help people learn RobotFramework. It is set up use along side the course as delivered to the client. Students attending the course may use this repository to prepare, study, and support their learnings before, during and after training is delivered and while employeed at BCBSWNY (HealthNow).
We encourage trainees to clone this repository, modify it locally and work together with other trainees to learn RobotFramework.
## A note on this course
This course was customized for HealthNow for the Software & QA Leadership team at HealthNow by Beaufort Fairmont, LLC cooperation with Zenergy Technologies.
Each exercise correlates to a learning segment in the planned curriculum (starting with “Introduction” and ending with “Exercise 40”). Each section includes “Purpose” and “Learning Objectives” to help the trainee better understand the curriculum.
Exercise numbering is for internal (Beaufort Fairmont) purposes and identification. Numbering is key in planning and traceability, please do not change exercise numbers.
This document lists exercises in the order they are planned to be delivered. The instructor may have a need to change the ordering during delivery for the benefit of the students and the client.
Zenergy Technologies and Beaufort Fairmont appreciate your business and enjoy working with the team at HealthNow!
Find other courses, consulting, and support for software test automation at https://beaufortfairmont.com
## Copyright, permissions, license
Copyright Beaufort Fairmont, LLC 2019. All rights reserved.
<h2>End-User License Agreement (EULA) of <span class="app_name">RobotFramework Training Course</span></h2>
<p>This End-User License Agreement ("EULA") is a legal agreement between Blue Cross Blue Shield of Western New York and <span class="company_name">Beaufort Fairmont, LLC</span></p>
<p>This EULA agreement governs your acquisition and use of our <span class="app_name">RobotFramework Training Course</span> software ("Software") directly from <span class="company_name">Beaufort Fairmont, LLC</span> or indirectly through a <span class="company_name">Beaufort Fairmont, LLC</span> authorized reseller or distributor (a "Reseller").</p>
<p>Please read this EULA agreement carefully before completing the installation process and using the <span class="app_name">RobotFramework Training Course</span> software. It provides a license to use the <span class="app_name">RobotFramework Training Course</span> software and contains warranty information and liability disclaimers.</p>
<p>If you register for a free trial of the <span class="app_name">RobotFramework Training Course</span> software, this EULA agreement will also govern that trial. By clicking "accept" or installing and/or using the <span class="app_name">RobotFramework Training Course</span> software, you are confirming your acceptance of the Software and agreeing to become bound by the terms of this EULA agreement.</p>
<p>If you are entering into this EULA agreement on behalf of a company or other legal entity, you represent that you have the authority to bind such entity and its affiliates to these terms and conditions. If you do not have such authority or if you do not agree with the terms and conditions of this EULA agreement, do not install or use the Software, and you must not accept this EULA agreement.</p>
<p>This EULA agreement shall apply only to the Software supplied by <span class="company_name">Beaufort Fairmont, LLC</span> herewith regardless of whether other software is referred to or described herein. The terms also apply to any <span class="company_name">Beaufort Fairmont, LLC</span> updates, supplements, Internet-based services, and support services for the Software, unless other terms accompany those items on delivery. If so, those terms apply. This EULA was created by <a href="https://www.eulatemplate.com">EULA Template</a> for <span class="app_name">RobotFramework Training Course</span>.
<h3>License Grant</h3>
<p><span class="company_name">Beaufort Fairmont, LLC</span> hereby grants you a personal, non-transferable, non-exclusive licence to use the <span class="app_name">RobotFramework Training Course</span> software on your devices in accordance with the terms of this EULA agreement.</p>
<p>You are permitted to load the <span class="app_name">RobotFramework Training Course</span> software (for example a PC, laptop, mobile or tablet) under your control. You are responsible for ensuring your device meets the minimum requirements of the <span class="app_name">RobotFramework Training Course</span> software.</p>
<p>You are not permitted to:</p>
<ul>
<li>Edit, alter, modify, adapt, translate or otherwise change the whole or any part of the Software nor permit the whole or any part of the Software to be combined with or become incorporated in any other software, nor decompile, disassemble or reverse engineer the Software or attempt to do any such things</li>
<li>Reproduce, copy, distribute, resell or otherwise use the Software for any commercial purpose</li>
<li>Allow any third party to use the Software on behalf of or for the benefit of any third party</li>
<li>Use the Software in any way which breaches any applicable local, national or international law</li>
<li>use the Software for any purpose that <span class="company_name">Beaufort Fairmont, LLC</span> considers is a breach of this EULA agreement</li>
</ul>
<h3>Intellectual Property and Ownership</h3>
<p><span class="company_name">Beaufort Fairmont, LLC</span> shall at all times retain ownership of the Software as originally downloaded by you and all subsequent downloads of the Software by you. The Software (and the copyright, and other intellectual property rights of whatever nature in the Software, including any modifications made thereto) are and shall remain the property of <span class="company_name">Beaufort Fairmont, LLC</span>.</p>
<p><span class="company_name">Beaufort Fairmont, LLC</span> reserves the right to grant licences to use the Software to third parties.</p>
<h3>Termination</h3>
<p>This EULA agreement is effective from the date you first use the Software and shall continue until terminated. You may terminate it at any time upon written notice to <span class="company_name">Beaufort Fairmont, LLC</span>.</p>
<p>It will also terminate immediately if you fail to comply with any term of this EULA agreement. Upon such termination, the licenses granted by this EULA agreement will immediately terminate and you agree to stop all access and use of the Software. The provisions that by their nature continue and survive will survive any termination of this EULA agreement.</p>
<h3>Governing Law</h3>
<p>This EULA agreement, and any dispute arising out of or in connection with this EULA agreement, shall be governed by and construed in accordance with the laws of <span class="country">The United States</span>.</p>
# EXERCISE 02
## PROJECT SETUP
### PURPOSE:
The purpose of this exercise is to ensure that everyone has access to the project examples and source code. Ensure python 2.7, pip, chromedriver, chrome, git, and robot framework are installed properly.
# Project Setup
## Purpose:
The purpose of this exercise is to ensure that everyone has access to the project examples and source code. Ensure python 3, pip, chromedriver, chrome, git, and robot framework are installed properly.
## Learning Objectives:
- Automators will demonstrate that they have python, pip, chromedriver, chrome, git, and robotframework installed correctly.
## Challenge:
Complete project setup.
### Project Setup
Before starting the install process, check to see what is already installed. At command line type to verify tool installation:
```
git version
python --version
robot --version
pip --version-
chromedriver --version
```
#### Install Tools:
- [Install Atom](https://atom.io/)
- [Install Git](https://git-scm.com/downloads)
- [Install python 3.6](https://www.python.org/downloads/)
- [Install pip](https://pip.pypa.io/en/stable/installing/)
- [Install Robot Framework](https://robotframework.org/#support)
- [Install SeleniumLibrary and WebDrivers](http://robotframework.org/SeleniumLibrary/)
#### Validate Installations
At command line type to verify tool installation:
### CHALLENGE:
1. At command line type:
```
git version
python --version
robot --version
pip --version
pip --version-
chromedriver --version
```
2. Check that chrome is installed
3. Optional Atom Packages:
### Optional
#### Atom
Installing Atom
* Go to https://atom.io/
* Verify that Windows is displayed as the operating system
* Click the Download link
* Follow the setup instructions to complete installation
Atom is an integrated development environment(IDE) available at https://atom.io. If you prefer using Atom, some nice to have Packages are these.
```
gitlab-integration
language-robot-framework
autocomplete-robot-framework
```
4. Open Atom and open cloned directory
#### Open Atom and open cloned directory
#### VSCode
Install VSCode from the VSCode site.
### NOTES:
- Must be python 2.7 for original client.
- [Install Atom](https://atom.io/)
- [Install Git](https://git-scm.com/downloads)
- [Install python 2.7](https://www.python.org/downloads/)
- [Install pip](https://pip.pypa.io/en/stable/installing/)
- [Install Chrome](https://www.google.com/chrome/)
# EXCERISE 03
## AN INTRODUCTION TO ROBOT FRAMEWORK
### PURPOSE:
The purpose of this exercise is to provide a quick overview of what’s possible in Robot Framework.
# An Introduction to Robot Framework
### CHALLENGE:
Review the RobotFramework files in the /tour-of directory.
## Purpose:
### NOTES:
The purpose of this exercise is to provide a quick overview of what’s possible in Robot Framework.
## Learning Objectives:
- Automators will be able to restate 2-3 actions robotframework can perform
- Automators will be able to recognize and identify a robotframework script
- Automators will be able to open and read a robotframework script in VSCode
- Automators will be able to navigate the file structure in VSCode
## Notes:
Documentation for keywords: http://robotframework.org/robotframework/#user-guide
# EXERCISE 04
## WHERE DO KEYWORDS COME FROM?
### PURPOSE:
# Where Do Keywords Come From?
## Purpose:
The purpose of this exercise is to learn where keywords come from.
### CHALLENGE (10 MIN):
Determine Which Libraries Should be Included for the Test to Pass.
## Learning Objectives:
- Automators will be able to define what a keyword is
- Automators will be able to identify correct syntax of a keyword
- Automators will be able to use a keyword in a test script
- Automators will be able to find keywords and keyword documents
### EXTRA CREDIT:
Close the browser after the test finishes.
## Challenge:
Determine which Library(ies) should be included for the test to pass (10 min)
### NOTES:
- [Selenium Library](http://robotframework.org/SeleniumLibrary/SeleniumLibrary.html)
- [Standard Libraries](http://robotframework.org/robotframework/#user-guide)
**Extra Credit:** Close the browser when the test finishes
\ No newline at end of file
*** Settings ***
Library OperatingSystem
Library SeleniumLibrary
*** Test Cases ***
Create an Invoice
Comment This is my first RobotFramework test case!
Set Environment Variable PATH %{PATH}:${EXECDIR}/../drivers
Open Browser http://34.225.240.91/ chrome
*** Settings ***
#Library #?
#Library #?
*** Test Cases ***
Create an Invoice
Comment This is my first RobotFramework test case!
Open Browser http://34.225.240.91/ chrome
# EXERCISE 05
## TEST CASES
### PURPOSE:
The purpose of this exercise is learn what a test case is in RobotFramework.
# Test Cases
### CHALLENGE (15 MIN):
Verify that "Invoice Manager" is on the first page of the application.
## Purpose:
The purpose of this exercise is to learn what a test case is in Robotframework.
### EXTRA CREDIT:
Set up additional verification points to make sure that the page is the correct page.
## Learning Objectives:
### NOTES:
- [RobotFramework Test Case Syntax](http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#test-case-syntax)
- “Although Given-When-Then style is symptomatic to BDD, the basic idea is pretty common when writing tests or specification by example. Meszaros describes the pattern as Four-Phase Test. His four phases are Setup (Given), Exercise (When), Verify (Then) and Teardown [5]. Bill Wake came up with the formulation as Arrange, Act, Assert.”
- [Given-When-Then](https://martinfowler.com/bliki/GivenWhenThen.html)
- Automators will be able to identify a test case in robotframework
- Automators will be able to recognize the name of a test case
- Automators will be able to read the steps of a test case
- Automators will state the characters used to delimit parts of a line of a test case
- Automators will be able to restate what the AAA format for test cases is
## Challenge:
Verify that "Invoice Manager" is on the first (1st) page of the application (15 min)
**Extra Credit:** Set up more verification points to make sure that this page is the correct page.
\ No newline at end of file
*** Settings ***
Library OperatingSystem
Library SeleniumLibrary
*** Test Cases ***
Check invoice manager page
Comment Checking that we're on the invoice manager page
Set Environment Variable PATH %{PATH}:${EXECDIR}/../drivers
Open Browser http://34.225.240.91/ chrome
Page Should Contain Invoice Manager
......@@ -4,7 +4,5 @@ Library SeleniumLibrary
*** Test Cases ***
Check invoice manager page
Comment Checking that we're on the invoice manager page
Set Environment Variable PATH %{PATH}:${EXECDIR}/../drivers
Open Browser http://34.225.240.91/ chrome
#Verify that the text "Invoice Manager" is on the front page
#Verify that the text "Invoice Managaer" is on the front page
# EXERCISE 06
## BASICS OF KEYWORDS (45 MIN)
### PURPOSE:
The purpose of this exercise is for participants to learn how to create a custom keyword.
# Basics of Keywords
### CHALLENGE (20 MIN):
Create and use a keyword in your robot file called “Navigate To Home Page".
## Purpose:
The purpose of this exercise is for participants to learn how to create a custom keyword
### EXTRA CREDIT:
Determine if anything else should be a keyword and create that keyword for it.
## Learning Objectives:
- Automators will state the characters used to delimit parts of a keyword usage
- Automators will create a custom keyword
- Automators will be able to state the section of the file a keyword must go in
- Automators will be able to define what makes robotframework so powerful
- Automators will be able to restate the 3 places a keyword can be defined
## Challenge:
Create and use a keyword in your robot file called "Navigate to Home Page" (20 min)
**Extra Credit:** Determine if anything else should be a keyword and create that keyword for it.
\ No newline at end of file
*** Settings ***
Library OperatingSystem
Library SeleniumLibrary
*** Test Cases ***
Check invoice manager page
Comment We've learned how to create a custom keyword!
Set Environment Variable PATH %{PATH}:${EXECDIR}/../drivers
Navigate To Home Page
Page Should Contain Invoice Manager
*** Keywords ***
Navigate To Home Page
# Requires Chromedriver in Path (See earlier Excercise)
Open Browser http://34.225.240.91 chrome
......@@ -5,12 +5,5 @@ Library SeleniumLibrary
*** Test Cases ***
Check invoice manager page
Comment We're learning how to create a custom keyword.
Set Environment Variable PATH %{PATH}:${EXECDIR}/../drivers
Open Browser http://34.225.240.91/ chrome
Page Should Contain Invoice Manager
My Logger
*** Keywords ***
My Logger
Log To Console Hello world!
# EXERCISE 07
## TEST SUITE SETUP (25 MIN):
### PURPOSE:
The purpose of this exercise is to learn how setup is done for a test suite in RobotFramework.
# Test Suite Setup
### CHALLENGE (5 MIN):
Manage test suite set up by calling an existing keyword.
## Purpose:
### EXTRA CREDIT:
Create a second test and call the comment keyword at the beginning of each test case using a concept similar to suite setup.
The purpose of this exercise is to learn how setup is done for a test suite in Robot Framework
## Learning Objectives:
- Automators will state the area of the test case used for setting up the test case suite
- Automators will identify suite setup as the “Arrange” step from the AAA paradigm
- Automators will demonstrate their test case calling a keyword as a part of the Suite Setup
## Challenge:
Manage test suite set up by calling an existing keyword (5 min)
**Extra Credit:** Create a second test and call the comment keyword at the beginning of
each test case using a concept similar to suite setup.
*** Settings ***
Library SeleniumLibrary
Test Setup Navigate To Home Page
*** Test Cases ***
Page contains invoice
Page Should Contain Invoice
Page contains Manager
Page Should Contain Manager
*** Keywords ***
Navigate To Home Page
# Requires Chromedriver in Path (See earlier Excercise)
Open Browser http://34.225.240.91 chrome
......@@ -9,5 +9,4 @@ Using a suite setup works
*** Keywords ***
Navigate To Home Page
# Requires Chromedriver in Path (See earlier Excercise)
Open Browser http://34.225.240.91 Chrome
# EXERCISE 08
## TEST SUITE TEARDOWN (10 MIN):
### PURPOSE:
The purpose of this exercise is to learn how teardown is done for a test suite in RobotFramework.
# Test Suite Teardown
### CHALLENGE (5 MIN):
Manage test suite – tear down the browser.
## Purpose:
### EXTRA CREDIT:
Write down 1-3 other situations where you would need to use teardown or setup.
The purpose of this exercise is to learn how teardown is done for a test suite in Robot Framework
## Learning Objectives:
- Automators will state the area of the test case used for tearing down the test suite
- Automators will demonstrate their test case calling a keyword as a part of the Suite Teardown
## Challenge:
Manage test suite - tear down the browser. (5 min)
**Extra Credit:** Write down 1-3 other situations where you’d need to use teardown or setup.
\ No newline at end of file
*** Settings ***
Library SeleniumLibrary
Suite Setup Navigate To Home Page
Suite Teardown Close Browser
*** Test Cases ***
Using a suite teardown works
Comment Using a suite teardown to navigate to home page.
*** Keywords ***
Navigate To Home Page
# Requires Chromedriver in Path (See earlier Excercise)
Open Browser http://34.225.240.91 chrome
......@@ -10,5 +10,4 @@ Using a suite teardown works
*** Keywords ***
Navigate To Home Page
# Requires Chromedriver in Path (See earlier Excercise)
Open Browser http://34.225.240.91 Chrome
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment