Sahi Web Automation and Test Tool



Similar documents
CA APM Cloud Monitor. Scripting Guide. Release 8.2

Agile Web Application Testing

Practice Fusion API Client Installation Guide for Windows

TSI Support for Autodesk Fabrication Software on Zendesk Help Desk Platform

HELP DOCUMENTATION E-SSOM BACKUP AND RESTORE GUIDE

TestTrack Test Case Management Quick Start Guide

Windmill. Automated Testing for Web Applications

SAIP 2012 Performance Engineering

HP Business Process Monitor

Hudson configuration manual

MONITORING PERFORMANCE IN WINDOWS 7

Generic MetaTrader 4 vs. MetaTrader 4 with MBT ECN/STP Execution

OpenSta OpenSource for Web Load, HTTP Stress & Performance testing

1 Download & Installation Usernames and... Passwords

Web Applications Testing

Ce document a été téléchargé depuis le site de Precilog. - Services de test SOA, - Intégration de solutions de test.

Bitrix Site Manager ASP.NET. Installation Guide

Test Automation Integration with Test Management QAComplete

BROWSER AND SYSTEM REQUIREMENTS

Performance Testing Web 2.0

Automated backup. of the LumaSoft Gas database

Spam Marshall SpamWall Step-by-Step Installation Guide for Exchange 5.5

NetBrain Enterprise Edition 6.0a NetBrain Server Backup and Failover Setup

Specify the location of an HTML control stored in the application repository. See Using the XPath search method, page 2.

1. Welcome to QEngine About This Guide About QEngine Online Resources Installing/Starting QEngine... 5

You may have been given a download link on your trial software . Use this link to download the software.

Load testing with. WAPT Cloud. Quick Start Guide

XCM Internet Explorer Settings

QAS Small Business for Salesforce CRM

PART 1 CONFIGURATION 1.1 Installing Dashboard Software Dashboardxxx.exe Administration Rights Prerequisite Wizard

The full setup includes the server itself, the server control panel, Firebird Database Server, and three sample applications with source code.

Apache JMeter HTTP(S) Test Script Recorder

HP BladeSystem Management Pack version 1.0 for Microsoft System Center Essentials Troubleshooting Assistant

How To Use Gfi Mailarchiver On A Pc Or Macbook With Gfi From A Windows 7.5 (Windows 7) On A Microsoft Mail Server On A Gfi Server On An Ipod Or Gfi.Org (

So in order to grab all the visitors requests we add to our workbench a non-test-element of the proxy type.

Traitware Authentication Service Integration Document

Table of contents. HTML5 Data Bindings SEO DMXzone

Generating Automated Test Scripts for AltioLive using QF Test

Bug Report. Date: March 19, 2011 Reporter: Chris Jarabek

HP Operations Orchestration Software

ASUS WebStorage Client-based for Windows [Advanced] User Manual

OUTLOOK ADDIN V1.5 ABOUT THE ADDIN

MS SQL Express installation and usage with PHMI projects

How to start with 3DHOP

Laptop Backup - Administrator Guide (Windows)

Setting up the Oracle Warehouse Builder Project. Topics. Overview. Purpose

Using SMI-S for Management Automation of StarWind iscsi SAN V8 beta in System Center Virtual Machine Manager 2012 R2

How To Test Your Web Site On Wapt On A Pc Or Mac Or Mac (Or Mac) On A Mac Or Ipad Or Ipa (Or Ipa) On Pc Or Ipam (Or Pc Or Pc) On An Ip

Auditing UML Models. This booklet explains the Auditing feature of Enterprise Architect. Copyright Sparx Systems Pty Ltd

Monitoring Oracle Enterprise Performance Management System Release Deployments from Oracle Enterprise Manager 12c

GreenEye Monitor Setup Guide V1.0 Brultech Research Inc.

Setting up FileMaker 10 Server

EM Single Sign On 1.2 (1018)

Connecting to LRDC Fileserver Remotely Using Windows Vista/7 & SRemote VPN

Advanced Digital Imaging

How to deploy fonts using Configuration Manager 2012 R2

Service Exchange Network

Desktop, Web and Mobile Testing Tutorials

Network/Floating License Installation Instructions

Installing and Running the Google App Engine On Windows

Installing and Configuring DB2 10, WebSphere Application Server v8 & Maximo Asset Management

ENABLE LOGON/LOGOFF AUDITING

ibaan ERP 5.2a Configuration Guide for ibaan ERP Windows Client

14.1. bs^ir^qfkd=obcib`qflk= Ñçê=emI=rkfuI=~åÇ=léÉåsjp=eçëíë

NetBeans Profiler is an

HELP DOCUMENTATION E-SSOM BACKUP AND RESTORE GUIDE

Apache JMeter. Emily H. Halili. Chapter No. 6 "Functional Testing"

Monitoring HP OO 10. Overview. Available Tools. HP OO Community Guides

Oracle Applications Release Notes Release 12 for Apple Macintosh OS X version 10.4 (Doc ID )

JAVASCRIPT AND COOKIES

OpenLDAP Oracle Enterprise Gateway Integration Guide

Java and JavaScript. Krishna Tateneni

Tutorial: BlackBerry Object API Application Development. Sybase Unwired Platform 2.2 SP04

Opacus Outlook Addin v3.x User Guide

TARGETPROCESS HELP DESK PORTAL

Support Desk Help Manual. v 1, May 2014

Quick-Start Guide. Remote Surveillance & Playback SUPER DVR MONITORING SOFTWARE. For use on Q-See s QSDT series of PC Securitiy Surveillance Cards

Getting Started using the SQuirreL SQL Client

HP LoadRunner. Software Version: Ajax TruClient Tips & Tricks

Sophos Mobile Control Installation guide

Connecting to HomeRun over the Web

The Top 10 Things DBAs Should Know About Toad for IBM DB2

Exam Name: IBM InfoSphere MDM Server v9.0

Web Automated Test for SharePoint

Continuous Integration

enicq 5 System Administrator s Guide

Sonatype CLM Enforcement Points - Continuous Integration (CI) Sonatype CLM Enforcement Points - Continuous Integration (CI)

SSL VPN Setup for Windows

WS_FTP Professional 12 and WS_FTP Home 12. Getting Started Guide

Configuration Guide - OneDesk to SalesForce Connector

Building Java Servlets with Oracle JDeveloper

DiskPulse DISK CHANGE MONITOR

DreamFactory on Microsoft SQL Azure

Installation and User Guide Zend Browser Toolbar

Intelligent Power Protector User manual extension for Microsoft Virtual architectures: Hyper-V 6.0 Manager Hyper-V Server (R1&R2)

Ingenious Testcraft Technical Documentation Installation Guide

TeamViewer & DynGate Manual V 2.0

PaperCut Payment Gateway Module PayPal Website Payments Standard Quick Start Guide

Yottaa Site Optimizer Guide

Installation Guide of the Change Management API Reference Implementation

Transcription:

Macquarie QA Engagement Proposal Sahi Web Automation and Test Tool Author: Divya Peddi & Nivetha Padmanaban 2008 ThoughtWorks Ltd. Version: 1.0

This document and the information contained in it are the confidential property of ThoughtWorks Ltd. Use of the document is subject to the following conditions: 1. No part of this document may be reproduced or transmitted without the express written permission of ThoughtWorks Ltd. 2. The contents of this document shall not be revealed to any third party without ThoughtWorks prior written permission. 4. ThoughtWorks reserves rights at any time to revise, amend or withdraw this document and for any of these purposes to call for the return of this document. 2008 ThoughtWorks Ltd. Page 2 Version: 1.0

Introduction: As application and domain becomes more complex, it becomes necessary to have an effective regression suite to evolve the application. Most of the time, buying a commercial tool may not be affordable for all companies. It is very dangerous to skip automation in such cases. Open source tools help to take advantage of automation with no cost. An important factor in automation is the choice of testing tool. A Test Manager may prefer to have the option of working with an open source tool in order to contain project cost. This paper elaborates on an open source tool called Sahi. OSS is not taboo anymore: OSS gives control to the customer. You can see the code, change it, learn from it. Bugs are more quickly found and fixed. And when customers don't like how one vendor is serving them, they can choose another without overhauling their infrastructure. No more technology lock-in. No more monopolies. It multiplies one company's development capacity many times over. Everyone collaborates, the best software wins. Not just within one company, but among an Internet-connected, worldwide community. As a result, the open source model often builds higher quality, more secure, more easily integrated software. And it does it at a vastly accelerated pace and often at a lower cost. About Sahi: Sahi is an open source automation and testing tool for web applications, with the facility to record and playback scripts. Developed in java and JavaScript, this tool uses simple JavaScript to execute events on the browser. Sahi runs as a proxy server and the browser needs to use the sahi server as its proxy. Sahi then injects javascript so that it can access elements in the webpage. This makes the tool independent of the website/ web application. Some of the features that sets Sahi apart from other tools are - Ant support for playback of suites of tests Suites can run in multiple threads thus reducing the test execution time External Proxy, HTTP and HTTPS support AJAX support Good Database and file support. Simple APIs Easily editable scripts (text files) version friendly artifacts Logging/reports Tests do not need the browser window to be in focus Supports javascript. Editor support Jedit has supporting sahi.xml Active community support 2008 ThoughtWorks Ltd. Page 3 Version: 1.0

Facts about Sahi: Number of downloads till Jul 16, 2007 is 19385 Ranked as 581 in sourceforge.net Activity in sourceforge.net is 99.7% Role of Proxy in Sahi: Two things that happen in proxy---- 1. Script here gets modified in the proxy. The scheduler function gets added into the array and then executed with delay. And all API's get changed to sahi_ 2. The responses coming from the webserver gets injected in the beginning and end with javascript code to help me work with the objects in the app. Getting Started: Initial Setup - 1) Download and Install sahi from sourceforge. 2) Start the sahi proxy. 3) Configure the browser to use the sahi proxy. Create scripts Scripts can be created either using the Recording facility of the controller or they can be directly written using any editor. Controller Screenshots Controller can be launched by ctrl+alt+dblclick on the browser window. Controller has very powerful features like: Recorder and Playback window Show accessor of the element DOM path of the element Value of the element List possible assertions for the element One / more commands can be executed Shows the list of properties like scrollheight, currentstyle etc for the selected element Can view the list of API s 2008 ThoughtWorks Ltd. Page 4 Version: 1.0

Fig - Sahi Controller APIs: There are two kinds functions : a) Normal Functions These are the functions which are primarily used to access the elements on the web page. Ex _button, _cell, _textbox Some other examples which are not for accessing elements on the web page _gettext, _getglobal b) Scheduler Functions These are the functions that schedule the action for later execution with a delay when its time comes. All actions should be performed using them. Ex - _assertequal, _click, _rightclick Example of API usages 2008 ThoughtWorks Ltd. Page 5 Version: 1.0

_click(_image("inbox")) _assertequal( text message, _gettext(_byid( mail_text )) Sahi Scripting: Sahi script is based on javascript. So, sahi script automatically inherits the power of javascript, like functions, variables, loops, conditional statements etc. function gettextmessage() { return (_byid( mail_text ).value.replace(/\r/g,"").replace(/\n/g,"")); } _asserttrue(gettextmessage().indexof("---------- Forwarded message ----------")!= -1); Database support: Sahi supports database connectivity, where script can connect to database during runtime to execute any queries. var db = _getdb("oracle.jdbc.driver.oracledriver", "jdbc:oracle:thin:@dbserver:1521:sid", "username", "password") var $rs = db.select("select * from User"); where $rs gets an 2 dimensional array of values and can be verified as _assertequal("1", $rs[0]["id"]); _assertequal("kamlesh", $rs[0]["name"]); _assertequal("28", $rs[0]["age"]); File Access: Files can be accessed through provided APIs. _readfile("filepath"); which returns the full file in single string and.split function can be used to read line by line. For ex. _readfile("filepath").split("\n"); where split is an javascript function. Execute API: Any DOS/Unix commands can be executed. For ex. _execute("mkdir abc") - This invokes the call and returns immediately. _execute("mkdir abc", true); - This invokes the call and waits till mkdir is done. 2008 ThoughtWorks Ltd. Page 6 Version: 1.0

Ant Integration: Sahi has ant integration. By including a small snippet of code in build.xml file, it is possible to run a suite of sahi tests. Ant integration offers several advantages 1. Facilitates running of functional tests as part of cruise control - This spares the QA of the burden of having to explicitly run the tests. The QA just needs to keep a tab on the build status and analyze the results in case of a failure. 2. Facilitates parallel execution of the tests - This opens multiple browser windows, executes sahi scripts, and logs the results. This considerably reduces the execution time of the suite and reduces the turnaround time of testing. Screenshot of Cruise Page 2008 ThoughtWorks Ltd. Page 7 Version: 1.0

Reporting Two-level reports will be generated. First level is consolidated report as shown in the below screenshot, where report just says the script name and its result. Sahi follows the color code (green for pass and red for fail) for reporting which helps to locate the failed script easily. 2008 ThoughtWorks Ltd. Page 8 Version: 1.0

Second level of reporting is the detailed report, which shows the detailed script. This report shows the each line of the script and follows color code for asserts as shown in the below snapshot. Conclusion: Sahi is one of the open source testing tool for web applications available in the market and because of all above features, sahi is stands out from other open source tools. Sahi has very active community and discussion forum. It is easy to adopt Sahi as it uses javascript, the most common scripting language. References: http://sahi.co.in/ http://sourceforge.net/projects/sahi/ http://sourceforge.net/forum/?group_id=151639 2008 ThoughtWorks Ltd. Page 9 Version: 1.0