Selenium and Selenium on Rails. Agenda  Overview of Selenium Simple Selenium Tests Selenium IDE  Overview of Selenium on Rails  Problems with Selenium.

Slides:



Advertisements
Similar presentations
Selenium Tutorial. What is Selenium? Javascript framework that runs in your web- browser Works anywhere Javascript is supported Hooks for many other languages.
Advertisements

Selenium Automation Testing Suite of Tools
Pubman and Selenium tests. What is Selenium Selenium is a suite of Web application test automation tools for any browser on any operating system –Firefox,
Selenium HP Web Test Tool Training
Object-Oriented Enterprise Application Development Tomcat 3.2 Configuration Last Updated: 03/30/2001.
Chapter 9 Introduction to the Document Object Model (DOM) JavaScript, Third Edition.
Web based testing: Chucklist and Selenium
Selenium – Testing Tool. What is Selenium? Selenium is a robust set of tools that supports rapid development of test automation for web-based applications.
Selenium Automation Testing Suite of Tools. What is Selenium? Selenium is a robust set of tools that supports rapid development of test automation for.
© 2011 LogiGear Corporation. All Rights Reserved Capturing Interface Presenter: Thuy Tran.
© 2006 by IBM 1 How to use Eclipse to Build Rich Internet Applications With PHP and AJAX Phil Berkland IBM Software Group Emerging.
Selenium Web Test Tool Training Using Ruby Language Discover the automating power of Selenium Kavin School Kavin School Presents: Presented by: Kangeyan.
Automation using Selenium Authored & Presented by : Chinmay Sathe & Amit Prabhu Cybage Software Pvt. Ltd.
Review of last Session Adding custom html Adding custom html HTML is the language that web servers understand, all web pages are created using HTML. HTML.
Ruby on Rails. What is Ruby on Rails? Ruby on Rails is an open source full-stack web framework. It is an alternative to PHP/MySQL. It can render templates,
Ori Calvo, 2010 “If people want to have maximum reach across *all* devices then HTML will provide the broadest reach” Scott Guthrie,
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Chapter 3.2 – RoR: easier, faster, better Maciej Mensfeld Presented by: Maciej Mensfeld RoR: easier, faster, better mensfeld.pl github.com/mensfeld.
JavaScript & jQuery the missing manual Chapter 11
WaveMaker Visual AJAX Studio 4.0 Training Troubleshooting.
Selenium automated testing in Openbravo ERP Quality Assurance Webinar April 8th, 2010.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Robot Framework – Basic Level. Date: Version:1.0 Page 1.
1 Test Automation For Web-Based Applications Selenium HP Web Test Tool Training Portnov Computer School.
Selenium Web Test Tool Training Using Ruby Language Discover the automating power of Selenium Kavin School Kavin School Presents: Presented by: Kangeyan.
© 2012 LogiGear Corporation. All Rights Reserved Robot framework.
JDeveloper 10g and JavaServer Faces: High-Performance UIs on the Web Avrom Roy-Faderman Senior Programmer May, 2006.
Testing web applications with Selenium Gannon University Frank.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
Selenium Web Test Tool Training Using Ruby Language Discover the automating power of Selenium Kavin School Kavin School Presents: Presented by: Kangeyan.
HTML Hyper Text Markup Language A simple introduction.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
Forms and Server Side Includes. What are Forms? Forms are used to get user input We’ve all used them before. For example, ever had to sign up for courses.
HTML Basics BCIS 3680 Enterprise Programming. Web Client/Server Architecture 2  Your browser (the client) requests a Web page from a remote computer.
Selenium IDE. Benefits Selenium IDE is full-featured Selenium version with GUI Easy to install (Firefox plugin) Plugin support Intelligent field selection.
Web Automation Testing With Selenium By Rajesh Kanade.
Where does PHP code get executed?. Where does JavaScript get executed?
Selenium Web Test Tool Training Using Ruby Language Discover the automating power of Selenium Kavin School Kavin School Presents: Presented by: Kangeyan.
BIT 286: Web Applications Automated Web Testing. Selenium  Selenium Is moving from being Firefox based to being more of a 'normal desktop' program that.
Pubman and Selenium tests. What is Selenium Selenium is a suite of Web application test automation tools for any browser on any operating system –Firefox,
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Rails & Ajax Module 5. Introduction to Rails Overview of Rails Rails is Ruby based “A development framework for Web-based applications” Rails uses the.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Introduction Selenium IDE is a Firefox extension that allows you to record, edit, and debug tests for HTML Easy record and playback Intelligent field selection.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training.
UNDERSTANDING YOUR OPTIONS FOR CLIENT-SIDE DEVELOPMENT IN OFFICE 365 Mark Rackley
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Selenium server By, Kartikeya Rastogi Mayur Sapre Mosheca. R
Test Automation Using Selenium Presented by: Shambo Ghosh Ankit Sachan Samapti Sinhamahapatra Akshay Kotawala.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
Robot Framework – Basic Level. Date: Version:1.0 Page 1.
The New Face of ASP.NET ASP.NET MVC, Razor, and jQuery Ido Flatow | Senior Architect | Sela | This session is.
This was written with the assumption that workbooks would be added. Even if these are not introduced until later, the same basic ideas apply Hopefully.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
Arklio Studija 2007 File: / / Page 1 Automated web application testing using Selenium
Introduction of Selenium Eli Lu 2016/10/13. Outline What is selenium ? Selenium Projects Selenium Sponsors Easy to use Useful Feature & Tools Useful Links.
Dreamweaver – Setting up a Site and Page Layouts
Selenium HP Web Test Tool Training
Selenium and Selenium on Rails
Testing with Selenium IDE
Introduction to ASP.NET 2.0
Stable and reliable Web Automation
Introduction of Selenium Webdriver Using Java
Testing With Selenium - Open source Test Automation Tool
Automation with Gwen Introduction.
Building Web Applications
Selenium Web Test Tool Training Using Ruby Language
Selenium Tutorials Cheyat Training.
Presentation transcript:

Selenium and Selenium on Rails

Agenda  Overview of Selenium Simple Selenium Tests Selenium IDE  Overview of Selenium on Rails  Problems with Selenium

Selenium Overview  Selenium is composed of four things: Selenium Core Selenium IDE Selenium RC Selenium on Rails

Overview of Selenium  Open source browser based integration test framework built originally by Thoughtworks  100% Javascript and HTML  Designed to make test writing easy  Ability to run whole suites of tests or individual tests  Ability to step through individual tests  Cross browser – IE 6/7, Firefox.8+, Opera, Safari 2.0+  Lets see an example of a selenium test suite…

Overview of Selenium  Downloads and Documentation can be found at:  Getting started: Download Selenium core off of Place the contents of the zip file on a web server in a selenium-core directory Go to

Simple Selenium Tests  Selenium understands two types of files Tests Test Suites  Every test must be contained within a test suite  Both tests and test suites are defined by using simple tables in HTML  To execute a test suite you must point TestRunner.html at it

Format of Selenium Test Suite  More complex than Selenium Tests  Easiest just to copy TestSuite.html from the samples  Mostly a table that points to the tests

Format of a Selenium Test  HTML Table with 3 columns First Column: Selenium command Second Column: Required first parameter Third Column: Optional second parameter  Selenium commands are broken into 3 types: Actions – Command the browser to do something Accessors – Store/retrieve data from selenium variables Asserts – Verify that the browser is in a certain state

Format of a Selenium Test  Two types of Selenium Parameters Locators – Used to find elements in html trees Pattern Matchers – Used to verify values  Lots of locator types. Some examples are: Id based, xpath based, css selector based  Pattern matchers are typically exact matches or regular expressions  Lots more info at: core/reference.html  So lets try to write a simple Selenium test…

Gotchas in HTML Selenium Test Writing  Selenium is sensitive to the format of the table  All selenium command rows must have three columns or they will not be recognized as commands  You can only test URL’s that are in the same domain as the selenium core  Separation of concerns is hard – Tests become very dependent on the internal structure of the HTML

Wow, that was hard!  Lesson learned: Never ever write this by hand  There are a lot of commands - you can even add your own custom commands into the user- extensions.js  Firebug is very useful for developing your accessors

Selenium IDE  Firefox extension that allows recording and editing of tests  Can be download off of  Allows easier development of tests  Can even output Ruby for it’s Ruby based API  Lets see it in action…

Selenium IDE  Much easier to use  Only really works with synchronous requests  Only automates commands, assert still must be entered by hand  Still requires lots of work to get Selenium to run it as part of a Test Suite

Selenium on Rails  Plugin for Rails that allows tests to be expressed in Ruby  Selenium core files no longer go in public – they are part of the Plugin  Supports two kinds of files SEL files and RSEL files SEL files are pipe separated files that look much like Selenium HTML RSEL files talk to a Ruby API that closely mirrors the normal commands – more info at: html

Selenium on Rails  Each test becomes a single RSEL file which contains Ruby calls closely resembling the Selenium Commands  RSEL files work much like views in Ruby and can be broken down into partials  Selenium on Rails takes over the /selenium/ URL space  RSEL files are used to automatically generate Selenium HTML table based tests  Selenium on Rails then generates it’s own Test Suite containing all of the tests

Selenium on Rails  RSEL files can reference fixtures and clear session state on startup  RSEL files support partials  Test development is much more Rails like -> Edit RSEL file, hit Reload in browser, run updated test  Lets see it in action…

That was still pretty hard…  Selenium on Rails does not initially make WRITING tests any easier  Selenium on Rails makes deploying and the development cycle of tests easier  Selenium on Rails makes writing tests more natural for RoR developers – it also gives your tests access to the rest of the code you have developed for your application  Selenium on Rails should really be seen as a starting point for developing a DSL to test YOUR application

Problems with Selenium  The Xpath locators are basically worthless because of the poor performance in IE  It is not designed to do AJAX type testing  waitForElement and waitForCondition are the tools that Selenium provides to deal with AJAX both of which add a lot of complexity to tests  Custom Selenium commands added to user- extensions.js are difficult to write – Avoid doing so unless you must  Timeouts are unreliable – sometimes tests hang  Not all Javascript events are supported

?