-------------------------------------------------------------------------------------------------------------
'Batch Testing using AOM Script
Dim objQTP
Set objQTP = CreateObject("QuickTest.Application")
objQTP.Visible = True 'To View the Operations
objQTP.Launch 'To Launch QTP application / Tool
objQTP.Open "C:\Documents and Settings\Administrator\Desktop\Tests\Login"
objQTP.Test.Run 'To Run the Test
objQTP.Test.Close 'To close Test
objQTP.Open "C:\Documents and Settings\Administrator\Desktop\Tests\OpenOrder"
objQTP.Test.Run 'To Run the Test
objQTP.Test.Close 'To close Test
objQTP.Open "C:\Documents and Settings\Administrator\Desktop\Tests\FaxOrder"
objQTP.Test.Run 'To Run the Test
objQTP.Test.Close 'To close Test
objQTP.Quit 'To Close the QTP Tool
Set objQTP = Nothing
--------------------------------------------------------------
'Batch Testing using AOM script, by fetching Test Paths from a Text file
Dim objFso, objTextstream, objQTP, TestPath
Set objFso = CreateObject("Scripting.FileSystemObject")
Set objTextstream = objFso.OpenTextFile ("C:\Documents and Settings\Administrator\Desktop\Testpaths.txt")
Set objQTP = CreateObject("QuickTest.Application")
objQTP.Visible = True
objQTP.Launch
Do Until objTextstream.AtEndOfStream
TestPath=objTextstream.ReadLine
objQTP.Open TestPath
objQTP.Test.Run
objQTP.Test.Close
Loop
objTextstream.Close
Set objTextstream = Nothing
Set objFso= Nothing
objQTP.Quit
Set objQTP = Nothing
'Batch Testing using AOM Script
Dim objQTP
Set objQTP = CreateObject("QuickTest.Application")
objQTP.Visible = True 'To View the Operations
objQTP.Launch 'To Launch QTP application / Tool
objQTP.Open "C:\Documents and Settings\Administrator\Desktop\Tests\Login"
objQTP.Test.Run 'To Run the Test
objQTP.Test.Close 'To close Test
objQTP.Open "C:\Documents and Settings\Administrator\Desktop\Tests\OpenOrder"
objQTP.Test.Run 'To Run the Test
objQTP.Test.Close 'To close Test
objQTP.Open "C:\Documents and Settings\Administrator\Desktop\Tests\FaxOrder"
objQTP.Test.Run 'To Run the Test
objQTP.Test.Close 'To close Test
objQTP.Quit 'To Close the QTP Tool
Set objQTP = Nothing
--------------------------------------------------------------
'Batch Testing using AOM script, by fetching Test Paths from a Text file
Dim objFso, objTextstream, objQTP, TestPath
Set objFso = CreateObject("Scripting.FileSystemObject")
Set objTextstream = objFso.OpenTextFile ("C:\Documents and Settings\Administrator\Desktop\Testpaths.txt")
Set objQTP = CreateObject("QuickTest.Application")
objQTP.Visible = True
objQTP.Launch
Do Until objTextstream.AtEndOfStream
TestPath=objTextstream.ReadLine
objQTP.Open TestPath
objQTP.Test.Run
objQTP.Test.Close
Loop
objTextstream.Close
Set objTextstream = Nothing
Set objFso= Nothing
objQTP.Quit
Set objQTP = Nothing
No comments
Post a Comment