Scripting Web Tests with Watir and Ruby Copyright © 2004-2005 Bret Pettichord. Permission granted to reproduce with attribution. July 2005 A One-Day Tutorial.

Slides:



Advertisements
Similar presentations
BY NICK PEARSON Using Google Forms. What are Google Forms? They are web based They are completely customizable They create the spreadsheet that organizes.
Advertisements

Computer Software 3 Section A Software Basics CHAPTER PARSONS/OJA
Html: getting started HTML is hyper text markup language. It is what web browsers look at on the Internet. HTML documents should be created in a simple.
 How practices shape identity: An exploration of Transition for Undergraduate Psychology Students.
…and why do you need to know? K-W-L Write paragraph about how you learn best. This can be school related, but it can also be about something you’ve.
PDF Questions Submitted by our customers: Gus Lluberes.
Plagiarism and the IWU Student. … I’ve been hearing about plagiarism since I was in preschool! … of course I know it’s wrong and I could get in trouble.
Dynamic Web Pages. Web Programming  All our web pages so far have been static pages. 1. We create a web page 2. We upload it to the web server 3. People.
The Information School of the University of Washington Oct university of washington1 What the Digerati Know INFO/CSE100, Fall 2006 Fluency.
Improving Technology Expertise in Mathematics Instructors Maria H. Andersen, Muskegon Community College We live in a society exquisitely dependent on science.
Downloading and Installing AutoCAD Architecture 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the software.
How To Open an Account Tech Tools Project Joanna Conrad-Pacelli Last Updated: 6/3/11.
Copyright Laws.
Common Sense Unit 2 – Lesson 1 Category: Internet Safety.
How to make it easy for you customers to find and research you and your services!
The Watir Community Scripting Web Tests Copyright © Bret Pettichord. Permission granted to reproduce with attribution. July 2005 A One-Day Tutorial.
Making a Book Report in Alice by Jenna Hayes Under the direction of Professor Susan Rodger Duke University, June 2010.
Hotmail Tutorial This tutorial aims to quickly cover some of the basic elements of web based using msn Hotmail - a free service Use the Index.
What can a good teacher do with a computer? (or 2 or 3)
Study Tips Some tips to help you succeed in Biology (or any other) class.
Unit 1 – Improving Productivity. 1.1Why did you use a computer? What other systems / resources could you have used? I could have used a pen and paper.
Welcome to the CRE Programming Club! Robert Eckstein and Robert Heard.
Instructional Guide Original presentation created by EasyBib, adapted by S. Hall for educational purposes following Fair Use Guidelines and permission.
Beyond Watir Scripting Web Tests Copyright © Bret Pettichord. Permission granted to reproduce with attribution. July 2005 A One-Day Tutorial.
Advanced Web Design Scripting Tutorial Chapters. Scripting Intro The scripting part of the forthcoming Advanced Web Design textbook introduces you to.
Three Secrets about Learning Objects Rachel S. Smith Director, Development & Programs NMC: The New Media Consortium September 15, 2004.
Personal Safety Unit - Level 7. The Internet is not anonymous. Your address, screen name, and password serve as barriers between you and others.
Another Method to Open WebSpace as a Web Folder Alternative Method for Creating Web Folder in WebSpace, Slide 1Copyright © 2004, Jim Schwab, University.
Introduction to JavaScript + More on Interactive Forms.
Lecture # 6 Forms, Widgets and Event Handling. Today Questions: From notes/reading/life? Share Personal Web Page (if not too personal) 1.Introduce: How.
Registration and Log-in Flow Benjamin Melançon agaric.com & dgd7.org.
Acceptable Use Policy Review Crisafulli Elementary School Click “GO” to begin.
SharePoint document libraries I: Introduction to sharing files Sharjah Higher Colleges of Technology presents:
Welcome to the CRE Programming Club! Robert Eckstein and Robert Heard.
AND COPYRIGHT. WHY CC To avoid breaking copyright There are different licenses but almost all allow for work images / music / media to be used in learner.
Class 1: What this course is about. Assignment Read: Chapter 1 Read: Chapter 1 Do: Chapter 1 ‘workbook’ pages not finished in class Do: Chapter 1 ‘workbook’
Selenium Web Test Tool Training Using Ruby Language Discover the automating power of Selenium Kavin School Kavin School Presents: Presented by: Kangeyan.
Working with Files. Learning Objectives By the end of this lecture, you should be able to: – Examine a file that contains code with unfamiliar material,
BIT 286: Web Applications Automated Web Testing. Selenium  Selenium Is moving from being Firefox based to being more of a 'normal desktop' program that.
Copyright © 2007 Verizon Foundation. All Rights Reserved. This document may be reproduced and distributed solely for uses that are both (a) educational.
Second Harvest Finding Summer Meals for kids by using this Mapping Tool.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Creating a Historical Tour in Alice By Jenna Hayes May 2010.
Mrs. Feliciano’s Guide to Understanding Copyright and Fair Use 3rd-6th Grade.
GIVING A BOOK TALK. WHAT IS A BOOK TALK?  THE PURPOSE OF A BOOK TALK IS TO “SELL” THE BOOK. YOU WANT TO GIVE ENOUGH OF THE PLOT TO INTEREST THE LISTENERS,
Setting Up Your TSS Course. www/bcpss.org and log in.
By: Dina Discepolo Google Classroom Project- Animal Habitats.
Testing External Survey Automatic Credit Granting Shepherd University Department of Psychology.
Reading at home with your child. The Power of Reading! Creating a love of reading in children is potentially one of the most powerful ways of improving.
How to download and PRINT your Moving ON Audits Monthly Audit and Indicator reports (click on the ▼button on your computer to continue this presentation)
IT’S OUR FAVORITES!! Delicious: It’s What’s for Dinner.
Internet Literacy Evaluating Web Sites. Objective The Student will be able to evaluate internet web sites for accuracy and reliability The Student will.
Getting Started with HTML. HTML  Hyper Text Markup Language  HTML isn’t a program language, its known as a markup language  A Markup language has tags.
 SEO Terms A few additional terms Search site: This Web site lets you search through some kind of index or directory of Web sites, or perhaps both an.
 What can I change? What can I change?  How do I change slides? How do I change slides?  How do I link an event to a slide? How do I link an event.
WEB DESIGN CONCEPTS Brayden Burr. UNDERSTANDING THE CONTENT.
Introduction to Workbot 2.0 Ryan Li  Test automation  ant the Cucumber.
VAdata Tools VAdata: Virginia’s Sexual and Domestic Violence Data Collection System.
Selenium HP Web Test Tool Training
Selenium HP Web Test Tool Training
Imran Hussain University of Management and Technology (UMT)
Selenium Web Test Tool Training Using Ruby Language
Excise Tasks CS 4640 Programming Languages for Web Applications
Install WordPress Premium Theme & Customization. Every developer knows that WordPress is a free content management system, such as a easy blogging tool.
Dynamic Web Pages JavaScript Jill Thomas Oct 14, 2003.
Internet Literacy Evaluating Web Sites.
Web UI testing automation and Selenium
Accelerated Introduction to Computer Science
WEB DESIGNING THROUGH HTML
Easy-Speak How easy is it?
Presentation transcript:

Scripting Web Tests with Watir and Ruby Copyright © Bret Pettichord. Permission granted to reproduce with attribution. July 2005 A One-Day Tutorial

2 Objectives Learn Test Automation Concepts Dispel Common Myths Gain Hands-on Experience

3 Method Allow people to use their own computers Provide a tool they can keep We found open-source tools and improved them All class materials are open-source and can be shared with others

4 Watir WATIR = Web Application Testing In Ruby Watir is the tool that developed from this class (which we’ve taught since May 2003) Since Jan 2005, Watir has become popular in its own right But our purpose is still to teach concepts that apply whether you use Watir or another tool – open-source or commercial

5 Watir Testimonials Watir is the most compelling alternative for filling the automated acceptance testing need – Ward Cunningham, comparing Watir to Fit Watir Rocks! I have played with it for only about on hour and accomplished what I had wanted to do, but did not have the wherewithal, for ages. Truly awesome!! I was able to write a few unit tests using Watir in about 15 minutes and I’ve looked at Ruby code for all around 48 hours. Up until now, I'd managed to avoid learning the Ruby scripting language.... But after seeing what Watir could do and how neat Ruby is, I became a convert. I've been looking for an easy to use automated test tool for quite some time now. Something went wrong with everything that I tried. When I first came across Watir, I expected the same disappointment. However, Watir blew my freakin mind. Everything worked, no fuss, no muss, no bother. I had never used Ruby or Watir, and within a half a day I was gliding through my application with the greatest of ease. I can't overstate how much this application is going to change my life

6 Agenda 1. Show you a web application 2. Teach you how to drive it with a program 3. Turn these programs into tests

7 A Series of Labs 1. Manually test Timeclock 2. Use the Ruby interactive shell (irb) 3. Write scripts 4. Verify results 5. Use Assertions 6. Use a Test Harness End Result: A Suite of Tests for Timeclock

8 Enough Talk Let’s see some action

9 Example Script require 'watir' site = ' set a variable ie = Watir::IE.new # open the IE browser ie.goto(site)# go to the google site # enter 'pickaxe' in the search text field. # "q" is the name of the search field ie.text_field(:name, "q").set("pickaxe") # click the 'Google Search' button # "btnG" is the name of the Search button ie.button(:name, "btnG").click # see if the Programming Ruby book appears on the page if ie.contains_text("Programming Ruby") puts "Test Passed" else puts "Test Failed!" end

10 Expect to Struggle We don't necessarily teach you everything you need to know to complete each lab But the information you need is documented somewhere Ask questions if you are stuck Feel free to experiment