harbinger systems pvt. ltd. system test automation in agile environments using open source...
TRANSCRIPT
Harbinger Systems Pvt. Ltd.
System Test Automation in Agile Environments using
Open Source Technologies
Asheesh ChoksiAssociate Test Architect
Harbinger Systems Pvt Ltd
2
About Us
Harbinger Systems Harbinger Knowledge Products
Harbinger Group
Global provider of software products & services since 1990
www.harbingerknowledge.com
Global leader in interactivity solutions for knowledge sharing applications in
Learning
Presentation
Web development.
www.harbinger-systems.com
Partner in technology innovation
Web 2.0, eLearning Technology, Mobile, Software Product Development, and Systems Software Development and Testing
3
Agenda
A Review of Agile Environment
We will review the Agile methodologies from the Test point of view
What is needed to become an Agile Test Specialist
The requirements to take up the role of Agile test engineer
How to …
Review of open source technologies and some implementation snippets
Extending the Framework
4
Review of Agile Environment
Several flavors of Agile emphasize on Communication specially with Customer
Agile Methodologies have been created from Developer’s point of view
Stress is on Test Automation
The focus is on automated Unit testing and Integration testingAnd finally an Acceptance Testing by Client
There is a missing thread
These methodologies do not emphasize on need of QA specialist
The blunder is realized sometimes in the Project Cycle which is often late for a QA specialist to perform
5
Agile DNA
Adapt Quickly
Anticipate the change in Requirements / Application design / Deliverables
Do not anticipate change in delivery dates
Automate the Testing
Create an atmosphere of constant testing
6
How to do this
There is no dearth of help when you ask for it
Proprietary tools / Freeware /… / Selenium
At times we get drifted along the lines to procure Tools to do the job
Caution
Are you forcing your testing thoughts into Tools compliance range?
You would be more robust with Technology on your finger tips
Open Source options: Perl / Python / Ruby
7
Why Ruby
A dynamic, Open Source, Object Oriented Programming Language with focus on Simplicity and Productivity
Not a new Technology – originated in Japan mid 90s
It is really free
You really don’t need any special skill to learn Ruby
Caution
Ruby applications could be extremely complex in terms of design and code.
8
Win32OLE AutoIT
Process Automation with AutoIT
Things you can do with AutoIT Write installers /Uninstallers for software applications Perform automation of repetitive tasks on windows based forms Process Automation
A quick handle to AutoIT is a valuable cross-skill with Test specialist
require "win32ole"@au = WIN32OLE.new("AutoItX3.Control")@au.Run "Notepad" @au.send "ABCD" @au.send "{ENTER}"
9
Win32OLE Excel Automation
Excel is QA’s Oxygen
Things you can do with excel object in Ruby Read test cases: execution steps and test data Write a string in a given cell Execute the Excel Macro
require 'win32ole'
ex = WIN32OLE.new('Excel.Application')ex.visible = TRUEworkbook = ex.Workbooks.Add();worksheet = workbook.Worksheets(1);worksheet.Range('A1:D1').value = ['North','South','East','West'];
10
Watir : Web Application Testing in Ruby
Watir is a ruby based open source library for automating web browsers. It was primarily written on top of IE Com object to drive IE browser
Strong presence in all major technologies: Watij / Watin Things you can do with Watir
Simulate user actions: form filling and submit It has got full access to Browser's DOM Write assertions : content based Connect to Databases Read data files Export data files in format of your choice (excel / HTML /
XML)
11
Watir : Web Application Testing in Ruby Watir script [IE]
For Firefox
require 'watir'browser = Watir::IE.newbrowser.goto "http://google.com"browser.text_field(:name => 'q').set(“Test Automation with Watir")start_time = Time.nowbrowser.button(:name => 'btnG').clickpage_done_time = Time.nowresponse_time = page_done_time – start_timeputs “Response Time is ” + response_time.to_s + “seconds”
require 'watir-webdriver'browser = Watir::Browser.new :firefox
12
Watir : Writing Test Classrequire 'rubygems'require "watir"require 'test/unit'
class YovrTest < Test::Unit::TestCase def test_JTR_import # "====Perform login======" test_site = "http://staging:8080/signIn.jsp" $ie = Watir::IE.new $ie.goto test_site $ie.text_field(:name, "j_username").set "foo" $ie.text_field(:name, "j_password").set "bar" $ie.button(:value, " Sign In ").click
# "====Check the String ‘Home’======" assert($ie.text.include?("Home")) end end
13
Extending the Framework with Fitnesse Fitnesse is Software Development Collaboration Tool
Has got a web server and provides a wiki interface. Test cases can be written and executed from wiki pages Available in various technologies: Java / .Net / Ruby / …
It enables Customer, Business Analyst/Test Engineer and Programmer to learn how their software behaves or should behave under certain conditions of test data
14
System Diagram
15