Blog to understand automation concepts in QTP, Selenium Webdriver and Manual Testing concepts

Showing posts with label Automation Mindmaps. Show all posts
Showing posts with label Automation Mindmaps. Show all posts

WebTables in UFT - 10 Key points

1. WebTable or html grid are integral part of html pages and a lot of application data is organised in WebTables. QTP provides different methods to interact with the webtable in the web application. In this remaining article, we will discuss key points to interact with the webtables. 
Below image shows how a webTable is divided into column and rows and data can be extracted from cell in the web table.


2. Verify if the table exist in the application
istbleExist=Browser("qaaqtp").Page("title:=.*").WebTable("name:= DataTable").exist

3. In case the table exist in the Page, we can get the count of rows and columns in the application as shown below:

iRowCnt=Browser("qaautmationqtp").Page("title:=.*").WebTable("name:= DataTable").RowCount
'' for each of the  row, get the column count for each row
For rownum=1 to iRowCnt
 iColCnt=Browser("qaautmationqtp").Page("title:=.*").WebTable("name:=DataTable").ColumnCount(rownum) 
 MsgBox iColCnt
Next

4. Now we know the number of rows and columns in the table, we can extract cell information using the code below:
CellData= Browser("qaautmationqtp").Page("title:=.*").WebTable("name:=DataTable").GetCellData(rownum,colcnt)

5. We can perform action on object of specific type in a cell in the webTable based on the cell
ibtnCnt=Browser("qaautmationqtp").Page("title:=.*").WebTable("name:=DataTable")
.ChildItemCount(4,3,"WebButton")
This will get the number of child items in a particular cell of particular type.

6. This will click on the 2nd  webbutton in row 4 and column 3 of the webtable.
Browser("qaautmationqtp").Page("title:=.*").WebTable("name:=DataTable").ChildItem(4,3,"WebButton",1).click

7. Using HTML DOM also, we can get count of objects in a webtable
ielemCnt = Browser("Google").Page("title:=.*").WebTable("name:=DataTable").object.getElementsbyTagName(strTagName).length

8. We can get row count of element based on the cell text as below:
irownum = object.GetRowWithCellText ("text to search",columnnum, startfromrownum)

9. We can work with webtable together with dynamic descriptive programming as shown below:
Set objDesc = Description.Create
objDesc("micclass").value = "WebElement"
objDesc("html tag").value = "TD"
Set childobjdesc=Browser("Google").Page("title:=.*").WebTable("name:=DataTable")ChildObjects(objDesc)

10. Using ChildItemCount and childItem, we can extract information from webTable as shown below:

Public Function findObjectinWebTable(strobjType,iRow,iCol)
 ''get child count of specific object type
 oChildCnt=Browser("qaautmationqtp").Page("title:=.*").WebTable("name:=DataTable").ChildItemCount(iRow,iCol,strobjType)
 If oChildCnt >0
  ''Perform action based on object type
  Set ChldItem = Browser("qaautmationqtp").Page("title:=.*").WebTable("name:=DataTable").ChildItem(iRow,iCol,strobjType,0)
 If (strobjType = "Link" or strobjType ="WebEdit") Then
  ChldItm.Click
  ElseIf(stobjType = "WebCheckBox") Then
  ChldItm.Set "ON"
 End If
End Function

Mind Maps: Add-ins in Unified functional testing

Mind Maps: Add-ins in Unified functional testing

In this article mindmap for Add-ins in UFT is explained:


1. Web Add-in Extensibility extends Web  Add-in to customize how UFT recognizes  and interacts with different types of controls

2. We can add or remove add-ins associated  with test in UFT

3. UFT license enables the use of all UFT add-ins.

4. Add-ins in UFT are broadly classified as web  based and windows based application support

5. UFT add-ins help you to create and run tests  and business components on applications  in a variety of development environments.

6. We can define run and record setting for each  of the environment once the add-in is loaded

Mindmap explaining automation framework

In this mind map, we will discuss on automation framework in QTP explaining:


What is automation framework, what are different types of framework, what are key features of an automation framework and expectations from an automation framework:


Mindmap explaining automation framework

Content in the mindmap:
Automation  Framework in QTP
1. Set of Guidelines
1.1 Coding standards
1.2 Structure of test Data
1.3 Folder structure
1.3.1 Test Scripts
1.3.2 Test Libraries
1.3.3 Test Data
1.3.4 Test results
1.4 Object Repositories


2. Decisions
2.1 Decide automation framework to be used
2.2 Decide object Identification technique
2.3 Decide on set of automation guidelines

3. Framework Types
3.1 Linear
3.1.1 Script created by recording on AUT
3.1.2 Script creation is simple, fast and require minimal knowledge
3.1.3 No reusability of code and  high maintenance cost
3.2 Functional Decomposition
3.2.1 Divide test into logical groups or functions
3.2.2 Reusability of code is better
3.2.3 Scripts cannot be run with multiple set of data
3.3 Data Driven
3.3.1   Test data stored in external files drives automation by executing scripts with multiple sets of data
3.3.2 Covers multiple scenario with same script and change in data does not require change in scripts
3.3.3 Additional effort of creating test data and good knowledge of tool for resource
3.4 Keyword Driven
3.4.1 Object, action and arguments are maintained in an excel sheet in form of keywords
3.4.2 Highly reusable code can be used across applications. Once framework is created, easy to create test scripts.
3.4.3 Initial investment in creating framework is high and understanding framework for new user is comparably difficult
3.5 BPT Framework
3.5.1 BPT Components linked together to create test script using Quality center.
3.5.2 Easier for business users to create scripts
3.5.3 License cost of BPT and dependency on QC
3.6 Hybrid Framework
3.6.1 Uses best features of various frameworks
3.6.2 Highly robust and maintainable if properly implemented
3.6.3 Require skilled automation experts.


4. Great Expectations
4.1 Framework should Support Versioning Controlling for files
4.2 should be executed in different environments
4.3 minimal change in script for object changes
4.4 Robust and easy to interpret reporting system
4.5 Should have strong error handling and recovery scenarios

MindMap: Testing Process in QTP

In this article, we will discuss the mindmap for testing process in QTP (the same approach can be used with other tools also).Below are the steps in the testing process for QTP to be followed:
  • Analyse the application under test
  • Perform a proof of concept for understanding automation feasibility.
  • Design the automation test strategy and automation framework
  • Create test scripts and integrate with external tools like quality center or ALM.
  • Execute test scripts.
  • Define strategy for support and maintenance of automation suite.

Testing process in QTP/ UFT
MindMap explaining testing process in QTP

MindMap for Automation testing

This mind map illustrates the basic information about automation testing. Following information is mapped in the below mind map:

  • What is automation testing
  • What are the different phases in automation process.
  • What are different types of frameworks.
  • What are different automation tools.
  • What are the advantage of Automation testing

Automation testing mindmap