UFT Class 32 (Batch Testing/ Batch Execution)
----------------------------
Batch Testing:
 
Executing serial of Tests
> It is 1 of the advantages of Test Automation, In Manual Testing for each as well as every Test representative execution human user interaction is mandatory. If It is automation Test Tool tin execute serial of tests without user interaction.
They are 4 ways for batch testing inward UFT:
i) Using "Test Batch Runner" tool
ii) Using AOM(Automation Object Model) Script.
iii) Using Driver script inward Automation framework.
iv) Using QC/ALM tool
---------------------------------------------------
Steps of Batch Testing Using "Test Batch Runner" tool:
a) Create basic tests as well as run them once.
b) Launch "Test Batch Runner" Tool as well as exercise Test batches.
c) Provide permission to "Test Batch Runner" Tool to execute tests as well as components.
d) Run the Test Batch.
----------------------------
Note: "Test Batch Runner" Tool doesn't render batch wise Result.
Note 2: "Test Batch Runner" Tool tin execute entire Test batch or business office of the Test batch.
-----------------------------------
Navigation to Provide permission to "Test Batch Runner" Tool:
Tools bill of fare -> Options -> GUI Testing -> Test Runs ->
Select "Allow other HP products to Run tests as well as components -> OK
---------------------------------------
Test Batch execution process:
---------------------------
Test batch Runner tool launches UFT tool as well as provides instructions,
UFT exclusively executes Tests 1 past times 1 based on "Test batch Runner" instructions.
-------------------------------
ii) Using AOM(Automation Object Model) Script.
---------------------------------------
Automation Object model is a person object model.
Usage of VBScript:
i) Client side scripting inward the web
ii) Server side scripting inward the web
iii) Network Administration
iv) System Administration
v) Test Automation etc...
Global object models (ex: Filesystem object model, Excel object model as well as Database object models)
for all types of Scripting,
AOM (QTP Application object) is a Private object model, it is exclusively for
UFT Test Automation.
------------------------
QTP Application object is used to automate UFT tool operations.
Create QTP Application object:
Set Variable = CreateObject("QuickTest.Application")
----------------
Note: Don't run AOM scripts from UFT tool editor,
AOM is non UFT exam script, It is VBScript file.
> You tin exercise AOM script inward UFT tool editor for getting context help.
Otherwise opened upwards notepad, write the code as well as relieve every bit .vbs file
Example (Batch Testing using QTP Application Object):
Dim objQTP
'Create QTP Application Object, it is used to automate UFT tool operations
Set objQTP = CreateObject("QuickTest.Application")
objQTP.Visible = True 'To persuasion the UFT tool during execution.
objQTP.Launch 'To launch UFT Tool.
objQTP.Open "C:\Users\G C Reddy\Desktop\Tests\Login"
objQTP.Test.Run 'To run the Test
objQTP.Test.Close 'To unopen the Test
objQTP.Open "C:\Users\G C Reddy\Desktop\Tests\OpenOrder"
objQTP.Test.Run 'To run the Test
objQTP.Test.Close 'To unopen the Test
objQTP.Open "C:\Users\G C Reddy\Desktop\Tests\FaxOrder"
objQTP.Test.Run 'To run the Test
objQTP.Test.Close 'To unopen the Test
objQTP.Quit 'To unopen UFT Tool
Set objQTP = Nothing 'To free the memory.
----------------------------------------------
Batch Testing using AOM,
Read Test paths from a text file as well as execute using Loop statements.
Dim objFSO, objTextstream, objQTP, TestPath
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextstream = objFSO.OpenTextFile("C:\Users\G C Reddy\Desktop\testpaths.txt")
Set objQTP = CreateObject("QuickTest.Application")
objQTP.Launch
Do Until objTextstream.AtEndOfStream = True
TestPath= objTextstream.ReadLine
objQTP.Open TestPath
objQTP.Test.Run
objQTP.Test.Close
Loop
objQTP.Quit
objTextstream.Close
Set objTextstream = Nothing
Set objFSO = Nothing
----------------------------------------
Debugging Tests
What is Debugging?
Locating as well as Isolating Errors thru Step past times Step execution
Application Life Cycle
--------------------------
Development phase Testing phase Production phase
-----------------------------------------------------------------
Error Defect Failure
Mistake Bug
Fault
-----------------------------------------------------------
When Debugging Tests is required?
Debugging is optional inward UFT Test Automation,
Scenario 1:
Test is non showing whatever errors as well as providing right output - Not required.
Scenario 2:
Test is showing errors -Debugging is optional
Scenario 3:
Test is non showing whatever errors as well as Not providing right output - Debugging is required.
x = a * b
 
How to Debug Tests?
  Sumber http://www.gcreddy.com/
----------------------------
Batch Testing:
Executing serial of Tests
> It is 1 of the advantages of Test Automation, In Manual Testing for each as well as every Test representative execution human user interaction is mandatory. If It is automation Test Tool tin execute serial of tests without user interaction.
They are 4 ways for batch testing inward UFT:
i) Using "Test Batch Runner" tool
ii) Using AOM(Automation Object Model) Script.
iii) Using Driver script inward Automation framework.
iv) Using QC/ALM tool
---------------------------------------------------
Steps of Batch Testing Using "Test Batch Runner" tool:
a) Create basic tests as well as run them once.
b) Launch "Test Batch Runner" Tool as well as exercise Test batches.
c) Provide permission to "Test Batch Runner" Tool to execute tests as well as components.
d) Run the Test Batch.
----------------------------
Note: "Test Batch Runner" Tool doesn't render batch wise Result.
Note 2: "Test Batch Runner" Tool tin execute entire Test batch or business office of the Test batch.
-----------------------------------
Navigation to Provide permission to "Test Batch Runner" Tool:
Tools bill of fare -> Options -> GUI Testing -> Test Runs ->
Select "Allow other HP products to Run tests as well as components -> OK
---------------------------------------
Test Batch execution process:
---------------------------
Test batch Runner tool launches UFT tool as well as provides instructions,
UFT exclusively executes Tests 1 past times 1 based on "Test batch Runner" instructions.
-------------------------------
ii) Using AOM(Automation Object Model) Script.
---------------------------------------
Automation Object model is a person object model.
Usage of VBScript:
i) Client side scripting inward the web
ii) Server side scripting inward the web
iii) Network Administration
iv) System Administration
v) Test Automation etc...
Global object models (ex: Filesystem object model, Excel object model as well as Database object models)
for all types of Scripting,
AOM (QTP Application object) is a Private object model, it is exclusively for
UFT Test Automation.
------------------------
QTP Application object is used to automate UFT tool operations.
Create QTP Application object:
Set Variable = CreateObject("QuickTest.Application")
----------------
Note: Don't run AOM scripts from UFT tool editor,
AOM is non UFT exam script, It is VBScript file.
> You tin exercise AOM script inward UFT tool editor for getting context help.
Otherwise opened upwards notepad, write the code as well as relieve every bit .vbs file
Example (Batch Testing using QTP Application Object):
Dim objQTP
'Create QTP Application Object, it is used to automate UFT tool operations
Set objQTP = CreateObject("QuickTest.Application")
objQTP.Visible = True 'To persuasion the UFT tool during execution.
objQTP.Launch 'To launch UFT Tool.
objQTP.Open "C:\Users\G C Reddy\Desktop\Tests\Login"
objQTP.Test.Run 'To run the Test
objQTP.Test.Close 'To unopen the Test
objQTP.Open "C:\Users\G C Reddy\Desktop\Tests\OpenOrder"
objQTP.Test.Run 'To run the Test
objQTP.Test.Close 'To unopen the Test
objQTP.Open "C:\Users\G C Reddy\Desktop\Tests\FaxOrder"
objQTP.Test.Run 'To run the Test
objQTP.Test.Close 'To unopen the Test
objQTP.Quit 'To unopen UFT Tool
Set objQTP = Nothing 'To free the memory.
----------------------------------------------
Batch Testing using AOM,
Read Test paths from a text file as well as execute using Loop statements.
Dim objFSO, objTextstream, objQTP, TestPath
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextstream = objFSO.OpenTextFile("C:\Users\G C Reddy\Desktop\testpaths.txt")
Set objQTP = CreateObject("QuickTest.Application")
objQTP.Launch
Do Until objTextstream.AtEndOfStream = True
TestPath= objTextstream.ReadLine
objQTP.Open TestPath
objQTP.Test.Run
objQTP.Test.Close
Loop
objQTP.Quit
objTextstream.Close
Set objTextstream = Nothing
Set objFSO = Nothing
----------------------------------------
Debugging Tests
What is Debugging?
Locating as well as Isolating Errors thru Step past times Step execution
Application Life Cycle
--------------------------
Development phase Testing phase Production phase
-----------------------------------------------------------------
Error Defect Failure
Mistake Bug
Fault
-----------------------------------------------------------
When Debugging Tests is required?
Debugging is optional inward UFT Test Automation,
Scenario 1:
Test is non showing whatever errors as well as providing right output - Not required.
Scenario 2:
Test is showing errors -Debugging is optional
Scenario 3:
Test is non showing whatever errors as well as Not providing right output - Debugging is required.
x = a * b
How to Debug Tests?