Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Saturday, 15 October 2016

UFT Panes


UFT’s user interface has witnessed a lot of change in the past few years. If you are someone who is migrating from QTP 11 or earlier versions you will find that not only has HPE added extra panes, they have replaced the panes found in earlier versions with the new ones.
Here is the list of all panes available in UFT. We will go through each of them one-by-one.

Solution Explorer Pane

Before we talk about Solution Explorer Pane, we need to first understand Solution

What is a Solution in UFT?

Solution is a collection of testing documents. The testing documents can be function libraries, actions, object repositories. Solution in UFT provides you a way to view, edit and manage all your testing assets (GUI based or API based) from a single location. Solutions are stored in your file system in a HP proprietary format .ftsln
In layman terms, Solution can be thought of as a binder where you can ‘bind’ or ‘keep’ all your testing assets together for an easy access. When you create a new Test in UFT, a Solution Untitled is created automatically along with it. You can rename the Solution by right clicking on it > Save As…solution-untitled
Alternatively, you can create a New Solution by going to File > New > New Solution…. New Solution in UFT

What is Solution Explorer Pane in UFT?

Solution Explorer Pane can be used to view and manage the Solution(s). Solution Explorer Pane comes up on the left hand side inside the UFT IDE as soon as you launch UFT.UFT Solutions Explorer

ToolBox Pane

The Toolbox Pane displays the test objects/library functions/local functions available to the action that is currently in focus. It enables you to view and drag and drop these objects/functions into your action or component. Available Keywords pane in QTP 11 was renamed to ToolBoxin UFT 11.5. UFT toolbox

Document Pane

This is the main design area in the center of UFT IDE. All documents opened in the document pane are displayed as separate tabs. The complete area inside the red border in the image below isDocument Pane.document-canvas-pane

Canvas Pane

Canvas Pane provides a pictorial representation of GUI or API test flow. As can be seen in the image above – bordered blue – Canvas Pane opens as a tab inside the Document Pane. You can right click on the individual actions in the flow and access various settings related to that action.
Performance Tip: As far as possible, try to work on UFT with Canvas Paneclosed. It can improve UFT performance.

Keyword View and Editor

An action in UFT can be designed and viewed in two ways; Keyword View and Editor.
Keyword View enables you to view the action steps in a tabular excel-sheet-like format. Editoris much more powerful and allows you to create/edit scripts , write logical statements in a more natural fashion. Almost all UFT engineers create and design their scripts in UFT Editor.
Since time immemorial (in QTP 11 and earlier versions), the toggling between Keyword view and Expert View (editor) was available through a tabbed interface in IDE.Keywordview & Expertview toggling in QTP 11 and earlier versions
With UFT 11.5 and above versions, this toggling is now available through the tool bar at the top. (as shown in animation below)Toggle between Keyword view and editor in UFT

Output Pane

Output Pane displays info that is set to be output from a given test. Output Pane is available below the Document Pane.uft-output-pane
  • Shows you the output sent using Print utility statement.
  • Shows missing resources during a run session. As an example, if you are trying to load a function library during the run-time and for any reason, function library fails to load, Output Pane will show you the relevant details.

Active Screen Pane

When you record a test, UFT takes a screenshot of each-and-every screen it encounters during recording. These screenshots are saved with your tests and are known as Active Screen in UFT.
uft-active-screen
Active Screen Pane can be seen below the Document Pane and it is available as the 2nd tab after the Output Pane tab.

Data Pane

Data Pane consists of data sheets where you can parameterize your tests. Normally this would be the first method you will learn on how to parameterize tests in UFT. Data Pane is available as the 3rd tab, just after the Active Screen tab.
In simple words, parameterization in UFT is a way to make any test value variable. For example: username can assume several values – like mercury, merc, john – which can be fed through the data sheet.
 uft-data-pane

Debug Panes

Debug Pane allows you to debug tests and functions libraries using debugging capabilities within UFT and VBScript. To use UFT debugger you should ensure that Microsoft Debugger is installed in your machine. Since July 2016, Microsoft has removed MS Debugger from their servers. Until it comes back, follow this article on how to download and install MS debugger
Debug pane is not actually a single pane rather it is a collection of sub-panes which can be activated by going to View -> Debug   debug-panes-uft
  • Breakpoints Pane: Shows all the breakpoints in the editor.
  • Call Stack Pane: Shows detail about the methods and functions on the call stack. Test is in paused mode during this time.
  • Local Variables Pane: It displays the values of variables and their types in the current action/function library.
  • Console Pane: You can inject VB Script or C# code in the console to retrieve information from the application or change variable values during current run session.
  • Watch Pane: It displays the values of selected variables and their types in the current action/function library. The difference between Local Pane and Watch Pane is that while in local variables you view the value of ALL variables, in the watch pane you can view value of variables selected by you.

Properties Pane

Properties pane is available as a tag on the right side of IDE. It can also be accessed usingView -> Properties or a keyboard shortcut Ctrl + Alt + P.
uft-properties-pane
Properties pane can be used to:
  • view/modify properties of a test
  • make an action Reusable to Non-Reusable and vice versa
  • add input/output parameter to a test.

Bookmarks Pane

Bookmarks in UFT are like a marker which can be put on any statement in a given script.
Bookmarks Pane can be accessed using View > Bookmarks. All bookmarks are neatly stacked in the Bookmarks Pane. You can jump to any bookmark by clicking on the corresponding line in the Bookmarks Pane.bookmark-pane-uft
A bookmark can be inserted by opening the bookmarks pane and clicking ▢ while your mouse cursor is placed on the corresponding statement in Editor.

Errors Pane

error-pane-uftThe Errors Pane can be used to locate:
  • syntax errors
  • missing resources
  • missing references
  • missing property values
This pane can be accessed from View –> Errors or keyboard shortcut Ctrl+Alt+E.

Run Step Results Pane

The Run Step Results Pane displays the results of a single step performed using the Run Step command.

Tasks Pane

The Tasks Pane enables you to view and access TODO comments in actions and function libraries.uft-tasks-pane
TODO comments can be thought-of as reminders that can be inserted as comments adjacent or before the relevant steps in a testing document. For example, use TODO to remind yourself to complete or have a re-look at a specific piece of code or provide instructions to your team-mate.
You can insert TODO comments inside editor or a function library by beginning a statement with:
  • ‘To Do
  • ‘todo
  • ‘to-do
  • ‘TODO

Monday, 1 August 2016

Example VB Script Function using QTP


InStr Function:
'InStr([start,]string1,string2[,compare]) 
txt="indra"
s1=InStr(1,txt,"d")
msgbox s1
'Result s1=3

InStrRev Function:
'InStrRev(String, Substring, Start, Compare) 
val="ABCDE ABCDE"
res=InStrRev(val, "C")
msgbox res

Len Function:
s2=Len("indra")
msgbox s2

'StrReverse Function:
s2=StrReverse("indra")
msgbox s2

'StrComp Function:
s1=StrComp("indra""indra" )
msgbox s1
'If the strings are the same, the output is zero. If the strings are different, the output will be a 1 or -1 depending on the order of the strings


'Sqr Function:
val = 16
res = sqr(val)
msgbox res

'String Function:

'String(Number, Character)
'The Number argument must an integer and defines the number of times to repeat the character
res = String (10,"%")
msgbox res
'Output: %%%%%%%%%%


'Split Function :
'Split(Expression, Delimiter, Count, Compare)
Vendor_name="Aravind Engineering"
s = Split(Vendor_name)
s1= s(0)
msgbox s1

'Ucase Function
val="indra"
res=Ucase(val)
msgbox res

'Lcase Function

val="INDRA"
res=Lcase(val)
msgbox res

'Mid Function:
'Mid(String, Start, Length)
s= Mid("abcde fghij klmno pqrst uvwxyz"87)
msgbox s

'Left Function
s = Left("abcde fghij klmno pqrst uvwxyz"13)
msgbox s

'Right Function 
'Right(String, Length)
s = Right("abcde fghij klmno pqrst uvwxyz"13)
msgbox s


'FormatCurrency Function

'FormatCurrency(Expression, NumDigitsAfterDecimal, IncludeLeadingDigit, UseParensForNegativeNumbers, GroupDigit)
s= FormatCurrency(31567)
msgbox s


'FormatDateTime Function
s = FormatPercent(.77)
msgbox s


'Replace Function

'Replace(String, FindSubstring, ReplaceSubstring, Start, Count, Compare)

s = Replace("Indra is working in QTP""QTP""QC")
msgbox s

Sunday, 31 July 2016

Manual Testing with BPT approach in HP ALM

Every body knows BPT (Business Process Testing) can be done with HP UFT/QTP tool with HP ALM. But HP ALM tool has option to support Business Process Testing for manual testing as well. In fact it is quite easy and more structured compare to normal manual testing process in ALM.

Below are the steps how to proceed for that.


1.    Create Business Component in ALM under “Business Components” tab Steps:
  1. Choose “Business Components” tab 
  2. Select/Create a folder
  3. Click on “New Component” (Highlighted in below screenshot)
  4. On the new component window enter details and click on “OK” button
Now under “Manual Implementation” tab create test case steps to prepare manual test case.


Click on “New Step” from above screen(Highlighted). On clicking this it opens “Component Step Details” window From the “Component Step Details” window enter manual test case step details and Press OK button


2.    Calling Business Component in Test Plan to create Test Case Steps:
  1. Choose “Test Plan” tab 
  2. Select/Create a folder
  3. Click on “New Test” (Highlighted in below screenshot)


In the “New Test” window choose “Type” as “Business Process” option and enter rest of details and click on OK


From above created test click on “Select Components” button to select business components created above

From the components tab(right hand side) Select the required components and click on “Quick Add” button or drag and drop under “test script” pane


3.    Run the test case (manual business components) from Test Lab tab Steps
  1. Choose “Test Lab” tab
  2. Select/Create a folder
  3. Click on “New Test Set” (Highlighted in above screenshot)
In the “New Test Window” enter mandatory details and click on “OK” button to generate empty test set. Form the above created test set click on “Select Tests” button to select test case(business components test case) From the “Test Plan Tree” pull business process test case and make your business process test set ready


4.    Execute business process test set from Manual Runner

On “BPT Manual Runner” window click on “Begin Run” button to start manual BPT to run On Clicking “Begin Run” button it opens Business process test with manual test steps details Enter actual results and make pass/fail the test step and complete the test case execution


After completing the test case execution click on “end Run” and verify the test case status





SAP Automation tidbits

Below are tidbits used when you are automating SAP applications.


''' Generic function to verify success message displays in status bar

Public Function SAP_VerifySuccessMsg(objSAPWindowName)

On Error Resume Next
 Report_WriteStepHeader("<B> Verify Success Message in the statusbar </B>")
 SAPGuiSession("SAPSession").SAPGuiWindow(objSAPWindowName).SAPGuiStatusBar("StatusBar").Sync
 
 strSBarSuccessMsg = SAPGuiSession("SAPSession").SAPGuiWindow(objSAPWindowName).SAPGuiStatusBar("StatusBar").GetROProperty("text")

 intTransNum = Trim(Split(Split(strSBarSuccessMsg,"Transaction ")(1)," saved")(0))
 Print intTransNum
 On Error GoTo 0
 SAP_VerifySuccessMsg = intTransNum
End Function

''Making fields values empty:
SAPGuiSession("SAPGuiSession").SAPGuiWindow("Purchasing Documents").SelectMenuItemById "DELSCTX"

If SAPGuiSession("SAPGuiSession").SAPGuiWindow("Purchasing Documents").SAPGuiEdit("Purchasing document").Exist(intMinSyncTime) Then
  PODefaultValue=SAPGuiSession("SAPGuiSession").SAPGuiWindow("Purchasing Documents").SAPGuiEdit("Purchasing document").GetROProperty("value")

  If PODefaultValue<>"" Then
     SAPGuiSession("SAPGuiSession").SAPGuiWindow("Purchasing     Documents").SAPGuiEdit("Purchasing document").SetFocus
     SAPGuiSession("SAPGuiSession").SAPGuiWindow("Purchasing Documents").SAPGuiEdit("Purchasing document").SetCaretPos 0

     Set WScript = createobject("WScript.Shell")
     WScript.SendKeys "^"+"{A}"
     WScript.SendKeys "{DEL}"
     Set WShell = Nothing
  End If
End If

''''################### to make sure cell is editable in SAP table

BlockCellEditable1 = SAPGuiSession("SAPGuiSession").SAPGuiWindow("Change S/O SysB SDI 4"). SAPGuiTable("Dates").IsCellEditable(1"Block")
    If Trim(BlockCellEditable1)="True"  Then
      SAPGuiSession("SAPGuiSession").SAPGuiWindow("Change S/O SysB SDI  4"). SAPGuiTable("Dates").SetCellData 1,"Block",""
      SAPGuiSession("SAPGuiSession").SAPGuiWindow("Change S/O SysB SDI 4").
SAPGuiTable("Dates").SelectCell 1,"Block"
      SAPGuiSession("SAPGuiSession").SAPGuiWindow("Change S/O SysB SDI 4").SendKey ENTER
 
      If SAPGuiSession("SAPGuiSession").SAPGuiWindow("Information").Exist Then
       SAPGuiSession("SAPGuiSession").SAPGuiWindow("Information").SAPGuiButton("Continue   (Enter)").Click
      End If
    End If

'''############Changing reply mode type

Setting.WebPackage("ReplayType") = 2 'Mouse
Browser("KnowledgeInbox").Page("ReplayType").WebEdit("txtReplayType").Set "KnowledgeInbox"
Browser("KnowledgeInbox").Page("ReplayType").WebButton("Type and enable me").Click
Setting.WebPackage("ReplayType") = 1 'Events
'''############

Wednesday, 13 July 2016

SAP_FICO

SAP“Systems, Applications, and Products in Data Processing” – was founded in 1972 with its headquarters in Walldorf, Germany.

FICO -
SAP FICO Consists of two modules - SAP Finance(FI) and SAP Controlling(CO). Both of these modules are designed for specific functions. The SAP FI module deals with financial accounting and reporting. The CO module deals with monitoring costs and financial planning. The software aim's to assist companies to make the process of financial planning and analysis easier. all this helps in making better financial decisions.

SAP Financial Accounting (FI) is an important core module where in live-time, the financial processing transactions are all captured to provide the basis via which data is drawn for external reporting. 

SAP FI can be integrated with other SAP Logistics modules, Following are-
  1. Sales and Distribution (SD).
  2. Quality Management (QM)
  3. Production Planning (PP)
  4. Material Management (MM)
  5. Plant Maintenance (PM)
SAP FI: 
SAP FI can integrate different modules into a single system for the company. This software offers all the feature for handling financial transactions and accounts. The reports generated by SAP FICO are used widely by Banks, Tax authorities, managers and Stockholders. The software also generates financial statements. These include profit/loss statements and balance sheets.
 
SAP FI has the following sub modules that have specific functionalities-
  1. AA – Asset Accounting
  2. AP – Accounts Payable
  3. AR – Accounts Receivable
  4. BL – Bank Accounting
  5. FM – Funds Management
  6. GL – General Ledger Accounting
  7. LC – Legal Consolidations
  8. SL – Special Purpose Ledger
  9. TM – Travel Management
General Ledger - This is used to provide a complete report for internal/external accounting. It contains the company's transaction data and lists all the accounts. These can be recorded in sub-module in real time.

Accounts Receivable - These are records that are used to manage all customer accounting data. It is also used to manage customer accounts and transactions. These transactions include Invoice Payments, Down Payments, Invoice Posting and Customer reports.

Accounts Payable- These records have vendor accounting data. It also consists of data regarding vendor transactions and vendor accounts.

Asset Accounting - This sub module is used for managing the company's assets. This includes all fixed assets such as heavy equipment, land and buildings. The module also has asset transactions including sales, transfers , revaluations and asset acquisitions.

Bank Ledger - This contains all the bank account transaction data. It can merge all transaction data on bank statements. Then, it can compare the data with transactions stored in the system.

Consolidation - This sub module allows the company to combine all financial statements from multiple entities. It also provides a complete view of the firm's financial health.

Funds Management - It is used for managing the budgets for revenues and expenses.

Special Purpose Ledger - The defines the SAP FI ledger for financial reporting.

Travel Management - This manages all transactions regarding travel process. This will include booking trips and managing travel expenses.

Note - To implement SAP FI, It needs to be configured. The Business Manager has to make the primary configurations. These configurations are required to gather client needs, business requirements and other configurations. After this all financial statements and Master Data is migrated to SAP FI. This configuration process also requires currencies, fiscal year variants and chart of accounts.

SAP CO (Controlling) :

This module supports monitoring, controlling and optimization of business processes. It includes facilities for managing master data. This data covers cost centers, internal orders, cost elements and other areas. The main purpose of introducing this module is planning companies can compare their planned data and actual business data to analyze the variances.

We have different sub modules of SAP CO are given.

Cost Element - This module have an overview of the costs and revenues of the company. These are based on income statements. Cost elements accounting defines the cost origins and also represents different company costs. Most of these values are transferred from Financial Accounting to Controlling.

Cost Centers Accounting - This sub module is used for controlling activities. It deals with the expenses associated with the company's internal departments. These departments include marketing, Production, Sales and HR. The Cost Center includes only expenses and not revenues.

Profit Centers - It consists of all the cost data about the company's business lines. This module deals with expenses and revenues.

Internal Orders - The module is used for managing all expenses of smaller internal projects/ non fixed assets.

Profitability Analysis - Companies analyze their profit and losses using this sub-module. This is a vital process for decision-making. Measuring product profitability, pricing and evaluating target markets. This eases the process of profitability analysis for each region of business. Additionally customer profitability, distribution channels and product types can also be analyzed.

Product Costing - This module deals with all the costs related to the company's goods and services. This helps in optimizing business efficiency and manufacturing costs.


Q. What is the posting key?

A two digi numerical for controlling and determining the transaction type documented in the line item is referred to as a posting key. It helps determine the following:

1. Account types

2. Types of posting : debit and credit

3. Field status of a transaction

Q. State the most important organizational elements in SAP FI.

The important organizational elements in SAP FI are as follows: 

1. Functional Area 

2. Business Area 

3. Company Code

4. Chart of Account

Q. Company code

Company code is the entity under which you can create financial statements. Every company code under FICO has distinct financial statements, legal requirements and reporting structures. Before you can create financial statements for a company within the SAP system, you'd first register at least one company code.

Q. How many currencies can you configure for a Company Code

You can configure three currencies for a Company Code, including 

1.One local currency

2. Two parallel currencies

Q. What is the role of the Chart of Accounts in SAP FICO

The Chart of Accounts is used to meet the company's daily needs and the country's legal requirements. Its two types are as follows: 

  • Operating Chart of Accounts (COA): A record with all the general ledger accounts assigned to the company code. 
  • Country Chart of Accounts (COA): The list of general ledger accounts needed to meet the country's legal requirements.