Wednesday, January 23, 2013

Running Test Cases in QC using QTP

Sometimes it might be required to match the data provided say in an excel with Test case name as in QC while running Automated Test Cases using QTP.Then QTP allows user to create QTP object inside QTP and killing of QTP object or deallocation of QTP object will not affect currently opened QTP.

Function tc_check(TCName)
Set oQTP=createobject("quicktest.application")
QC_Loc=oQTP.Test.Location
bStatus=instr(1,lCase(QC_Loc),trim(lcase(TCName) ) )
if bStatus>0 then
msgbox "matching TC found"
else
msgbox "TC does not match"
end if
oQTP=nothing
End Function

1 comment:

  1. Nice post. We are providing Best QTP & QC Online Training.for more Visit QTP&QC Online Training

    ReplyDelete