Wednesday 23 January 2013

Lesson 6 - Test Object Model

It is a collection of objects that are used to represent objects in application.Basically,object means any data in application that supports methods and properties. QTP support two types of  objects as,

Test Object(TO) :- QTP creates an object during recording mode that correspond to object in application called as Test Object.The properties of objects are stored in in Object Repository that are used to identify object during run session.

Run Time Object(RO) :- The object that QTP uses to identify actual object in application during run session is Run Time Object. QTP uses the properties stored in object repository to identify actual object in application during run session.
You can add objects in object repository simply by recording events in application or by manually in object repository.

Both TO and RO supports various properties and methods.These properties can be retrieved using GetRO property and can be set using SetTO property.
Use Object Spy to view properties and methods supported by objects.

Object Hierarchy in QTP:-
It is very important to understand how QTP maintains object hierarchy. It will simplify your expert view also and helpful when we use Descriptive Programming.

If object is on simple page then Hierarchy will be as shown:-


In the expert view,you can view your statement as:-

Browser(" ").Page(" ").WebList(" ").Select" "

If object is on simple page having frame then Hierarchy will be as shown:-




In the expert view,you can view your statement as:-

Browser(" ").Page(" ").Frame("MainFrame").WebElement(" ").click

If object is on Window then Hierarchy will be as shown:-














In the expert view,you can view your statement as:-

Browser(" ").Window(" ").Page(" ").Frame("ebRealModal").WebElement(" ").click


If object is on Window which is on other window then Hierarchy will be as shown:-

In the expert view,you can view your statement as:-

Browser(" ").Window(" ").Window(" ").Page(" ").Frame("ebRealModal").WebElement(").click

Important Points:-

  • As you can see in the hierarchy ,there are some nested WebTables which are not recorded in statements.While Creating your script  you don't have to  deal  with them as you can see in expert view.Bottom line is you can ignore them while viewing objects hierarchy.
  • Whenever you record your script for Web application the first Web object is Browser then followed by others as in above cases.
  • Frames are of two type viz, Main Frame and ebRealModal Frame.If the object is on window then its frame will always be ebRealModal frame.

Lesson 5 - Test Result Analysis


When Quick Test finishes running the test, the Test Results window opens. 
Initially, the Test Results window contains two panes for displaying the key elements of your test run.
  1. Test Results Tree :-The left pane displays the Test Results Tree, an icon-based view of the steps that were performed while the test was running. Similar to the test tree in QuickTest main screen, it is organized according to the Web pages visited during the test run and can be expanded (+) to view each step. The steps performed during the test run are represented by icons in the tree. You can instruct QuickTest to run a test or action more than once using different sets of data in each run. Each test run is called an iteration and each iteration is numbered. (The test you ran had only one iteration.)
  2. The right pane displays the three areas as
  •  Test results details.
  •  The iteration summary table indicates which iterations passed and which failed.
  •  The status summary table indicates the number of checkpoints or reports that passed, failed, and  raised warnings during the test.
     


Viewing Result of Specific Step:-

  • In the test results tree, expand (+) Test Recording Summary > Select step
  • The Test Results window now contains three panes, displaying:
  • The Test Results Tree, with one step highlighted
  • The Test Results Details of the highlighted step
  • The Active Screen, showing a screen capture of the Web page on which the step was performed.
  • When you click a page in the test results tree, QuickTest displays the corresponding page in the application view. When you click a step (an operation performed on an object) in the test results tree, the corresponding object is highlighted in the application view.
  • Close the Test Results window.Choose File > Exit.  
Test Result Symbols




Lesson 4 - Recording Script

Before you start recording make test setting.
  • Choose Test > Automation > Record and Run Setting, The Record and Run Settings dialog box opens.
  • In the Web tab, select Open the following browser when a record or run session begins.
  • Choose a browser from the Type list and confirm that the URL in the Address box  for example . http://newtours.mercuryinteractive.com.
  • Confirm that Close the browser when the test is closed is selected.
  • In the Windows Applications tab, confirm that Record and run on these applications is selected, and that there are no applications listed.
  • This setting prevents you from inadvertently recording operations performed on various Windows applications (such as e-mail) during a recording session.
  • Click OK.
  • Click on Record button and your browser opens to the URL you specified.
  • Follow the actions specified in your test case and Record the script.
  • Once you finish recording ,click on stop button to stop recording.
  • Now Run your recorded script using Run Button and make necessary enhancements. 
Types Of Recording In QTP

Standard / Normal Recording:- Records the test in terms of GUI objects.In this mode QTP also captures unnecessary objects in script which are stored in object repository.It is the default mode of recording.

Analog Recording:-Exact keyboard and mouse operations are recorded  in accordance with the application or screen.

Low Level Recording:-It records at the object level and records all run-time objects as Window or WinObject test objects.Use it when QTP is not able to recognize object or environment.It is also useful for capturing objects which are location based.

You can use all recordings in single test based on the areas that you are covering in application.

Tuesday 22 January 2013

Lesson 3 - Getting Started With QTP

Before you start creating your script, understand  QTP window and its Menu.
  • Test Pane:- The area provided by QTP to create, modify  and enhance your script.It supports modes or view.
  • Modes:- QTP has two modes that allows you create your script.
  1. Keyword View:-The keyword view displays your script in the form of keywords (objects represented by icons) arranged in tree like format.Keyword view has components as Item, Operation,  value and Documentation with which testers with no programming skills can deal. 
  2. Expert View:-Expert view displays your script in the form of VB script code and provides substantial capabilities that are not available in keyword view.
  • Active Screen:-QTP provided a feature called Active Screen that holds the snapshot of each and every statement in your script.Viewing the snapshots in result summary makes easy to enhance and debug script.
  • Data Table:-It is a third party excel sheet integrated into QTP. There are two types of data tables available in QTP.
  1. Design Time Data Table
  2. Run Time Data Table
Debug Viewer Pane:- This pane allows you to set or reset values of variables and expression in your script during test execution.

Toolbar Pane:- This area provides various tools of QTP like file, view, resources etc.to operate QTP.
Add In Manager in QTP:- Add In provides the integrated system environment that makes the QTP compatible with the application.By default thee add ins are loaded in QTP , you have to select them at the time of installing QTP.
  1. Activex
  2. Visual Basic
  3. Web
Other than these add in's you have to pay .

QuickTest Professional Environment Support

Windows Applications
(MFC)
• Visual Basic
• Java
• ActiveX
Enterprise Applications
• SAP
• Oracle
• PeopleSoft
• Siebel
Web Technologies
HTML
• DHTML
• JavaScript
Browsers
IE and Firefox
• Netscape
• AOL
Emerging Technologies
• .Net Winforms,
Webforms, Web services
• J2EE Web services
• XML, WSDL, UDDI
Terminal Emulators
• 3270
• 5250
• VT100
Server Technologies
• Oracle
• Microsoft
• IBM
• BEA
• ODBC
• COM/COM+
Multimedia
• RealAudio/RealVideo
• Windows Media Player
• Flash

Languages
• European
• Japanese
• Chinese (traditional and
simplified)
• Korean

Lesson 1 - QTP Testing Worlkflow

Planning :-It is the first phase in QTP testing process.Before you start recording make sure that application area you are going to test synchronizes and communicate well with QTP. Analyse the test case and plan accordingly .Planning includes What resources, Utilities, Reusable actions etc will be required in script.

Recording Basic Test Script :- Following the test case, record a basic test script against  the actions specified in test case.

Enhancing Test Script :- Once a basic test script is created, enhance it.It includes making script readable by renaming objects in object repository, adding additional properties like class, html id etc.,using programming statements to achieve complex testing goals, inserting checkpoints, using regular expressions to validate data, parametrization, adding synchronisation points etc.

Running Test Script :- Once a test script is created run it to verify that all scenarios are covered as mentioned in test case.

Debugging Test Script :- Once you run your script you may get errors, to rectify them debug your script.
You can use Breakpoints, Debuggviewer pane, and Step Commands.

Executing Test Script :- Now, execute your test script in full fetch making sure that it will not generate any errors and it is available for batch run.

Analysis of Test Result And Reporting Defects  :-Analyse test result for any defect or issue in application and remove warnings in test script mentioned in results summary

Lesson 2 - Introduction and Installation of QTP

QTP is an Automated testing tool developed by Mercury interactive later on took over by HP.It uses VB script as its default scripting language .QTP is record and playback tool i.e. it record the events that we perform on application and replay them back.QTP identifies each element of application as an object and provides various methods to work on them.It performs functional and regression testing  through a user interface such as a native GUI or web interface. It works by identifying the objects in the application user interface or a web page and performing desired operations (such as mouse clicks or keyboard events); it can also capture object properties like name or handler ID. Although QTP is usually used for "UI Based" Automation, it also can automate some "Non-UI" based Test Cases such as file system operations, database testing or Web services testing.

Version History of QTP
  1. 1998 - Astra QT
  2. 2000 - QTP 5.0
  3. 2001 - QTP 5.5
  4. 2002 - QTP 6.0
  5. 2003 - QTP 6.5
  6. 2004 - QTP 8.0
  7. 2005 - QTP 8.2
  8. 2006 - QTP 9.0
  9. 2007 - QTP 9.1
  10. 2008 - QTP 9.2
  11. 2008 - QTP 9.5
  12. 2009 - QTP 10.0
Now, the latest version of QTP is 11.0

QTP Installation Guide:-

If you are installing Demo Version of QTPthen i will  recommended you to use virtual drive of XP on your machine. The reason behind this scene is that if you installed QTP on your machine with Demo Version license and if that Demo version expires then you cannot Re-install Demo Version of QTP until and unless you format your machine. So why to get into trouble just follow simple steps. If you are using any software in demo version then you have to uninstall it before its validity ends. Same scene with QTP ,if your Demo License version of QTP 9.1 is for 14 days then you have to uninstall it on 13th day otherwise on 15th day you will have to face troubles for Re-installing it.
So here is the step by step guide to install QTP on your machine with Demo version license.

  1.  Install VMware player on your pc. If you don’t have the set up, download it from here, https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_player/5_0 
  2. Now Create virtual Drive of XP on your machine using VMware player. 
  3.  Start > VMware player > Create a New Virtual Machine > Select Installer disc > Follow    the instructions.
  4. Open your virtual machine using VMware player.
  5. Copy QTP folder to virtual machine in ‘ C ’ drive and install it.
  6. Select License option as Demo License and Click Next. All options are set by Default so just go on clicking Next till the set up finishes.
  7. Once the set up finishes Restart your virtual machine and open QTP from start menu .
           
Select Add ins that your application  require and Open New Blank test. 

On 13th day uninstall QTP and before reinstalling it clear all registry of QTP using QTP cleaner (a tool that clears all registry of QTP) or if you dont have the tools follow the below process.

QTP Re-Installation Guide
1. Uninstall QTP from control panel 
2. Restart the machine. 
3. From Registry - delete all reference of QTP and Mercury
    (Perform search for the entire regedit and delete)
open Run command and enter regedit 
4. Delete the keys from the HKEY_local_machine\Software
                                        CLSYSTEM                    
5. Delete Rainbow.SentinelLM from HKEY_CLASSES_ROOT 
6. Delete the following files from your system 
wlrun.ini,
mercury.ini,
sysprs7.dll,
clauth1.dll,
clauth2.dll,
lsprst7.dll,
lsprst7.tgz,
lservrc,
ssprs.dll,
ssprs.tgz,
tmpPrst.tgz,
sysprs7.tgz
 
(Some of the files might not be available in your system. Leave it and continue to next step)
 
7. Navigate to <install dir> and delete the folder. 
8. Restart the machine.
9. Re- Install QTP.

Note: If your QTP trial license is not expired than the trial period will get restored to complete 14 days. If you make the QTP license to expire by changing the system date than your QTP license will remain expired even after following the above steps.

Monday 21 January 2013

QTP Vs SELENIUM


QTP: -
Functional Testing Tool -QTP has the feature for storing screenshot of each and every page navigated during the execution. So it can be used as a proof for completion of testing, and also we can refer the screenshots of previous executions if there is any need to refer them. Test report can be automatically written to a customized report page which will ensure accuracy of the report and also it can improve look & feel of the report

Advantages of Using QTP

§User friendliness and less effort for script creation.
§Meets the needs of both technical and non-technical users.
§Advanced solution for functional test and regression test automation.
§Automation scripts are executed within specific interval of time using task scheduler/crone job.
§Many inbuilt functionalities by default and easy configuration.
§Excellent Object Identification process/mechanism.
§Easily integrated with test management tools like QC.

Disadvantages of QTP
In recent economic crisis, software companies are planning for cost reduction and efficient productivity. QTP is losing its market because of the following limitations:

§Runs only in Windows environments.
§Cannot test with all browser types and versions.
§Limited to smaller organizations/ testing teams.
§High licensing and add-inns costs.
§Slow in execution when compared with open source tools.

Selenium: -There are four variants of Selenium, which can be used in isolation or in combination to create complete automation suite for your web applications.

§Selenium IDE – Recording/Creating and enhancing scripts
§Selenium Remote Control (RC)– Executing scripts
§Selenium Web Driver (API) – Cross browser testing
§Selenium Grid – Cross platform testing

Advantages of Using Selenium:-

§Simple and powerful document object model (DOM) level testing, can be used for continuous integration with agile projects.
§Has great extensibility and flexibility, along with its tight integration with the browser unmatched by   available proprietary tools.
§Supports multiple browsers such as Internet Explorer, Fire fox, Safari or Opera on  Windows, Mac OS X and Linux.
§Wires Object Oriented Programming languages like JAVA, .NET, Ruby, Perl, PHP, etc.
§Provides the option of using wide range of IDEs such as Eclipse, Netbeans, Visual Studio etc depending on  the choice of development language.

Disadvantages of Selenium: -

§Supports only browser based application, not the windows application
§Does not support file uploads from local machine
§Provides only partial support for dialog boxes
§Being an open source, Selenium has no official technical support 

Comparison between Selenium and QTP is as follows:-


                FEATURES

              SELENIUM

                QTP

Cost

Open source & Portable

Licensed and very expensive; Ten user license costs approx. 60L

Application support

Web Applications only

Client server applications only (like built in TCL/TK and PowerBuilder)

Support for web browsers

Supports IE, Firefox, Safari and Opera

Supports IE & Firefox only

Object Oriented Language support & Scalability

Supports Java, .Net, Perl, PHP, Python, and Ruby

Supports VB script only

Support for operating system/platforms

Supports Windows PC/MAC/UNIX Platforms

Supports Windows Platform only

Support for Test management tool integration

Not available. Need to track separately

TD/QC will be easily integrated

Test Development Environment

We can use wide range of IDEs like Eclipse, Netbeans, Visual Studio etc

Need Separate environment

UI object management & Storage

Managed using UI-Element user extension and properties A set of dynamically loaded libraries that is stored in the Java archive file.

Built-in object repository and easy handling

Support for Dialog Boxes

Supports partially

Supports all kinds of dialog boxes

Support for File upload (system)

Not available

Supports all kinds of File upload


Conclusion:-
· Using Selenium as the Functional Test Automation Tool, you can reduce the cost incurred for licensing using QTP.
· The efforts involved in scripting for Selenium increased by about 15 % than QTP in the initial stages. Once all the solutions are in place the efforts of automation using Selenium and QTP were almost the same.

Automation Tools

Automation tools are broadly classified into three categories as follow:-
1.    Functional Testing Tools
      Eg.QTP, Selenium etc.
2.    Performance Testing Tools
      Eg. LoadRunner, WebLoad etc.
3.    Test Management Tools
      Eg.Quality Centre, Test Director etc.

Nowadays, companies/testers have multiple options to pick licensing or open source automation tools such as Quick Test Professional (QTP), selenium etc., based on their requirement.
 Licensed Tools: -  License is available through single-seat licenses, as well as floating or concurrent licenses and based on the Vendor.
  • Seat License: - These are node blocked or machine specific license. They can be installed only on machine for which it is generated.
  •  Floating or Concurrent License:-It is server based license. This license can be installed on machine only if the machine is registered on the server. They are session based i.e. applicable only when QTP or any tool is open on machine.
QTP, Win Runner, Test complete, Ranorex, QA Wizard Pro, Silk Test, Silk Performer, QA Test, QA Load, and Rational Robot.
·         Functional Testing Tool -QTP has the feature for storing screenshot of each and every page navigated during the execution. So it can be used as a proof for completion of testing, and also we can refer the screenshots of previous executions if there is any need to refer them. Test report can be automatically written to a customized report page which will ensure accuracy of the report and also it can improve look & feel of the report.

    Open Source Tools:-
  • Open source tools are typically created as a collaborative effort in which programmers improve upon the code and share the changes within the community, and are usually available at no charge under a license defined by the open source initiative. The tool can be downloaded at free of cost.
  • Open source tools are getting popular because of its integration and interaction, rapid debugging and development with flexibility at low cost by avoiding lock-in to one supplier.
  • There are lots of Open Source automation test tools available like Selenium, SOAP UI, Open STA, Robotium, WebDriver, WebInject, Arbiter, Jmeter, Junit, Nunit, etc.
  • Among these tools Selenium Functional Testing Tool is considered as a portable software testing framework, and one of the best tools available in the current market for web applications at free of cost.
  • The tests can be written as HTML tables or coded in a number of popular programming languages and can be run directly in most modern web browsers. Selenium can be deployed on Windows, Linux, and Macintosh. Selenium is used for UAT (User Acceptance Test).
     Some Web Functional and Regression Test Tools
  •      IeUnit :-IeUnit is an open-source simple framework to test logical behaviors of web pages, released under IBM's Common Public License. It helps users to create, organize and execute functional unit tests. Includes a test runner with GUI interface. Implemented in JavaScript for the Windows XP platform with Internet Explorer. 
  •      QEngine Web Test Studio :-Web functional test tool from AdventNet. Scripting uses Jython; records using page elements controls symbolically rather than with raw screen coordinate. Secure recording on password fields; data-driven Test wizard to fetch script data from external source; provision to add GUI, Database and File checkpoints and verify database tables, files, page titles and HTML element properties. Supports keyword-driven testing, built-in exception handling and reporting facility. Works with a variety of browsers and OS's. Free and professional versions available.
  •      AppPerfect DevSuite :- Suite of testing, tuning, and monitoring products from AppPefect Corp. that includes a web functional testing module. Records browser interaction by element instead of screen co-ordinates. Supports handling dynamic content created by JavaScript; supports ASP, JSP, HTML, cookies, SSL. For Windows and MSIE; integrates with a variety of IDE's. 
  •      JStudio SiteWalker : -Test tool from Jarsch Software Studio allows capture/replay recording; fail definitions can be specified for each step of the automated workflow via JavaScript. JavaScript's Document Object Model enables full access to all document elements. Test data from any database or Excel spreadsheet can be mapped to enter values automatically into HTML form controls. HTML-based test result reports can be generated. Shareware for Windows/MSIE. 
  •      Test Complete Enterprise
    Automated test tool from AutomatedQA Corp. includes web functional testing capabilities. Works with Internet Explorer. 
  •      QEngine :- Test tool from AdventNet enables functional testing of Web sites and Web-based applications. Record and playback capability; automatic recording of any Web browser events and translates into an Python editable scripts. Includes Script Editor, Application Map Editor to view and edit the map object properties. Supports multiple OS's and browsers. 
  •       actiWate :- Java-based Web application testing environment from Actimind Inc. Advanced framework for writing test scripts in Java (similar to open-source frameworks like HttpUnit, HtmlUnit etc. but with extended API), and Test Writing Assistant - Web browser plug-in module to assist the test writing process. Freeware. 
  •       KUMO Editor :-Toolset from Softmorning LTD for creation and editing of web macros and automated web tests. Includes syntax-coloring editor with intellisense, autocomplete, run-time debugging features. Macro recorder transforms any click to a C# directive. Page objects navigator allows browsing of hierarchy of web objects in a page. Enables creation of scenarios from spreadsheets; and loop, retry on error, robust handling of page modifications. Can export created .DLL and .EXE files to enable running web macros on demand and integration into other software frameworks. Multilingual for Asian, eastern and western European languages. 
  •       WebInject:- Open source tool in PERL for automated testing of web applications and services. Can be used to unit test any individual component with an HTTP interface (JSP, ASP, CGI, PHP, servlets, HTML forms, etc.) or it can be used to create a suite of HTTP level functional or regression tests.
  •        Site Test Center :-Functional and performance test tool from Alliance Software Engineering. Has an XML-based scripting capability to enable modifying captured scripts or creating new scripts. Utilizes a distributed testing model and consists of three parts: STC Administrator, STC Master and STC Master Service. 
  •       jWebUnit :-Open source Java framework that facilitates creation of acceptance tests for web applications. Provides a high-level API for navigating a web application combined with a set of assertions to verify the application's correctness including navigation via links, form entry and submission, validation of table contents, and other typical business web application features. Utilizes HttpUnit behind the scenes. The simple navigation methods and ready-to-use assertions allow for more rapid test creation than using only JUnit and HttpUnit. 
  •       SimpleTest :- Open source unit testing framework which aims to be a complete PHP developer test solution. Includes all of the typical functions that would be expected from JUnit and the PHPUnit ports, but also adds mock objects; has some JWebUnit functionality as well. This includes web page navigation, cookie testing and form submission. 
  •       WinTask :-Macro recorder from TaskWare, automates repetitive tasks for Web site testing (and standard Windows applications), with its HTML objects recognition. Includes capability to expand scope of macros by editing and adding loops, branching statements, etc. (300+ commands); ensure robustness of scripts with Synchronization commands. Includes a WinTask Scheduler.
  •       TestCaseMaker/Runner :-Test case document driven functional test tool for web applications from Agile Web Development. Maker creates test case documents, and Runner executes the test case document; test case documents are always synchronized with the application. Free including source code. 
  •       Canoo WebTest :-Free Java Open Source tool for automatic functional testing of web applications. XML-based test script code is editable with user's preferred XML editor; until recording capabilities are added, scripts have to be developed manually. Can group tests into a testsuite that again can be part of a bigger testsuite. Test results are reported in either plain text or XML format for later presentation via XSLT. Standard reporting XSLT stylesheets included, and can be adapted to any reporting style or requirements. 
  •       TestSmith :-Functional/Regression test tool from Quality Forge. Includes an Intelligent, HTML/DOM-Aware and Object Mode Recording Engine, and a Data-Driven, Adaptable and Multi-Threaded Playback Engine. Handles Applets, Flash, Active-X controls, animated bitmaps, etc. Controls are recorded as individual objects independent of screen positions or resolution; playback window/size can be different than in capture. Special validation points, such as bitmap or text matching, can be inserted during a recording, but all recorded items are validated and logged 'on the fly'. Fuzzy matching capabilities. Editable scripts can be recorded in SmithSript language or in Java, C++ or C++/MFC. 90-day evaluation copy available. 
  •       TestAgent :-Capture/playback tool for user acceptance testing from Strenuus, LLC. Key features besides capture/playback include automatically detecting and capturing standard and custom content errors. Reports information needed to troubleshoot problems. Enables 'Persistent Acceptance Testing' that activates tests each time a web application is used. 
  •       MITS.GUI :-Unique test automation tool from Omsphere LLC; has an intelligent state machine engine that makes real-time decisions for navigating through the GUI portion of an application. It can test thousands of test scenarios without use of any scripts. Allows creation of completely new test scenarios without ever having performed that test before, all without changing tool, testware architecture (object names, screen names, etc), or logic associated with the engine. Testers enter test data into a spreadsheet used to populate objects that appear for the particular test scenario defined.
  •       Badboy :-Tool from Bradley Software to aid in building and testing dynamic web based applications. Combines sophisticated capture/replay ability with performance testing and regression features. Free for most uses; source code avalable. 
  •       SAMIE :-Free tool designed for QA engineers - 'Simple Automated Module For Internet Explorer'. Perl module that allows a user to automate use of IE via Perl scripts; Written in ActivePerl, allowing inheritance of all Perl functionality including regular expressions, Perl dbi database access, many Perl cpan library functions. Uses IE's built in COM object which provides a reference to the DOM for each browser window or frame. Easy development and maintenance - no need to keep track of GUI maps for each window. For Windows. 
  •       PAMIE :-Free open-source 'Python Automated Module For Internet Explorer' Allows control of an instance of MSIE and access to it's methods though OLE automation . Utilizes Collections, Methods, Events and Properties exposed by the DHTML Object Model. 
  •       PureTest :-Free tool from Minq Software AB, includes an HTTP Recorder and Web Crawler. Create scenarios using the point and click interface. Includes a scenario debugger including single step, break points and response introspection. Supports HTTPS/SSL, dynamic Web applications, data driven scenarios, and parsing of response codes or parsing page content for expected or unexpected strings. Includes a Task API for building custom test tasks. The Web Crawler is useful for verifying consistency of a static web structure, reporting various metrics, broken links and the structure of the crawled web. Multi-platform - written in Java. 
  •       Solex :-Web application testing tool built as a plug-in for the Eclipse IDE (an open, extensible IDE). Records HTTP messages by acting as a Web proxy; recorded sessions can be saved as XML and reopened later. HTTP requests and responses are fully displayed in order to inspect and customize their content. Allows the attachment of extraction or replacement rules to any HTTP message content, and assertions to responses in order to validate a scenario during its playback. 
  •       QA Wizard :-Automated functional web test tool from Seapine Software. Advanced object binding reduces script changes when Web-based apps change. Next-generation scripting language eliminates problems created by syntax or other language errors. Includes capability for automated scripting, allowing creation of more scripts in less time. Supports unlimited set of ODBC-compatible data sources as well as MS Excel, tab/comma delimited file formats, and more. Free Demo and Test Script available. For Windows platforms. 
  •       HTTP-WebTest :-A Perl module which runs tests on remote URLs or local Web files containing Perl/JSP/HTML/JavaScript/etc., and generates a detailed test report. This module can be used "as-is" or its functionality can be extended using plugins. Plugins can define test types and provide additional report capabilities. This module comes with a set of default plugins, but can be easily extended with third-party plugins. Open-source project maintained by Ilya Martynov. 
  •       HttpUnit :-Open source Java program for accessing web sites without a browser, from SourceForge.net/Open Source Development Network, designed and implemented by Russell Gold. Ideally suited for automated unit testing of web sites when combined with a Java unit test framework such as JUnit. Emulates the relevant portions of browser behavior, including form submission, basic http authentication, cookies and automatic page redirection, and allows Java test code to examine returned pages as text, an XML DOM, or containers of forms, tables, and links. Includes ServletUnit to test servlets without a servlet container. 
  •       iOpus Internet Macros :-Macro recorder utility from iOpus Inc. automates repetitious aspects of web site testing. Records any combination of browsing, form filling, clicking, script testing and information gathering; assists user during the recording with visual feedback. Power users can manually edit a recorded macro. A command line interface allows for easy integration with other test software. Works by remote controlling the browser, thus automatically supports advanced features such as SSL, HTTP-Redirects and cookies. Can handle data input from text files, databases, or XML. Can extract web data and save as CSV file or process the data via a script. For Windows and MSIE. 
  •       MaxQ :-Free open-source web functional testing tool from Tigris.org, written in Java. Works as a proxy server; includes an HTTP proxy recorder to automate test script generation, and a mechanism for playing tests back from the GUI and command line. Jython is used as the scripting language, and JUnit is used as the testing library. 
  •       TestWeb :-Test tool from Original Software Group Ltd. utilizes a new approach to recording/playback of web browser scripts. It analyses the underlying intentions of the script and executes it by direct communication with web page elements. IntelliScripting logic removes the reliance on specific browser window sizes, component location and mouse movements for accurate replay, for easier script maintenance; supports hyperlinks targeted at new instances of browser. Playback can run in background while other tasks are performed on the same machine. 
  •       Compuware TestPartner :-Automated software testing tool from Compuware designed specifically to validate Windows, Java, and web-based applications. The 'TestPartner Visual Navigator' can create visual-based tests, or MS VBA can be used for customized scripting. 
  •       WebKing :-Web site functional, load, and static analysis test suite from ParaSoft. Maps and tests all possible paths through a dynamic site; can enforce over 200 HTML, CSS, JavaScript, 508 compliance, WML and XHTML coding standards or customized standards. Allows creation of rules for automatic monitoring of dynamic page content. Can run load tests based on the tool's analysis of web server log files. For Windows, Linux, Solaris. 
  •       eValid :-Web test tool from Software Research, Inc that uses a 'Test Enabled Web Browser' test engine that provides browser-based client side quality checking, dynamic testing, content validation, page performance tuning, and webserver load and capacity analysis. Utilizes multiple validation methods.
  •       Rational Functional Tester :-IBM's (formerly Rational's) automated tool for testing of Java, .NET, and web-based applications. Enables data-driven testing, choice of scripting languages and editors. For Windows and Linux. 
  •       e-Test Suite :-Integrated functional/regression test tool from Empirix for web applications and services and .NET and J2EE applications; includes site monitoring and load testing capabilities, and record/playback, scripting language, test process management capabilities. Includes full VBA script development environment and options such as javascript, C++, etc. DOM-based testing and validation; 'Data Bank Wizard' simplifies creation of data-driven tests. Evaluation version available.
  •       QuickTest Pro :-Functional/regression test tool from Mercury; includes support for testing Web, Java, ERP, etc. 
  •       Winrunner :-Functional/regression test tool from Mercury; includes support for testing Web, Java, ERP, etc. 
  •       Compuware's QARun :-QARun for functional/regression testing of web, Java, and other applications. Handles ActiveX, HTML, DHTML, XML, Java beans, and more. 
  •       SilkTest :-Functional test tool from Segue for Web, Java or traditional client/server-based applications. Features include: test creation and customization, test planning and management, direct database access and validation, recovery system for unattended testing, and IDE for developing, editing, compiling, running, and debugging scripts, test plans, etc. 

Automation Frameworks


A framework is an integrated system or an infrastructure that sets the rules of automation of a specific product. This system integrates the function libraries, test data sources, object details and various reusable modules. These components act as small building blocks which need to be assembled to represent a business process. The framework provides the basis of test automation and simplifies the automation effort.Lets discuss types of frameworks in automation.

  Linear Framework :-

  • The capture/playback approach means that tests are performed manually while the inputs and outputs are captured in the background.
  • During subsequent automated playback, the script repeats the same sequence of actions to apply the inputs and compare the actual responses to the captured results; differences are reported as errors.
  • Capture/playback is available from almost all automated test tools, although it may be implemented differently.












Advantages:-
  •  The main advantage of this approach is that it requires the least training and setup time. The Learning curve is relatively short, even for non technical test operators.
  • Tests need not be developed in advance, as they can be defined on the fly by the test operator. This allows experienced users to contribute to the test process on an ad hoc basis.
  • This approach also provides an excellent audit trail for ad hoc or usability testing; in the event an error occurs, the precise steps that created it are captured for later diagnosis or reproduction
Disadvantages:-There are, however, several disadvantages of capture/playback, many of which have led to more advanced and sophisticated test tools, such as scripting languages.

  •    Except for reproducing errors, this approach offers very little leverage in the short term; since the tests must be performed manually in order to be captured, there is no real leverage or time savings. In the example shown, the entire sequence of steps must repeated for each account to be added, updated or deleted.
  • Also, because the application must already exist and be stable enough for manual testing, there is little opportunity for early detection of errors; any test that uncovers an error will most likely have to be recaptured after the fix in order to preserve the correct result.
  • Unless an overall strategy exists for how the functions to be tested will be distributed across the test team, the probability of redundancy and/or omission is high: each individual tester will decide what to test, resulting in some areas being repeated and others ignored. Assuring efficient coverage means you must plan for traceability of the test scripts to functions of the application so you will know what has been tested and what hasn't.
  • It is also necessary to give overall consideration to what will happen when the tests are combined; this means you must consider naming conventions and script development standards to avoid the risk of overwriting tests or the complications of trying to execute them as a set.
  • Although subsequent replay of the tests may offer time savings for future releases, this benefit is greatly curtailed by the lack of maintainability of the test scripts. Because the inputs and outputs are hard-coded into the scripts, relatively minor changes to the application may invalidate large groups of test scripts. For example, changing the number or sequence of controls in a window will impact any test script that traverses it, so a window which has one hundred test transactions executed against it would require one hundred or more modifications for a single change.
  • This issue is exacerbated by the fact that the test developer will probably require additional training in the test tool in order to be able to locate and implement necessary modifications. Although it may not be necessary to know the script language to capture a test, it is crucial to understand the language when making changes. As a result, the reality is that it is easier to discard and recapture scripts, which leads to a short useful life and a lack of cumulative test coverage.
  • Note also that there is no logic in the script to be sure that the expected window is in fact displayed, or that the cursor or mouse is correctly positioned before input occurs - all the decisions about what to do next are made by the operator at the time of capture and are not explicit in the script. This lack of any decision-making logic in the scripts means that any failure, regardless of its true severity, may abort the test execution session and/or invalidate all subsequent test results. If the application does not behave precisely as it did when the test was captured, the odds are high that all following tests will fail because of an improper context, resulting in many duplicate or false failures which require time and effort to review.
 Data Driven Framework :-

  •    The difference between classic capture/playback and Data-Driven is that in the former case the inputs and outputs are fixed, while in the latter the inputs and outputs are variable.
  •    This is accomplished by performing the test manually, then replacing the captured inputs and expected outputs with variables whose corresponding values are stored in data files external to the script.
  •    The sequence of actions remain fixed and stored in the test script. Data-Driven is available from most test tools that employ a script language with variable data capability, but may not be possible with pure capture/playback tools.




Advantages:-
  • Data-Driven allows test cases - the inputs and expected outputs – to be created in advance of the application. The software does not have to be stable enough to operate before test cases can be prepared as data files; only the actual script has to await the application.
  • Because they are stored as data, the sets of inputs and outputs can be entered through a spreadsheet, word processor, database or other familiar utility, then stored for later use by the test script.
  • Familiarity with, or even use of, the test tool is not required for test cases.Data-Driven provides leverage in the sense that a single test script can be used to apply many test cases, and test cases can be added later without modifications to the test script. Notice that the example script could be used to enter one or one thousand different accounts, while the capture/playback script enters only one. Cut and paste facilities of the selected utility can be used to rapidly “clone” and modify test cases, providing leverage.
  • This approach reduces required maintenance by not repeating the sequence of actions and logic to apply each test case; therefore, should the steps to enter an account change, they would have to be changed only one time, instead of once for each account.
Disadvantages:- Requirement of  additional expertise in the test tool and in data file management is the main disadvantage of this framework.
  • In order to convert the script to process variable data, at least one of the testers must be proficient in the test tool and understand the concept of variable values, how to implement external data files, and programming logic such as if/then/else expressions and processing loops.
  • Similarly, the test case data will require someone with expertise in creating and managing the test files; large numbers of data elements in a test case may lead to long, unwieldy test case records and awkward file management. Depending on the utility used, this may require expertise in creating and manipulating spreadsheet macros, database forms or word processor templates, then exporting the data into a file compatible with the test tool.
Keyword/ Table Driven Framework:-

  • Table-Driven differs from Data-Driven in the sequence of actions to apply and evaluate the inputs and outputs are also stored external to the script.This means that the test does not have to be performed manually at all. The inputs and expected outputs, as well as the sequence of actions, are created as data records; the test scripts are modular, reusable routines that are executed in a sequence based on the test data.
  • The logic to process these records and respond to application results is embedded in these routines.Also, these script routines are reusable across applications. They are completely generic in that they are based on the type of field or object and the action to be performed. The exact instance of the field or object is defined in the Application Map and is provided to the routine when the test executes.
  • A keyword in its simplest form is an aggregation of one or more atomic test steps. The keyword-driven testing methodology divides test creation into two stages:-
  • Planning Stage :- Preparing the test resources and testing tools.
  • Implementation Stage:- The implementation stage differs depending on the tool or framework. Often, automation engineers implement a framework that provides keywords like “check” and “enter”.Testers or test designers (who do not need to know how to program) write test cases based on the keywords defined in the planning stage that have been implemented by the engineers. The test is executed using a driver that reads the keywords and executes the corresponding code.Other methodologies use an all-in-one implementation stage. Instead of separating the tasks of test design and test engineering, the test design is the test automation. Keywords, such as “edit” or “check” are created using tools in which the necessary code has already been written. This removes the necessity for extra engineers in the test process, because the implementation for the keywords is already a part of the tool. Examples include GUIdancer and QTP.



                                      
Advantages:-
  • The main advantage to this approach is that it provides the maximum maintainability and flexibility.
  • Test cases can be constructed much earlier in the development cycle, and can be developed as data files through utilities such as spreadsheets, word processors, databases, and so forth. The elements of the test cases, can be easily modified and extended as the application itself becomes more and more defined. The scripts that process the data can be created as soon as the objects.
  • By constructing the test script library out of modular, reusable routines, maintenance is minimized. The script routines need not be modified unless a new type of object is added that supports different methods; adding new windows or controls simply requires additions to the tool’s variable file or GUI map, where the objects are defined.
  • Another key advantage of Table-Driven is that the test library can be easily ported from one application to another. Since most applications are composed of the same basic components - screens, fields and keys for character-based applications; windows and controls for graphical applications - all that is needed to move from one to another is to change the names and attributes of the components. Most of the logic and common routines can be left intact.
  • This approach is also portable between test tools. As long as the underlying script language has the equivalent set of commands, test cases in this format could be executed by a script library created in any tool. This means you are free to use different tools for different platforms if necessary, or to migrate to another tool.
  • Because logic is defined and stored only once per method, and there is substantial implied logic for verifying the context and state of the application to assure proper playback, individual testers may create test cases without understanding logic or programming. All that is needed is an understanding of the application components, their names, and the valid methods and values which apply to them.

Disadvantages: - 
  • In Table-Driven approach the amount of training and setup time required to implement it is high. 
  • In order to properly design and construct the script library, extensive programming skills and test tool expertise are needed. Programming skills are needed to implement a library of modular scripts and the surrounding logic that ties them together and uses external data to drive them.
  • Because all test assets are maintained as data, it is essential to have a means of enforcing conventions and managing the data. While this can be done in spreadsheets, a database is far more powerful.

Hybrid Framework:- 
  • The hybrid framework is what most frameworks evolve into over time and multiple projects.
  • The most successful automation frameworks generally accommodate both keyword and data driven frameworks.
  • This allows data driven scripts to take advantage of the powerful libraries and utilities that usually accompany a keyword driven architecture.
  • The framework utilities can make the data driven scripts more compact and less prone to failure than they otherwise would have been. The utilities can also facilitate the gradual and manageable conversion of existing scripts to keyword driven equivalents when and where that appears desirable.
  • On the other hand, the framework can use scripts to perform some tasks that might be too difficult to re-implement in a pure keyword driven approach, or where the keyword driven capabilities are not yet in place.
Modular Framework:-
  • The test script modularity framework requires the creation of small, independent scripts that represent modules, sections, and functions of the application-under-test.
  • These small scripts are then used in a hierarchical fashion to construct larger tests, realizing a particular test case.
  • Of all the frameworks, this one should be the simplest to grasp and master. It is a well-known programming strategy to build an abstraction layer in front of a component to hide the component from the rest of the application.
  • This insulates the application from modifications in the component and provides modularity in the application design. The test script modularity framework applies this principle of abstraction or encapsulation in order to improve the maintainability and scalability of automated test suites.