NoVaTAIG April 7, 2010 Automated In-Browser Testing with Cucumber and Watir Rudy RegnerMike PerzErik ScheirerRasik Pandey.

Slides:



Advertisements
Similar presentations
A Bluffer's Guide to Selenium 2 By: Simon Stewart & Anthony Long.
Advertisements

HP Quality Center Overview.
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,
Key-word Driven Automation Framework Shiva Kumar Soumya Dalvi May 25, 2007.
Company LOGO Automation Tools For Android Anshu Prasad.
2 A programmer is going out for a stroll one evening. His wife asks him to swing by the store and pick up a gallon of milk, and if they had eggs, to get.
Story-Based Test Automation Using Free Tools
1 The Database Application Development Process The Database Application Development Process.
Selenium vs. Watir Evaluation William Mosteller Test Automation Specialist Copyright © 2009, Eloqua Inc.
Java.  Java is an object-oriented programming language.  Java is important to us because Android programming uses Java.  However, Java is much more.
Designveloper BDD Training October 2 nd – October 3 rd, 2014 Hung Vo - CEO.
Automated Testing Nathan Weiss April 23, Overview History of Testing Advantages to Automated Testing Types of Automated Testing Automated Testing.
Agile Testing with Testing Anywhere The road to automation need not be long.
© Company Confidentialwww.itcinfotech.com Business Case for Test Automation S.Janardhanan Chief Technology Officer ITC Infotech India Limited Business.
Selenium – Testing Tool. What is Selenium? Selenium is a robust set of tools that supports rapid development of test automation for web-based applications.
Living Requirements using Behavior Driven Development
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.
QA Automation Solution. Solution Architecture Test Management tool CI Tool Automation framework Testing Project BDD Tool Text of test to Testing Project.
Three-tier Mobile Application Testing Framework:
Software Quality Assurance QA Engineering, Testing, Bug Tracking, Test Automation Software University Technical Trainers SoftUni Team.
Background The Encyclopedio of Life (EOL) is an ROR open source project to create a free, online reference source and database for every one of the 1.8.
Copyright BSPIN Agile Practices Benchmarking Case Study by Mazataz – Tesco.
Selenium automated testing in Openbravo ERP Quality Assurance Webinar April 8th, 2010.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Software Testing Life Cycle
Connecticut Computer Measurement Group 2015 Spring Meeting 5 Ingredients to Executing Application Performance Management on.
From Design to Production Practicing what we preach at HP Shane Evans – Product Manager Oded Keret – Functional Architect.
A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Web Automation Testing With Selenium By Rajesh Kanade.
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.
Agile and the automated testing of accessibility
Selenium January Selenium course content  Introduction (Session-1)Session-  Automation  What is automation testing  When to go for automation.
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.
HOW AND WHY TO LOVE CUCUMBER By Dana Scheider. Is This Your Programming Experience?
T Project Review WellIT I2 Iteration
ScriptOnce™ & Best Practices. Agenda 2 Automation that works ScriptOnce –Minimal maintenance –Easy to add devices Robustness –Reliable Scripts - Minimize.
Selenium server By, Kartikeya Rastogi Mayur Sapre Mosheca. R
Tata Consultancy Services1 WebDriver Basics Submitted By : Akhil K Gagan Deep Singh Naveenrajha H M Poornachandra Meduri Shubham Utsav Sunil Kumar G Vivek.
We Behatin’. INTRODUCTION Behat background 3 Behat prep Getting started
CS223: Software Engineering Lecture 31: Acceptance Testing.
Zhuhai Test Automation Overview Ryan Li Team lead of test automation Foglight QA.
INTRODUCING HYBRID APP KAU with MICT PARK IT COMPANIES Supported by KOICA
SAFARI TEST AUTOMATION: NAVIGATING THROUGH THE JUNGLE BY KARAN KUMAR AND JAMES CHUONG.
Arklio Studija 2007 File: / / Page 1 Automated web application testing using Selenium
HPE ALM Octane.
Software Engineering “Practical Approach”
Leverage your Business with Selenium Automation Testing
BEHAVIOR DRIVEN DEVELOPMENT / TESTING (BDD)
Testing with Selenium IDE
aBAP – NextGen QA Delivery Gear
UI-Performance Optimization by Identifying its Bottlenecks
The merging of Web and Mobile APP
Software Quality Assurance
Jama Options for Complex Testing variations
Course Name: QTP Trainer: Laxmi Duration: 25 Hrs Session: Daily 1 Hr.
An Expert Guide On Regression Testing. A software regression is any undesired variation that occurs from code changes. Let just take an example of this.
What is selenium? Selenium is a portable software-testing framework for web applications. Selenium provides a playback (formerly also recording) tool.
Advantages OF BDD Testing
Sharing the good, the bad, the ugly & What can we do about it?
DevOps - Extreme Automation using Cucumber, Selenium, Ruby
Behat - Arguably the best tool to switch to Automated testing from Manual Shweta Sharma.
How to Improve Releasing Efficiency via i18N/L10n Test Automation.
Selenium Tutorials Cheyat Training.
Open Source Tool Based Automation solution with Continuous Integration and end to end BDD Implementation Arun Krishnan - Automation Manager Maria Afzal-
HCL’s Viewpoint – DevOps on MS Cloud
Games Development 2 Entity / Architecture Review
Open Source Tool Based Automation solution with Continuous Integration and end to end BDD Implementation Arun Krishnan - Automation Manager Maria Afzal-
Presentation transcript:

NoVaTAIG April 7, 2010 Automated In-Browser Testing with Cucumber and Watir Rudy RegnerMike PerzErik ScheirerRasik Pandey

Rudy Regner Introductory Notes – We’re all on linkedin.com. – Send us questions regarding any details presented tonight Presentation Goals and Objectives – Mike Perz: Test Automation Framework – Erik Scheirer: End-to-End SDLC Architect – Rus Pandey: BDD Tools Expert

Our Situation Writing regression tests for an app in production – Only required to support IE Rails v1.2.3 – Precludes using Webrat latest version – ?? Could possibly have used earlier version ?? why regression tests for earmarks? – Bug made it through manual testing – Encapsulate critical functionality in automated regression test scripts to decrease likelihood of this failure occurring again.

Mike Perz How accomplished the automation framework Challenges encountered

Our Learning Curve Started with Watir – Easy to get up and running Added Cucumber (RSpec) Replaced Watir with Webrat and Selenium – Sought flexibility gain through re-use of Webrat to drive Selenium, Mechanize or straight Rails Productivity dropped with Selenium – Watir can manipulate the DOM as objects. (you can iterate through the cells of an html table) – With Selenium you would have to find each cell individually. – Script debugging difficult without irb You can attach to a browser window* (with Watir) Converted existing Selenium code to Watir

Cucumber Feature snippet associated Step Definition

Scenario Outline example (similar to fitnesse tables)

Cucumber Test Summary Output (sample)

Once we switched back to Watir At first our tests were dependent on each other – They needed to be run in a particular order. – We used Rake to accomplish this. Open 4 browsers with 4 different users (Watir::IE.new_process vs. Watir::IE.new) – Now we can attach Watir to whichever browser session we need Watir::IE.attach – We use SQLite to keep track of which user is associated with which browser session

Interesting side benefits to writing automated tests Writing automated tests helped/made us understand the app better. Found application bugs that were missed earlier

Other useful tools Watircuke IE Developer Toolbar Firebug FireWatir recorder:

Erik Scheirer Spreading the Developer Joy Benefits of a single executable Cucumber artifact end-to-end

Status - Your Organization What Rules? Confusion? Sanity? Even if its sane, it probably can be more so. Some groups have managed a high degree of sanity. But what most organizations are experiencing is...

Chaos little Trust between groups + infighting bad communication no ‘Process’ (or its limping, bleeding, out the door) no time to implement anything new, constantly fighting fires instead

This approach provides an end-to-end process via architecture, convention, and tools is easy to implement is easy to customize to exacting technical needs and group culture

This approach builds better quality builds more trust between technical and non-technical stakeholders utilizes resources more effectively

Ingredients CTBE - catch that bug early! Unit tests, feature and black-box testing, via one single artifact in this case an Agile approach (scrum) artifact re-use creates self-reinforcing system

One Artifact, multiple uses developer can create cucumbers as part of T/BDD, and also to capture ‘drive-by requirements’ QA can create ‘cukes’ for regression tests Cukes can be fed from dev. to QA or vice versa Cukes can be used by Continuous Integration, and in Production monitoring

Next, the Process from multiple perspectives:

Stakeholder interaction, design and architecture, includes non-technical Iteration s testing & daily work The overall lifecycle The daily grind Time Building Trust - spreading the joy Building Trust - spreading the joy

Conclusion There is a way to achieve more success, better utilization of existing resources, and get more sleep; using a simple, adaptable architecture coupled with process, convention, and tools. Did we mention ‘metrics’ and how these can be used to CTBE in this manner, too? Its also all open-source, so its customizable to a great degree. Thank you for listening.

Rus Pandey How BDD would work Other possible tools

Ideal BDD Process: 1. Describe behaviour in plain text 2. Write a step definition in cucumber 3. Run and watch it fail 4. Write code to make the step pass 5. Run again and see the step pass 6. Repeat 2-5 for all your functionality

Performance: Since it takes 3 hours to run a test suite we should investigate using spork and --drb and testjour to distribute the test load if possible to speed up test runs.

Test Web apps in any language: Drive a full or headless browser using one of these *Webrat – Ruby acceptance testing for web applications *Capybara – Acceptance testing framework with a webrat-like API and support for multiple backends, including RackTest, Selenium, Celerity and Culerity *Steam – Drives a fast headless browser with Javascript support. Support for the normal webrat step definitions, see Setting up Steam *Testing PHP app using Webrat *WebDriver – Drives IE, Firefox, Chrome *Watir – Drives IE (Windows only), see: Setting up FireWatir *FireWatir – Drives Firefox on Windows, OSX and GNU/Linux *SafariWatir – Drives Safari (OS X only) *ChromeWatir – Drives Google Chrome *Celerity – Drives a fast headless browser with Javascript support. Examples here *Culerity – For when you can’t run your app under jRuby *Selenium – Runs any browser (any OS), see: Setting up Selenium *Mechanize – Runs a headless browser (any OS)

Examples of Cucumber being used in the real world across various languages/platforms to test all sorts of things. er/tutorials-and-related-blog-posts er/tutorials-and-related-blog-posts