UFT Automation Lesson 2
Framework is key to success, when start any work and to get success on that you should plan.
The same way framework is the base for any automation testing.
Framework is Structure – the set of rules function and prototype which you will use in your automation testing.
Why We need Framework?
If we will not use framework, then our scripts, tests and data will be in unstructured manner and maintenance of script and development of script will cost more.
So if we want to use reusability of function or script created and maintain them for longer time, we should use Framework.
What is Framework?
In detail framework is Structure of your test, scripts, libraries, data and functions, so easy to develop, maintain and reuse.
Developing a framework
In terms of Test Framework when an automation tester start developing framework below are the major activities need to be followed.
Prerequisite or activities which can be done before developing a framework.
- Basic/Intermediate understanding of application under test.
- Verify and validate the Manual scripts which is already written.
- Selection of tool’s and technology, based the available competencies.
- Do the feasibility analysis, which includes POC and estimation with small presentation to stake holders, based on that decision can be made.
- Do ROI calculation – with effort and time compare with manual execution.
Activities to develop framework.
- Design or plan the basic Folder Structure. To maintain Data, Results and Test Script.
- Can be used as HP ALM or other tools available.
- Test Scripts includes library files and Object repository.
- Library files have various function, which can be common utility or business function.
Will discuss more in detail about library, functions and repository in detail further in this tutorial.
- Selection of the Test cases and scenarios needs to be automated.
Automation Framework Type
In terms of UFT generally there are four type of framework.
- Data Driven
- BPT framework
- Hybrid framework.
Lesson 1 – UFT Automation
UFT is an Automation Tool developed by HP Software, to automate software Testing.
For more details, you can visit the HP Website.
Majorly UFT Test automation is used for Regression Testing by the software company.
But with new Features we can do the Business and Function Testing also.
UFT ALM Connection
ALM connection with UFT is very much essential when you are creating an Automation for very regress application and impact is high with your automation and also with a big test team.
- Safe code with Check Out option.
- Can be run from ALM, UFT expert is not required.
- Results will be stored on ALM so user can check any time.
- Can run multiple Test from different machine parallel.
UFT 12.5 options:
Creating New Test.
- GUI Test
- API Test
- Business Process Test
- Business Process Flow
Existing Test, Function or Solution
Creating New GUI Test.
- Record a test
- Create Functions and call functions in Test Action
- Create new Test
- Click on Record Button
Open Application and Run the manual steps.
Ex: for calculator
- Stop the record and Analyze the Code and Object repository(Local).
- Modify the Object names and their properties.
Use more appropriate name for the objects and more common identification properties.
Open application and use Highlight button to check the object.
Change the object name and properties accordingly.
The identification in Scripts get updated so that programmer or Automation tester, will know the object is used for what purpose.
In this way we can update the script and get the good code.
- Run – Run will run the test as standard mode.
- Maintenence Run Mode – in this mode user get the suggestion from UFT if there is any steps which is not working or objects are not identified, so that user can modify the steps or object at run time.
- Update Run Mode – If some object is changed and able to identified by QTP it automatically makes changes to script without asking user.
Automated testing will shorten development and test cycles, by avoiding repetitive tasks and improve software quality.
But to get success in that choosing right automation tool is very important.
There is much functional and nonfunctional automation testing tool available in market, some are commercial and some are open source.
We will talk about two tools which are majorly used by the testers or firms.
HP QTP and Selenium
Let us check the positive and negative points of both the tool.
First will discuss about HP QTP tool
- Primary language used is VB script and can be easily learn by user.
- Object repository is great feature.
- QTP can be integrated with HP ALM, so easily manageable.
- Product Support can be available.
- Reporting can be easy if it associated with ALM.
- Less coding experience
- Supporting windows based application.
- QTP is costly compare to other commercial tools and license cost depends on volume and the type of license. If any add-ins required then extra cost for that. And requires renewal.
- Upgrade required whenever the system or software upgrade done QTP version also have to be upgraded based on specific application.
- With respect to performance execution time is higher, whereas scripting time is less.
- Hardware resource utilization High
- Only supports windows environment.
Now we will discuss about Selenium.
- Primary Selenium supports many languages Like Java, C#, ruby, and python.
- It is an open source (no license cost) and also can support integration with Test NG, Maven and Ant for build and execution.
- Supports most of the browsers Like IE, Chrome, FF, Safari etc…
- User can create their own framework based on the needs.
- Hardware utilization is less
- Very good for Web automation
- Supports multiple Environment like Linux , Solaris OS X, Windows.
- Resource or user should be good in programming and also in framework as well as in reporting.
- There will not be any direct support and user has to find solution through forums or community online.
- More coding experience required
- Windows based application cannot be tested as only support web automation.