CSC/ECE 517 Fall 2014/ch1a 22 as: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''HP Unified Functional Testing Professional'''
'''HP Unified Functional Testing Professional'''


HP Unified Functional Testing (UFT) software, formerly known as HP Quick Test Professional (QTP),<ref>http://www.automationrepository.com/2012/12/hp-unified-functional-testing-uft-11-5-new-features</ref> provides [http://en.wikipedia.org/wiki/Functional_testing functional testing] and [http://en.wikipedia.org/wiki/Regression_testing regression testing] automation for software applications and environments.<ref>http://www8.hp.com/us/en/software-solutions/application-lifecycle-management-application-test-software/index.html?zn=bto&cp=1-11-127-24^1352_4000_1__</ref> HP Unified Functional Testing can be used for enterprise [http://en.wikipedia.org/wiki/Quality_assurance quality assurance].<ref>http://www.learnqtp.com/qtp-quality-center-test-director-guide/</ref> HP Unified Functional Testing is a test automation tool originally developed by [http://en.wikipedia.org/wiki/Mercury_Interactive Mercury Interactive] and later acquired by [http://en.wikipedia.org/wiki/Hewlett-Packard Hewlett Packard].<ref> http://www.devbistro.com/articles/Testing/Mercury-QuickTest-Professional-Evaluation</ref>  HP Unified Functional Testing 11.5 combined HP QuickTest Professional and HP Service Test into a single software package,<ref> http://selftechy.com/2013/10/07/hp-uft-11-50-unified-functional-testing</ref> which is currently available from the HP Software Division. The integrated HP Unified Functional Testing software allows developers to test from a single console all three layers of a program’s operations: the interface, [http://en.wikipedia.org/wiki/Service_layer the service layer] and the database layer.<ref>http://www.computerworld.com/article/2493313/data-center/hp-simplifies-automated-software-testing-suite.html</ref>
''"'''HP Unified Functional Testing (UFT)''' software, previously known as '''HP Quick Test Professional (QTP)''',<ref>http://www.automationrepository.com/2012/12/hp-unified-functional-testing-uft-11-5-new-features</ref> provides [http://en.wikipedia.org/wiki/Functional_testing functional testing] and [http://en.wikipedia.org/wiki/Regression_testing regression testing] automation for software applications.<ref>http://www8.hp.com/us/en/software-solutions/application-lifecycle-management-application-test-software/index.html?zn=bto&cp=1-11-127-24^1352_4000_1__</ref> HP Unified Functional Testing can be used for enterprise [http://en.wikipedia.org/wiki/Quality_assurance quality assurance].<ref>http://www.learnqtp.com/qtp-quality-center-test-director-guide/</ref>"'' HP Unified Functional Testing is a test automation tool originally developed by [http://en.wikipedia.org/wiki/Mercury_Interactive Mercury Interactive] and later acquired by [http://en.wikipedia.org/wiki/Hewlett-Packard Hewlett Packard].<ref> http://www.devbistro.com/articles/Testing/Mercury-QuickTest-Professional-Evaluation</ref>  HP Unified Functional Testing 11.5 combined HP QuickTest Professional and HP Service Test into a single software package,<ref> http://selftechy.com/2013/10/07/hp-uft-11-50-unified-functional-testing</ref> which is currently available from the HP Software Division. The integrated HP Unified Functional Testing software allows developers to test from a single console all three layers of a program’s operations: the interface, [http://en.wikipedia.org/wiki/Service_layer the service layer] and the database layer.<ref>http://www.computerworld.com/article/2493313/data-center/hp-simplifies-automated-software-testing-suite.html</ref>


[https://docs.google.com/document/d/1eq3XHiUUBIrEBx-R2Mgolaw7HttSgzPniwDLEF5oVk0/edit# Writeup page.]
[https://docs.google.com/document/d/1eq3XHiUUBIrEBx-R2Mgolaw7HttSgzPniwDLEF5oVk0/edit# Writeup page.]
Line 19: Line 19:


=='''Background'''==
=='''Background'''==
Test automation is the use of software to control the execution of tests, the comparison of actual outcomes to predicted outcomes, the setting up of test preconditions, and other test control and test reporting functions.<ref>''The Testing Network, An Integral Approach to Test Activities in Large Software Projects'' by Jean-Jacques Pierre Henry (Aug 17, 2008), p413, ISBN 978-3-540-78504-0</ref> Test Automation is a development discipline as it uses scripting languages to instruct the tool how to interact with your application. As such careful consideration needs to be paid to
Test automation is the use of software to control the execution of tests cases, the comparison of actual to predicted results, the setting up of test preconditions, and other test control and test reporting functions.<ref>''The Testing Network, An Integral Approach to Test Activities in Large Software Projects'' by Jean-Jacques Pierre Henry (Aug 17, 2008), p413, ISBN 978-3-540-78504-0</ref> Test Automation is a development discipline as it uses scripting languages to instruct the tool how to interact with your application. As such careful consideration needs to be paid to


* Exception handling for bugs that occur during testing cycles(i.e, unexpected error messages during a test run).
* Exception handling for bugs that occur during testing cycles(i.e, unexpected error messages during a test run).
Line 36: Line 36:


=='''Description'''==
=='''Description'''==
Although HP UFT is usually used for UI based Test Case Automation, it can also automate some non-UI based test cases like database testing, webservice testing and file based operations. It offers a graphical user interface, keyboard support, multiple testing views, and scripting language.  
HP UFT is generally used for GUI based Test Case Automation, it can also automate some non-GUI based test cases like database testing, webservice testing and file based operations. It offers a graphical user interface, keyboard support, multiple testing views, and scripting language.  
<ref>http://www.softwaretestinghelp.com/qtp-quicktest-professional-tutorial-1/</ref>
<ref>http://www.softwaretestinghelp.com/qtp-quicktest-professional-tutorial-1/</ref>
===Data Driven Testing===
===Data Driven Testing===
HP Unified Functional Testing supports data-driven testing. For example, data can be output to a data table for reuse elsewhere. [http://en.wikipedia.org/wiki/Data-driven_testing Data-driven testing] is implemented as a Microsoft Excel workbook that can be accessed from HP Unified Functional Testing. HP Unified Functional Testing has two types of data tables: the Global data sheet and Action (local) data sheets. The test steps can read data from these data tables in order to drive variable data into the application under test, and verify the expected result.<ref>http://www.qtp10.com/2009/07/using-global-and-action-data-sheets-in.html</ref>
HP Unified Functional Testing allows us to perform data-driven testing. For example, data can be output to a data table for reuse. [http://en.wikipedia.org/wiki/Data-driven_testing Data-driven testing] is implemented as a Microsoft Excel workbook, which is accessible from HP Unified Functional Testing. HP Unified Functional Testing has two data tables: the Global data sheet and Action (local) data sheets. The test steps can read data from these data tables in order to drive variable data into the application under test, and verify the expected result.<ref>http://www.qtp10.com/2009/07/using-global-and-action-data-sheets-in.html</ref>


===Views===
===Views===
Line 53: Line 53:
HP UFT's VBScript allows for classes, but not other object oriented properties such as inheritance and polymorphism. It also lacks a debugger, however UFT has a debugger provided by HP. Some Windows script ([http://en.wikipedia.org/wiki/Windows_Script_Host WScript],[http://en.wikipedia.org/wiki/WSH WSH],[http://en.wikipedia.org/wiki/Wmii WMI]) & [http://en.wikipedia.org/wiki/Visual_Basic_.NET VB.Net] code can be used in a script in the expert view  <ref>https://h20546.www2.hp.com/main/training/course_details.cfm?Course=00008165&sitepick=US</ref>
HP UFT's VBScript allows for classes, but not other object oriented properties such as inheritance and polymorphism. It also lacks a debugger, however UFT has a debugger provided by HP. Some Windows script ([http://en.wikipedia.org/wiki/Windows_Script_Host WScript],[http://en.wikipedia.org/wiki/WSH WSH],[http://en.wikipedia.org/wiki/Wmii WMI]) & [http://en.wikipedia.org/wiki/Visual_Basic_.NET VB.Net] code can be used in a script in the expert view  <ref>https://h20546.www2.hp.com/main/training/course_details.cfm?Course=00008165&sitepick=US</ref>


===Types of testing===
UFT typically supports following types of testing:
1. Regression testing
2. Unit testing
3. Load testing
4. Integration testing
5. Functional testing
6. Regression testing
7. Acceptance testing
8. Performance testing
9. Stress testing
Further reading on [http://www.softwaretestinghelp.com/types-of-software-testing/ testing types]
===Example===
QTP script for opening a Notepad file<ref>http://kuldeepse.wordpress.com/2007/11/11/qtp-script-for-sending-a-mail-using-outlook/</ref>.
<pre>invokeapplication”c:/whatever the path”
Run
Dim a
Set a = WScript.CreateObject (“WSCript.shell”)
a.run “notepad.exe”
Dim oShell
Set oShell = CreateObject (“WSCript.shell”)
oShell.run “cmd/notepad.exe”
Set oShell = Nothing
DsystemUtil.Run “Notepad.exe”
</pre>
===Exception handling===
===Exception handling===
Application crashes, Unexpected events and errors during a run session can disrupt the run session and distort results. This is a problem particularly when tests run unattended—the test pauses until one performs the operation needed to recover. To handle such situations, Error and Exception Handling is must while developing script or Automation Framework.<ref>http://qtpautomationcodes.blogspot.com/2013/05/error-handling-in-qtp.html</ref>
Application crashes, Unexpected events and errors during a run session can interrupt the run session and mislead results. This is a problem particularly when tests run unattended—the test pauses until one performs the operation needed to recover. To handle these situations, Exception Handling and Error handling is must while developing script or Automation Framework.<ref>http://qtpautomationcodes.blogspot.com/2013/05/error-handling-in-qtp.html</ref>
Error and Exception handling in HP UFT can be done by the following ways:
Error and Exception handling in HP UFT can be done by any of the following ways:


* Conditional Statement  
* [http://www.softwaretestinghelp.com/conditional-loop-statements-qtp-tutorial-4/ Conditional Statement]
* On Error statement
* [http://www.tutorialspoint.com/qtp/qtp_error_handling.htm On Error statement]
* Recovery Scenarios
* [http://www.tutorialspoint.com/qtp/qtp_recovery_scenarios.htm Recovery Scenarios]


=='''Life Cycle'''==
=='''Life Cycle'''==
A typical [http://www.learnqtp.com/forums/Thread-Automation-Life-Cycle life cycle] of HP UFT looks like this.
[[File:LifeCycle.jpg‎]]
[[File:LifeCycle.jpg‎]]


=='''Comparison to other tools'''==
=='''Comparison to other tools'''==
Tools such as [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber] and [https://rubygems.org/gems/capybara Capybara] run tests from the perspective of the user. Cucumber converts user stories into tests and Capybara simulates a user or web browser. Unified Functional Testing is used by programmers to preform specific test cases they code themselves.<ref>''Engineering Long-Lasting Software: An Agile Approach Using SaaS and Cloud Computing'', Beta Edition 0.9.0 by Armando Fox and David Patterson, August 23, 2012, p136, </ref>
Tools like [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber] and [http://rubygems.org/gems/capybara Capybara] run tests from the viewpoint of the user. Cucumber translates user stories into tests and Capybara simulates a user or web browser. Unified Functional Testing is used by programmers to preform specific test cases they code themselves.<ref>''Engineering Long-Lasting Software: An Agile Approach Using SaaS and Cloud Computing'', Beta Edition 0.9.0 by Armando Fox and David Patterson, August 23, 2012, p136, </ref>


'''Capybara''' interacts with a website the way a human would (like visiting a url, clicking a link, typing text into a form and submitting it). It is used to emulate a user's flow through a website. Test cases in Capybara will look like this:<ref>http://stackoverflow.com/questions/15004918/cucumber-vs-capybara</ref>
'''Capybara''' talks to a website, just like a human would do (example: visit a url, click on the specific area of the sceen, input data and submit the form). It imitates user flow over website. Test cases in Capybara will look like this:<ref>http://stackoverflow.com/questions/15004918/cucumber-vs-capybara</ref>
<pre>
<pre>
describe "the signup process", :type => :feature do
describe "the signup process", :type => :feature do
Line 84: Line 124:
end</pre>
end</pre>


'''Cucumber''' writes human-readable tests that are mapped onto code. With it, you can rewrite the above example like this:<ref>http://stackoverflow.com/questions/15004918/cucumber-vs-capybara</ref>
'''Cucumber''' tests are very much human readable. Example:<ref>http://stackoverflow.com/questions/15004918/cucumber-vs-capybara</ref>


<pre>
<pre>
Line 95: Line 135:
[http://en.wikipedia.org/wiki/Selenium Selenium] is a tool for automating web applications for testing purposes.
[http://en.wikipedia.org/wiki/Selenium Selenium] is a tool for automating web applications for testing purposes.


'''Comparison of UFT with other tools'''<ref>http://www.aspiresys.com/WhitePapers/QTPvsSelenium.pdf</ref>
'''Comparison of UFT with other tools'''<ref>http://www.aspiresys.com/WhitePapers/QTPvsSelenium.pdf</ref><ref>http://www.qtphelp.com/2011/06/advantages-and-disadvantages-of-qtp.html</ref>
{| border="1" class="wikitable"
{| border="1" class="wikitable"
|+  
|+  
Line 134: Line 174:
different pieces of framework
different pieces of framework
|Requires minimal use of Ruby programming
|Requires minimal use of Ruby programming
|-
!Script written in
|VBScript
|Java, Ruby, Python, C#, and PHP
|Ruby
|-
|-
!Script Creation Time
!Script Creation Time
Line 139: Line 184:
|High
|High
|Medium
|Medium
|-
|-
!Multiple threads/instances
|Not supported
|Supported, we can run multiple instances of the
application on different browsers at the same time
|Supported, we can run multiple instances of the
application on different browsers at the same time
|-
|-
!Hardware resource (CPU  
!Hardware resource (CPU  
Line 154: Line 207:
|-
|-
!Framework
!Framework
|Easily integrated with HP Quality  
|Easily integrated with [http://en.wikipedia.org/wiki/HP_Quality_Center HP Quality Center] or [http://en.wikipedia.org/wiki/HP_Application_Lifecycle_Management HP ALM]
Center or [http://en.wikipedia.org/wiki/HP_Application_Lifecycle_Management HP ALM]
|Selenium + Eclipse + [http://en.wikipedia.org/wiki/MAVEN Maven] / [http://en.wikipedia.org/wiki/Apache_Ant ANT]
|Selenium + Eclipse + Maven / ANT  
+[http://en.wikipedia.org/wiki/Jenkins_(software) Jenkins] / [http://en.wikipedia.org/wiki/Hudson_(software) Hudson] & its plugins /  
+ Jenkins / Hudson & its plugins /  
Cruise Control + [http://en.wikipedia.org/wiki/TestNG TestNG] + [http://en.wikipedia.org/wiki/Apache_Subversion SVN]
Cruise Control + TestNG + SVN
|Ruby on Rails
|Ruby on Rails
Merb
[http://en.wikipedia.org/wiki/Merb Merb]
Sinatra
 
[http://en.wikipedia.org/wiki/Sinatra_(software) Sinatra]
|-
|-
!Continuous Integration
!Continuous Integration
Line 168: Line 221:
|Possible through Jenkins / Hudson  
|Possible through Jenkins / Hudson  
/ Cruise Control
/ Cruise Control
|Possible through Rake, Ant, Maven and JUnit output
|Possible through Rake, Ant, Maven and [http://en.wikipedia.org/wiki/JUnit JUnit] output
|}
|}
=='''Advantages'''==
1. Support for different addins like Java, Oracle, SAP, .NET, Web Forms, Siebel, PeopleSoft, Web services, Main frame (Terminal Emulator) etc.
2. UFT comes with an inbuilt IDE
3. UFT can be integrated with Test management tools like QC (Quality Center)
4. Easy to maintain test iterations and data driving the tests through configurations
5.''' Record and Playback:''' It is pretty easy even for a non-programmer to record scripts / test cases, customize / modify and play back the tests


=='''Disadvantages'''==
=='''Disadvantages'''==
UFT market is shrinking slowly.<ref>http://www.quora.com/Is-there-demand-for-QTP</ref> It is being used more in legacy application and tools like Selenium, Cucumber and Capybara are becoming more popular.
UFT popularity is slowly shrinking.<ref>http://www.quora.com/Is-there-demand-for-QTP</ref> It is being used more for legacy applications.
 
One of the main reason that we move from UFT is that it is a reactive approach of writing test automation. The product is finished and the tester starts writing the automation test. Only the tester writes the automation. With cucumber and selenium, writing automation test is a joint effort between the developers and the testers. The testers write the test cases in cucumber scenario format, then the developers write the steps definition. This way, everyone is contributing and everyone is reviewing the test cases. Cucumber code is readable and easy to understand.<ref>http://qastuffs.blogspot.com/2010_12_01_archive.html</ref>


Unified Functional Testing is developed mainly for Windows based systems and it relies on outdated Windows tools like VBXScript. Tests can not be run outside of the UFT environment nor are they compatible with all browser types.<ref>http://www8.hp.com/us/en/software-solutions/unified-functional-testing-automated-testing/demos-documents.html#!&pd1=1</ref>
People are moving away from UFT because of it's reactive approach of writing test automation. Testers write the scripts. With cucumber, capybara and selenium, automation test are joint effort between developers and the testers. The testers write the test cases in cucumber scenario format, then the developers write the steps definition. This way, everyone is contributing and everyone is reviewing the test cases.<ref>http://qastuffs.blogspot.com/2010_12_01_archive.html</ref>


=='''References'''==
=='''References'''==
<references/>
<references/>

Latest revision as of 09:45, 25 September 2014

HP Unified Functional Testing Professional

"HP Unified Functional Testing (UFT) software, previously known as HP Quick Test Professional (QTP),<ref>http://www.automationrepository.com/2012/12/hp-unified-functional-testing-uft-11-5-new-features</ref> provides functional testing and regression testing automation for software applications.<ref>http://www8.hp.com/us/en/software-solutions/application-lifecycle-management-application-test-software/index.html?zn=bto&cp=1-11-127-24^1352_4000_1__</ref> HP Unified Functional Testing can be used for enterprise quality assurance.<ref>http://www.learnqtp.com/qtp-quality-center-test-director-guide/</ref>" HP Unified Functional Testing is a test automation tool originally developed by Mercury Interactive and later acquired by Hewlett Packard.<ref> http://www.devbistro.com/articles/Testing/Mercury-QuickTest-Professional-Evaluation</ref> HP Unified Functional Testing 11.5 combined HP QuickTest Professional and HP Service Test into a single software package,<ref> http://selftechy.com/2013/10/07/hp-uft-11-50-unified-functional-testing</ref> which is currently available from the HP Software Division. The integrated HP Unified Functional Testing software allows developers to test from a single console all three layers of a program’s operations: the interface, the service layer and the database layer.<ref>http://www.computerworld.com/article/2493313/data-center/hp-simplifies-automated-software-testing-suite.html</ref>

Writeup page.

HP Uniffied Functional Testing<ref>http://en.wikipedia.org/wiki/HP_QuickTest_Professional</ref>
Developer(s) HP, HP Software Division
Stable release 12.01
Operating system Microsoft Windows
Type Test automation tools
License Proprietary

Background

Test automation is the use of software to control the execution of tests cases, the comparison of actual to predicted results, the setting up of test preconditions, and other test control and test reporting functions.<ref>The Testing Network, An Integral Approach to Test Activities in Large Software Projects by Jean-Jacques Pierre Henry (Aug 17, 2008), p413, ISBN 978-3-540-78504-0</ref> Test Automation is a development discipline as it uses scripting languages to instruct the tool how to interact with your application. As such careful consideration needs to be paid to

  • Exception handling for bugs that occur during testing cycles(i.e, unexpected error messages during a test run).
  • How the tool synchronizes with your application(e.g. if there are slow response times from your environment)
  • The level of maintenance required to keep the tests up to date with changes in the application GUI(i.e, new buttons, data fields, custom controls etc)

Any test automation framework is a set of assumptions, concepts and tools that provide support for automating the major activities in the testing process. The main advantage of a framework is

  • Increased Productivity
  • Easy and Reduced maintenance effort
  • Consistent automation development across projects
  • Process driven than person driven approach
  • Controlled maintenance of automation artifacts

There is a range of automation testing tools available. Some of them are licensed and few others are open sourced. QTP, Cucumber, Capybara and other tools<ref>http://en.wikipedia.org/wiki/List_of_web_testing_tools</ref>

Description

HP UFT is generally used for GUI based Test Case Automation, it can also automate some non-GUI based test cases like database testing, webservice testing and file based operations. It offers a graphical user interface, keyboard support, multiple testing views, and scripting language. <ref>http://www.softwaretestinghelp.com/qtp-quicktest-professional-tutorial-1/</ref>

Data Driven Testing

HP Unified Functional Testing allows us to perform data-driven testing. For example, data can be output to a data table for reuse. Data-driven testing is implemented as a Microsoft Excel workbook, which is accessible from HP Unified Functional Testing. HP Unified Functional Testing has two data tables: the Global data sheet and Action (local) data sheets. The test steps can read data from these data tables in order to drive variable data into the application under test, and verify the expected result.<ref>http://www.qtp10.com/2009/07/using-global-and-action-data-sheets-in.html</ref>

Views

HP Unified Functional Testing provides two views—and ways to modify—a test script: Keyword View and Expert View. These views enable HP Unified Functional Testing to act as an Integrated Development Environment (IDE) for the test, and HP Unified Functional Testing includes many standard IDE features, such as breakpoints to pause a test at predetermined places.<ref>http://en.wikipedia.org/wiki/HP_QuickTest_Professional</ref>

Keyword view

Keyword View lets users create and view the steps of a test in a modular, table format. In Keyword View, users can also view properties for items such as checkpoints, output values, and actions, use conditional and loop statements, and insert breakpoints to assist in debugging a test.<ref>http://www.qtp10.com/2009/07/working-with-keyword-view-in-hp-qtp.html</ref>

Expert View

Expert view displays test code using VBScript. Designed for more advanced users, users can edit all test actions except for the root Global action, and changes are synchronized with the Keyword View.<ref>http://www.fdscallcentre.com/homepage/data/mi/DS-0413-020_QTPro6.0.pdf</ref>

Scripting

HP UFT's VBScript allows for classes, but not other object oriented properties such as inheritance and polymorphism. It also lacks a debugger, however UFT has a debugger provided by HP. Some Windows script (WScript,WSH,WMI) & VB.Net code can be used in a script in the expert view <ref>https://h20546.www2.hp.com/main/training/course_details.cfm?Course=00008165&sitepick=US</ref>

Types of testing

UFT typically supports following types of testing:

1. Regression testing

2. Unit testing

3. Load testing

4. Integration testing

5. Functional testing

6. Regression testing

7. Acceptance testing

8. Performance testing

9. Stress testing

Further reading on testing types

Example

QTP script for opening a Notepad file<ref>http://kuldeepse.wordpress.com/2007/11/11/qtp-script-for-sending-a-mail-using-outlook/</ref>.

invokeapplication”c:/whatever the path”
Run 
Dim a
Set a = WScript.CreateObject (“WSCript.shell”)
a.run “notepad.exe”

Dim oShell
Set oShell = CreateObject (“WSCript.shell”)
oShell.run “cmd/notepad.exe”
Set oShell = Nothing

DsystemUtil.Run “Notepad.exe”

Exception handling

Application crashes, Unexpected events and errors during a run session can interrupt the run session and mislead results. This is a problem particularly when tests run unattended—the test pauses until one performs the operation needed to recover. To handle these situations, Exception Handling and Error handling is must while developing script or Automation Framework.<ref>http://qtpautomationcodes.blogspot.com/2013/05/error-handling-in-qtp.html</ref> Error and Exception handling in HP UFT can be done by any of the following ways:

Life Cycle

A typical life cycle of HP UFT looks like this.

Comparison to other tools

Tools like Cucumber and Capybara run tests from the viewpoint of the user. Cucumber translates user stories into tests and Capybara simulates a user or web browser. Unified Functional Testing is used by programmers to preform specific test cases they code themselves.<ref>Engineering Long-Lasting Software: An Agile Approach Using SaaS and Cloud Computing, Beta Edition 0.9.0 by Armando Fox and David Patterson, August 23, 2012, p136, </ref>

Capybara talks to a website, just like a human would do (example: visit a url, click on the specific area of the sceen, input data and submit the form). It imitates user flow over website. Test cases in Capybara will look like this:<ref>http://stackoverflow.com/questions/15004918/cucumber-vs-capybara</ref>

describe "the signup process", :type => :feature do
  before :each do
    User.make(:email => 'user@example.com', :password => 'caplin')
  end
  it "signs me in" do
    visit '/sessions/new'
    within("#session") do
      fill_in 'Login', :with => 'user@example.com'
      fill_in 'Password', :with => 'password'
    end
    click_link 'Sign in'
    page.should have_content 'Success'
  end
end

Cucumber tests are very much human readable. Example:<ref>http://stackoverflow.com/questions/15004918/cucumber-vs-capybara</ref>

Scenario: Signup process
Given a user exists with email "user@example.com" and password "caplin"
When I try to login with "user@example.com" and "caplin"
Then I should be logged in successfully

Selenium is a tool for automating web applications for testing purposes.

Comparison of UFT with other tools<ref>http://www.aspiresys.com/WhitePapers/QTPvsSelenium.pdf</ref><ref>http://www.qtphelp.com/2011/06/advantages-and-disadvantages-of-qtp.html</ref>

Feature UFT Selenium Cucumber/ Capybara
Windows (Non-browser)

based Application support

Yes No No
Environment Support Only Windows Windows , Linux , Solaris

OS X , Others

Windows , Linux , Solaris

OS X , Others

Windows (Non-browser)

based Application support

Yes No No
Software Cost License & Annual maintenance Fees Zero Zero
Coding Experience of

Engineer

Not Much Should be very good along with

technical capabilities of integrating different pieces of framework

Requires minimal use of Ruby programming
Script written in VBScript Java, Ruby, Python, C#, and PHP Ruby
Script Creation Time Low High Medium
Multiple threads/instances Not supported Supported, we can run multiple instances of the

application on different browsers at the same time

Supported, we can run multiple instances of the

application on different browsers at the same time

Hardware resource (CPU

+ RAM) consumption during script execution

High Low Low
Product Support Dedicate HP support along with

support forums

Open Source Community Open Source Community
Framework Easily integrated with HP Quality Center or HP ALM Selenium + Eclipse + Maven / ANT

+Jenkins / Hudson & its plugins / Cruise Control + TestNG + SVN

Ruby on Rails

Merb

Sinatra

Continuous Integration Possible through Quality Center

/ ALM or Jenkins

Possible through Jenkins / Hudson

/ Cruise Control

Possible through Rake, Ant, Maven and JUnit output

Advantages

1. Support for different addins like Java, Oracle, SAP, .NET, Web Forms, Siebel, PeopleSoft, Web services, Main frame (Terminal Emulator) etc.

2. UFT comes with an inbuilt IDE

3. UFT can be integrated with Test management tools like QC (Quality Center)

4. Easy to maintain test iterations and data driving the tests through configurations

5. Record and Playback: It is pretty easy even for a non-programmer to record scripts / test cases, customize / modify and play back the tests

Disadvantages

UFT popularity is slowly shrinking.<ref>http://www.quora.com/Is-there-demand-for-QTP</ref> It is being used more for legacy applications.

People are moving away from UFT because of it's reactive approach of writing test automation. Testers write the scripts. With cucumber, capybara and selenium, automation test are joint effort between developers and the testers. The testers write the test cases in cucumber scenario format, then the developers write the steps definition. This way, everyone is contributing and everyone is reviewing the test cases.<ref>http://qastuffs.blogspot.com/2010_12_01_archive.html</ref>

References

<references/>