Monday, 11 August 2014

How to Re-Run Test in ALM on failure?

Incase we start our search for any issue on ALM; it is really arduous to find something relevant and meaningful. Furthermore there is a scarcity of website addressing ALM issues or help. So we thought of sharing an article pertaining to "Re-Run of Test case in Test set in ALM in case of failure".

Test Case (say TC2), fails when we ran from ALM for the first time, how we can control the execution flow , whether we want to rerun the test , test set or stop the execution?

Execution flow: - 
TC1->TC2->TC3 but TC2 is failing on first attempt and we want to re-run it to complete the execution flow.

Solution: - 
We can control the Rerun behaviour from “Automation Tab” in ALM.

Finding "Automation Tab": - 
In ALM, Testing->Test Lab->Select the Test Set ->Automation Tab

Approach 1:- 
We can check the Rerun test option and set the “Maximum test reruns”.
Maximum test reruns: - Specifies the number of times an automated test should be rerun upon failure.
Cleanup test before rerun:-Runs a cleanup test before each test rerun.
Automation Tab in ALM
Automation Tab
What can be done in ALM  on final failure of test.? We can select the option from “On final failure”. Like "Stop the test set"

Note: - We can also configure the email settings (Execution Summary) which ALM will send after the run, we can also change it as per our need like whether to send email on failure or pass. (Notification)
Email Notification box
Email Notification in ALM
Also “Settings per test”, Opens the On Test Failure dialog box, enabling you to change the default failure rules for a test in the test set
Test Failure Box
Test Failure window

Sunday, 10 August 2014

ActiveX component can't create object: 'Mercury.ObjectRepositoryUtil’

Recently we got this error while running our .vbs file, external to UFT. 
It is a common error that one can encounter while working with .VBS files.
Let us focus on the possible solution for the same.

Please feel free to share your experience on the same.As always their are 100 of solutions for a problem, and you never know that you are holding the best solution :)

Machine Details :- 64 Bit

Problem :- Microsoft VBScript runtime error (800A01AD)

ActiveX Errror
ActiveX Error Message
Solution :-

1.Get the path of Your .vbs file having the “ObjectRepositoryUtil” code
2.Open CMD prompt
3.Copy paste the following code of line,
4. Add the File path to this, so our code of line will be
%SystemRoot%\SysWow64\cscript “File Path of .vbs”
5.Press Enter and we are done.Our script executes with following messages 

Command Prompt
Command Prompt

Thursday, 7 August 2014

How to convert Object Repository into XML format?

We will be focusing on 2 methodologies to achieve our target.

Approach 1:- 
Using "ObjectRepositoryUtil Object"

ObjectRepositoryUtil(ORU):-By using this object we can work with object Repository files (Local/Shared) from outside of UFT.

We need to use “ExportToXML” method of ORU object.

ExportToXML Method

'Creating the ObjectRepositoryUtil to work with OR
Set objORU = CreateObject("Mercury.ObjectRepositoryUtil")
'Exporting the OR into new XML file
'Destroying the object
Set objORU = Nothing

Incase TargetFile, already exists UFT will give an error.

Approach 2:-
Using Object Repository manager
1.Open Object Repository manager
   Resources ->Object Repository Manager

Object Repository Manager
Object Repository Manager
2.Open the OR
 File ->open

3.Export to XML format
  File ->Export to XML

Export to XML
Export to XML

After Export we will get the information regarding the objects Exported from OR
XML export
Export Result
ActiveX Component Error

Wednesday, 6 August 2014

How to change Settings of Remote Agent ?

After launching the Remote Agent successfully. we can play with the settings of Remote Agent in UFT.

Approach 1:-

The Remote Agent’s icon will appear as a Taskbar Button(Check the far bottom right of the taskbar). Right click on remote agent button and select “Settings” from the context menu.
Settings Remote Agent
Remote Agent Button on Task Bar

Remote Settings Dialogbox
Remote Agent Dialog Box

Approach 2:-

Go to run (use Windows + R shortcut key)
Open remote agent setting file, “mic.ini”.
Search RemoteAgent File in UFT
Searching Remote Agent file through Run

Look for below segment to change the settings.


Operation wait interval is by default is set to 45 minutes(2700 sec = 2700000 microseconds), we can change it as per our requirement.

Change RunQTPHidden=0 to RunQTPHidden=1 if you don’t want to run UFT in Hidden mode when running tests from ALM.

Working with Remote Agent in UFT

Let us comprehend the role and settings of a “Remote Agent” in UFT/QTP.

It is an inbuilt tool inside HPUFT, which comes into picture when we run a test from ALM.

UFT Remote Agent opens on the UFT computer where the test runs.

The UFT Remote Agent determines how UFT behaves when a test is run by a remote application such as ALM.

Automatic: - It will be automatically triggered on the machine (UFT Machine) where we are running our tests from ALM/QC.

Manual: -
1. Look for the Unified Functional Testing (installation) folder ->bin->AQTRmtAgent.exe. Launch this .exe file.


2.Invoke the Remote Agent by following the path, Start > All Programs > HP Software > HP Unified Functional Testing > Tools > Remote Agent

Launching RemoteAgent in UFT

Settings in Remote Agent