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

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
Line 155: Line 155:
!Framework
!Framework
|Easily integrated with HP Quality  
|Easily integrated with HP Quality  
Center or HP ALM
Center or [http://en.wikipedia.org/wiki/HP_Application_Lifecycle_Management HP ALM]
|Selenium + Eclipse + Maven / ANT  
|Selenium + Eclipse + Maven / ANT  
+ Jenkins / Hudson & its plugins /  
+ Jenkins / Hudson & its plugins /  

Revision as of 01:45, 16 September 2014

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 functional testing and 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 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, 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

  • 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

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. <ref>http://www.softwaretestinghelp.com/qtp-quicktest-professional-tutorial-1/</ref>

Data Driven Testing

HP Unified Functional Testing supports data-driven testing. For example, data can be output to a data table for reuse elsewhere. 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>

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>

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> Error and Exception handling in HP UFT can be done by the following ways:

  • Conditional Statement
  • On Error statement
  • Recovery Scenarios

Life Cycle

Comparison to other tools

Tools such as Cucumber and 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>

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>

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 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>

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>

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 Creation Time Low High Medium
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

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.

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>

References

<references/>